@extends('layouts.app') @section('page-title', 'Receivable & Payable Report') @section('content')

Receivable & Payable Report

Accounts Receivable
@php $receivables = \App\Models\Invoice::where('user_id', auth()->id()) ->where('status', '!=', 'paid') ->where('due', '>', 0) ->with('customer') ->get(); $totalReceivable = $receivables->sum('due'); @endphp @if($receivables->count() > 0)
@foreach($receivables as $invoice) @endforeach
Invoice # Customer Due Date Amount
{{ $invoice->id }} {{ $invoice->customer->name ?? '-' }} {{ $invoice->due_date ? $invoice->due_date->format('M d, Y') : '-' }} {{ number_format($invoice->due, 2) }}
Total Receivable {{ number_format($totalReceivable, 2) }}
@else

No outstanding receivables!

@endif
Accounts Payable

No payable tracking implemented yet.

To enable payable tracking, you need to implement purchase management.
@endsection