Improve auto-taxes
This commit is contained in:
parent
ceeba71cdd
commit
de58c3f80d
|
|
@ -287,23 +287,24 @@ class ClientEditDetailsState extends State<ClientEditDetails> {
|
|||
value: client.customValue4,
|
||||
onSavePressed: _onSavePressed,
|
||||
),
|
||||
if (state.company.settings.enableEInvoice == true) ...[
|
||||
if (state.company.settings.enableEInvoice == true)
|
||||
DecoratedFormField(
|
||||
label: localization.routingId,
|
||||
controller: _routingIdController,
|
||||
keyboardType: TextInputType.text,
|
||||
onSavePressed: _onSavePressed,
|
||||
),
|
||||
if (state.company.calculateTaxes) ...[
|
||||
SizedBox(height: 20),
|
||||
SwitchListTile(
|
||||
title: Text(localization.taxExempt),
|
||||
title: Text(localization.isTaxExempt),
|
||||
value: client.isTaxExempt,
|
||||
onChanged: (value) {
|
||||
viewModel
|
||||
.onChanged(client.rebuild((b) => b..isTaxExempt = value));
|
||||
},
|
||||
)
|
||||
]
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -154,15 +154,6 @@ class ClientEditSettingsState extends State<ClientEditSettings> {
|
|||
numDays == null ? null : '$numDays'));
|
||||
},
|
||||
),
|
||||
if (company.isModuleEnabled(EntityType.task))
|
||||
DecoratedFormField(
|
||||
controller: _taskRateController,
|
||||
isMoney: true,
|
||||
label: localization.taskRate,
|
||||
onSavePressed: viewModel.onSavePressed,
|
||||
keyboardType:
|
||||
TextInputType.numberWithOptions(decimal: true, signed: true),
|
||||
),
|
||||
if (company.isModuleEnabled(EntityType.invoice)) ...[
|
||||
AppDropdownButton<bool>(
|
||||
blankValue: null,
|
||||
|
|
@ -185,6 +176,15 @@ class ClientEditSettingsState extends State<ClientEditSettings> {
|
|||
),
|
||||
],
|
||||
),
|
||||
if (company.isModuleEnabled(EntityType.task))
|
||||
DecoratedFormField(
|
||||
controller: _taskRateController,
|
||||
isMoney: true,
|
||||
label: localization.taskRate,
|
||||
onSavePressed: viewModel.onSavePressed,
|
||||
keyboardType:
|
||||
TextInputType.numberWithOptions(decimal: true, signed: true),
|
||||
),
|
||||
],
|
||||
],
|
||||
);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
static final Map<String, Map<String, String>> _localizedValues = {
|
||||
'en': {
|
||||
// STARTER: lang key - do not remove comment
|
||||
'is_tax_exempt': 'Tax Exempt',
|
||||
'district': 'District',
|
||||
'region': 'Region',
|
||||
'county': 'County',
|
||||
|
|
@ -105944,6 +105945,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
_localizedValues[localeCode]['district'] ??
|
||||
_localizedValues['en']['district'];
|
||||
|
||||
String get isTaxExempt =>
|
||||
_localizedValues[localeCode]['is_tax_exempt'] ??
|
||||
_localizedValues['en']['is_tax_exempt'];
|
||||
|
||||
// STARTER: lang field - do not remove comment
|
||||
|
||||
String lookup(String key) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue