Skip to content

Commit

Permalink
PLGMAG2V2-755: Typecast getRate return value to float (#697)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinodsowdagar authored May 13, 2024
1 parent d377c97 commit 7fb9f52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Util/TaxUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Magento\Customer\Model\Session;
use Magento\Customer\Model\Vat;
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Quote\Api\CartRepositoryInterface;
use Magento\Quote\Api\Data\CartInterface;
Expand Down Expand Up @@ -90,6 +91,7 @@ public function getShippingTaxRate(OrderInterface $order): float
* @param CartInterface $cart
* @param $taxRateId
* @return float
* @throws LocalizedException
*/
public function getTaxRateByTaxRateIdAndCart(CartInterface $cart, $taxRateId): float
{
Expand All @@ -100,7 +102,7 @@ public function getTaxRateByTaxRateIdAndCart(CartInterface $cart, $taxRateId): f
$cart->getStore()
);

return $this->calculation->getRate($request->setProductClassId($taxRateId));
return (float)$this->calculation->getRate($request->setProductClassId($taxRateId));
}

/**
Expand Down

0 comments on commit 7fb9f52

Please sign in to comment.