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: incorrect item-wise tax distribution in item valuation #42229

Closed
wants to merge 0 commits into from

Conversation

jabir-tridz
Copy link

@jabir-tridz jabir-tridz commented Jul 8, 2024

Item wise tax are not respected in Purchase receipt valuation:

In the previous implementation, when an item-wise tax template was selected, the tax rate of that item was split proportionally among the valuation rates of all items in the list, leading to inaccurate item valuations.
This fix corrects the distribution of item-wise tax to the valuation rate of each item and ensures that only the item with a tax template selected reflects its own valuation rate.

Also added validation to ensure that when a purchase tax template is selected, the item tax template is disregarded.

For eg:-

Item 1: Lemon
Rate: 70
Item tax : 5%

Item 2: Onion
Rate: 37
Item tax: 10%

Screenshot from 2024-07-08 22-24-08

Screenshot from 2024-07-08 22-21-28

Valaution Rate Shown in Ledger:- (for Either "Valuation" or "Valuation and Total")

BEFORE:-
Screenshot from 2024-07-08 23-22-58

Lemon: 74.71
Onion: 39.49

AFTER:-
Screenshot from 2024-07-08 23-29-40

Lemon 73.5 ( 70 + 3.5(5%) )
Onion 40.7 ( 37 + 3.7(10%) )

@github-actions github-actions bot added buying needs-tests This PR needs automated unit-tests. labels Jul 8, 2024
@jabir-tridz jabir-tridz marked this pull request as ready for review July 15, 2024 07:07
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
buying needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant