@extends('admin.admin_dashboard') @section('admin')
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Filter --}}
Filter
@can('expense_bill.create') Create Bill @endcan
{{-- List --}}
Bill List
@forelse($bills as $i => $bill) @php $badgeClass = match($bill->status) { 'draft' => 'badge-secondary', 'approved' => 'badge-info', 'partial' => 'badge-warning', 'paid' => 'badge-success', 'void' => 'badge-danger', default => 'badge-primary', }; @endphp @empty @endforelse
# Bill No Date Category Vendor Total Paid Status Actions
{{ $bills->firstItem() + $i }} {{ $bill->bill_no }} {{ optional($bill->bill_date)->format('d - m - Y') }} {{ $bill->category?->name }} {{ $bill->vendor_name ?: ($bill->expenseVendor?->name ?? '-') }} {{ number_format((float)$bill->total_amount, 2) }} {{ number_format((float)$bill->paid_amount, 2) }} {{ strtoupper($bill->status) }} @can('expense_bill.update') @if($bill->status === 'draft')
@csrf @method('DELETE')
@endif @endcan
No bills found.

Showing {{ $bills->count() }} of {{ $bills->total() }} records

{{ $bills->links() }}
@endsection @section('customjs') @endsection