Fixed issue 18394.Fix check on FIN_Utilities.js.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Wed, 31 Aug 2011 10:40:02 +0200
changeset 13627 3b5f56734bca
parent 13626 2a1d61ea3efc
child 13628 f184d98cb917
child 13629 5fdf47cc9185
Fixed issue 18394.Fix check on FIN_Utilities.js.
modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js	Wed Aug 31 10:34:18 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/FIN_Utilities.js	Wed Aug 31 10:40:02 2011 +0200
@@ -385,9 +385,9 @@
       frm.inpActualPayment.value = frm.inpGeneratedCredit.value;
     }
     updateDifference();
-    if (OB.APRM.HasGLItems === 'undefined' || !OB.APRM.HasGLItems) {
+    //if (OB.APRM.HasGLItems === 'undefined' || !OB.APRM.HasGLItems) {
       //return;
-    }
+    //}
   } else if (!chk.length) {
     scheduledPaymentDetailId = frm.inpRecordId0.value;
     pendingAmount = frm.elements["inpRecordAmt" + scheduledPaymentDetailId].value;
@@ -613,7 +613,7 @@
       if (!validateSelectedAmounts(chk.value, compare(selectedTotal, '<', actualPayment), action)) {
         return false;
       }
-    } else if ( !allowNotSelectingPendingPayment || compare(document.frmMain.inpDifference.value, '==', "0") ){
+    } else if ( !allowNotSelectingPendingPayment || compare(actualPayment, '==', "0")){
       showJSMessage('APRM_JSNOTLINESELECTED');
       return false;
     }
@@ -629,7 +629,7 @@
       }
     }
     if (!isAnyChecked &&
-        (!allowNotSelectingPendingPayment || compare(document.frmMain.inpDifference.value, '==', "0")) 
+        (!allowNotSelectingPendingPayment || compare(actualPayment, '==', "0"))
         ) {
       showJSMessage('APRM_JSNOTLINESELECTED');
       return false;