diff --git a/erpnext/public/js/controllers/taxes_and_totals.js b/erpnext/public/js/controllers/taxes_and_totals.js index 1601ba28cc6..6a08dbf3ecc 100644 --- a/erpnext/public/js/controllers/taxes_and_totals.js +++ b/erpnext/public/js/controllers/taxes_and_totals.js @@ -10,7 +10,7 @@ erpnext.taxes_and_totals = erpnext.payments.extend({ + flt(item.price_list_rate) * ( flt(item.margin_rate_or_amount) / 100); } else { item.rate_with_margin = flt(item.price_list_rate) + flt(item.margin_rate_or_amount); - item.base_rate_with_margin = flt(item.rate_with_margin) * flt(cur_frm.doc.conversion_rate); + item.base_rate_with_margin = flt(item.rate_with_margin) * flt(this.frm.doc.conversion_rate); } item.rate = flt(item.rate_with_margin , precision("rate", item));