plentymarkets / plentymarkets-shopware-connector

plentymarkets shopware connector plugin
http://www.plentymarkets.eu/shopware/
MIT License
30 stars 51 forks source link

Rounding error when using gross prices and displaying net prices #536

Open florianliebig opened 4 years ago

florianliebig commented 4 years ago
Q A
issue or Enhancement issue Enhancement
Version Specific version or SHA of a commit

Actual Behavior

What is the actual behavior?

https://github.com/plentymarkets/plentymarkets-shopware-connector/commit/c94e165d22226e23d42786692485c659a24617e9 With this commit you changed the rounding of OrderItem Prices

image

It transfers a rounded price into plentymarkets:

E.g. when having an item which has a price of 11.45€ gross:

UVP 11,45€ x 12 = 137,40€

Shopware now calculates like this

11,45 / 1,19 = 9,62184€ rounding to 9,62€ 9,62 * 12 = 115,44€ total net cart

In Plentymarkets due to rounding it transfers 137,40.

Expected Behavior

What is the behavior you expect?

Not 100% sure if this needs to be solved by Shopware or it's wrong from plentyconnector. I just would like to know the case in which rounding for transferring the order to plentymarkets is needed.

Steps to Reproduce

I can provide Frontend access to example project if needed.

Possible Solutions

florianliebig commented 4 years ago

Removing the round(..) solves the issue for this particular problem.

florianliebig commented 4 years ago

It seems to conflict with "Grundeinstellungen > Storefront > Warenkorb / Artikeldetails > Netto-Bestellungen konsequent auf 2 Stellen runden"

Which is set to now at our site.