-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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: Recalculate payment amounts instead of refetching the schedule. #38044
Conversation
bb20473
to
c084a06
Compare
Codecov Report
@@ Coverage Diff @@
## develop #38044 +/- ##
===========================================
- Coverage 67.39% 67.39% -0.01%
===========================================
Files 757 757
Lines 60379 60376 -3
===========================================
- Hits 40692 40689 -3
Misses 19687 19687
|
Marked as draft as we need additional tests. First I will reinstate Gursheen‘s test from #36440. Besides that, please review. Also consider #38031: There may be a point in removing And #38029: When the Sales Order already has a Payment Schedule, it‘s hard to imagine why you wouldn‘t preserve it in the Sales Invoice. Simplifying the logic here would reduce complexity both in code and in the UI:
|
c084a06
to
89d9fcd
Compare
Gursheen‘s test still fails. Need to look into what exactly is expected there and why, and add more testing. |
This pull request has been automatically marked as inactive because it has not had recent activity. It will be closed within 3 days if no further activity occurs, but it only takes a comment to keep a contribution alive :) Also, even if it is closed, you can always reopen the PR when you're ready. Thank you for contributing. |
I still think both my assessment and the solution was correct, but apologize for putting you guys off with a premature PR. Will only reopen once fully investigated. |
Fixes #38030.
Reverts #35007 while still fixing the issue reported there.
Reverts #35285 while still fixing the issue reported there.
Also reverts #36440. Unsure whether
allocate_payment_based_on_payment_terms
is useful at all – either you have a schedule and allocate accordingly or you don’t. But even if turned off, we need the payment schedule to be correct. Otherwise we needed to clear the schedule altogether.Last mostly correct commit was #34872, but we need to doublecheck if every single of the later reported cases are still covered.
Definitely needs more test cases and optimally some feedback by @ruthra-kumar, @GursheenK, and/or @deepeshgarg007.