{{-- ══ Header ══ --}}
M.D.S
Purchase Register   خرید رجسٹر
From : {{ $fromDate ? \Carbon\Carbon::parse($fromDate)->format('d/m/y') : '—' }},  To : {{ $toDate ? \Carbon\Carbon::parse($toDate)->format('d/m/y') : '—' }} @if ($selectedPurchaser) ,  Client: {{ $selectedPurchaser->purchaser_name }} @endif

@if (empty($reportData['purchasers']))

No records found.

@else @php $n = fn($v) => $v ? number_format($v, 0) : ''; $n0 = fn($v) => number_format($v, 0); @endphp @foreach ($reportData['purchasers'] as $purchaserName => $purchaserData) {{-- Purchaser name (red, Urdu) --}} @foreach ($purchaserData['orders'] as $order) {{-- Product rows --}} @foreach ($order['details'] as $i => $detail) @endforeach {{-- مزدوري row --}} @if (!empty($order['labour_charges']) && $order['labour_charges'] > 0) @endif @if (!empty($order['local_charges']) && $order['local_charges'] > 0) @endif @if (!empty($order['weight_charges']) && $order['weight_charges'] > 0) @endif @if (!empty($order['tax']) && $order['tax'] > 0) @endif {{-- Order subtotal: solid line above, bori / wazn / qmt ── --}} @endforeach {{-- Long dot-dash separator --}} {{-- کُل row (purchaser grand) --}} @endforeach
تاریخ گاڑی نمبر مال بوری وزن ریٹ قیمت
{{ $purchaserData['urdu_name'] ?: $purchaserName }}
{{ $i === 0 ? $order['order_date'] : '' }} {{ $i === 0 ? $order['po_number'] ?? '' : '' }} {{ $detail['name'] }} {{ $detail['bori'] ?: '' }} {{ $n($detail['weight']) }} {{ $n($detail['rate']) }} {{ $n($detail['amount']) }}
{{ $order['order_date'] }} مزدوري {{ $n($order['labour_charges']) }}
{{ $order['order_date'] }} لوکل چارجز {{ $n($order['local_charges']) }}
{{ $order['order_date'] }} وزن چارجز {{ $n($order['weight_charges']) }}
{{ $order['order_date'] }} ٹیکس {{ $n($order['tax']) }}
{{ $order['total_bori'] ?: '' }} {{ $n0($order['total_weight']) }} {{ $n0($order['grand_total']) }}
کُل {{ $purchaserData['subBori'] ?: '' }} {{ $n0($purchaserData['subWeight']) }} {{ $n0($purchaserData['subAmount']) }}
{{-- ══ Summary Box ══ --}}
کُل
{{-- Right col: گاڑی --}}
گاڑی {{ $reportData['grandOrders'] }}
{{-- Middle col: Urdu labels --}}
بوري
وزن
قیمت
{{-- Left col: values --}}
{{ number_format($reportData['grandBori'], 0) }}
{{ number_format($reportData['grandWeight'], 0) }}
{{ number_format($reportData['grandAmount'], 0) }}
@endif