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

Aging Payables — ادائیگی ادھاری

{{-- ── Filter Form ── --}}
@if($reportData && count($reportData['rows'])) پرنٹ @endif

@if($reportData !== null) @if(empty($reportData['rows']))
کوئی اندراج نہیں ملا۔
@else @php // Negative → parentheses like the image, zero → $z param $fmt = fn($v, $z = '-') => $v == 0 ? $z : ($v < 0 ? '(' . number_format(abs($v), 0) . ')' : number_format($v, 0)); @endphp {{-- Summary Cards --}}
سابقہ بیلنس {{ $fmt($reportData['grandSabiqah'], '0') }}
خرید وغیرہ {{ number_format($reportData['grandKharid'], 0) }}
ادائیگی {{ number_format($reportData['grandAdaegi'], 0) }}
حالیہ بیلنس {{ $fmt($reportData['grandHaliah'], '0') }}
{{-- Aging Table --}}
M.D.S
ادائیگی ادھاری    Aging Payables
مورخہ: {{ \Carbon\Carbon::parse($fromDate)->format('d/m/Y') }} تا {{ \Carbon\Carbon::parse($toDate)->format('d/m/Y') }}
@foreach($reportData['rows'] as $row) @endforeach
پارٹی سابقہ بیلنس خرید وغیرہ ادائیگی حالیہ بیلنس
{{ $row['supplier_name'] }} {{ $fmt($row['sabiqah']) }} {{ $row['kharid'] == 0 ? '-' : number_format($row['kharid'], 0) }} {{ $row['adaegi'] == 0 ? '0' : number_format($row['adaegi'], 0) }} {{ $fmt($row['haliah'], '0') }}
کُل مجموعہ {{ $fmt($reportData['grandSabiqah'], '0') }} {{ number_format($reportData['grandKharid'], 0) }} {{ number_format($reportData['grandAdaegi'], 0) }} {{ $fmt($reportData['grandHaliah'], '0') }}
{{-- .aging-wrap --}} @endif @endif
@endsection