mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-02 11:49:10 +00:00
set tax amount also in base currency after manipulation
This commit is contained in:
@@ -282,6 +282,9 @@ class calculate_taxes_and_totals(object):
|
|||||||
last_tax.tax_amount += diff
|
last_tax.tax_amount += diff
|
||||||
last_tax.tax_amount_after_discount_amount += diff
|
last_tax.tax_amount_after_discount_amount += diff
|
||||||
last_tax.total += diff
|
last_tax.total += diff
|
||||||
|
|
||||||
|
self._set_in_company_currency(last_tax,
|
||||||
|
["total", "tax_amount", "tax_amount_after_discount_amount"])
|
||||||
|
|
||||||
def calculate_totals(self):
|
def calculate_totals(self):
|
||||||
self.doc.grand_total = flt(self.doc.get("taxes")[-1].total
|
self.doc.grand_total = flt(self.doc.get("taxes")[-1].total
|
||||||
|
|||||||
@@ -319,6 +319,8 @@ erpnext.taxes_and_totals = erpnext.stock.StockController.extend({
|
|||||||
tax.tax_amount_after_discount_amount = flt(tax.tax_amount_after_discount_amount +
|
tax.tax_amount_after_discount_amount = flt(tax.tax_amount_after_discount_amount +
|
||||||
discount_amount_loss, precision("tax_amount", tax));
|
discount_amount_loss, precision("tax_amount", tax));
|
||||||
tax.total = flt(tax.total + discount_amount_loss, precision("total", tax));
|
tax.total = flt(tax.total + discount_amount_loss, precision("total", tax));
|
||||||
|
|
||||||
|
this.set_in_company_currency(tax, ["total", "tax_amount_after_discount_amount"]);
|
||||||
},
|
},
|
||||||
|
|
||||||
manipulate_grand_total_for_inclusive_tax: function() {
|
manipulate_grand_total_for_inclusive_tax: function() {
|
||||||
@@ -338,6 +340,9 @@ erpnext.taxes_and_totals = erpnext.stock.StockController.extend({
|
|||||||
last_tax.tax_amount += diff;
|
last_tax.tax_amount += diff;
|
||||||
last_tax.tax_amount_after_discount += diff;
|
last_tax.tax_amount_after_discount += diff;
|
||||||
last_tax.total += diff;
|
last_tax.total += diff;
|
||||||
|
|
||||||
|
this.set_in_company_currency(last_tax,
|
||||||
|
["total", "tax_amount", "tax_amount_after_discount_amount"]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user