Skip to content
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

Merged
merged 5 commits into from
Jun 19, 2024

Conversation

agritheory
Copy link
Owner

@agritheory agritheory commented Jun 14, 2024

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))

],
"on_submit": ["check_run.overrides.payment_entry.update_check_number"],
"on_submit": [
"check_run.overrides.payment_entry.update_outstanding_amount",
Copy link
Collaborator

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?

Copy link
Owner Author

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?

@agritheory
Copy link
Owner Author

@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.

@agritheory agritheory marked this pull request as draft June 18, 2024 13:23
@agritheory agritheory marked this pull request as ready for review June 18, 2024 16:04
@fproldan fproldan self-requested a review June 18, 2024 16:06
@agritheory
Copy link
Owner Author

@fproldan Can you give this one another look please?

Copy link
Collaborator

@fproldan fproldan left a 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

@agritheory agritheory merged commit 46a084a into version-14 Jun 19, 2024
5 checks passed
@agritheory agritheory deleted the fix_payment_schedule_outstanding branch June 19, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants