mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-29 18:04:46 +00:00
fix: taxes sequence if shipping rule is set in the sales invoice (#18330)
This commit is contained in:
committed by
Nabin Hait
parent
a6a6f69e26
commit
b4cf29391b
@@ -1290,11 +1290,14 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
},
|
},
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
if(!r.exc) {
|
if(!r.exc) {
|
||||||
me.frm.set_value("taxes", r.message);
|
if(me.frm.doc.shipping_rule && me.frm.doc.taxes) {
|
||||||
|
for (let tax of r.message) {
|
||||||
|
me.frm.add_child("taxes", tax);
|
||||||
|
}
|
||||||
|
|
||||||
if(me.frm.doc.shipping_rule) {
|
refresh_field("taxes");
|
||||||
me.frm.script_manager.trigger("shipping_rule");
|
|
||||||
} else {
|
} else {
|
||||||
|
me.frm.set_value("taxes", r.message);
|
||||||
me.calculate_taxes_and_totals();
|
me.calculate_taxes_and_totals();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user