|
|
@@ -433,8 +433,11 @@ class OrderRepository extends AbstractRepository |
|
|
|
|
|
|
|
public function isOrderPaid(Order $order): bool |
|
|
|
{ |
|
|
|
if($this->orderSolver->getOrderAmount($order, Order::AMOUNT_PAID) |
|
|
|
>= $this->orderSolver->getOrderAmountWithTax($order, Order::AMOUNT_TOTAL)) { |
|
|
|
$amountPaid = $this->orderSolver->getOrderAmount($order, Order::AMOUNT_PAID); |
|
|
|
$amountTotal = $this->orderSolver->getOrderAmountWithTax($order, Order::AMOUNT_TOTAL); |
|
|
|
|
|
|
|
if(abs($amountPaid - $amountTotal) < 0.00001 |
|
|
|
|| $amountPaid >= $amountTotal) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
|