[Reservations]Fix issue in PandE.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Tue, 06 Nov 2012 12:35:32 +0100
changeset 18682 7b91ed9d54bc
parent 18681 ff35907f8977
child 18683 a3b01ae29b19
[Reservations]Fix issue in PandE.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/materialmgmt/ob-reservation.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/materialmgmt/ob-reservation.js	Tue Nov 06 12:35:00 2012 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/materialmgmt/ob-reservation.js	Tue Nov 06 12:35:32 2012 +0100
@@ -50,7 +50,9 @@
   }
   for (i = 0; i < selectedRecordsLength; i++) {
     editedRecord = isc.addProperties({}, selectedRecords[i], item.grid.getEditedRecord(selectedRecords[i]));
-    reservedQty = reservedQty.add(new BigDecimal(String(editedRecord.quantity)));
+    if (isc.isA.Number(editedRecord.quantity)) {
+      reservedQty = reservedQty.add(new BigDecimal(String(editedRecord.quantity)));
+    }
   }
   if (reservedQty.compareTo(totalQty) > 0) {
     return false;