Explorar el Código

[Espace producteur] Mes commandes : libellé paiement commandes #1266

feature/souke
Guillaume Bourgeois hace 1 año
padre
commit
a6d5a31682
Se han modificado 1 ficheros con 1 adiciones y 22 borrados
  1. +1
    -22
      common/logic/Order/Order/Repository/OrderRepository.php

+ 1
- 22
common/logic/Order/Order/Repository/OrderRepository.php Ver fichero

@@ -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;
}


Cargando…
Cancelar
Guardar