@extends('layouts.app') @section('title', 'Accounting Overview') @include('inventory.accounting.partials.styles') @section('content')

Accounting Overview

Financial snapshot for {{ $tenant->business_name ?? 'your business' }} — {{ \Carbon\Carbon::parse($from)->format('M j') }} to {{ \Carbon\Carbon::parse($to)->format('M j, Y') }}.

New Entry
@include('inventory.accounting.partials.sub-nav') @if(session('success'))
{{ session('success') }}
@endif
Net Revenue
{{ number_format($pnl['revenue']['net'], 2) }}
Gross {{ number_format($pnl['revenue']['gross'], 2) }} — Refunds {{ number_format($pnl['revenue']['refunds'], 2) }}
Net Income
{{ number_format($pnl['net_income'], 2) }}
{{ $pnl['margin'] }}% margin
Cash on Hand
{{ number_format($cashBalance, 2) }}
All bank & cash accounts
Expenses
{{ number_format($pnl['expenses']['total'], 2) }}
{{ number_format($expenseMtd, 2) }} recorded this month
Receivables
{{ number_format($ar['total'], 2) }}
{{ count($ar['buckets']['current']['orders']) + count($ar['buckets']['bucket_30']['orders']) + count($ar['buckets']['bucket_60']['orders']) + count($ar['buckets']['bucket_90']['orders']) }} open orders

Cash Flow by Source

@if(empty($cashFlow['sources']))
No cash movements yet in this period.
@else @foreach($cashFlow['sources'] as $s) @endforeach
SourceInflowOutflowNet
{{ str_replace('_', ' ', $s['source']) }} {{ number_format($s['inflow'], 2) }} {{ number_format($s['outflow'], 2) }} {{ number_format($s['net'], 2) }}
Total {{ number_format($cashFlow['inflow'], 2) }} {{ number_format($cashFlow['outflow'], 2) }} {{ number_format($cashFlow['net_cash'], 2) }}
@endif

Recent Journal Entries

@if($recentEntries->isEmpty())
No entries posted yet. Payments and expenses will appear here automatically.
@else @foreach($recentEntries as $entry) @endforeach
Entry #DateSourceDescriptionAmount
{{ $entry->entry_number }} {{ optional($entry->entry_date)->format('M j, Y') }} {{ $entry->source }} {{ \Illuminate\Support\Str::limit($entry->description, 80) }} {{ number_format($entry->total_debit, 2) }} View
@endif
@endsection