process current and previous standing instructions on loans
This commit is contained in:
committed by
Adam Saghy
parent
5c54a9dbea
commit
7c618a69d5
+6
-1
@@ -97,7 +97,7 @@ public class ExecuteStandingInstructionsTasklet implements Tasklet {
|
||||
transactionAmount = standingInstructionDuesData.totalDueAmount();
|
||||
}
|
||||
if (recurrenceType.isDuesRecurrence()) {
|
||||
isDueForTransfer = LocalDate.now(DateUtils.getDateTimeZoneOfTenant()).equals(standingInstructionDuesData.dueDate());
|
||||
isDueForTransfer = isDueForTransfer(standingInstructionDuesData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,4 +164,9 @@ public class ExecuteStandingInstructionsTasklet implements Tasklet {
|
||||
jdbcTemplate.update(updateQuery.toString());
|
||||
return transferCompleted;
|
||||
}
|
||||
|
||||
public boolean isDueForTransfer(StandingInstructionDuesData standingInstructionDuesData) {
|
||||
return standingInstructionDuesData.dueDate() != null
|
||||
&& !standingInstructionDuesData.dueDate().isAfter(LocalDate.now(DateUtils.getDateTimeZoneOfTenant()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user