fix: Run get_item_tax_info and set_taxes serially

This commit is contained in:
Saif Ur Rehman 2018-12-28 04:59:42 +05:00
parent aca374e478
commit e414a92d55

View File

@ -1319,9 +1319,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
}
});
//todo run serially?
erpnext.utils.set_taxes(this.frm, "tax_category");
frappe.run_serially([
() => {
if(item_codes.length) {
return this.frm.call({
method: "erpnext.stock.get_item_details.get_item_tax_info",
@ -1346,6 +1345,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
});
}
},
() => erpnext.utils.set_taxes(this.frm, "tax_category"),
]);
},
item_tax_template: function(doc, cdt, cdn) {
var me = this;