fix: Allocate payment amount in reference table on change of payment amount (#19041)

This commit is contained in:
Nabin Hait 2019-09-13 15:48:50 +05:30 committed by GitHub
parent b3c732daf5
commit 93a9c08116
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;