diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 6b20212673a..3492ad954df 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -1182,7 +1182,7 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ payment_terms_template: function() { var me = this; - if(this.frm.doc.payment_terms_template && this.frm.doc.payment_schedule.length === 0) { + if(this.frm.doc.payment_terms_template && !this.frm.doc.payment_schedule) { frappe.call({ method: "erpnext.controllers.accounts_controller.get_payment_terms", args: {