Fix shipping vat

main
CPlaiz 2025-12-13 17:46:23 +01:00
parent dd70788226
commit a987746e01
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ public class Order {
List<Product> highVatProducts = filterHighVatProducts(products);
float lowVatPortion = getPrice(lowVatProducts) / totalPrice;
float highVatPortion = getPrice(highVatProducts) / totalPrice;
return baseShippingCost * lowVatPortion / (1 + Constants.lowVat) + baseShippingCost * highVatPortion / (1 + Constants.highVat);
return baseShippingCost - (baseShippingCost * lowVatPortion / (1 + Constants.lowVat) + baseShippingCost * highVatPortion / (1 + Constants.highVat));
}
public float calculateShippingCost(List<Product> products) {