From 93a9c081162a54db3faa77694f177e64798ab907 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 13 Sep 2019 15:48:50 +0530 Subject: [PATCH] fix: Allocate payment amount in reference table on change of payment amount (#19041) --- erpnext/accounts/doctype/payment_entry/payment_entry.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/payment_entry/payment_entry.js b/erpnext/accounts/doctype/payment_entry/payment_entry.js index f17b2cbeda4..172d5372a61 100644 --- a/erpnext/accounts/doctype/payment_entry/payment_entry.js +++ b/erpnext/accounts/doctype/payment_entry/payment_entry.js @@ -720,7 +720,7 @@ frappe.ui.form.on('Payment Entry', { $.each(frm.doc.references || [], function(i, row) { row.allocated_amount = 0 //If allocate payment amount checkbox is unchecked, set zero to allocate amount - if(frappe.flags.allocate_payment_amount){ + if(frappe.flags.allocate_payment_amount != 0){ if(row.outstanding_amount > 0 && allocated_positive_outstanding > 0) { if(row.outstanding_amount >= allocated_positive_outstanding) { row.allocated_amount = allocated_positive_outstanding;