M.D.S

ٹرک   فروخت رجسٹر   Truck Sales Register

Truck No. : {{ $truckNumber }}

سپلائر {{ $supplier->supplier_name ?? '—' }}
@php $grandTotalBori = 0; $grandTotalWeight = 0; $grandTotalAmount = 0; $grandTotalPaid = 0; $grandTotalBalance = 0; @endphp @foreach ($salesByCustomer as $customerId => $customerSales) @php $totalBori = 0; $totalWeight = 0; $totalAmount = 0; $totalCashRec = $customerTotals[$customerId]->total_paid ?? 0; $totalBalance = $customerTotals[$customerId]->total_balance ?? 0; $totalCredit = $customerCredits[$customerId] ?? 0; $allItems = $customerSales->flatMap(fn($sale) => $sale->salesItemsDetails); @endphp @foreach ($allItems as $item) @php $totalBori += (int) $item->bori; $totalWeight += (int) $item->weight; $totalAmount += (int) $item->amount; @endphp @endforeach {{-- Customer Subtotal --}} @php $grandTotalBori += $totalBori; $grandTotalWeight += $totalWeight; $grandTotalAmount += $totalAmount; $grandTotalPaid += $totalCredit+$totalCashRec; $grandTotalBalance += $totalBalance-$totalCredit; @endphp @endforeach
مال بوری وزن ریٹ قیمت کیش وصول بقایہ

{{ $customerSales->first()->customer->customer_name_urdu ?? 'Unknown' }}

{{ $item->productChildCate->name_urdu ?? '—' }} {{ number_format($item->bori) }} {{ number_format($item->weight) }} {{ number_format($item->rate) }} {{ number_format($item->amount) }}
{{ number_format($totalBori) }} {{ number_format($totalWeight) }} {{ number_format($totalAmount) }} {{ number_format($totalCredit+$totalCashRec) }} {{ number_format($totalBalance-$totalCredit) }}
کل جمع (Grand Total) {{ number_format($grandTotalBori) }} {{ number_format($grandTotalWeight) }} {{ number_format($grandTotalAmount) }} {{ number_format($grandTotalPaid) }} {{ number_format($grandTotalBalance) }}