-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: update expense claim outstanding amount and status on payment unreconcile #3421
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?
Conversation
…atus on unreconcile payment submission
…nt-on-payment-unreconcile
WalkthroughA new document event hook was introduced for the "Unreconcile Payment" doctype, triggering an update function on submit. The added function updates the reimbursed amount of related Expense Claims when an unreconcile payment is processed, ensuring accurate tracking of reimbursement status. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ERP System
participant UnreconcilePaymentDoc
participant ExpenseClaimDoc
User->>ERP System: Submit Unreconcile Payment
ERP System->>UnreconcilePaymentDoc: on_submit event triggered
UnreconcilePaymentDoc->>ERP System: Call update_expense_claim_on_unreconcile_payment
ERP System->>ExpenseClaimDoc: For each allocation referencing Expense Claim, fetch and update
ExpenseClaimDoc->>ERP System: update_reimbursed_amount called
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (2)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Description
This PR fixes an issue where Expense Claims were not updating their outstanding amount and status when a Payment Entry linked to the claim was unreconciled.
Issue:
Solution Implemented:
update_expense_claim_on_unreconcile_payment
update_reimbursed_amount()
to recalculate outstanding amount and update status.This ensures that Expense Claims now remain accurate.
Testing
Summary by CodeRabbit