mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-19 23:05:12 +00:00
fix: fetch item tax template after setting base_net_rate
(cherry picked from commit db654d5e59)
This commit is contained in:
@@ -42,6 +42,10 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
}
|
}
|
||||||
item.base_rate_with_margin = item.rate_with_margin * flt(frm.doc.conversion_rate);
|
item.base_rate_with_margin = item.rate_with_margin * flt(frm.doc.conversion_rate);
|
||||||
|
|
||||||
|
cur_frm.cscript.set_gross_profit(item);
|
||||||
|
cur_frm.cscript.calculate_taxes_and_totals();
|
||||||
|
cur_frm.cscript.calculate_stock_uom_rate(frm, cdt, cdn);
|
||||||
|
|
||||||
if (item.item_code && item.rate) {
|
if (item.item_code && item.rate) {
|
||||||
frappe.call({
|
frappe.call({
|
||||||
method: "erpnext.stock.get_item_details.get_item_tax_template",
|
method: "erpnext.stock.get_item_details.get_item_tax_template",
|
||||||
@@ -63,10 +67,6 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
cur_frm.cscript.set_gross_profit(item);
|
|
||||||
cur_frm.cscript.calculate_taxes_and_totals();
|
|
||||||
cur_frm.cscript.calculate_stock_uom_rate(frm, cdt, cdn);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
frappe.ui.form.on(this.frm.cscript.tax_table, "rate", function(frm, cdt, cdn) {
|
frappe.ui.form.on(this.frm.cscript.tax_table, "rate", function(frm, cdt, cdn) {
|
||||||
|
|||||||
Reference in New Issue
Block a user