@if (isLegalOperation($operation["docType"])) @endif
@if($operationSettings['logoPosition']['value']==='left') @if($operationSettings['hasSlogen']) @endif
{{ $company["slogan"] }}
@elseif($operationSettings['logoPosition']['value']==='right') @if($operationSettings['hasSlogen']) @endif
{{ $company["slogan"] }}
Page
@else @if($operationSettings['hasSlogen']) @endif
{{ $company["slogan"] }}
Page
Page
@endif

{{ getDocTypeLabel($operation["docType"]) }} N°:{{ $operation["docId"] ?? "" }}

Date: {{ $operation["date"]->format("d/m/Y") ?? "" }}
@if ($operation["docType"] === "estimate" && $operation["validateDate"])
{{ "Valide Jusqu'à" }} : {{ $operation["validateDate"]->format("d/m/Y") ?? "" }}
@endif @if ($operation["baseDocId"])
Référence: {{ $operation["baseDocId"] ?? "" }}
@endif
@if (!isInternOperation($operation["docType"])) {{ $operation["counterParty"]["name"] ?? "" }}
{{ $operation["counterParty"]["address"]["street"] ?? "" }}
{{ $operation["counterParty"]["address"]["city"] ?? "" }}
{{ $operation["counterParty"]["address"]["country"] ?? "" }}
{{ $operation["counterParty"]["address"]["zipCode"] ?? "" }}
{{ $operation["counterParty"]["ice"] ?? "" }}
{{ $operation["counterParty"]["contactPerson"] ?? "" }} @else Responsable {{ "d'opération" }}: {{ $operation["personInCharge"] ?? "" }} @endif
@if ($operation["subject"] && ($operation["docType"] === "purchaseorder" || $operation["docType"] === "estimate"))
{!! nl2br(e($operation["body"])) !!}
@endif @if (hasPricing($operation["docType"])) @endif @foreach ($operation["items"] as $item) @if ($item["isSeparator"] ?? false) @else @if (hasPricing($operation["docType"])) @endif @endif @endforeach
# Référence Désignation QuantitéUnité P.U ({{ $operation["currency"]["code"] }}) Impôt Montant ({{ $operation["currency"]["code"] }})
{{ $item["separatorName"] ?? "" }}
{{ $item["id"] ?? "" }} {{ $item["ref"] ?? "" }} {{ $item["name"] ?? "" }} {{ formatNumber($item["qty"] ?? 0) }}{{ $item["unit"]['name'] ?? "" }} {{ formatNumber($item["price"] ?? 0) }} {{-- Handle both cases: tax as array with name, or tax as empty array --}} @if (!empty($item["tax"]) && is_array($item["tax"])) {{ $item["tax"]["name"] ?? "" }} @else @endif {{ formatNumber($item["amount"] ?? 0) }}
@if (hasPricing($operation["docType"]))
@if ($operation["discount"] > 0) @endif @if ($operation["tax"] && count($operation["tax"]) > 0) @foreach ($operation["tax"] as $tax) @if (isset($tax["tax"]) && $tax["tax"] > 0) @endif @endforeach @endif
Total HT : {{ formatNumber($operation["totalHt"]) ?? "" }} {{ $operation["currency"]["code"] ?? "" }}
Remise ({{ formatNumber(calculatePercentage($operation["totalHt"],$operation["discount"]))}}%) : -{{ formatNumber($operation["discount"]) ?? "" }} {{ $operation["currency"]["code"] ?? "" }}
Total HT remisé : {{ formatNumber(safeSubtract($operation["totalHt"], $operation["discount"])) ?? "" }} {{ $operation["currency"]["code"] }}
{{ $tax["name"] ?? "" }} : {{ formatNumber($tax["tax"]) }} {{ $operation["currency"]["code"] }}
Total TTC : {{ formatNumber($operation["totalTtc"] ?? 0) }} {{ $operation["currency"]["code"] ?? "" }}
@if ($operation["totalInWord"] && isLegalOperation($operation["docType"]))
{!! nl2br(e($operation["totalInWord"])) !!}
@endif @endif @if (!isInternOperation($operation["docType"])) @endif @if(isLegalOperation($operation['docType'] && ($operation["hasSignature"] ||$operation["hasStamp"]) )) @endif
    @if ($operation["conditions"])
  • Conditions: {{ $operation["conditions"] ?? "" }}
  • @endif @if ($operation["paymentMethod"])
  • Modes de paiment: @foreach ($operation["paymentMethod"] as $pm) {{ getMethodOfPayment($pm['value']) ?? "" }}, @endforeach
  • @endif @if ($operation["paymentDue"])
  • Échéance: {{ $operation["paymentDue"]->format("d/m/Y") ?? "" }}
  • @endif @if ($operation["shippingChargeMode"])
  • Expédition: {{ getModeShipping($operation["shippingChargeMode"]) ?? "" }}
  • @endif @if ($operation["shippingFees"] > 0)
  • Frais: {{ formatNumber($operation["shippingFees"]) ?? "" }} MAD
  • @endif @if ($operation["expectedArrival"])
  • Arrivée: {{ $operation["expectedArrival"]->format("d/m/Y") ?? "" }}
  • @endif
Company Stamp Signature
@if (!empty($operation["notes"]))
Notes:
@endif