This commit is contained in:
Hillel Coren 2019-11-07 12:20:20 +02:00
parent d992e49f96
commit 617efc98ff
9 changed files with 185 additions and 244 deletions

View File

@ -709,12 +709,12 @@ abstract class SettingsEntity
String get defaultQuoteFooter; String get defaultQuoteFooter;
@nullable @nullable
@BuiltValueField(wireName: 'invoice_taxes') @BuiltValueField(wireName: 'invoice_taxes_HIDDEN')
bool get enableInvoiceTaxes; int get numberOfInvoiceTaxRates;
@nullable @nullable
@BuiltValueField(wireName: 'invoice_item_taxes') @BuiltValueField(wireName: 'invoice_item_taxes_HIDDEN')
bool get enableInvoiceItemTaxes; int get numberOfItemTaxRates;
@nullable @nullable
@BuiltValueField(wireName: 'invoice_design_id') @BuiltValueField(wireName: 'invoice_design_id')
@ -760,10 +760,6 @@ abstract class SettingsEntity
@BuiltValueField(wireName: 'payment_type_id') @BuiltValueField(wireName: 'payment_type_id')
String get defaultPaymentTypeId; String get defaultPaymentTypeId;
@nullable
@BuiltValueField(wireName: 'enable_second_tax_rate')
bool get enableSecondTaxRate;
@nullable @nullable
@BuiltValueField(wireName: 'invoice_fields') @BuiltValueField(wireName: 'invoice_fields')
String get invoiceFields; String get invoiceFields;
@ -1013,10 +1009,6 @@ abstract class SettingsEntity
@BuiltValueField(wireName: 'email_template_reminder4') @BuiltValueField(wireName: 'email_template_reminder4')
String get emailBodyReminder4; String get emailBodyReminder4;
@nullable
@BuiltValueField(wireName: 'number_of_tax_rates')
int get numberOfTaxRates;
// TODO remove this field // TODO remove this field
@nullable @nullable
@BuiltValueField(wireName: 'custom_payment_terms') @BuiltValueField(wireName: 'custom_payment_terms')
@ -1037,6 +1029,18 @@ abstract class SettingsEntity
@BuiltValueField(wireName: 'has_custom_design3_HIDDEN') @BuiltValueField(wireName: 'has_custom_design3_HIDDEN')
bool get hasCustomDesign3; bool get hasCustomDesign3;
bool get enableFirstInvoiceTaxRate => (numberOfInvoiceTaxRates ?? 0) >= 1;
bool get enableSecondInvoiceTaxRate => (numberOfInvoiceTaxRates ?? 0) >= 2;
bool get enableThirdInvoiceTaxRate => (numberOfInvoiceTaxRates ?? 0) >= 3;
bool get enableFirstItemTaxRate => (numberOfItemTaxRates ?? 0) >= 1;
bool get enableSecondItemTaxRate => (numberOfItemTaxRates ?? 0) >= 2;
bool get enableThirdItemTaxRate => (numberOfItemTaxRates ?? 0) >= 3;
bool get hasAddress => address1 != null && address1.isNotEmpty; bool get hasAddress => address1 != null && address1.isNotEmpty;
bool get hasLogo => companyLogo != null && companyLogo.isNotEmpty; bool get hasLogo => companyLogo != null && companyLogo.isNotEmpty;

View File

@ -1038,17 +1038,17 @@ class _$SettingsEntitySerializer
..add(serializers.serialize(object.defaultQuoteFooter, ..add(serializers.serialize(object.defaultQuoteFooter,
specifiedType: const FullType(String))); specifiedType: const FullType(String)));
} }
if (object.enableInvoiceTaxes != null) { if (object.numberOfInvoiceTaxRates != null) {
result result
..add('invoice_taxes') ..add('invoice_taxes_HIDDEN')
..add(serializers.serialize(object.enableInvoiceTaxes, ..add(serializers.serialize(object.numberOfInvoiceTaxRates,
specifiedType: const FullType(bool))); specifiedType: const FullType(int)));
} }
if (object.enableInvoiceItemTaxes != null) { if (object.numberOfItemTaxRates != null) {
result result
..add('invoice_item_taxes') ..add('invoice_item_taxes_HIDDEN')
..add(serializers.serialize(object.enableInvoiceItemTaxes, ..add(serializers.serialize(object.numberOfItemTaxRates,
specifiedType: const FullType(bool))); specifiedType: const FullType(int)));
} }
if (object.defaultInvoiceDesignId != null) { if (object.defaultInvoiceDesignId != null) {
result result
@ -1116,12 +1116,6 @@ class _$SettingsEntitySerializer
..add(serializers.serialize(object.defaultPaymentTypeId, ..add(serializers.serialize(object.defaultPaymentTypeId,
specifiedType: const FullType(String))); specifiedType: const FullType(String)));
} }
if (object.enableSecondTaxRate != null) {
result
..add('enable_second_tax_rate')
..add(serializers.serialize(object.enableSecondTaxRate,
specifiedType: const FullType(bool)));
}
if (object.invoiceFields != null) { if (object.invoiceFields != null) {
result result
..add('invoice_fields') ..add('invoice_fields')
@ -1506,12 +1500,6 @@ class _$SettingsEntitySerializer
..add(serializers.serialize(object.emailBodyReminder4, ..add(serializers.serialize(object.emailBodyReminder4,
specifiedType: const FullType(String))); specifiedType: const FullType(String)));
} }
if (object.numberOfTaxRates != null) {
result
..add('number_of_tax_rates')
..add(serializers.serialize(object.numberOfTaxRates,
specifiedType: const FullType(int)));
}
if (object.customPaymentTerms != null) { if (object.customPaymentTerms != null) {
result result
..add('custom_payment_terms') ..add('custom_payment_terms')
@ -1791,13 +1779,13 @@ class _$SettingsEntitySerializer
result.defaultQuoteFooter = serializers.deserialize(value, result.defaultQuoteFooter = serializers.deserialize(value,
specifiedType: const FullType(String)) as String; specifiedType: const FullType(String)) as String;
break; break;
case 'invoice_taxes': case 'invoice_taxes_HIDDEN':
result.enableInvoiceTaxes = serializers.deserialize(value, result.numberOfInvoiceTaxRates = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool; specifiedType: const FullType(int)) as int;
break; break;
case 'invoice_item_taxes': case 'invoice_item_taxes_HIDDEN':
result.enableInvoiceItemTaxes = serializers.deserialize(value, result.numberOfItemTaxRates = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool; specifiedType: const FullType(int)) as int;
break; break;
case 'invoice_design_id': case 'invoice_design_id':
result.defaultInvoiceDesignId = serializers.deserialize(value, result.defaultInvoiceDesignId = serializers.deserialize(value,
@ -1843,10 +1831,6 @@ class _$SettingsEntitySerializer
result.defaultPaymentTypeId = serializers.deserialize(value, result.defaultPaymentTypeId = serializers.deserialize(value,
specifiedType: const FullType(String)) as String; specifiedType: const FullType(String)) as String;
break; break;
case 'enable_second_tax_rate':
result.enableSecondTaxRate = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool;
break;
case 'invoice_fields': case 'invoice_fields':
result.invoiceFields = serializers.deserialize(value, result.invoiceFields = serializers.deserialize(value,
specifiedType: const FullType(String)) as String; specifiedType: const FullType(String)) as String;
@ -2103,10 +2087,6 @@ class _$SettingsEntitySerializer
result.emailBodyReminder4 = serializers.deserialize(value, result.emailBodyReminder4 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String; specifiedType: const FullType(String)) as String;
break; break;
case 'number_of_tax_rates':
result.numberOfTaxRates = serializers.deserialize(value,
specifiedType: const FullType(int)) as int;
break;
case 'custom_payment_terms': case 'custom_payment_terms':
result.customPaymentTerms.replace(serializers.deserialize(value, result.customPaymentTerms.replace(serializers.deserialize(value,
specifiedType: const FullType( specifiedType: const FullType(
@ -3334,9 +3314,9 @@ class _$SettingsEntity extends SettingsEntity {
@override @override
final String defaultQuoteFooter; final String defaultQuoteFooter;
@override @override
final bool enableInvoiceTaxes; final int numberOfInvoiceTaxRates;
@override @override
final bool enableInvoiceItemTaxes; final int numberOfItemTaxRates;
@override @override
final String defaultInvoiceDesignId; final String defaultInvoiceDesignId;
@override @override
@ -3360,8 +3340,6 @@ class _$SettingsEntity extends SettingsEntity {
@override @override
final String defaultPaymentTypeId; final String defaultPaymentTypeId;
@override @override
final bool enableSecondTaxRate;
@override
final String invoiceFields; final String invoiceFields;
@override @override
final String emailFooter; final String emailFooter;
@ -3490,8 +3468,6 @@ class _$SettingsEntity extends SettingsEntity {
@override @override
final String emailBodyReminder4; final String emailBodyReminder4;
@override @override
final int numberOfTaxRates;
@override
final BuiltList<PaymentTermEntity> customPaymentTerms; final BuiltList<PaymentTermEntity> customPaymentTerms;
@override @override
final bool hasCustomDesign1; final bool hasCustomDesign1;
@ -3563,8 +3539,8 @@ class _$SettingsEntity extends SettingsEntity {
this.defaultInvoiceTerms, this.defaultInvoiceTerms,
this.defaultQuoteTerms, this.defaultQuoteTerms,
this.defaultQuoteFooter, this.defaultQuoteFooter,
this.enableInvoiceTaxes, this.numberOfInvoiceTaxRates,
this.enableInvoiceItemTaxes, this.numberOfItemTaxRates,
this.defaultInvoiceDesignId, this.defaultInvoiceDesignId,
this.defaultQuoteDesignId, this.defaultQuoteDesignId,
this.defaultInvoiceFooter, this.defaultInvoiceFooter,
@ -3576,7 +3552,6 @@ class _$SettingsEntity extends SettingsEntity {
this.defaultTaxName3, this.defaultTaxName3,
this.defaultTaxRate3, this.defaultTaxRate3,
this.defaultPaymentTypeId, this.defaultPaymentTypeId,
this.enableSecondTaxRate,
this.invoiceFields, this.invoiceFields,
this.emailFooter, this.emailFooter,
this.emailSubjectInvoice, this.emailSubjectInvoice,
@ -3641,7 +3616,6 @@ class _$SettingsEntity extends SettingsEntity {
this.lateFeePercent3, this.lateFeePercent3,
this.emailSubjectReminder4, this.emailSubjectReminder4,
this.emailBodyReminder4, this.emailBodyReminder4,
this.numberOfTaxRates,
this.customPaymentTerms, this.customPaymentTerms,
this.hasCustomDesign1, this.hasCustomDesign1,
this.hasCustomDesign2, this.hasCustomDesign2,
@ -3719,8 +3693,8 @@ class _$SettingsEntity extends SettingsEntity {
defaultInvoiceTerms == other.defaultInvoiceTerms && defaultInvoiceTerms == other.defaultInvoiceTerms &&
defaultQuoteTerms == other.defaultQuoteTerms && defaultQuoteTerms == other.defaultQuoteTerms &&
defaultQuoteFooter == other.defaultQuoteFooter && defaultQuoteFooter == other.defaultQuoteFooter &&
enableInvoiceTaxes == other.enableInvoiceTaxes && numberOfInvoiceTaxRates == other.numberOfInvoiceTaxRates &&
enableInvoiceItemTaxes == other.enableInvoiceItemTaxes && numberOfItemTaxRates == other.numberOfItemTaxRates &&
defaultInvoiceDesignId == other.defaultInvoiceDesignId && defaultInvoiceDesignId == other.defaultInvoiceDesignId &&
defaultQuoteDesignId == other.defaultQuoteDesignId && defaultQuoteDesignId == other.defaultQuoteDesignId &&
defaultInvoiceFooter == other.defaultInvoiceFooter && defaultInvoiceFooter == other.defaultInvoiceFooter &&
@ -3732,7 +3706,6 @@ class _$SettingsEntity extends SettingsEntity {
defaultTaxName3 == other.defaultTaxName3 && defaultTaxName3 == other.defaultTaxName3 &&
defaultTaxRate3 == other.defaultTaxRate3 && defaultTaxRate3 == other.defaultTaxRate3 &&
defaultPaymentTypeId == other.defaultPaymentTypeId && defaultPaymentTypeId == other.defaultPaymentTypeId &&
enableSecondTaxRate == other.enableSecondTaxRate &&
invoiceFields == other.invoiceFields && invoiceFields == other.invoiceFields &&
emailFooter == other.emailFooter && emailFooter == other.emailFooter &&
emailSubjectInvoice == other.emailSubjectInvoice && emailSubjectInvoice == other.emailSubjectInvoice &&
@ -3797,7 +3770,6 @@ class _$SettingsEntity extends SettingsEntity {
lateFeePercent3 == other.lateFeePercent3 && lateFeePercent3 == other.lateFeePercent3 &&
emailSubjectReminder4 == other.emailSubjectReminder4 && emailSubjectReminder4 == other.emailSubjectReminder4 &&
emailBodyReminder4 == other.emailBodyReminder4 && emailBodyReminder4 == other.emailBodyReminder4 &&
numberOfTaxRates == other.numberOfTaxRates &&
customPaymentTerms == other.customPaymentTerms && customPaymentTerms == other.customPaymentTerms &&
hasCustomDesign1 == other.hasCustomDesign1 && hasCustomDesign1 == other.hasCustomDesign1 &&
hasCustomDesign2 == other.hasCustomDesign2 && hasCustomDesign2 == other.hasCustomDesign2 &&
@ -3824,7 +3796,8 @@ class _$SettingsEntity extends SettingsEntity {
$jc( $jc(
$jc( $jc(
$jc( $jc(
$jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, timezoneId.hashCode), dateFormatId.hashCode), enableMilitaryTime.hashCode), languageId.hashCode), showCurrencyCode.hashCode), currencyId.hashCode), customValue1.hashCode), customValue2.hashCode), customValue3.hashCode), customValue4.hashCode), defaultPaymentTerms.hashCode), companyGatewayIds.hashCode), defaultTaskRate.hashCode), sendReminders.hashCode), showTasksInPortal.hashCode), emailStyle.hashCode), replyToEmail.hashCode), bccEmail.hashCode), pdfEmailAttachment.hashCode), ublEmailAttachment.hashCode), documentEmailAttachment.hashCode), emailStyleCustom.hashCode), customMessageDashboard.hashCode), customMessageUnpaidInvoice.hashCode), customMessagePaidInvoice.hashCode), customMessageUnapprovedQuote.hashCode), lockSentInvoices.hashCode), autoArchiveInvoice.hashCode), autoArchiveQuote.hashCode), autoEmailInvoice.hashCode), autoConvertQuote.hashCode), enableInclusiveTaxes.hashCode), translations.hashCode), taskNumberPattern.hashCode), taskNumberCounter.hashCode), expenseNumberPattern.hashCode), expenseNumberCounter.hashCode), vendorNumberPattern.hashCode), vendorNumberCounter.hashCode), ticketNumberPattern.hashCode), ticketNumberCounter.hashCode), paymentNumberPattern.hashCode), paymentNumberCounter.hashCode), invoiceNumberPattern.hashCode), invoiceNumberCounter.hashCode), quoteNumberPattern.hashCode), quoteNumberCounter.hashCode), clientNumberPattern.hashCode), clientNumberCounter.hashCode), creditNumberPattern.hashCode), creditNumberCounter.hashCode), recurringInvoiceNumberPrefix.hashCode), resetCounterFrequencyId.hashCode), resetCounterDate.hashCode), counterPadding.hashCode), sharedInvoiceQuoteCounter.hashCode), defaultInvoiceTerms.hashCode), defaultQuoteTerms.hashCode), defaultQuoteFooter.hashCode), enableInvoiceTaxes.hashCode), enableInvoiceItemTaxes.hashCode), defaultInvoiceDesignId.hashCode), defaultQuoteDesignId.hashCode), defaultInvoiceFooter.hashCode), invoiceLabels.hashCode), defaultTaxName1.hashCode), defaultTaxRate1.hashCode), defaultTaxName2.hashCode), defaultTaxRate2.hashCode), defaultTaxName3.hashCode), defaultTaxRate3.hashCode), defaultPaymentTypeId.hashCode), enableSecondTaxRate.hashCode), invoiceFields.hashCode), emailFooter.hashCode), emailSubjectInvoice.hashCode), emailSubjectQuote.hashCode), emailSubjectPayment.hashCode), emailBodyInvoice.hashCode), emailBodyQuote.hashCode), emailBodyPayment.hashCode), emailSubjectReminder1.hashCode), emailSubjectReminder2.hashCode), emailSubjectReminder3.hashCode), emailBodyReminder1.hashCode), emailBodyReminder2.hashCode), emailBodyReminder3.hashCode), enablePortalPassword.hashCode), sendPortalPassword.hashCode), signatureOnPdf.hashCode), enableEmailMarkup.hashCode), showAcceptInvoiceTerms.hashCode), showAcceptQuoteTerms.hashCode), requireInvoiceSignature.hashCode), requireQuoteSignature.hashCode), name.hashCode), companyLogo.hashCode), website.hashCode), address1.hashCode), address2.hashCode), city.hashCode), state.hashCode), postalCode.hashCode), phone.hashCode), email.hashCode), countryId.hashCode), vatNumber.hashCode), idNumber.hashCode), pageSize.hashCode), fontSize.hashCode), primaryColor.hashCode), secondaryColor.hashCode), primaryFont.hashCode), secondaryFont.hashCode), hidePaidToDate.hashCode), embedDocuments.hashCode), allPagesHeader.hashCode), allPagesFooter.hashCode), enableReminder1.hashCode), enableReminder2.hashCode), enableReminder3.hashCode), enableReminder4.hashCode), numDaysReminder1.hashCode), $jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, timezoneId.hashCode), dateFormatId.hashCode), enableMilitaryTime.hashCode), languageId.hashCode), showCurrencyCode.hashCode), currencyId.hashCode), customValue1.hashCode), customValue2.hashCode), customValue3.hashCode), customValue4.hashCode), defaultPaymentTerms.hashCode), companyGatewayIds.hashCode), defaultTaskRate.hashCode), sendReminders.hashCode), showTasksInPortal.hashCode), emailStyle.hashCode), replyToEmail.hashCode), bccEmail.hashCode), pdfEmailAttachment.hashCode), ublEmailAttachment.hashCode), documentEmailAttachment.hashCode), emailStyleCustom.hashCode), customMessageDashboard.hashCode), customMessageUnpaidInvoice.hashCode), customMessagePaidInvoice.hashCode), customMessageUnapprovedQuote.hashCode), lockSentInvoices.hashCode), autoArchiveInvoice.hashCode), autoArchiveQuote.hashCode), autoEmailInvoice.hashCode), autoConvertQuote.hashCode), enableInclusiveTaxes.hashCode), translations.hashCode), taskNumberPattern.hashCode), taskNumberCounter.hashCode), expenseNumberPattern.hashCode), expenseNumberCounter.hashCode), vendorNumberPattern.hashCode), vendorNumberCounter.hashCode), ticketNumberPattern.hashCode), ticketNumberCounter.hashCode), paymentNumberPattern.hashCode), paymentNumberCounter.hashCode), invoiceNumberPattern.hashCode), invoiceNumberCounter.hashCode), quoteNumberPattern.hashCode), quoteNumberCounter.hashCode), clientNumberPattern.hashCode), clientNumberCounter.hashCode), creditNumberPattern.hashCode), creditNumberCounter.hashCode), recurringInvoiceNumberPrefix.hashCode), resetCounterFrequencyId.hashCode), resetCounterDate.hashCode), counterPadding.hashCode), sharedInvoiceQuoteCounter.hashCode), defaultInvoiceTerms.hashCode), defaultQuoteTerms.hashCode), defaultQuoteFooter.hashCode), numberOfInvoiceTaxRates.hashCode), numberOfItemTaxRates.hashCode), defaultInvoiceDesignId.hashCode), defaultQuoteDesignId.hashCode), defaultInvoiceFooter.hashCode), invoiceLabels.hashCode), defaultTaxName1.hashCode), defaultTaxRate1.hashCode), defaultTaxName2.hashCode), defaultTaxRate2.hashCode), defaultTaxName3.hashCode), defaultTaxRate3.hashCode), defaultPaymentTypeId.hashCode), invoiceFields.hashCode), emailFooter.hashCode), emailSubjectInvoice.hashCode), emailSubjectQuote.hashCode), emailSubjectPayment.hashCode), emailBodyInvoice.hashCode), emailBodyQuote.hashCode), emailBodyPayment.hashCode), emailSubjectReminder1.hashCode), emailSubjectReminder2.hashCode), emailSubjectReminder3.hashCode), emailBodyReminder1.hashCode), emailBodyReminder2.hashCode), emailBodyReminder3.hashCode), enablePortalPassword.hashCode), sendPortalPassword.hashCode), signatureOnPdf.hashCode), enableEmailMarkup.hashCode), showAcceptInvoiceTerms.hashCode), showAcceptQuoteTerms.hashCode), requireInvoiceSignature.hashCode), requireQuoteSignature.hashCode), name.hashCode), companyLogo.hashCode), website.hashCode), address1.hashCode), address2.hashCode), city.hashCode), state.hashCode), postalCode.hashCode), phone.hashCode), email.hashCode), countryId.hashCode), vatNumber.hashCode), idNumber.hashCode), pageSize.hashCode), fontSize.hashCode), primaryColor.hashCode), secondaryColor.hashCode), primaryFont.hashCode), secondaryFont.hashCode), hidePaidToDate.hashCode), embedDocuments.hashCode), allPagesHeader.hashCode), allPagesFooter.hashCode), enableReminder1.hashCode), enableReminder2.hashCode), enableReminder3.hashCode), enableReminder4.hashCode),
numDaysReminder1.hashCode),
numDaysReminder2.hashCode), numDaysReminder2.hashCode),
numDaysReminder3.hashCode), numDaysReminder3.hashCode),
scheduleReminder1.hashCode), scheduleReminder1.hashCode),
@ -3839,7 +3812,6 @@ class _$SettingsEntity extends SettingsEntity {
lateFeePercent3.hashCode), lateFeePercent3.hashCode),
emailSubjectReminder4.hashCode), emailSubjectReminder4.hashCode),
emailBodyReminder4.hashCode), emailBodyReminder4.hashCode),
numberOfTaxRates.hashCode),
customPaymentTerms.hashCode), customPaymentTerms.hashCode),
hasCustomDesign1.hashCode), hasCustomDesign1.hashCode),
hasCustomDesign2.hashCode), hasCustomDesign2.hashCode),
@ -3908,8 +3880,8 @@ class _$SettingsEntity extends SettingsEntity {
..add('defaultInvoiceTerms', defaultInvoiceTerms) ..add('defaultInvoiceTerms', defaultInvoiceTerms)
..add('defaultQuoteTerms', defaultQuoteTerms) ..add('defaultQuoteTerms', defaultQuoteTerms)
..add('defaultQuoteFooter', defaultQuoteFooter) ..add('defaultQuoteFooter', defaultQuoteFooter)
..add('enableInvoiceTaxes', enableInvoiceTaxes) ..add('numberOfInvoiceTaxRates', numberOfInvoiceTaxRates)
..add('enableInvoiceItemTaxes', enableInvoiceItemTaxes) ..add('numberOfItemTaxRates', numberOfItemTaxRates)
..add('defaultInvoiceDesignId', defaultInvoiceDesignId) ..add('defaultInvoiceDesignId', defaultInvoiceDesignId)
..add('defaultQuoteDesignId', defaultQuoteDesignId) ..add('defaultQuoteDesignId', defaultQuoteDesignId)
..add('defaultInvoiceFooter', defaultInvoiceFooter) ..add('defaultInvoiceFooter', defaultInvoiceFooter)
@ -3921,7 +3893,6 @@ class _$SettingsEntity extends SettingsEntity {
..add('defaultTaxName3', defaultTaxName3) ..add('defaultTaxName3', defaultTaxName3)
..add('defaultTaxRate3', defaultTaxRate3) ..add('defaultTaxRate3', defaultTaxRate3)
..add('defaultPaymentTypeId', defaultPaymentTypeId) ..add('defaultPaymentTypeId', defaultPaymentTypeId)
..add('enableSecondTaxRate', enableSecondTaxRate)
..add('invoiceFields', invoiceFields) ..add('invoiceFields', invoiceFields)
..add('emailFooter', emailFooter) ..add('emailFooter', emailFooter)
..add('emailSubjectInvoice', emailSubjectInvoice) ..add('emailSubjectInvoice', emailSubjectInvoice)
@ -3986,7 +3957,6 @@ class _$SettingsEntity extends SettingsEntity {
..add('lateFeePercent3', lateFeePercent3) ..add('lateFeePercent3', lateFeePercent3)
..add('emailSubjectReminder4', emailSubjectReminder4) ..add('emailSubjectReminder4', emailSubjectReminder4)
..add('emailBodyReminder4', emailBodyReminder4) ..add('emailBodyReminder4', emailBodyReminder4)
..add('numberOfTaxRates', numberOfTaxRates)
..add('customPaymentTerms', customPaymentTerms) ..add('customPaymentTerms', customPaymentTerms)
..add('hasCustomDesign1', hasCustomDesign1) ..add('hasCustomDesign1', hasCustomDesign1)
..add('hasCustomDesign2', hasCustomDesign2) ..add('hasCustomDesign2', hasCustomDesign2)
@ -4286,15 +4256,15 @@ class SettingsEntityBuilder
set defaultQuoteFooter(String defaultQuoteFooter) => set defaultQuoteFooter(String defaultQuoteFooter) =>
_$this._defaultQuoteFooter = defaultQuoteFooter; _$this._defaultQuoteFooter = defaultQuoteFooter;
bool _enableInvoiceTaxes; int _numberOfInvoiceTaxRates;
bool get enableInvoiceTaxes => _$this._enableInvoiceTaxes; int get numberOfInvoiceTaxRates => _$this._numberOfInvoiceTaxRates;
set enableInvoiceTaxes(bool enableInvoiceTaxes) => set numberOfInvoiceTaxRates(int numberOfInvoiceTaxRates) =>
_$this._enableInvoiceTaxes = enableInvoiceTaxes; _$this._numberOfInvoiceTaxRates = numberOfInvoiceTaxRates;
bool _enableInvoiceItemTaxes; int _numberOfItemTaxRates;
bool get enableInvoiceItemTaxes => _$this._enableInvoiceItemTaxes; int get numberOfItemTaxRates => _$this._numberOfItemTaxRates;
set enableInvoiceItemTaxes(bool enableInvoiceItemTaxes) => set numberOfItemTaxRates(int numberOfItemTaxRates) =>
_$this._enableInvoiceItemTaxes = enableInvoiceItemTaxes; _$this._numberOfItemTaxRates = numberOfItemTaxRates;
String _defaultInvoiceDesignId; String _defaultInvoiceDesignId;
String get defaultInvoiceDesignId => _$this._defaultInvoiceDesignId; String get defaultInvoiceDesignId => _$this._defaultInvoiceDesignId;
@ -4351,11 +4321,6 @@ class SettingsEntityBuilder
set defaultPaymentTypeId(String defaultPaymentTypeId) => set defaultPaymentTypeId(String defaultPaymentTypeId) =>
_$this._defaultPaymentTypeId = defaultPaymentTypeId; _$this._defaultPaymentTypeId = defaultPaymentTypeId;
bool _enableSecondTaxRate;
bool get enableSecondTaxRate => _$this._enableSecondTaxRate;
set enableSecondTaxRate(bool enableSecondTaxRate) =>
_$this._enableSecondTaxRate = enableSecondTaxRate;
String _invoiceFields; String _invoiceFields;
String get invoiceFields => _$this._invoiceFields; String get invoiceFields => _$this._invoiceFields;
set invoiceFields(String invoiceFields) => set invoiceFields(String invoiceFields) =>
@ -4658,11 +4623,6 @@ class SettingsEntityBuilder
set emailBodyReminder4(String emailBodyReminder4) => set emailBodyReminder4(String emailBodyReminder4) =>
_$this._emailBodyReminder4 = emailBodyReminder4; _$this._emailBodyReminder4 = emailBodyReminder4;
int _numberOfTaxRates;
int get numberOfTaxRates => _$this._numberOfTaxRates;
set numberOfTaxRates(int numberOfTaxRates) =>
_$this._numberOfTaxRates = numberOfTaxRates;
ListBuilder<PaymentTermEntity> _customPaymentTerms; ListBuilder<PaymentTermEntity> _customPaymentTerms;
ListBuilder<PaymentTermEntity> get customPaymentTerms => ListBuilder<PaymentTermEntity> get customPaymentTerms =>
_$this._customPaymentTerms ??= new ListBuilder<PaymentTermEntity>(); _$this._customPaymentTerms ??= new ListBuilder<PaymentTermEntity>();
@ -4747,8 +4707,8 @@ class SettingsEntityBuilder
_defaultInvoiceTerms = _$v.defaultInvoiceTerms; _defaultInvoiceTerms = _$v.defaultInvoiceTerms;
_defaultQuoteTerms = _$v.defaultQuoteTerms; _defaultQuoteTerms = _$v.defaultQuoteTerms;
_defaultQuoteFooter = _$v.defaultQuoteFooter; _defaultQuoteFooter = _$v.defaultQuoteFooter;
_enableInvoiceTaxes = _$v.enableInvoiceTaxes; _numberOfInvoiceTaxRates = _$v.numberOfInvoiceTaxRates;
_enableInvoiceItemTaxes = _$v.enableInvoiceItemTaxes; _numberOfItemTaxRates = _$v.numberOfItemTaxRates;
_defaultInvoiceDesignId = _$v.defaultInvoiceDesignId; _defaultInvoiceDesignId = _$v.defaultInvoiceDesignId;
_defaultQuoteDesignId = _$v.defaultQuoteDesignId; _defaultQuoteDesignId = _$v.defaultQuoteDesignId;
_defaultInvoiceFooter = _$v.defaultInvoiceFooter; _defaultInvoiceFooter = _$v.defaultInvoiceFooter;
@ -4760,7 +4720,6 @@ class SettingsEntityBuilder
_defaultTaxName3 = _$v.defaultTaxName3; _defaultTaxName3 = _$v.defaultTaxName3;
_defaultTaxRate3 = _$v.defaultTaxRate3; _defaultTaxRate3 = _$v.defaultTaxRate3;
_defaultPaymentTypeId = _$v.defaultPaymentTypeId; _defaultPaymentTypeId = _$v.defaultPaymentTypeId;
_enableSecondTaxRate = _$v.enableSecondTaxRate;
_invoiceFields = _$v.invoiceFields; _invoiceFields = _$v.invoiceFields;
_emailFooter = _$v.emailFooter; _emailFooter = _$v.emailFooter;
_emailSubjectInvoice = _$v.emailSubjectInvoice; _emailSubjectInvoice = _$v.emailSubjectInvoice;
@ -4825,7 +4784,6 @@ class SettingsEntityBuilder
_lateFeePercent3 = _$v.lateFeePercent3; _lateFeePercent3 = _$v.lateFeePercent3;
_emailSubjectReminder4 = _$v.emailSubjectReminder4; _emailSubjectReminder4 = _$v.emailSubjectReminder4;
_emailBodyReminder4 = _$v.emailBodyReminder4; _emailBodyReminder4 = _$v.emailBodyReminder4;
_numberOfTaxRates = _$v.numberOfTaxRates;
_customPaymentTerms = _$v.customPaymentTerms?.toBuilder(); _customPaymentTerms = _$v.customPaymentTerms?.toBuilder();
_hasCustomDesign1 = _$v.hasCustomDesign1; _hasCustomDesign1 = _$v.hasCustomDesign1;
_hasCustomDesign2 = _$v.hasCustomDesign2; _hasCustomDesign2 = _$v.hasCustomDesign2;
@ -4913,8 +4871,8 @@ class SettingsEntityBuilder
defaultInvoiceTerms: defaultInvoiceTerms, defaultInvoiceTerms: defaultInvoiceTerms,
defaultQuoteTerms: defaultQuoteTerms, defaultQuoteTerms: defaultQuoteTerms,
defaultQuoteFooter: defaultQuoteFooter, defaultQuoteFooter: defaultQuoteFooter,
enableInvoiceTaxes: enableInvoiceTaxes, numberOfInvoiceTaxRates: numberOfInvoiceTaxRates,
enableInvoiceItemTaxes: enableInvoiceItemTaxes, numberOfItemTaxRates: numberOfItemTaxRates,
defaultInvoiceDesignId: defaultInvoiceDesignId, defaultInvoiceDesignId: defaultInvoiceDesignId,
defaultQuoteDesignId: defaultQuoteDesignId, defaultQuoteDesignId: defaultQuoteDesignId,
defaultInvoiceFooter: defaultInvoiceFooter, defaultInvoiceFooter: defaultInvoiceFooter,
@ -4926,7 +4884,6 @@ class SettingsEntityBuilder
defaultTaxName3: defaultTaxName3, defaultTaxName3: defaultTaxName3,
defaultTaxRate3: defaultTaxRate3, defaultTaxRate3: defaultTaxRate3,
defaultPaymentTypeId: defaultPaymentTypeId, defaultPaymentTypeId: defaultPaymentTypeId,
enableSecondTaxRate: enableSecondTaxRate,
invoiceFields: invoiceFields, invoiceFields: invoiceFields,
emailFooter: emailFooter, emailFooter: emailFooter,
emailSubjectInvoice: emailSubjectInvoice, emailSubjectInvoice: emailSubjectInvoice,
@ -4991,7 +4948,6 @@ class SettingsEntityBuilder
lateFeePercent3: lateFeePercent3, lateFeePercent3: lateFeePercent3,
emailSubjectReminder4: emailSubjectReminder4, emailSubjectReminder4: emailSubjectReminder4,
emailBodyReminder4: emailBodyReminder4, emailBodyReminder4: emailBodyReminder4,
numberOfTaxRates: numberOfTaxRates,
customPaymentTerms: _customPaymentTerms?.build(), customPaymentTerms: _customPaymentTerms?.build(),
hasCustomDesign1: hasCustomDesign1, hasCustomDesign1: hasCustomDesign1,
hasCustomDesign2: hasCustomDesign2, hasCustomDesign2: hasCustomDesign2,

View File

@ -642,7 +642,7 @@ class _FeesEditorState extends State<FeesEditor> {
label: localization.feeCap, label: localization.feeCap,
controller: _capController, controller: _capController,
), ),
if (company.settings.enableInvoiceItemTaxes) if (company.settings.enableFirstItemTaxRate)
TaxRateDropdown( TaxRateDropdown(
taxRates: company.taxRates, taxRates: company.taxRates,
onSelected: (taxRate) => onSelected: (taxRate) =>
@ -653,8 +653,7 @@ class _FeesEditorState extends State<FeesEditor> {
initialTaxName: companyGateway.taxName1, initialTaxName: companyGateway.taxName1,
initialTaxRate: companyGateway.taxRate1, initialTaxRate: companyGateway.taxRate1,
), ),
if (company.settings.enableInvoiceItemTaxes && if (company.settings.enableSecondItemTaxRate)
company.settings.enableSecondTaxRate)
TaxRateDropdown( TaxRateDropdown(
taxRates: company.taxRates, taxRates: company.taxRates,
onSelected: (taxRate) => onSelected: (taxRate) =>

View File

@ -112,6 +112,7 @@ class ExpenseEditSettingsState extends State<ExpenseEditSettings> {
children: <Widget>[ children: <Widget>[
FormCard( FormCard(
children: <Widget>[ children: <Widget>[
if (company.settings.enableFirstItemTaxRate)
TaxRateDropdown( TaxRateDropdown(
taxRates: company.taxRates, taxRates: company.taxRates,
onSelected: (taxRate) => onSelected: (taxRate) =>
@ -122,8 +123,8 @@ class ExpenseEditSettingsState extends State<ExpenseEditSettings> {
initialTaxName: expense.taxName1, initialTaxName: expense.taxName1,
initialTaxRate: expense.taxRate1, initialTaxRate: expense.taxRate1,
), ),
company.settings.enableSecondTaxRate if (company.settings.enableSecondItemTaxRate)
? TaxRateDropdown( TaxRateDropdown(
taxRates: company.taxRates, taxRates: company.taxRates,
onSelected: (taxRate) => onSelected: (taxRate) =>
viewModel.onChanged(expense.rebuild((b) => b viewModel.onChanged(expense.rebuild((b) => b
@ -132,8 +133,7 @@ class ExpenseEditSettingsState extends State<ExpenseEditSettings> {
labelText: localization.tax, labelText: localization.tax,
initialTaxName: expense.taxName2, initialTaxName: expense.taxName2,
initialTaxRate: expense.taxRate2, initialTaxRate: expense.taxRate2,
) ),
: SizedBox(),
SizedBox(height: 16), SizedBox(height: 16),
expense.isInvoiced expense.isInvoiced
? SizedBox() ? SizedBox()

View File

@ -276,27 +276,24 @@ class InvoiceEditDetailsState extends State<InvoiceEditDetails> {
TextInputType.numberWithOptions(decimal: true), TextInputType.numberWithOptions(decimal: true),
) )
: Container(), : Container(),
(company.settings.enableInvoiceTaxes ?? false) if (company.settings.enableFirstInvoiceTaxRate)
? TaxRateDropdown( TaxRateDropdown(
taxRates: company.taxRates, taxRates: company.taxRates,
onSelected: (taxRate) => onSelected: (taxRate) =>
viewModel.onChanged(invoice.applyTax(taxRate)), viewModel.onChanged(invoice.applyTax(taxRate)),
labelText: localization.tax, labelText: localization.tax,
initialTaxName: invoice.taxName1, initialTaxName: invoice.taxName1,
initialTaxRate: invoice.taxRate1, initialTaxRate: invoice.taxRate1,
) ),
: Container(), if (company.settings.enableSecondInvoiceTaxRate)
(company.settings.enableInvoiceTaxes ?? false) && TaxRateDropdown(
company.settings.enableSecondTaxRate
? TaxRateDropdown(
taxRates: company.taxRates, taxRates: company.taxRates,
onSelected: (taxRate) => viewModel onSelected: (taxRate) => viewModel
.onChanged(invoice.applyTax(taxRate, isSecond: true)), .onChanged(invoice.applyTax(taxRate, isSecond: true)),
labelText: localization.tax, labelText: localization.tax,
initialTaxName: invoice.taxName2, initialTaxName: invoice.taxName2,
initialTaxRate: invoice.taxRate2, initialTaxRate: invoice.taxRate2,
) ),
: Container(),
AppDropdownButton( AppDropdownButton(
labelText: localization.design, labelText: localization.design,
value: invoice.designId, value: invoice.designId,

View File

@ -255,8 +255,8 @@ class ItemEditDetailsState extends State<ItemEditDetails> {
TextInputType.numberWithOptions(decimal: true), TextInputType.numberWithOptions(decimal: true),
) )
: Container(), : Container(),
company.settings.enableInvoiceItemTaxes if (company.settings.enableFirstItemTaxRate)
? TaxRateDropdown( TaxRateDropdown(
taxRates: company.taxRates, taxRates: company.taxRates,
onSelected: (taxRate) { onSelected: (taxRate) {
_taxRate1 = taxRate; _taxRate1 = taxRate;
@ -265,11 +265,9 @@ class ItemEditDetailsState extends State<ItemEditDetails> {
labelText: localization.tax, labelText: localization.tax,
initialTaxName: invoiceItem.taxName1, initialTaxName: invoiceItem.taxName1,
initialTaxRate: invoiceItem.taxRate1, initialTaxRate: invoiceItem.taxRate1,
) ),
: Container(), if (company.settings.enableSecondItemTaxRate)
company.settings.enableInvoiceItemTaxes && TaxRateDropdown(
company.settings.enableSecondTaxRate
? TaxRateDropdown(
taxRates: company.taxRates, taxRates: company.taxRates,
onSelected: (taxRate) { onSelected: (taxRate) {
_taxRate2 = taxRate; _taxRate2 = taxRate;
@ -278,8 +276,7 @@ class ItemEditDetailsState extends State<ItemEditDetails> {
labelText: localization.tax, labelText: localization.tax,
initialTaxName: invoiceItem.taxName2, initialTaxName: invoiceItem.taxName2,
initialTaxRate: invoiceItem.taxRate2, initialTaxRate: invoiceItem.taxRate2,
) ),
: Container(),
], ],
), ),
), ),

View File

@ -208,8 +208,8 @@ class _ProductEditState extends State<ProductEdit> {
keyboardType: keyboardType:
TextInputType.numberWithOptions(decimal: true), TextInputType.numberWithOptions(decimal: true),
), ),
(company.settings.enableInvoiceItemTaxes ?? false) if (company.settings.enableFirstItemTaxRate)
? TaxRateDropdown( TaxRateDropdown(
taxRates: company.taxRates, taxRates: company.taxRates,
onSelected: (taxRate) => onSelected: (taxRate) =>
viewModel.onChanged(product.rebuild((b) => b viewModel.onChanged(product.rebuild((b) => b
@ -218,11 +218,9 @@ class _ProductEditState extends State<ProductEdit> {
labelText: localization.tax, labelText: localization.tax,
initialTaxName: product.taxName1, initialTaxName: product.taxName1,
initialTaxRate: product.taxRate1, initialTaxRate: product.taxRate1,
) ),
: Container(), if (company.settings.enableSecondItemTaxRate)
(company.settings.enableInvoiceItemTaxes ?? false) && TaxRateDropdown(
company.settings.enableSecondTaxRate
? TaxRateDropdown(
taxRates: company.taxRates, taxRates: company.taxRates,
onSelected: (taxRate) => onSelected: (taxRate) =>
viewModel.onChanged(product.rebuild((b) => b viewModel.onChanged(product.rebuild((b) => b
@ -231,8 +229,7 @@ class _ProductEditState extends State<ProductEdit> {
labelText: localization.tax, labelText: localization.tax,
initialTaxName: product.taxName2, initialTaxName: product.taxName2,
initialTaxRate: product.taxRate2, initialTaxRate: product.taxRate2,
) ),
: Container(),
], ],
), ),
], ],

View File

@ -42,19 +42,22 @@ class _TaxSettingsState extends State<TaxSettings> {
children: <Widget>[ children: <Widget>[
FormCard( FormCard(
children: <Widget>[ children: <Widget>[
BoolDropdownButton( AppDropdownButton(
iconData: FontAwesomeIcons.fileInvoice, labelText: localization.invoiceTaxRates,
label: localization.invoiceTax, // TODO remove this
value: settings.enableInvoiceTaxes, showBlank: true,
value: settings.numberOfInvoiceTaxRates == null
? ''
: '${settings.numberOfInvoiceTaxRates}',
onChanged: (value) => viewModel.onSettingsChanged( onChanged: (value) => viewModel.onSettingsChanged(
settings.rebuild((b) => b..enableInvoiceTaxes = value)), settings.rebuild(
), (b) => b..numberOfInvoiceTaxRates = int.parse(value))),
BoolDropdownButton( items: List<int>.generate(3, (i) => i + 1)
iconData: FontAwesomeIcons.cubes, .map((value) => DropdownMenuItem<String>(
label: localization.lineItemTax, child: Text('$value'),
value: settings.enableInvoiceItemTaxes, value: '$value',
onChanged: (value) => viewModel.onSettingsChanged( ))
settings.rebuild((b) => b..enableInvoiceItemTaxes = value)), .toList(),
), ),
BoolDropdownButton( BoolDropdownButton(
iconData: FontAwesomeIcons.percent, iconData: FontAwesomeIcons.percent,
@ -65,61 +68,42 @@ class _TaxSettingsState extends State<TaxSettings> {
), ),
], ],
), ),
if (settings.enableFirstInvoiceTaxRate)
FormCard( FormCard(
children: <Widget>[ children: <Widget>[
AppDropdownButton(
labelText: localization.numberOfRates,
// TODO remove this
showBlank: true,
value: settings.numberOfTaxRates == null
? ''
: '${settings.numberOfTaxRates}',
onChanged: (value) => viewModel.onSettingsChanged(settings
.rebuild((b) => b..numberOfTaxRates = int.parse(value))),
items: List<int>.generate(3, (i) => i + 1)
.map((value) => DropdownMenuItem<String>(
child: Text('$value'),
value: '$value',
))
.toList(),
),
if (settings.enableInvoiceTaxes) ...[
TaxRateDropdown( TaxRateDropdown(
taxRates: company.taxRates, taxRates: company.taxRates,
onSelected: (taxRate) => onSelected: (taxRate) =>
viewModel.onSettingsChanged(settings.rebuild((b) => b viewModel.onSettingsChanged(settings.rebuild((b) => b
..defaultTaxName1 = taxRate.name ..defaultTaxName1 = taxRate.name
..defaultTaxRate1 = taxRate.rate)), ..defaultTaxRate1 = taxRate.rate)),
labelText: localization.tax, labelText: localization.defaultTaxRate,
initialTaxName: settings.defaultTaxName1, initialTaxName: settings.defaultTaxName1,
initialTaxRate: settings.defaultTaxRate1, initialTaxRate: settings.defaultTaxRate1,
), ),
// TODO get null value from company if (settings.enableSecondInvoiceTaxRate)
if ((settings.numberOfTaxRates ?? 0) > 1)
TaxRateDropdown( TaxRateDropdown(
taxRates: company.taxRates, taxRates: company.taxRates,
onSelected: (taxRate) => onSelected: (taxRate) =>
viewModel.onSettingsChanged(settings.rebuild((b) => b viewModel.onSettingsChanged(settings.rebuild((b) => b
..defaultTaxName2 = taxRate.name ..defaultTaxName2 = taxRate.name
..defaultTaxRate2 = taxRate.rate)), ..defaultTaxRate2 = taxRate.rate)),
labelText: localization.tax, labelText: localization.defaultTaxRate,
initialTaxName: settings.defaultTaxName2, initialTaxName: settings.defaultTaxName2,
initialTaxRate: settings.defaultTaxRate2, initialTaxRate: settings.defaultTaxRate2,
), ),
// TODO get null value from company if (settings.enableThirdInvoiceTaxRate)
if ((settings.numberOfTaxRates ?? 0) > 2)
TaxRateDropdown( TaxRateDropdown(
taxRates: company.taxRates, taxRates: company.taxRates,
onSelected: (taxRate) => onSelected: (taxRate) =>
viewModel.onSettingsChanged(settings.rebuild((b) => b viewModel.onSettingsChanged(settings.rebuild((b) => b
..defaultTaxName3 = taxRate.name ..defaultTaxName3 = taxRate.name
..defaultTaxRate3 = taxRate.rate)), ..defaultTaxRate3 = taxRate.rate)),
labelText: localization.tax, labelText: localization.defaultTaxRate,
initialTaxName: settings.defaultTaxName3, initialTaxName: settings.defaultTaxName3,
initialTaxRate: settings.defaultTaxRate3, initialTaxRate: settings.defaultTaxRate3,
), ),
], ],
],
), ),
if (!state.uiState.settingsUIState.isFiltered) if (!state.uiState.settingsUIState.isFiltered)
Padding( Padding(

View File

@ -14,11 +14,13 @@ abstract class LocaleCodeAware {
mixin LocalizationsProvider on LocaleCodeAware { mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _localizedValues = { static final Map<String, Map<String, String>> _localizedValues = {
'en': { 'en': {
'default_tax_rate': 'Default Tax Rate',
'user': 'User', 'user': 'User',
'invoice_tax': 'Invoice Tax', 'invoice_tax': 'Invoice Tax',
'line_item_tax': 'Line Item Tax', 'line_item_tax': 'Line Item Tax',
'inclusive_taxes': 'Inclusive Taxes', 'inclusive_taxes': 'Inclusive Taxes',
'number_of_rates': 'Number of Rates', 'invoice_tax_rates': 'Invoice Tax Rates',
'item_tax_rates': 'Item Tax Rates',
'no_client_selected': 'No client selected', 'no_client_selected': 'No client selected',
'configure_rates': 'Configure rates', 'configure_rates': 'Configure rates',
'tax_settings': 'Tax Settings', 'tax_settings': 'Tax Settings',
@ -15511,10 +15513,15 @@ mixin LocalizationsProvider on LocaleCodeAware {
String get inclusiveTaxes => _localizedValues[localeCode]['inclusive_taxes']; String get inclusiveTaxes => _localizedValues[localeCode]['inclusive_taxes'];
String get numberOfRates => _localizedValues[localeCode]['number_of_rates']; String get invoiceTaxRates => _localizedValues[localeCode]['invoice_tax_rates'];
String get itemTaxRates => _localizedValues[localeCode]['item_tax_rates'];
String get user => _localizedValues[localeCode]['user']; String get user => _localizedValues[localeCode]['user'];
String get defaultTaxRate => _localizedValues[localeCode]['default_tax_rate'];
String lookup(String key) { String lookup(String key) {
final lookupKey = toSnakeCase(key); final lookupKey = toSnakeCase(key);
return _localizedValues[localeCode][lookupKey] ?? return _localizedValues[localeCode][lookupKey] ??