@if(!empty($setting['logo']) && file_exists(public_path('images/'.$setting['logo']))) Logo @endif
PURCHASE ORDER
{{$purchase['Ref']}}
Date: {{$purchase['date']}}
Order #: {{$purchase['Ref']}}
Status: @php $statusColors = [ 'completed' => ['bg' => '#d1fae5', 'color' => '#065f46'], 'received' => ['bg' => '#d1fae5', 'color' => '#065f46'], 'pending' => ['bg' => '#fef3c7', 'color' => '#92400e'], 'ordered' => ['bg' => '#dbeafe', 'color' => '#1e40af'], ]; $statusKey = strtolower($purchase['statut']); $statusStyle = $statusColors[$statusKey] ?? ['bg' => '#e5e7eb', 'color' => '#374151']; @endphp {{$purchase['statut']}}
Payment: @php $paymentKey = strtolower($purchase['payment_status']); $paymentStyle = $statusColors[$paymentKey] ?? ['bg' => '#e5e7eb', 'color' => '#374151']; @endphp {{$purchase['payment_status']}}
SUPPLIER INFO
{{$purchase['supplier_name']}}
Phone: {{$purchase['supplier_phone']}}
Email: {{$purchase['supplier_email']}}
Address: {{$purchase['supplier_adr']}}
@if($purchase['supplier_tax'])
Tax #: {{$purchase['supplier_tax']}}
@endif
COMPANY INFO
{{$setting['CompanyName']}}
Phone: {{$setting['CompanyPhone']}}
Email: {{$setting['email']}}
Address: {{$setting['CompanyAdress']}}
@php $rowIndex = 0; @endphp @foreach ($details as $detail) @php $rowIndex++; @endphp @endforeach
PRODUCT COST QTY DISC TAX TOTAL
{{$detail['name']}}
Code: {{$detail['code']}}
@if($detail['is_imei'] && $detail['imei_number'] !==null)
SN: {{$detail['imei_number']}}
@endif
{{$detail['cost']}} {{$detail['quantity']}} {{$detail['unit_purchase']}} {{$detail['DiscountNet']}} {{$detail['taxe']}} {{$detail['total']}}
Subtotal: {{$symbol}} {{number_format((float)($purchase['GrandTotal'] - $purchase['TaxNet'] + $purchase['discount'] - $purchase['shipping']), 2)}}
Order Tax: {{$symbol}} {{$purchase['TaxNet']}}
Discount: - {{$symbol}} {{$purchase['discount']}}
Shipping: {{$symbol}} {{$purchase['shipping']}}
TOTAL: {{$symbol}} {{$purchase['GrandTotal']}}
Paid Amount: {{$symbol}} {{$purchase['paid_amount']}}
Amount Due: {{$symbol}} {{$purchase['due']}}
@if($setting['is_invoice_footer'] && $setting['invoice_footer'] !==null)

{{$setting['invoice_footer']}}

@endif

Thank you for your business!