Fixed bug 19905: JSON exception on Add Details button for Payment Out window
authorVíctor Martínez Romanos <victor.martinez@openbravo.com>
Wed, 29 Feb 2012 12:47:29 +0100
changeset 15647 36954df33011
parent 15646 42dbbe2c9bec
child 15648 0e1375b72b2c
Fixed bug 19905: JSON exception on Add Details button for Payment Out window
Ensure OB.APRM.APFT_GLItems is not undefined when submitting to the server

In case the GL Item selector is not properly load (for example, because of a performance
issue), the value assigned to OB.APRM.APFT_GLItems was undefined. After the fix, if
OB.APRM.APFT_GLItems is undefined, we set it to []
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	Wed Feb 29 12:05:16 2012 +0100
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_actionbutton/AddOrderOrInvoice.html	Wed Feb 29 12:47:29 2012 +0100
@@ -12,7 +12,7 @@
  * under the License.
  * The Original Code is Openbravo ERP.
  * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2010-2011 Openbravo SLU
+ * All portions are Copyright (C) 2010-2012 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -331,6 +331,7 @@
       }
       if (!validateSelectedPendingPayments(true, selectedAction)) { return false; }
     }
+    OB.APRM.APFT_GLItems = OB.APRM.APFT_GLItems || [];
   }
   return true;
 }