[fix] discount setting multiple times

This commit is contained in:
Rushabh Mehta 2017-07-07 13:14:08 +05:30
parent 233a19a373
commit 6705ab3eaf

View File

@ -76,7 +76,8 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
if(frm.doc.additional_discount_percentage && frm.doc.discount_amount) {
// Reset discount amount and net / grand total
frm.set_value("discount_amount", 0);
frm.doc.discount_amount = 0;
frm.cscript.calculate_taxes_and_totals();
}
var total = flt(frm.doc[frappe.model.scrub(frm.doc.apply_discount_on)]);