Merged heads
authorMartin Taal <martin.taal@openbravo.com>
Thu, 11 Jun 2015 17:13:36 +0200
changeset 26900 aba1a9d25e4d
parent 26899 f6e2f6a4c29b (current diff)
parent 26898 3eaa0f22f0db (diff)
child 26901 2a66cd73cfe8
child 26905 83a0f8d2d083
Merged heads
--- a/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js	Thu Jun 11 12:37:01 2015 +0200
+++ b/modules/org.openbravo.advpaymentmngt/web/org.openbravo.advpaymentmngt/js/ob-aprm-addPayment.js	Thu Jun 11 17:13:36 2015 +0200
@@ -1137,7 +1137,7 @@
     return clientSideValidationFail();
   }
 
-  if ((total.compareTo(creditTotalItem) < 0) && (overpaymentField.isVisible() && overpaymentAction === 'CR')) {
+  if (creditTotalItem.compareTo(BigDecimal.prototype.ZERO) !== 0 && (total.compareTo(creditTotalItem) < 0) && (overpaymentField.isVisible() && overpaymentAction === 'CR')) {
     view.messageBar.setMessage(isc.OBMessageBar.TYPE_ERROR, null, OB.I18N.getLabel('APRM_MORECREDITAMOUNT'));
     return clientSideValidationFail();
   }