{{-- Header Row --}}
{{-- Party Name + Contact --}}
{{ $sale->party->name }}
@if($sale->party->mobile)
| +91{{ $sale->party->mobile }}
@endif
{{-- Items Table --}}
| Sr. |
Qty |
Unit |
Items |
Rate |
Total Amount |
@foreach($sale->items as $index => $item)
| {{ $index + 1 }}. |
{{ indian_number($item->qty, 2) }} |
{{ strtolower($item->unit) }} |
{{ $item->product->name ?? 'Product' }} |
{{ indian_number($item->rate, 2) }} |
{{ indian_number($item->line_amount, 2) }} |
@endforeach
{{-- Totals Section --}}
|
Total Amount: |
{{ indian_number($sale->amount_total, 2) }} |
@if($sale->pf_amount > 0)
|
P&F: |
{{ indian_number($sale->pf_amount, 2) }} |
@endif
@if(($sale->discount ?? 0) != 0)
|
Adjustment: |
{{ $sale->discount > 0 ? '(-)' : '(+)' }}{{ indian_number(abs($sale->discount), 2) }} |
@endif
| Total |
Amount Remaining: |
{{ indian_number($sale->grand_total, 2) }} |
{{-- Narration --}}
@if($sale->remarks)
Narration: {{ $sale->remarks }}
@endif
{{-- Dispatched Through --}}
@if($sale->dispatched_through || $sale->party->transportation_name)
Dispatched Through: {{ $sale->dispatched_through ?? $sale->party->transportation_name }}
@endif
{{-- ═══ PAGE 2: Delivery / To section (for courier label) ═══ --}}
{{-- VPP / Dispatch badges --}}
@php
$vppLabel = $sale->party->vpp_cod
? 'VPP' . (($sale->party->cash_option ?? null) ? ' (' . strtoupper($sale->party->cash_option) . ')' : '')
: null;
$dispatch = $sale->dispatched_through ?: ($sale->party->transportation_name ?? null);
$vppAmount = $sale->party->vpp_cod ? indian_number($sale->grand_total, 0) : null;
@endphp
@if($vppLabel || $dispatch)
@if($vppLabel)
{{ $vppLabel }}
@endif
@if($dispatch)
Dispatch: {{ $dispatch }}
@endif
@if($vppAmount)
{{ $vppAmount }}
@endif
@endif
To,
+91{{ $sale->party->mobile }}
{{ $sale->party->name }}
{{ $sale->party->billing_address }},
{{ $sale->party->state }}
{{ $sale->party->pincode }}