@extends('layouts.master') @push('css') @endpush @section('content')

Purchase Billing Vehicle Register — گاڑی بیچک رجسٹر

{{-- ── Filter Form ── --}}
@if($reportData) پرنٹ @endif Reset

@if($reportData) @php $fmt = fn($v) => $v == 0 ? '-' : ($v < 0 ? '(' . number_format(abs($v), 0) . ')' : number_format($v, 0)); $vehicles = $reportData['vehicles']; $grandTotal = $reportData['grandTotal']; @endphp @if(empty($vehicles))
No records found for selected filters.
@else
@foreach($vehicles as $vehicle) {{-- Vehicle Heading --}} @php // Total number of item rows for this ENTIRE vehicle // (used so the expense columns span the whole vehicle // and are printed only once instead of once per bilty). $vehicleRowCount = 0; foreach ($vehicle['bilties'] as $b) { $vehicleRowCount += max(count($b['items']), 1); } $vehicleFirstRowPrinted = false; @endphp @foreach($vehicle['bilties'] as $bilty) {{-- Item rows --}} @foreach($bilty['items'] as $idx => $item) @if($idx === 0) @endif {{-- Expense columns are vehicle-level: print only once, on the very first row of the vehicle, spanning every row that belongs to it. --}} @if(!$vehicleFirstRowPrinted) @php $vehicleFirstRowPrinted = true; @endphp @endif @endforeach {{-- If no items --}} @if(empty($bilty['items'])) @if(!$vehicleFirstRowPrinted) @php $vehicleFirstRowPrinted = true; @endphp @endif @endif @endforeach {{-- Vehicle Total --}} @endforeach {{-- Grand Total --}}
تاریخ
Date
بلٹی نمبر
Bilty No
سپلار
Supplier
مال
Item
مارکیٹ
Marka
بوری
Bori
وزن
Weight
قیمت
Rate
کرایہ
Rent
مزدوری محصول
Labour
مارکیٹ فیس
Mkt Fees
ڈاک خرچ
Post Exp
نقد
Cash
کمیشن
Commission
کل خرچہ
Total Exp
بختہ بکری
Save Amt
گاڑی نمبر : {{ $vehicle['pb_no'] }}
{{ \Carbon\Carbon::parse($bilty['date'])->format('d/m/y') }} {{ $bilty['bilty_no'] }} {{ $bilty['supplier_name'] }} {{ $item->item ?? '-' }} {{ $item->marka ?? '-' }} {{ number_format($item->bori ?? 0) }} {{ number_format($item->weight ?? 0) }} {{ $fmt($item->rate ?? 0) }} {{ $fmt($vehicle['vehicleTotals']['rent_recieve_amount']) }} {{ $fmt($vehicle['vehicleTotals']['labour_amount']) }} {{ $fmt($vehicle['vehicleTotals']['market_fees_amount']) }} {{ $fmt($vehicle['vehicleTotals']['post_expense_amount']) }} {{ $fmt($vehicle['vehicleTotals']['cash_amount']) }} {{ $fmt($vehicle['vehicleTotals']['commission_amount']) }} {{ $fmt($vehicle['vehicleTotals']['total_expanse_amount']) }} {{ $fmt($vehicle['vehicleTotals']['save_amount']) }}
{{ \Carbon\Carbon::parse($bilty['date'])->format('d/m/y') }} {{ $bilty['bilty_no'] }} {{ $bilty['supplier_name'] }} — {{ $fmt($vehicle['vehicleTotals']['rent_recieve_amount']) }} {{ $fmt($vehicle['vehicleTotals']['labour_amount']) }} {{ $fmt($vehicle['vehicleTotals']['market_fees_amount']) }} {{ $fmt($vehicle['vehicleTotals']['post_expense_amount']) }} {{ $fmt($vehicle['vehicleTotals']['cash_amount']) }} {{ $fmt($vehicle['vehicleTotals']['commission_amount']) }} {{ $fmt($vehicle['vehicleTotals']['total_expanse_amount']) }} {{ $fmt($vehicle['vehicleTotals']['save_amount']) }}
گاڑی نمبر {{ $vehicle['pb_no'] }} — کل {{ number_format($vehicle['vehicleTotals']['total_bori']) }} {{ number_format($vehicle['vehicleTotals']['total_weight']) }} {{ $fmt($vehicle['vehicleTotals']['rent_recieve_amount']) }} {{ $fmt($vehicle['vehicleTotals']['labour_amount']) }} {{ $fmt($vehicle['vehicleTotals']['market_fees_amount']) }} {{ $fmt($vehicle['vehicleTotals']['post_expense_amount']) }} {{ $fmt($vehicle['vehicleTotals']['cash_amount']) }} {{ $fmt($vehicle['vehicleTotals']['commission_amount']) }} {{ $fmt($vehicle['vehicleTotals']['total_expanse_amount']) }} {{ $fmt($vehicle['vehicleTotals']['save_amount']) }}
کل مجموعہ — Grand Total {{ number_format($grandTotal['total_bori']) }} {{ number_format($grandTotal['total_weight']) }} {{ $fmt($grandTotal['rent_recieve_amount']) }} {{ $fmt($grandTotal['labour_amount']) }} {{ $fmt($grandTotal['market_fees_amount']) }} {{ $fmt($grandTotal['post_expense_amount']) }} {{ $fmt($grandTotal['cash_amount']) }} {{ $fmt($grandTotal['commission_amount']) }} {{ $fmt($grandTotal['total_expanse_amount']) }} {{ $fmt($grandTotal['save_amount']) }}
@endif @endif
@endsection @push('scripts') @endpush