Browse Source

fix: Recalculate taxes irrespective of price list rate changed or not

(cherry picked from commit 233f79bf960381b1c2bd753d783afd3020b377e0)

# Conflicts:
#	erpnext/public/js/controllers/transaction.js
develop
Deepesh Garg 3 years ago
committed by mergify-bot
parent
commit
d19369b198
  1. 7
      erpnext/public/js/controllers/transaction.js

7
erpnext/public/js/controllers/transaction.js

@ -1582,7 +1582,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
_set_values_for_item_list(children) { _set_values_for_item_list(children) {
var me = this; var me = this;
var price_list_rate_changed = false;
var items_rule_dict = {}; var items_rule_dict = {};
for(var i=0, l=children.length; i<l; i++) { for(var i=0, l=children.length; i<l; i++) {
@ -1593,7 +1592,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
var v = d[k]; var v = d[k];
if (["doctype", "name"].indexOf(k)===-1) { if (["doctype", "name"].indexOf(k)===-1) {
if(k=="price_list_rate") { if(k=="price_list_rate") {
if(flt(v) != flt(d.price_list_rate)) price_list_rate_changed = true;
item_row['rate'] = v; item_row['rate'] = v;
} }
@ -1622,8 +1620,13 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
me.frm.refresh_field('items'); me.frm.refresh_field('items');
me.apply_rule_on_other_items(items_rule_dict); me.apply_rule_on_other_items(items_rule_dict);
<<<<<<< HEAD
if(!price_list_rate_changed) me.calculate_taxes_and_totals(); if(!price_list_rate_changed) me.calculate_taxes_and_totals();
} }
=======
me.calculate_taxes_and_totals();
},
>>>>>>> 233f79bf96 (fix: Recalculate taxes irrespective of price list rate changed or not)
apply_rule_on_other_items(args) { apply_rule_on_other_items(args) {
const me = this; const me = this;

Loading…
Cancel
Save