From c1353e3001748d53263b16f9199e49d47471719c Mon Sep 17 00:00:00 2001 From: ashok-conflux Date: Tue, 29 Oct 2013 17:59:08 +0530 Subject: [PATCH] allow to pay all pending arrears recurring charges through scheduled job --- .../SavingsAccountWritePlatformServiceJpaRepositoryImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java index d78aec3f7..caa56d665 100644 --- a/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java +++ b/mifosng-provider/src/main/java/org/mifosplatform/portfolio/savings/service/SavingsAccountWritePlatformServiceJpaRepositoryImpl.java @@ -826,7 +826,10 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi savingsAccountChargeId, accountId); final DateTimeFormatter fmt = DateTimeFormat.forPattern("dd MM yyyy"); - payCharge(savingsAccountCharge, transactionDate, savingsAccountCharge.amoutOutstanding(), fmt); + + while (transactionDate.isAfter(savingsAccountCharge.getDueLocalDate())) { + payCharge(savingsAccountCharge, transactionDate, savingsAccountCharge.amoutOutstanding(), fmt); + } } @Transactional