Reorder uses prices exluding tax for customer entered prices regardless of taxsettings

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
2 anni tempo fa
Using nopCommerce 4.40.3.

I have a problem with my shopping cart total decreasing every time i do reorder on an order including products with CustomEredenteredPrice options enabled. It only happends when PricesIncludeTax is enabled in taxsettings.

Found out that the ReOrderAsync function in the OrderProcessingService is always using
orderItem.UnitPriceExclTax regardless of taxsettings.

Original code:
await _shoppingCartService.AddToCartAsync(customer, product,
                    ShoppingCartType.ShoppingCart, order.StoreId,
                    orderItem.AttributesXml, orderItem.UnitPriceExclTax,
                    orderItem.RentalStartDateUtc, orderItem.RentalEndDateUtc,
                    orderItem.Quantity, false);


Fix:
await _shoppingCartService.AddToCartAsync(customer, product,
                    ShoppingCartType.ShoppingCart, order.StoreId,
                    orderItem.AttributesXml, _taxSettings.PricesIncludeTax ?
                    orderItem.UnitPriceInclTax : orderItem.UnitPriceExclTax,
                    orderItem.RentalStartDateUtc, orderItem.RentalEndDateUtc,
                    orderItem.Quantity, false);


This way the customered entered price will be correct both for those who have the PricesIncludeTax option enabled or disabled :)
2 anni tempo fa
Thanks a lot for reporting. I've just created a work item. Our team will check it soon
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.