{% extends "base.html" %}
{% from "partials/ui.html" import page_header, subtabs, subtab_help, stat_card %}
{% block content %}
{{ page_header('Accounting', 'Operational accounting grounded in real ledger data.') }}
{{ subtabs([
{'key':'overview','href':'/accounting?tab=overview','label':'Overview'},
{'key':'expenses','href':'/accounting?tab=expenses','label':'Expenses'},
{'key':'payments','href':'/accounting?tab=payments','label':'Payments & Refunds'},
{'key':'shifts','href':'/accounting?tab=shifts','label':'Cash Shifts'},
{'key':'night_audit','href':'/accounting?tab=night_audit','label':'Night Audit'},
{'key':'ledger','href':'/accounting?tab=ledger','label':'Ledger'}
], active_tab, 'Accounting sections') }}
{% if active_tab == 'overview' %}
{{ subtab_help('High-level financial summary and quick guidance.') }}
How to use Accounting
Record / review expenses Record payment or refund View recent ledger Reports & Analytics
| ID | Date | Cat | Param | Net | |
|---|---|---|---|---|---|
| {{e['id']}} | {{e['at']}} | {{e['category_name']}} | {{e['parameter_name']}} | {{e['net_amount']}} | |
| None | |||||
Refunds require unlock and super password and are audited.
Open shift #{{ open_shift.id }} — {{ open_shift.name or '' }}
Opened {{ open_shift.opened_at }} · Float {{ "%.2f"|format(open_shift.opening_float or 0) }} · Expected (base) {{ "%.2f"|format(open_shift.expected_cash or 0) }}
{% if open_shift_recon %}Linked cash payments net {{ "%.2f"|format(open_shift_recon.linked_net or 0) }} (in {{ "%.2f"|format(open_shift_recon.linked_cash_in or 0) }}, out {{ "%.2f"|format(open_shift_recon.linked_cash_out or 0) }}) · Reconciled expected {{ "%.2f"|format(open_shift_recon.reconciled_expected_cash or 0) }}
View open shift reconciliation details
{% endif %}| ID | Type | Amount | Method | Ref | At |
|---|---|---|---|---|---|
| {{m.id}} | {{m.movement_type}} | {{"%.2f"|format(m.amount or 0)}} | {{m.method}} | {{m.reference}} | {{m.at}} |
| No movements | |||||
No open shift. Open a shift to track cash movements.
{% endif %}| ID | Name | Status | Opened | Closed | Expected | Counted | Variance | |
|---|---|---|---|---|---|---|---|---|
| {{s.id}} | {{s.name}} | {{s.status}} | {{s.opened_at}} | {{s.closed_at or ''}} | {{"%.2f"|format(s.expected_cash or 0)}} | {% if s.counted_cash is not none %}{{"%.2f"|format(s.counted_cash or 0)}}{% endif %} | {% if s.variance is not none %}{{"%.2f"|format(s.variance or 0)}}{% endif %} | Reconcile |
| No shifts | ||||||||
Opened {{ selected_shift_recon.opened_at }}{% if selected_shift_recon.closed_at %} · Closed {{ selected_shift_recon.closed_at }}{% endif %} · Float {{ "%.2f"|format(selected_shift_recon.opening_float or 0) }} · Base expected {{ "%.2f"|format(selected_shift_recon.expected_cash or 0) }}
Movements total {{ "%.2f"|format(selected_shift_recon.movements_total or 0) }} · Linked cash in {{ "%.2f"|format(selected_shift_recon.linked_cash_in or 0) }} · Linked cash out {{ "%.2f"|format(selected_shift_recon.linked_cash_out or 0) }} · Linked net {{ "%.2f"|format(selected_shift_recon.linked_net or 0) }} · Reconciled expected {{ "%.2f"|format(selected_shift_recon.reconciled_expected_cash or 0) }}
Counted {% if selected_shift_recon.counted_cash is not none %}{{ "%.2f"|format(selected_shift_recon.counted_cash or 0) }}{% else %}—{% endif %} · Variance {% if selected_shift_recon.variance is not none %}{{ "%.2f"|format(selected_shift_recon.variance or 0) }}{% else %}—{% endif %}
| ID | Type | Amount | Method | Ref | At |
|---|---|---|---|---|---|
| {{m.id}} | {{m.movement_type}} | {{"%.2f"|format(m.amount or 0)}} | {{m.method}} | {{m.reference}} | {{m.at}} |
| No movements | |||||
| ID | Res | Type | Amount | Method | At | Ref/Notes |
|---|---|---|---|---|---|---|
| {{p.id}} | {{p.reservation_id or 'walk-in'}} | {{p.payment_type}} | {{"%.2f"|format(p.amount or 0)}} | {{p.method}} | {{p.at}} | {{p.reference or p.notes or ''}} |
| No linked cash payments | ||||||
Captures front-desk counts/exceptions and ledger summary for review/reconciliation.
| ID | Business date | Status | Completed | Run by | Summary |
|---|---|---|---|---|---|
| {{a.id}} | {{a.business_date}} | {{a.status}} | {{a.completed_at or a.started_at}} | {{a.run_by or ''}} | View{{a.summary_json}}{% if a.exceptions_json and a.exceptions_json != '[]' %}Exceptions{{a.exceptions_json}}{% endif %} |
| No audit runs | |||||
| ID | Date | Type | Category | Net | VAT | Gross | Description |
|---|---|---|---|---|---|---|---|
| {{r['id']}} | {{r['at']}} | {{r['entry_type']}} | {{r['category']}} | {{r['net']}} | {{r['vat']}} | {{r['gross']}} | {{r['description']}} |
| None | |||||||