Merge pull request #16095 from SaiFi0102/BugFix-Rate-Calculation

Fixed error due to incorrect use of 'this' while calculating rate
This commit is contained in:
Nabin Hait 2018-11-26 19:31:25 +05:30 committed by GitHub
commit 736ce9a176
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -33,7 +33,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
item.margin_rate_or_amount = 0;
item.rate_with_margin = 0;
}
item.base_rate_with_margin = item.rate_with_margin * flt(this.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();