LocalDate check should be according to timezone of tenant.
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
3ee051cf57
commit
2ae916618b
+2
-2
@@ -2929,7 +2929,7 @@ public class Loan extends AbstractPersistableCustom<Long> {
|
||||
validateRepaymentDateIsOnNonWorkingDay(paymentTransaction.getTransactionDate(), holidayDetailDTO.getWorkingDays(),
|
||||
holidayDetailDTO.isAllowTransactionsOnNonWorkingDay());
|
||||
|
||||
if (paymentTransaction.getTransactionDate().isAfter(new LocalDate())) {
|
||||
if (paymentTransaction.getTransactionDate().isAfter(DateUtils.getLocalDateOfTenant())) {
|
||||
final String errorMessage = "The date on which a loan charge paid cannot be in the future.";
|
||||
throw new InvalidLoanStateTransitionException("charge.payment", "cannot.be.a.future.date", errorMessage,
|
||||
paymentTransaction.getTransactionDate());
|
||||
@@ -3767,7 +3767,7 @@ public class Loan extends AbstractPersistableCustom<Long> {
|
||||
rescheduledOnLocalDate, getDisbursementDate());
|
||||
}
|
||||
|
||||
if (rescheduledOnLocalDate.isAfter(new LocalDate())) {
|
||||
if (rescheduledOnLocalDate.isAfter(DateUtils.getLocalDateOfTenant())) {
|
||||
final String errorMessage = "The date on which a loan is rescheduled cannot be in the future.";
|
||||
throw new InvalidLoanStateTransitionException("close.reschedule", "cannot.be.a.future.date", errorMessage,
|
||||
rescheduledOnLocalDate);
|
||||
|
||||
+2
-2
@@ -1794,7 +1794,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
||||
.retrieveInstallmentLoanCharges(chargeData.getId(), true);
|
||||
PortfolioAccountData portfolioAccountData = null;
|
||||
for (final LoanInstallmentChargeData installmentChargeData : chargePerInstallments) {
|
||||
if (!installmentChargeData.getDueDate().isAfter(new LocalDate())) {
|
||||
if (!installmentChargeData.getDueDate().isAfter(DateUtils.getLocalDateOfTenant())) {
|
||||
if (portfolioAccountData == null) {
|
||||
portfolioAccountData = this.accountAssociationsReadPlatformService.retriveLoanLinkedAssociation(chargeData
|
||||
.getLoanId());
|
||||
@@ -1810,7 +1810,7 @@ public class LoanWritePlatformServiceJpaRepositoryImpl implements LoanWritePlatf
|
||||
transferFeeCharge(sb, accountTransferDTO);
|
||||
}
|
||||
}
|
||||
} else if (chargeData.getDueDate() != null && !chargeData.getDueDate().isAfter(new LocalDate())) {
|
||||
} else if (chargeData.getDueDate() != null && !chargeData.getDueDate().isAfter(DateUtils.getLocalDateOfTenant())) {
|
||||
final PortfolioAccountData portfolioAccountData = this.accountAssociationsReadPlatformService
|
||||
.retriveLoanLinkedAssociation(chargeData.getLoanId());
|
||||
final SavingsAccount fromSavingsAccount = null;
|
||||
|
||||
Reference in New Issue
Block a user