diff --git a/src/Model/OrderManager/OrderManager.php b/src/Model/OrderManager/OrderManager.php index 879acce..63018c0 100644 --- a/src/Model/OrderManager/OrderManager.php +++ b/src/Model/OrderManager/OrderManager.php @@ -109,14 +109,14 @@ private function calculateProductTotals (Product $product) : array $priceVatExcluded = $product->getPriceVatExcluded(); // Calculate price exclusive of VAT from price inclusive of VAT - if ( !is_null($priceVatIncluded) ) + if (!empty($priceVatIncluded)) { $priceVatExcludedRes = $this->subtractPercentage ($priceVatIncluded, $product->getVatRate()); $product->setPriceVatExcluded($priceVatExcludedRes); } // Calculate price inclusive of VAT from price exclusive of VAT - else if ( !is_null($priceVatExcluded) ) + else if (!empty($priceVatExcluded)) { $priceVatIncluded = ($priceVatExcluded * (100 + $product->getVatRate())) / 100; $product->setPriceVatIncluded($priceVatIncluded);