Commit 078016a9 authored by Daniel's avatar Daniel
Browse files

#35: Rounding issue in reserve and order amount

parent 9fb1d721
......@@ -17,7 +17,7 @@ class AmountBuilder
public function buildFromQuote(Quote $quote): Amount
{
$amount = new Amount();
$amount->setAmount((int) (round($quote->getGrandTotal(), 2) * 100));
$amount->setAmount(round($quote->getGrandTotal(), 2) * 100);
return $amount;
}
......@@ -29,7 +29,7 @@ class AmountBuilder
public function buildFromOrder(OrderAdapterInterface $order): Amount
{
$amount = new Amount();
$amount->setAmount((int) (round($order->getGrandTotalAmount(), 2) * 100));
$amount->setAmount(round($order->getGrandTotalAmount(), 2) * 100);
return $amount;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment