fix: Shipping Rule picking up old net_rate
This commit is contained in:
parent
07a3be6f61
commit
c78b8b7897
@ -268,6 +268,9 @@ erpnext.taxes_and_totals = class TaxesAndTotals extends erpnext.payments {
|
|||||||
});
|
});
|
||||||
|
|
||||||
frappe.model.round_floats_in(this.frm.doc, ["total", "base_total", "net_total", "base_net_total"]);
|
frappe.model.round_floats_in(this.frm.doc, ["total", "base_total", "net_total", "base_net_total"]);
|
||||||
|
if(frappe.meta.get_docfield(this.frm.doc.doctype,"shipping_rule",this.frm.doc.name)) {
|
||||||
|
this.shipping_rule()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
add_taxes_from_item_tax_template(item_tax_map) {
|
add_taxes_from_item_tax_template(item_tax_map) {
|
||||||
|
|||||||
@ -1085,16 +1085,8 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
return this.frm.call({
|
return this.frm.call({
|
||||||
doc: this.frm.doc,
|
doc: this.frm.doc,
|
||||||
method: "apply_shipping_rule",
|
method: "apply_shipping_rule",
|
||||||
callback: function(r) {
|
|
||||||
if(!r.exc) {
|
|
||||||
me.calculate_taxes_and_totals();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).fail(() => this.frm.set_value('shipping_rule', ''));
|
}).fail(() => this.frm.set_value('shipping_rule', ''));
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
me.calculate_taxes_and_totals();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set_margin_amount_based_on_currency(exchange_rate) {
|
set_margin_amount_based_on_currency(exchange_rate) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user