Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidPetrasek committed Jun 14, 2024
1 parent 9e992c3 commit eefe433
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Model/OrderManager/OrderManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit eefe433

Please sign in to comment.