浏览代码

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

feature/souke
Guillaume Bourgeois 1年前
父节点
当前提交
a6d5a31682
共有 1 个文件被更改,包括 1 次插入22 次删除
  1. +1
    -22
      common/logic/Order/Order/Repository/OrderRepository.php

+ 1
- 22
common/logic/Order/Order/Repository/OrderRepository.php 查看文件

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


正在加载...
取消
保存