AshharAhmadKhan commented on PR #6144:
URL: https://github.com/apache/fineract/pull/6144#issuecomment-5945268537

   Hey @adamsaghy, thanks a lot for the review, it was really helpful. I went 
through every point and pushed the updates.
   
   Updates:
   
   - Loan to Savings undo now uses the same pattern as Savings to Loan: 
undoTransaction on the savings side, then adjustLoanTransaction on the loan 
side, then transaction.reverse(). So the loan gets reprocessed properly 
(summary, status, events).
   
   - Removed the reverseTransfer and manuallyAdjustedOrReversed change 
completely, so nothing changes for the existing callers.
   
   - adjustLoanTransaction was rejecting a plain REFUND, so I added !isRefund() 
to its guard. Just flagging that this also affects the normal adjust path.
   
   - Undoing a loan disbursement that was transferred to savings is now 
rejected with an explicit error 
(error.msg.account.transfer.undo.loan.disbursement.not.supported) before 
anything is reversed.
   
   - Rebased on top of #6136, so the lookup by transfer transaction id comes 
from there.
   
   Tests:
   
   - The e2e now resolves the transfer transaction id through the list endpoint 
(same fix as #6136) instead of using the create resourceId.
   
   - The e2e now checks loan status and overpaid amount before and after the 
undo.
   
   - I also added a scenario where the refund closes the loan 
(CLOSED_OBLIGATIONS_MET) and the undo brings it back to OVERPAID.
   
   - Unit tests added for the refund undo, the disbursement rejection and the 
already reversed case.
   
   One thing to note: journal entry reversal relies on the shared 
adjustLoanTransaction path (same as Savings to Loan). It is not asserted in the 
e2e yet. Happy to add an accounting scenario here or as a follow-up, whichever 
you prefer.
   
   Also, the new e2e scenario has no @TestRailId, let me know if you want me to 
add one.
   
   I updated the PR description too. Could you please trigger the checks when 
you are free? Thanks again!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to