- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.1k
 
FINERACT-2326: Loan contract termination same disbursement date #5078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -149,13 +149,17 @@ private Loan getLoan(List<LoanTransaction> loanTransactions, List<LoanRepaymentS | |
| @Override | ||
| public ChangedTransactionDetail reprocessLoanTransactions(String transactionProcessingStrategyCode, LocalDate disbursementDate, | ||
| List<LoanTransaction> loanTransactions, MonetaryCurrency currency, List<LoanRepaymentScheduleInstallment> installments, | ||
| Set<LoanCharge> charges) { | ||
| Set<LoanCharge> charges, boolean interestRecognitionOnDisbursementDate) { | ||
| final LoanRepaymentScheduleTransactionProcessor loanRepaymentScheduleTransactionProcessor = getTransactionProcessor( | ||
| transactionProcessingStrategyCode); | ||
| if (loanRepaymentScheduleTransactionProcessor instanceof AdvancedPaymentScheduleTransactionProcessor advancedProcessor) { | ||
| LocalDate currentDate = DateUtils.getBusinessLocalDate(); | ||
| LocalDate interestForDate = DateUtils.getBusinessLocalDate(); | ||
| if (interestRecognitionOnDisbursementDate && interestForDate.equals(disbursementDate)) { | ||
| 
         There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I dont think its correct to use current date + 1 which effectively a future date. We cannot work against future date for transaction processing. Also interest is payable on the current date anyway, we dont need this.   | 
||
| interestForDate = interestForDate.plusDays(1L); | ||
| } | ||
| Pair<ChangedTransactionDetail, ProgressiveLoanInterestScheduleModel> result = advancedProcessor | ||
| .reprocessProgressiveLoanTransactions(disbursementDate, currentDate, loanTransactions, currency, installments, charges); | ||
| .reprocessProgressiveLoanTransactions(disbursementDate, interestForDate, loanTransactions, currency, installments, | ||
| charges); | ||
| if (!TransactionSynchronizationManager.isCurrentTransactionReadOnly()) { | ||
| modelRepository.writeInterestScheduleModel(getLoan(loanTransactions, installments, charges), result.getRight()); | ||
| } | ||
| 
          
            
          
           | 
    ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why to change this?