-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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(accounts): payment entry unallocated amount #30927
Conversation
# $20.00 USD * 45.263 = 905.26 INR # $20.00 USD * 50 = 1000 INR # 1000 - 905.26 = 94.74 INR # Therefore, deduction amount = 94.74
Codecov Report
@@ Coverage Diff @@
## develop #30927 +/- ##
===========================================
- Coverage 63.07% 63.03% -0.04%
===========================================
Files 985 985
Lines 67272 67277 +5
===========================================
- Hits 42431 42410 -21
- Misses 24841 24867 +26
|
Disregard comment about allocation for credit note. |
I'm starting to think the only way to solve this is to separate deductions/writeoffs and exchange rate deductions into separate child tables. Having a condition that forces unallocated_amount to be zero is not working. It should be produced by addition and subtraction. The only way I can think to solve this is to subtract exchange deductions from total_deductions. Then calculate the unallocated_amount |
Gonna post some screen recordings in a few hours. |
I don't know why the linter keeps failing. I've run |
@deepeshgarg007 This is working. Can you please review. |
@deepeshgarg007 Just checking up, did you have a chance to review this ? |
@dj12djdjs I am reviewing this and will also take a second opinion internally if we need a separate table for losses |
If you guys can find a way to make it work in 1 table that would be more convenient. I don't have much experience in accounting. This is the only way I could make it work. |
@deepeshgarg007 any update from the team on this matter? |
@deepeshgarg007 Is there a time frame for this? |
@dj12djdjs does this have any relation to being able to pull credit note amounts sitting on account as payment method for other invoices? |
@OneiricIT no, this PR is just about unallocated calculation method |
Closing this since a new PR is raised for this. |
Continuation of #30504
closes: #29595
closes: #23936
** Allocating References
This shows the unallocated amount being changes as rows become allocated.
** Write Offs
Using the "deductions" table, the unallocated_amount can be manipulated. It's primary use is for rounding, and writeoffs.
** Exchange gain/loss
Using the "losses table, the difference_amount can be manipulated. It's primary use if for declaring the difference between currencies.