Merge pull request #18161 from deepeshgarg007/additional_discount

fix: Additonal discount not getting set in sales transactions
This commit is contained in:
rohitwaghchaure
2019-07-05 18:13:23 +05:30
committed by GitHub

View File

@@ -151,6 +151,11 @@ erpnext.selling.SellingController = erpnext.TransactionController.extend({
},
discount_amount: function(doc, cdt, cdn) {
if(doc.name === cdn) {
return;
}
var item = frappe.get_doc(cdt, cdn);
item.discount_percentage = 0.0;
this.apply_discount_on_item(doc, cdt, cdn, 'discount_amount');