@extends('layouts.app') @section('title', _lang('Billing')) @php $statusBadge = [ 'pending' => 'bg-warning-transparent', 'partial' => 'bg-info-transparent', 'paid' => 'bg-success-transparent', 'overdue' => 'bg-danger-transparent', 'waived' => 'bg-secondary-transparent', 'cancelled' => 'bg-secondary-transparent', ]; @endphp @section('content')

{{ _lang('Billing Dashboard') }}

{{ _lang('Postpaid subscription billing — invoices, payments and grace control.') }}

{{ _lang('Invoices') }} {{ _lang('Payments') }}
@include('partials.alerts')
{{ _lang('Outstanding') }}

৳{{ number_format($outstanding / 100) }}

{{ _lang('Overdue') }}

৳{{ number_format($overdue / 100) }}

{{ _lang('Collected this month') }}

৳{{ number_format($collectedThisMonth / 100) }}

{{ _lang('Restricted organizations') }}

{{ $restricted }}

{{ _lang('Generate Invoice Manually') }}
@csrf {{ _lang('Closes the current cycle and bills up to today using the peak member count.') }}
{{ _lang('Discount an Organization (standing)') }}
@csrf
{{ _lang('Applies automatically to every future invoice for that organization. Percent caps at 100%; choose "None" to clear.') }}
{{ _lang('Recent Invoices') }}
@forelse ($recent as $inv) @empty @endforelse
{{ _lang('Invoice') }} {{ _lang('Organization') }} {{ _lang('Plan') }} {{ _lang('Total') }} {{ _lang('Due') }} {{ _lang('Status') }}
{{ $inv->invoice_no }} {{ optional($inv->organization)->name ?? '—' }} {{ $inv->plan_name }} ({{ $inv->peak_members }}) ৳{{ number_format($inv->total_amount / 100) }} {{ optional($inv->due_on)->format('d M Y') }} {{ ucfirst($inv->status) }}
{{ _lang('No invoices yet.') }}
@endsection