Net price calculation does not work with multiple changes if 0% tax rate exists
- Dominant language
- PHP
- Stars
- 3.4k
- Forks
- 1.2k
- Avg merge
- 3d 55m
- Merged PRs (30d)
- 436
Description
### Shopware Version
6.7.10.2
### Affected area / extension
Platform(Default)
### Actual behaviour
When performing a bulk edit in the product overview and entering a gross price, the net price is not calculated correctly if a custom tax rate with 0% tax exists. Instead of calculating the net price based on the product's assigned tax rate, the entered gross price is copied directly into the net price field.
The net price is only calculated correctly when the standard tax rate is explicitly selected in the bulk edit. However, the selected tax rate in the bulk edit should not affect the price calculation for products that already have their own tax rate assigned.
### Expected behaviour
The net price should always be calculated based on the tax rate assigned to each product, regardless of whether a custom 0% tax rate exists or which tax rate is selected in the bulk edit.
The presence of an unrelated 0% tax rate should not influence the price calculation when updating product prices via bulk edit.
### How to reproduce
Create a new tax rate with a value of 0% in the administration.
Open the product overview.
Select one or more products that use a regular tax rate (for example, the standard tax rate).
Start a bulk edit and navigate to the price section.
Enter a gross price.
Observe the calculated net price.
Result: The entered gross price is copied directly into the net price field instead of being calculated based on the product's assigned tax rate.
Additional observation: If the standard tax rate is explicitly selected in the bulk edit, the net price is calculated correctly.
Contributor guide
Assessment
This issue has not been assessed yet.