@extends('layouts.app') @section('title', 'Billings') @section('content')
@if(session('success')) @endif @if($errors->any()) @endif @if($stats)
Total Bills

{{ $stats['total_bills'] }}

Sent

{{ $stats['sent'] }}

Overdue

{{ $stats['overdue'] }}

Paid

{{ $stats['paid'] }}

@endif
@if($isSuperAdmin)
@else
@endif
@if($isSuperAdmin) @endif @forelse ($billings as $billing) @if($isSuperAdmin) @endif {{-- The late payment fee is part of the billing, so it is itemised here rather than shown as a payment. --}} @empty @endforelse
Billing #CompanyClient Consumption Water Charges Late Fee Total Amount Due Amount Paid Balance Status Due Date Actions
{{ $billing->billing_number }} @if($billing->is_legacy) Old System @endif {{ $billing->client->company->name }} {{ $billing->client->name }} {{ number_format($billing->units_consumed, 2) }} cu.m₱{{ number_format($billing->total_amount_due - $billing->penalties, 2) }} @if ($billing->penalties > 0) ₱{{ number_format($billing->penalties, 2) }} @else @endif ₱{{ number_format($billing->total_amount_due, 2) }} ₱{{ number_format($billing->amount_paid, 2) }} @if ($billing->status === 'voided') Voided @elseif ($billing->balance > 0) ₱{{ number_format($billing->balance, 2) }} @else Paid @endif {{ ucfirst(str_replace('_', ' ', $billing->status)) }} {{ $billing->due_date->format('M d, Y') }} View PDF @if ($billing->balance > 0) Pay @endif {{-- Void once money has been collected (it reverses the payments); Cancel while nothing has been paid. The two are mutually exclusive. --}} @can('void', $billing) @if ($billing->isVoidable()) @endif @endcan @can('cancel', $billing) @if ($billing->isCancellable())
@csrf
@endif @endcan
No billings found
{{ $billings->appends(request()->query())->links('pagination::bootstrap-5') }}
@can('void-billings') @include('components.void-billing-modal', ['hasVoidAuthorizer' => $hasVoidAuthorizer]) @endcan @endsection