[hotfix] Wrong calculation of total in taxes and totals (#10924)

This commit is contained in:
rohitwaghchaure 2017-09-27 11:49:13 +05:30 committed by Nabin Hait
parent df8fbd7d72
commit 45d45f4247

View File

@ -288,8 +288,11 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
},
set_cumulative_total: function(row_idx, tax) {
var tax_amount = (in_list(["Valuation and Total", "Total"], tax.category) ?
tax.tax_amount_after_discount_amount : 0);
var tax_amount = tax.tax_amount_after_discount_amount;
if (tax.category == 'Valuation') {
tax_amount = 0;
}
if (tax.add_deduct_tax == "Deduct") { tax_amount = -1*tax_amount; }
if(row_idx==0) {