fixed bug 19402 Set generated Credit to 0.00 when it's null(FIN_PaymentProcess)
authorNaiara Martinez <naiara.martinez@openbravo.com>
Thu, 10 May 2012 09:17:40 +0200
changeset 16482 075bbec1e396
parent 16481 9d66f8172e1a
child 16483 dc8359e908b0
fixed bug 19402 Set generated Credit to 0.00 when it's null(FIN_PaymentProcess)
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Thu May 10 07:03:17 2012 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Thu May 10 09:17:40 2012 +0200
@@ -196,6 +196,9 @@
           payment.setWriteoffAmount(paymentWriteOfAmount);
           payment.setProcessed(true);
           payment.setAPRMProcessPayment("R");
+          if (payment.getGeneratedCredit() == null) {
+            payment.setGeneratedCredit(BigDecimal.ZERO);
+          }
           if (BigDecimal.ZERO.compareTo(payment.getUsedCredit()) != 0
               || BigDecimal.ZERO.compareTo(payment.getGeneratedCredit()) != 0) {
             BusinessPartner businessPartner = payment.getBusinessPartner();