[RM]Add validation for received qty on RM Receipt P&E.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Mon, 07 Nov 2011 18:40:12 +0100
changeset 14532 f017efe7dec8
parent 14531 7c6a803fc198
child 14533 6f1e2a2540a5
[RM]Add validation for received qty on RM Receipt P&E.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/return-material/ob-return-material.js
src-db/database/sourcedata/AD_FIELD.xml
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/return-material/ob-return-material.js	Mon Nov 07 18:39:40 2011 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/return-material/ob-return-material.js	Mon Nov 07 18:40:12 2011 +0100
@@ -24,4 +24,11 @@
  */
 OB.RM.RMOrderQtyValidate = function (item, validator, value, record) {
   return value <= record.movementQuantity;
+};
+
+/**
+ * Check that entered received quantity is less than pending qty.
+ */
+OB.RM.RMReceiptQtyValidate = function (item, validator, value, record) {
+  return value <= record.pending;
 };
\ No newline at end of file
--- a/src-db/database/sourcedata/AD_FIELD.xml	Mon Nov 07 18:39:40 2011 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Mon Nov 07 18:40:12 2011 +0100
@@ -198283,6 +198283,7 @@
 <!--B0D4715F114BE93FE040007F01005164-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
 <!--B0D4715F114BE93FE040007F01005164-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
 <!--B0D4715F114BE93FE040007F01005164-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--B0D4715F114BE93FE040007F01005164-->  <EM_OBUIAPP_VALIDATOR><![CDATA[OB.RM.RMReceiptQtyValidate]]></EM_OBUIAPP_VALIDATOR>
 <!--B0D4715F114BE93FE040007F01005164--></AD_FIELD>
 
 <!--B0D4715F114CE93FE040007F01005164--><AD_FIELD>