- 
                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?
FINERACT-2326: Loan contract termination same disbursement date #5078
Conversation
| loanTransactionHelper.moveLoanState(loanId, | ||
| new PostLoansLoanIdRequest().note("Contract Termination Test").externalId(Utils.randomStringGenerator("", 20)), | ||
| "contractTermination"); | ||
| }); | 
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.
All tests should have some kind of assertions, if we execute these operations what is the expected result?
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.
@alberto-art3ch Have you addressed this?
09b64cc    to
    d7add12      
    Compare
  
    | 
           @alberto-art3ch Please rebase and take a look on @budaidev's comment  | 
    
9a56a87    to
    193d270      
    Compare
  
    | /* | ||
| PostLoanProductsResponse loanProductsResponse = loanProductHelper.createLoanProduct(create4IProgressive().interestRecognitionOnDisbursementDate(false)); | ||
| Long loanId = applyAndApproveProgressiveLoan(client.getClientId(), loanProductsResponse.getResourceId(), "1 January 2024", | ||
| 500.0, 7.0, 6, (request) -> request.interestRecognitionOnDisbursementDate(false)); | ||
| disburseLoan(loanId, BigDecimal.valueOf(100), "1 January 2024"); | ||
| loanTransactionHelper.moveLoanState(loanId, | ||
| new PostLoansLoanIdRequest().note("Contract Termination Test").externalId(Utils.randomStringGenerator("", 20)), | ||
| "contractTermination"); | ||
| verifyTransactions(loanId, // | ||
| transaction(100.0, "Disbursement", "01 January 2024"), // | ||
| transaction(100.0, "Contract Termination", "01 January 2024")); | ||
| GetLoansLoanIdResponse loanDetails = loanTransactionHelper.getLoanDetails(loanId); | ||
| assertEquals(BigDecimal.ZERO.stripTrailingZeros(), | ||
| loanDetails.getSummary().getInterestCharged().stripTrailingZeros()); | ||
| */ | 
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.
@alberto-art3ch Remove if not needed!
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.
ITC updated, It is required
daf9a80    to
    ccc36cf      
    Compare
  
    ccc36cf    to
    d193a88      
    Compare
  
    d193a88    to
    fb90c01      
    Compare
  
    dc07f34    to
    4923088      
    Compare
  
    
          
 PR updated and rebased with develop branch  | 
    
c332517    to
    149b2ba      
    Compare
  
    | transactionDate); | ||
| ProgressiveLoanInterestScheduleModel model = savedModel | ||
| .orElseGet(() -> processor.calculateInterestScheduleModel(loan.getId(), transactionDate)); | ||
| // final LocalDate tillDate = loanApplicationTerms.isInterestRecognitionOnDisbursementDate() ? | 
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 is this commented out?
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.
Done! Commented lines removed those are not needed
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?
| transactionProcessingStrategyCode); | ||
| if (loanRepaymentScheduleTransactionProcessor instanceof AdvancedPaymentScheduleTransactionProcessor advancedProcessor) { | ||
| LocalDate currentDate = DateUtils.getBusinessLocalDate(); | ||
| if (interestRecognitionOnDisbursementDate && currentDate.equals(disbursementDate)) { | 
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.
This looks not right... we cannot go into the future...
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.
Please check my comments and let me know if we should connect. I see many changes which concerns me.
149b2ba    to
    8cef0fd      
    Compare
  
    
Description
When user tries a Contract termination on disbursement day it results an 500-Integral server error because there were not an Installment to be updated
FINERACT-2326
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.