fix: Revert tax calculation changes

This commit is contained in:
marination
2020-09-15 09:42:51 +05:30
parent 22d3729427
commit b7cd84196d
2 changed files with 5 additions and 14 deletions

View File

@@ -223,13 +223,8 @@ erpnext.taxes_and_totals = erpnext.payments.extend({
},
_get_tax_rate: function(tax, item_tax_map) {
if(!$.isEmptyObject(item_tax_map)) {
return (Object.keys(item_tax_map).indexOf(tax.account_head) != -1) ?
flt(item_tax_map[tax.account_head], precision("rate", tax)) : tax.rate;
} else {
// If no item tax template against item dont calculate tax against it
return 0;
}
return (Object.keys(item_tax_map).indexOf(tax.account_head) != -1) ?
flt(item_tax_map[tax.account_head], precision("rate", tax)) : tax.rate;
},
calculate_net_total: function() {