mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
fix: Recalculate taxes irrespective of price list rate changed or not
(cherry picked from commit 233f79bf96)
# Conflicts:
# erpnext/public/js/controllers/transaction.js
This commit is contained in:
committed by
mergify-bot
parent
4756fbc253
commit
d19369b198
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user