Merge pull request #829 from lingalamadhukar/MIFOSX-1008
MIFOSX-998,MIFOSX-1008 Interest posting issue
This commit is contained in:
+5
@@ -160,6 +160,11 @@ public class GroupingTypesWritePlatformServiceJpaRepositoryImpl implements Group
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!newGroup.isCenter() && newGroup.hasActiveClients()) {
|
||||||
|
final CommandWrapper commandWrapper = new CommandWrapperBuilder().associateClientsToGroup(newGroup.getId()).build();
|
||||||
|
rollbackTransaction = this.commandProcessingService.validateCommand(commandWrapper, currentUser);
|
||||||
|
}
|
||||||
|
|
||||||
// pre-save to generate id for use in group hierarchy
|
// pre-save to generate id for use in group hierarchy
|
||||||
this.groupRepository.save(newGroup);
|
this.groupRepository.save(newGroup);
|
||||||
|
|
||||||
|
|||||||
+4
@@ -1164,6 +1164,10 @@ public class SavingsAccount extends AbstractPersistable<Long> {
|
|||||||
return this.client;
|
return this.client;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getNominalAnnualInterestRate() {
|
||||||
|
return this.nominalAnnualInterestRate;
|
||||||
|
}
|
||||||
|
|
||||||
public Map<String, Object> approveApplication(final AppUser currentUser, final JsonCommand command, final LocalDate tenantsTodayDate) {
|
public Map<String, Object> approveApplication(final AppUser currentUser, final JsonCommand command, final LocalDate tenantsTodayDate) {
|
||||||
|
|
||||||
final Map<String, Object> actualChanges = new LinkedHashMap<String, Object>();
|
final Map<String, Object> actualChanges = new LinkedHashMap<String, Object>();
|
||||||
|
|||||||
+2
@@ -309,6 +309,7 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi
|
|||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
private void postInterest(final SavingsAccount account) {
|
private void postInterest(final SavingsAccount account) {
|
||||||
|
if (account.getNominalAnnualInterestRate().compareTo(BigDecimal.ZERO) == 1) {
|
||||||
final Set<Long> existingTransactionIds = new HashSet<Long>();
|
final Set<Long> existingTransactionIds = new HashSet<Long>();
|
||||||
final Set<Long> existingReversedTransactionIds = new HashSet<Long>();
|
final Set<Long> existingReversedTransactionIds = new HashSet<Long>();
|
||||||
updateExistingTransactionsDetails(account, existingTransactionIds, existingReversedTransactionIds);
|
updateExistingTransactionsDetails(account, existingTransactionIds, existingReversedTransactionIds);
|
||||||
@@ -329,6 +330,7 @@ public class SavingsAccountWritePlatformServiceJpaRepositoryImpl implements Savi
|
|||||||
|
|
||||||
postJournalEntries(account, existingTransactionIds, existingReversedTransactionIds);
|
postJournalEntries(account, existingTransactionIds, existingReversedTransactionIds);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@CronTarget(jobName = JobName.POST_INTEREST_FOR_SAVINGS)
|
@CronTarget(jobName = JobName.POST_INTEREST_FOR_SAVINGS)
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user