You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "unit_price" stored in sylius_invoicing_plugin_line_item is wrong when a promotion is applied on the item.
This unit_price is the unit net price stored on lineItem entity in OrderItemUnitsToLineItemsConverter service.
This unit net price is calculated from UnitNetPriceProvider service, but the calculation doesn't seem right.
You retrieve unitPrice from orderItem (unit sale price, before discount) and you substract orderItemUnit tax adjustments calculated on the discounted price... So tax amount is not related to the unit sale price.
To reproduce simply apply a cart promotion and compare unitPrice from the Sylius Admin Order page (gross unit sale price if tax are included in price) and the unit net price on the invoice. You can recalculate gross and net price, the amount is wrong.
Hi,
The "unit_price" stored in sylius_invoicing_plugin_line_item is wrong when a promotion is applied on the item.
This unit_price is the unit net price stored on lineItem entity in OrderItemUnitsToLineItemsConverter service.
This unit net price is calculated from UnitNetPriceProvider service, but the calculation doesn't seem right.
You retrieve unitPrice from orderItem (unit sale price, before discount) and you substract orderItemUnit tax adjustments calculated on the discounted price... So tax amount is not related to the unit sale price.
To reproduce simply apply a cart promotion and compare unitPrice from the Sylius Admin Order page (gross unit sale price if tax are included in price) and the unit net price on the invoice. You can recalculate gross and net price, the amount is wrong.
An example with an order placed on the demo website (https://master.demo.sylius.com), so without custom developments.
Unit net price of the item "Off shoulder boho dress" should be 24,55$ and not 24,67.
24,67 = 26,27 (order item unit price) - 1,60 (tax amount of the discounted price)
Thanks
The text was updated successfully, but these errors were encountered: