@extends('backEnd.layouts.master') @section('title', 'Expenses') @push('styles') @include('backEnd.reports.partials.report-styles') @endpush @section('content')

Expenses

Track expenses by category — used in Sales Reports
Sales Reports
Categories
{{ $categories->count() }}
@csrf
@error('name'){{ $message }}@enderror
@forelse($categories as $cat)
@csrf @method('PUT')
@csrf @method('DELETE')
@empty
No categories yet. Add one above.
@endforelse
Add Expense
@csrf
Total Expenses (Filtered)
{{ number_format($totalAmount, 2) }} ৳
@if($categoryBreakdown->isNotEmpty())
By Category
All @foreach($categories as $cat) @php $row = $categoryBreakdown->get($cat->id); @endphp @if($row) {{ $cat->name }} {{ $row->total_count }} ৳{{ number_format($row->total_amount, 0) }} @endif @endforeach @php $uncat = $categoryBreakdown->get(null); @endphp @if($uncat) Uncategorized {{ $uncat->total_count }} ৳{{ number_format($uncat->total_amount, 0) }} @endif
@endif
Reset
@forelse($expenses as $expense) @empty @endforelse
Date Category Title Note Amount Action
{{ $expense->expense_date->format('d M Y') }} @if($expense->category) {{ $expense->category->name }} @else @endif {{ $expense->title }} {{ $expense->note ?: '—' }} {{ number_format($expense->amount, 2) }} ৳
@csrf @method('DELETE')
No expenses in this period.
@if($expenses->hasPages())
{{ $expenses->links() }}
@endif
@endsection