Fixes bug 26995 oustandingAmount is wrong calculated in done validation
authorSandra Huguet <sandra.huguet@openbravo.com>
Wed, 02 Jul 2014 11:24:49 +0200
changeset 24162 af3384088da6
parent 24161 c72ba2ba542e
child 24163 dda8644b37a3
Fixes bug 26995 oustandingAmount is wrong calculated in done validation
modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js	Thu Jul 03 15:12:47 2014 +0200
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js	Wed Jul 02 11:24:49 2014 +0200
@@ -747,7 +747,7 @@
 
   // Check if there is pending amount to distribute that could be distributed
   for (i = 0; i < selectedRecords.length; i++) {
-    outstandingAmount = new BigDecimal(String(orderInvoiceGrid.getRecord(i).outstandingAmount));
+    outstandingAmount = new BigDecimal(String(selectedRecords[i].outstandingAmount));
     totalOustandingAmount = totalOustandingAmount.add(outstandingAmount);
   }
   for (i = 0; i < orderInvoiceGrid.data.totalRows; i++) {