[fix] On change of payment terms template, not fetch respective schedule data (#11928)
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index 8daf3fd..c8d30c8 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -705,7 +705,7 @@
total_portion += flt(term.get('invoice_portion', 0))
if flt(total_portion, 2) != 100.00:
- frappe.throw(_('Combined invoice portion must equal 100%'), indicator='red')
+ frappe.msgprint(_('Combined invoice portion must equal 100%'), indicator='red', raise_exception=1)
def is_rounded_total_disabled(self):
if self.meta.get_field("disable_rounded_total"):
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 8dbb996..66c0c44 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -1186,7 +1186,7 @@
payment_terms_template: function() {
var me = this;
- if(this.frm.doc.payment_terms_template && !this.frm.doc.payment_schedule) {
+ if(this.frm.doc.payment_terms_template) {
frappe.call({
method: "erpnext.controllers.accounts_controller.get_payment_terms",
args: {