Fixes issue 41062: Updates creation date in new FIN_PaymentScheduleDetail
authorNono Carballo <nonofce@gmail.com>
Tue, 11 Jun 2019 09:15:25 -0400
changeset 36128 01243bac26fd
parent 36127 f90da150f6a7
child 36129 07fd428fb5a5
Fixes issue 41062: Updates creation date in new FIN_PaymentScheduleDetail

When adding a partial payment, the creation date of the new
FIN_PaymentScheduleDetail is updated.
modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Thu Jun 06 15:59:31 2019 -0400
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java	Tue Jun 11 09:15:25 2019 -0400
@@ -21,6 +21,7 @@
 
 import java.math.BigDecimal;
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -689,6 +690,7 @@
       BigDecimal writeoffAmount, BigDecimal debtAmount) {
     final FIN_PaymentScheduleDetail newPaymentScheduleDetail = (FIN_PaymentScheduleDetail) DalUtil
         .copy(paymentScheduleDetail);
+    newPaymentScheduleDetail.setCreationDate(Calendar.getInstance().getTime());
     newPaymentScheduleDetail.setAmount(writeoffAmount);
     newPaymentScheduleDetail.setDoubtfulDebtAmount(debtAmount);
     OBDal.getInstance().save(newPaymentScheduleDetail);