Correct third tax rate
This commit is contained in:
parent
0690362961
commit
68f1018c43
|
|
@ -259,8 +259,9 @@ abstract class CalculateInvoiceTotal {
|
|||
if (!usesInclusiveTaxes) {
|
||||
final double taxAmount1 = round(total * taxRate1 / 100, precision);
|
||||
final double taxAmount2 = round(total * taxRate2 / 100, precision);
|
||||
final double taxAmount3 = round(total * taxRate3 / 100, precision);
|
||||
|
||||
total += itemTax + taxAmount1 + taxAmount2;
|
||||
total += itemTax + taxAmount1 + taxAmount2 + taxAmount3;
|
||||
}
|
||||
|
||||
if (customSurcharge1 != 0.0 && !customTaxes1) {
|
||||
|
|
|
|||
|
|
@ -843,6 +843,10 @@ class InvoiceEditDesktopState extends State<InvoiceEditDesktop>
|
|||
invoice.taxName3.isNotEmpty)
|
||||
TaxRateDropdown(
|
||||
onSelected: (taxRate) {
|
||||
final updatedInvoice =
|
||||
invoice.applyTax(taxRate, isThird: true);
|
||||
print(
|
||||
'## UPDATED\nRate 3: ${updatedInvoice.taxName3} => ${updatedInvoice.taxRate3}');
|
||||
viewModel.onChanged(
|
||||
invoice.applyTax(taxRate, isThird: true));
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue