Merge pull request #44989 from aerele/update_apply_pricing_rules

fix: apply apply_pricing_rule on date change
This commit is contained in:
ruthra kumar
2025-01-01 10:11:30 +05:30
committed by GitHub

View File

@@ -837,6 +837,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
} }
validate() { validate() {
this.apply_pricing_rule()
this.calculate_taxes_and_totals(false); this.calculate_taxes_and_totals(false);
} }
@@ -998,6 +999,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
} }
transaction_date() { transaction_date() {
this.apply_pricing_rule()
if (this.frm.doc.transaction_date) { if (this.frm.doc.transaction_date) {
this.frm.transaction_date = this.frm.doc.transaction_date; this.frm.transaction_date = this.frm.doc.transaction_date;
frappe.ui.form.trigger(this.frm.doc.doctype, "currency"); frappe.ui.form.trigger(this.frm.doc.doctype, "currency");
@@ -1006,6 +1008,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
posting_date() { posting_date() {
var me = this; var me = this;
me.apply_pricing_rule()
if (this.frm.doc.posting_date) { if (this.frm.doc.posting_date) {
this.frm.posting_date = this.frm.doc.posting_date; this.frm.posting_date = this.frm.doc.posting_date;