소스 검색

[Administration] Export commandes PDF : cellule du montant en gris quand la commande est payée

feature/souke
Guillaume Bourgeois 11 달 전
부모
커밋
5dff3e9029
1개의 변경된 파일7개의 추가작업 그리고 1개의 파일을 삭제
  1. +7
    -1
      common/logic/Distribution/Distribution/Export/DistributionReportPdfGenerator.php

+ 7
- 1
common/logic/Distribution/Distribution/Export/DistributionReportPdfGenerator.php 파일 보기

@@ -119,6 +119,10 @@ class DistributionReportPdfGenerator extends AbstractGenerator implements Distri
.payment-detail-remaining-surplus {
font-size: 10px;
}
.td-order-amount.is-order-paid {
background-color: #f1f1f1;
}
',
'methods' => [
'SetHeader' => ['Commandes du ' . date('d/m/Y', strtotime($distribution->date))],
@@ -293,7 +297,9 @@ class DistributionReportPdfGenerator extends AbstractGenerator implements Distri

public function columnOrderAmount(Order $order): string
{
$html = '<td class="td-order-amount"><strong>'.number_format($order->amount_with_tax, 2) . ' €</strong>';
$isOrderPaid = $this->orderRepository->isOrderPaid($order);

$html = '<td class="td-order-amount'.(($isOrderPaid) ? ' is-order-paid' : '').'"><strong>'.number_format($order->amount_with_tax, 2) . ' €</strong>';

$paymentLabelPaid = $this->orderRepository->getPaymentLabelPaid($order);
if($paymentLabelPaid && strlen($paymentLabelPaid)) {

Loading…
취소
저장