fineract-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nazeer1100126 <...@git.apache.org>
Subject [GitHub] fineract pull request #351: MIFOSX-2149-Surplus Payment Treatment for Loan
Date Fri, 16 Jun 2017 15:15:07 GMT
Github user nazeer1100126 commented on a diff in the pull request:

    https://github.com/apache/fineract/pull/351#discussion_r122465971
  
    --- Diff: fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/service/LoanWritePlatformServiceJpaRepositoryImpl.java
---
    @@ -1789,6 +1791,45 @@ private LoanCharge retrieveLoanChargeBy(final Long loanId, final
Long loanCharge
             return loanCharge;
         }
     
    +	@Override
    +    @CronTarget(jobName = JobName.ALLOCATE_OVERPAYMENTS_TO_SAVINGS)
    +    public void allocateOverpayments() throws JobExecutionException {
    +        final Collection<Long> loanIds = this.loanReadPlatformService.fetchOverpayedLoansForAllocation();
    +        final StringBuilder sb = new StringBuilder();
    +
    +        if(loanIds != null){
    +            for(final Long loanId : loanIds){
    +
    +                try{
    +                    final AccountAssociations accountAssociations = this.accountAssociationRepository.findByLoanIdAndType(loanId,AccountAssociationType.LINKED_ACCOUNT_ASSOCIATION.getValue());
    --- End diff --
    
    Assume a case with over paid loans which doesn't have linked savings account. That time
accountAssociations will be null right?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message