Hi, we’re using the standard IPriceCalculator PriceCalculatorImpl
when we handle our pricer incl VAT in backoffice we notice some weird behavior in our cart prices, now after som digging around I decompiled PriceCalculatorImpl and dug around finding this snippet:
if (valueTuple.Item2)
{
calculatorResult.ListPriceWithVat = z.Item1.Price;
calculatorResult.ListPrice = z.Item1.Price * (Decimal.One - vatRate);
}
else
{
calculatorResult.ListPrice = z.Item1.Price;
calculatorResult.ListPriceWithVat = z.Item1.Price * (Decimal.One + vatRate);
}
The calculation for price without VAT doesn’t look right to me,
Shouldn’t it be something like:
calculatorResult.ListPrice = z.Item1.Price * (decimal.One / (decimal.One + vatRate)) ?
thats’ at least how I fixed it in our custom Calculator I’ve had to implement for now to get correct prices.
Litium version: 7.0.0