|
|
@@ -240,29 +240,8 @@ class OrderRepository extends AbstractRepository |
|
|
|
public function getAmountSummary(Order $order): string |
|
|
|
{ |
|
|
|
$html = ''; |
|
|
|
$creditActive = $this->producerSolver->getConfig('credit'); |
|
|
|
$html .= $this->orderSolver->getOrderAmountWithTax($order, Order::AMOUNT_TOTAL, true); |
|
|
|
|
|
|
|
if ($creditActive) { |
|
|
|
$html .= '<br />'; |
|
|
|
if ($order->paid_amount) { |
|
|
|
if ($this->orderSolver->getPaymentStatus($order) == Order::PAYMENT_PAID) { |
|
|
|
$html .= '<span class="label label-success">Payée</span>'; |
|
|
|
} elseif ($this->orderSolver->getPaymentStatus($order) == Order::PAYMENT_UNPAID) { |
|
|
|
$html .= '<span class="label label-danger">Non payée</span><br /> |
|
|
|
Reste <strong>' . $this->orderSolver->getOrderAmount( |
|
|
|
$order, |
|
|
|
Order::AMOUNT_REMAINING, |
|
|
|
true |
|
|
|
) . '</strong> à payer'; |
|
|
|
} elseif ($this->orderSolver->getPaymentStatus($order) == Order::PAYMENT_SURPLUS) { |
|
|
|
$html .= '<span class="label label-success">Payée</span>'; |
|
|
|
} |
|
|
|
} else { |
|
|
|
$html .= '<span class="label label-default">Non réglé</span>'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$html .= '<br />'.$this->getPaymentLabelShort($order); |
|
|
|
return $html; |
|
|
|
} |
|
|
|
|