-
Notifications
You must be signed in to change notification settings - Fork 27
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
Fix payment schedule outstanding #251
Conversation
], | ||
"on_submit": ["check_run.overrides.payment_entry.update_check_number"], | ||
"on_submit": [ | ||
"check_run.overrides.payment_entry.update_outstanding_amount", |
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.
Won't we need to reverse this in on_cancel
?
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.
@fproldan I added the hook and some tests for this since it was a bit of a refactor. Can you review again?
@fproldan I forgot to add a test and logic for a cancelled manual Payment Entry. I'll let you know when this need another review. |
@fproldan Can you give this one another look please? |
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 great!
I made the PR #253 with minor changes and added precision. we can add those changes if are good to you
Payment Entries are (somehow) not responsible for updating the outstanding amount field(s) of their source documents. This should be fixed with this workflow. Frappe has a functionality to selectively update terms where a payment term exists, but it doesn't work with the manual API (
get_payment_entry("Purchase Invoice", pi_name)
)