@extends('layouts.dashboard.superadminapp') @section('title', 'Accounts Payable') @section('styles') @endsection @section('content')

Accounts Payable

Overview of vendor bills, payment status, and outstanding dues.

Aging Report
Total Payables
₹{{ number_format($stats['total_payables'] ?? 0, 0) }}
Lifetime Volume
Total Paid
₹{{ number_format($stats['total_paid'] ?? 0, 0) }}
Settled Payments
Outstanding
₹{{ number_format($stats['total_outstanding'] ?? 0, 0) }}
@php $percent = ($stats['total_payables'] > 0) ? ($stats['total_outstanding'] / $stats['total_payables']) * 100 : 0; @endphp {{ number_format($percent, 1) }}% of total
Overdue Bills
{{ $stats['overdue_count'] ?? 0 }}
Action Required
Purchase Orders List
to
Reset
@forelse($payables as $payable) @empty @endforelse
PO Reference Date Vendor Total Paid Balance Status Action
{{ $payable->purchase_order_no }}
ID: #{{ $payable->id }}
{{ \Carbon\Carbon::parse($payable->purchase_order_date)->format('d M, Y') }}
{{ \Carbon\Carbon::parse($payable->purchase_order_date)->diffForHumans() }}
{{ strtoupper(substr($payable->vendor->company ?? 'U', 0, 1)) }}
{{ $payable->vendor->company ?? 'Unknown' }}
{{ $payable->vendor->gstno ?? 'GST: N/A' }}
₹{{ number_format($payable->grand_total, 2) }} ₹{{ number_format($payable->paid_amount ?? 0, 2) }} @if(($payable->balance_amount ?? $payable->grand_total) > 0) ₹{{ number_format($payable->balance_amount ?? $payable->grand_total, 2) }} @else ₹0.00 @endif @php $topay = $payable->grand_total ?? 0; $paid = $payable->paid_amount ?? 0; $status = 'pending'; if($topay > 0 && $paid >= $topay) $status = 'paid'; elseif($paid > 0) $status = 'partial'; @endphp @if($status=='paid') @elseif($status=='partial') @else @endif {{ ucfirst($status) }} View
No Records Found

No purchase orders found matching your criteria.

@if($payables->hasPages()) @endif
@endsection