Skip to content

[Bugfix] Incorrect Unit Net Price #432

Open
tomkalon wants to merge 2 commits into
Sylius:2.2from
tomkalon:bugfix/unit-net-price
Open

[Bugfix] Incorrect Unit Net Price #432
tomkalon wants to merge 2 commits into
Sylius:2.2from
tomkalon:bugfix/unit-net-price

Conversation

@tomkalon

@tomkalon tomkalon commented Jun 22, 2026

Copy link
Copy Markdown
Q A
Branch? 2.2
Bug fix? yes
New feature? no
BC breaks? yes
Related tickets #311
License MIT

Description

When no CalculatorInterface is injected (the deprecated path), UnitNetPriceProvider now recalculates the included tax from the full unit price (unitPrice − unitPrice/(1+rate)) instead of
subtracting the neutral adjustment's getAmount(). That old amount is computed on the discounted, post-promotion price, so subtracting it from the full unit price produced a net price that diverged
from the actual one (e.g. 10740 instead of 10000 on a €120 item with 20% included tax and a 37% discount).

…d ensure compatibility with tax calculators. Updated tests and added fallback for cases without a calculator.
@tomkalon tomkalon changed the title Refactor UnitNetPriceProvider to handle taxes included in prices an… [Bugfix] Incorrect Unit Net Price Jun 22, 2026
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.

1 participant