feat: coupon code discount in pos invoice (#27103)

This commit is contained in:
Frappe PR Bot
2021-08-24 19:47:40 +05:30
committed by GitHub
parent f84740e6e4
commit a7cdba24bc
5 changed files with 43 additions and 7 deletions

View File

@@ -2223,12 +2223,19 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
coupon_code: function() {
var me = this;
frappe.run_serially([
() => this.frm.doc.ignore_pricing_rule=1,
() => me.ignore_pricing_rule(),
() => this.frm.doc.ignore_pricing_rule=0,
() => me.apply_pricing_rule()
]);
if (this.frm.doc.coupon_code) {
frappe.run_serially([
() => this.frm.doc.ignore_pricing_rule=1,
() => me.ignore_pricing_rule(),
() => this.frm.doc.ignore_pricing_rule=0,
() => me.apply_pricing_rule()
]);
} else {
frappe.run_serially([
() => this.frm.doc.ignore_pricing_rule=1,
() => me.ignore_pricing_rule()
]);
}
}
});