Feature Request: Invoice vertical view
This commit is contained in:
parent
0a6804975f
commit
ef240b27d9
|
|
@ -1233,6 +1233,8 @@ abstract class InvoiceEntity extends Object
|
|||
|
||||
bool get isRecurring => [EntityType.recurringInvoice].contains(entityType);
|
||||
|
||||
bool get isLinkedToRecurring => (recurringId ?? '').isNotEmpty;
|
||||
|
||||
bool get hasExchangeRate => exchangeRate != 1 && exchangeRate != 0;
|
||||
|
||||
EmailTemplate get emailTemplate => isPurchaseOrder
|
||||
|
|
|
|||
|
|
@ -806,40 +806,51 @@ class InvoiceEditDesktopState extends State<InvoiceEditDesktop>
|
|||
children: [
|
||||
if (company.hasTaxes)
|
||||
Expanded(
|
||||
child: SwitchListTile(
|
||||
dense: true,
|
||||
activeColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary,
|
||||
title: Text(localization
|
||||
.inclusiveTaxes),
|
||||
value: invoice
|
||||
.usesInclusiveTaxes,
|
||||
onChanged: (value) {
|
||||
viewModel.onChanged(
|
||||
invoice.rebuild((b) => b
|
||||
..usesInclusiveTaxes =
|
||||
value));
|
||||
},
|
||||
child: Tooltip(
|
||||
message: localization
|
||||
.inclusiveTaxes,
|
||||
child: SwitchListTile(
|
||||
dense: true,
|
||||
activeColor:
|
||||
Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary,
|
||||
title: Text(localization
|
||||
.inclusiveTaxes),
|
||||
value: invoice
|
||||
.usesInclusiveTaxes,
|
||||
onChanged: (value) {
|
||||
viewModel.onChanged(invoice
|
||||
.rebuild((b) => b
|
||||
..usesInclusiveTaxes =
|
||||
value));
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
if (invoice.isInvoice)
|
||||
if (invoice.isInvoice &&
|
||||
invoice.isLinkedToRecurring)
|
||||
Expanded(
|
||||
child: SwitchListTile(
|
||||
dense: true,
|
||||
activeColor: Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary,
|
||||
title: Text(localization
|
||||
.autoBillEnabled),
|
||||
value:
|
||||
invoice.autoBillEnabled,
|
||||
onChanged: (value) {
|
||||
viewModel.onChanged(
|
||||
invoice.rebuild((b) => b
|
||||
..autoBillEnabled =
|
||||
value));
|
||||
},
|
||||
child: Tooltip(
|
||||
message: localization
|
||||
.autoBillEnabled,
|
||||
child: SwitchListTile(
|
||||
dense: true,
|
||||
activeColor:
|
||||
Theme.of(context)
|
||||
.colorScheme
|
||||
.secondary,
|
||||
title: Text(localization
|
||||
.autoBillEnabled),
|
||||
value:
|
||||
invoice.autoBillEnabled,
|
||||
onChanged: (value) {
|
||||
viewModel.onChanged(invoice
|
||||
.rebuild((b) => b
|
||||
..autoBillEnabled =
|
||||
value));
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue