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, 09 Jun 2017 05:19:44 GMT
Github user nazeer1100126 commented on a diff in the pull request:

    https://github.com/apache/fineract/pull/351#discussion_r121050562
  
    --- 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 --
    
    What happens when linked savings account is not available? There might be a null pointer
exception here.


---
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