Fixes Issue 22352: Wrong behaviour when reactivate a payment of G/L Items
authorPandeeswari Ramakrishnan <pandeeswari.ramakrishnan@openbravo.com>
Thu, 31 Jan 2013 18:02:12 +0530
changeset 19545 1c2b9754fa15
parent 19544 cad8ad34dd84
child 19546 b070aa80fc76
Fixes Issue 22352: Wrong behaviour when reactivate a payment of G/L Items
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html	Fri Feb 01 12:24:51 2013 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html	Thu Jan 31 18:02:12 2013 +0530
@@ -254,11 +254,11 @@
           var amountSelected = 0;
           for (i=0;i<glItems.length;i++){
             if (isTrue('isReceipt')) {
-              amountSelected = add(amountSelected,glItems[i].glitemReceivedInAmt);
-              amountSelected = subtract(amountSelected,glItems[i].glitemPaidOutAmt);
+              amountSelected = add(amountSelected,applyFormatJSToOBMasked(glItems[i].glitemReceivedInAmt));
+              amountSelected = subtract(amountSelected,applyFormatJSToOBMasked(glItems[i].glitemPaidOutAmt));
             } else {
-              amountSelected = subtract(amountSelected,glItems[i].glitemReceivedInAmt);
-              amountSelected = add(amountSelected,glItems[i].glitemPaidOutAmt);
+              amountSelected = subtract(amountSelected,applyFormatJSToOBMasked(glItems[i].glitemReceivedInAmt));
+              amountSelected = add(amountSelected,applyFormatJSToOBMasked(glItems[i].glitemPaidOutAmt));
             }
           }
           document.getElementById('paramGLItems').value = '';