Fixes Issue 22870. Reverts previous change.
authorDavid Miguelez <david.miguelez@openbravo.com>
Thu, 24 Jan 2013 12:09:48 +0100
changeset 19427 918cc7183ad6
parent 19426 8e07931c30b9
child 19428 339f82efc76c
Fixes Issue 22870. Reverts previous change.
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_ShipmentPO.html
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_ShipmentPO.html	Thu Jan 24 11:04:36 2013 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_ShipmentPO.html	Thu Jan 24 12:09:48 2013 +0100
@@ -154,37 +154,6 @@
       cell.className = cell.className.replace(' DataGrid_Body_Cell_hover', '');
     }
 
-    function validateQuantity(chk) {
-        var invalid = false;
-        var i = 0;
-        var frm = document.frmMain;
-        var defaultValue = 0;
-        var currentValue = 0;
-        do {
-          if(chk.length > 0) {
-            if(chk[i].checked) {
-              defaultValue = frm.elements["inpmovementqty" + chk[i].value].defaultValue;
-              currentValue = frm.elements["inpmovementqty" + chk[i].value].value;   
-            }
-          }
-          else {
-            if(chk.checked) {
-              defaultValue = frm.elements["inpmovementqty" + chk.value].defaultValue;
-              currentValue = frm.elements["inpmovementqty" + chk.value].value;   
-            }
-          }
-          i = i + 1;     
-          if(formattedNumberOp(currentValue, '>', defaultValue)) {
-            invalid = true;
-            showJSMessage('InvalidMovementQty');
-            break;
-          }
-          else
-            continue;
-        } while (i<chk.length);
-        if(!invalid)
-          submitThisPage('SAVE');
-      }
   </script>
   <script language="JavaScript" type="text/javascript">
     function onLoadDo(){
@@ -620,7 +589,7 @@
                   <button type="button" 
                     id="buttonOK" 
                     class="ButtonLink" 
-                    onclick="validateQuantity(document.frmMain.inpId);return false;"
+                    onclick="submitThisPage('SAVE');return false;" 
                     onfocus="buttonEvent('onfocus', this); window.status='Accept'; return true;" 
                     onblur="buttonEvent('onblur', this);" 
                     onkeyup="buttonEvent('onkeyup', this);"