From b85a9108ebf1ddfd19cfc9922b55e1ca4b45e9f3 Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Wed, 30 Apr 2014 19:32:16 +0530 Subject: [PATCH] Payment to invoice matching tool --- .../payment_to_invoice_matching_tool.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js index fae46469d6..4c5a3822c0 100644 --- a/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js +++ b/erpnext/accounts/doctype/payment_to_invoice_matching_tool/payment_to_invoice_matching_tool.js @@ -41,11 +41,11 @@ cur_frm.cscript.reconcile = function() { }); } -cur_frm.cscript.amt_to_be_reconciled = function(doc, cdt, cdn) { +cur_frm.cscript.allocated_amount = function(doc, cdt, cdn) { var total_allocated_amount = 0 $.each(cur_frm.doc.against_entries, function(i, d) { - if(d.amt_to_be_reconciled > 0) total_allocated_amount += flt(d.amt_to_be_reconciled); - else if (d.amt_to_be_reconciled < 0) frappe.throw(__("Allocated amount can not be negative")); + if(d.allocated_amount > 0) total_allocated_amount += flt(d.allocated_amount); + else if (d.allocated_amount < 0) frappe.throw(__("Allocated amount can not be negative")); }) cur_frm.set_value("total_allocated_amount", total_allocated_amount); }