if (!is_null($synchroTiller)) { | if (!is_null($synchroTiller)) { | ||||
$order->tiller_synchronization = $synchroTiller; | $order->tiller_synchronization = $synchroTiller; | ||||
} else { | } else { | ||||
$amountPaid = $this->orderSolver->getOrderAmount($order, Order::AMOUNT_PAID); | |||||
$amountPaid = $this->orderSolver->getOrderAmountPaidByCredit($order); | |||||
if ($amountPaid >= 0.01) { | if ($amountPaid >= 0.01) { | ||||
$order->tiller_synchronization = 1; | $order->tiller_synchronization = 1; |
} | } | ||||
} | } | ||||
$order = $orderManager->findOneOrderById($order->id); | |||||
$orderManager->initOrder($order); | $orderManager->initOrder($order); | ||||
$orderManager->updateOrderTillerSynchronization($order); | $orderManager->updateOrderTillerSynchronization($order); | ||||
} | } |