@extends('layouts.finance.finance') @section('content') {{-- Main Wrapper: Expanded with an Alpine state manager --}}
Invoice Management
₹{{ number_format($stats['net_cash'], 2) }}
₹{{ number_format($stats['total_outstanding_ar'], 2) }}
₹{{ number_format($stats['total_pending_ap'], 2) }}
| Project / Stage | Due Date | Amount Due | Action |
|---|---|---|---|
|
{{ $ar->project->title ?? 'Unknown Project' }}
{{ $ar->stage_name }} - {{ $ar->category_name }}
|
{{ \Carbon\Carbon::parse($ar->due_date)->format('d M, Y') }} ({{ \Carbon\Carbon::parse($ar->due_date)->diffForHumans() }}) | ₹{{ number_format($ar->amount - $ar->received_amount, 2) }} | |
|
{{-- Backdrop --}}
{{-- Modal Card --}}
|
|||
| No overdue receivables! Great job collecting. | |||
| PO Ref / Vendor | Total Invoice | Pending Amount | Action |
|---|---|---|---|
|
{{ $ap->order->po_number ?? 'N/A' }}
{{ $ap->vendor->company_name ?? 'N/A' }}
|
₹{{ number_format($ap->total_amount, 2) }} | {{ $ap->pending_amount <= 0 ? '₹0.00' : '₹' . number_format($ap->pending_amount, 2) }} | @if($ap->pending_amount > 0) @else @endif |
| All vendor accounts are settled up. | |||
Purchase Order
PendingVendor
{{ $ap->vendor->company_name ?? 'N/A' }}
Company
Meking Steel Pvt Ltd
Project
{{ $ap->project->title ?? $ap->project_name ?? 'N/A' }}
| ID | Material | Unit | Qty | Rate | Total |
|---|---|---|---|---|---|
| {{ $index + 1 }} | {{ $item->material_name ?? $item->title ?? 'Unknown Material' }} | {{ $item->unit ?? 'MT' }} | {{ number_format($itemQty, 2) }} | ₹{{ number_format($itemRate, 2) }} | ₹{{ number_format($itemSubtotal, 2) }} |
| 1 | {{ $ap->stage_name ?? 'Material Item' }} | {{ $ap->unit ?? 'MT' }} | {{ number_format($fallbackQty, 2) }} | ₹{{ number_format($fallbackRate, 2) }} | ₹{{ number_format($computedSubtotal, 2) }} |
| Project Name | Est. Budget (Cost Stages) | Actual Spend (POs) | Variance (Profit Margin) |
|---|---|---|---|
|
{{ $project->title }}
{{ $project->client_name }}
|
₹{{ number_format($project->budget, 2) }} | ₹{{ number_format($project->actual_spend, 2) }} | @if($project->profit_margin < 0) ₹{{ number_format($project->profit_margin, 2) }} (Over Budget) @else ₹{{ number_format($project->profit_margin, 2) }} @endif |
| No active projects found. | |||