@if(!empty($setting['logo']) && file_exists(public_path('images/'.$setting['logo']))) Logo @endif
SALES INVOICE
{{$sale['Ref']}}
Date: {{$sale['date']}}
Invoice #: {{$sale['Ref']}}
Status: @php $statusColors = [ 'completed' => ['bg' => '#d1fae5', 'color' => '#065f46'], 'paid' => ['bg' => '#d1fae5', 'color' => '#065f46'], 'pending' => ['bg' => '#fef3c7', 'color' => '#92400e'], 'unpaid' => ['bg' => '#fef3c7', 'color' => '#92400e'], 'partial' => ['bg' => '#dbeafe', 'color' => '#1e40af'], ]; $statusKey = strtolower($sale['statut']); $statusStyle = $statusColors[$statusKey] ?? ['bg' => '#e5e7eb', 'color' => '#374151']; @endphp {{$sale['statut']}}
Payment: @php $paymentKey = strtolower($sale['payment_status']); $paymentStyle = $statusColors[$paymentKey] ?? ['bg' => '#e5e7eb', 'color' => '#374151']; @endphp {{$sale['payment_status']}}
BILL TO
{{$sale['client_name']}}
Phone: {{$sale['client_phone']}}
Email: {{$sale['client_email']}}
Address: {{$sale['client_adr']}}
@if($sale['client_tax'])
Tax #: {{$sale['client_tax']}}
@endif
FROM
{{$setting['CompanyName']}}
Phone: {{$setting['CompanyPhone']}}
Email: {{$setting['email']}}
Address: {{$setting['CompanyAdress']}}
@php $rowIndex = 0; @endphp @foreach ($details as $detail) @php $rowIndex++; @endphp @endforeach
PRODUCT PRICE QTY DISC TAX TOTAL
{{$detail['name']}}
Code: {{$detail['code']}}
@if($detail['is_imei'] && $detail['imei_number'] !==null)
SN: {{$detail['imei_number']}}
@endif
{{$detail['price']}} {{$detail['quantity']}} {{$detail['unitSale']}} {{$detail['DiscountNet']}} {{$detail['taxe']}} {{$detail['total']}}
Subtotal: {{$symbol}} {{number_format((float)($sale['GrandTotal'] - $sale['TaxNet'] + $sale['discount'] - $sale['shipping']), 2)}}
Order Tax: {{$symbol}} {{$sale['TaxNet']}}
Discount: - {{$symbol}} {{$sale['discount']}}
Shipping: {{$symbol}} {{$sale['shipping']}}
TOTAL: {{$symbol}} {{$sale['GrandTotal']}}
Paid Amount: {{$symbol}} {{$sale['paid_amount']}}
Amount Due: {{$symbol}} {{$sale['due']}}
@if($setting['is_invoice_footer'] && $setting['invoice_footer'] !==null)

{{$setting['invoice_footer']}}

@endif

Thank you for your business!