feat(manager): expenses, the supplier book and tabs on v2 (platform-v2 step 6.13a)

- Finance -> Expenses: still owed, late, filters, new/edit (supplier picked or added there), pay in parts, details with payments, delete
- CRM -> Contacts: the supplier book with what each one is owed
- Finance -> Tabs: open (who owes most first) / settled, charges and payments, pay (cash/card/other), close, forgive
- backend: expenses.manage / tabs.manage (the list also reports.view, a customer's tabs also crm.manage, put-on-tab needs tabs.manage);
  payment <= due (expense.over_due), total >= paid (expense.below_paid), categories/kinds/methods checked, null clears a field;
  live events expenses.changed / tabs.changed; GET /api/expenses ?from=&to= venue dates (the report uses it); tab_status=settled
- fix: an expense with a due date failed to save (naive date refused by D-11)
- @xenia/i18n/number subpath; tests: test_finance.py (6), finance.test.mjs (5), e2e manager.mjs finance flow

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 12:54:21 +02:00
co-authored by Claude Opus 5.5
parent 6bdf0bdd79
commit 93c0dd7d9c
32 changed files with 1667 additions and 1153 deletions
+3 -1
View File
@@ -238,7 +238,9 @@
"not_found": "Contact not found."
},
"expense": {
"not_found": "Expense not found."
"not_found": "Expense not found.",
"over_due": "That's more than what is still due ({{due}}).",
"below_paid": "{{paid}} has been paid already: the total can't be less."
},
"flag": {
"not_found": "Mark not found.",
+186 -14
View File
@@ -3045,23 +3045,195 @@
"what": "What",
"supplier": "Supplier",
"total": "Total",
"status": {
"due": "Due",
"partial": "Partly paid",
"paid": "Paid"
},
"categories": {
"supplier": "Supplies",
"utilities": "Utilities",
"rent": "Rent",
"maintenance": "Maintenance",
"staff": "Staff",
"equipment": "Equipment",
"other": "Other"
},
"dueDate": "Due by {{date}}",
"payments": "Payments",
"noPayments": "Nothing paid yet."
}
},
"finance": {
"back": "Back",
"save": "Save",
"notes": "Notes",
"categories": {
"supplier": "Supplies",
"utilities": "Utilities",
"rent": "Rent",
"maintenance": "Maintenance",
"staff": "Staff",
"equipment": "Equipment",
"other": "Other"
},
"status": {
"due": "Due",
"partial": "Partly paid",
"paid": "Paid"
},
"exp": {
"title": "Expenses",
"subtitle": "What the venue owes and has paid. The analysis of a period is in Reports → Expenses.",
"new": "New expense",
"newTitle": "New expense",
"add": "Add the expense",
"owed": "Still owed",
"unpaid_one": "{{count}} not fully paid",
"unpaid_other": "{{count}} not fully paid",
"lateTitle": "Late",
"lateSub": "past their due date, not paid",
"late": "Late",
"shown": "In this list",
"shownSub_one": "{{count}} expense · {{paid}} paid",
"shownSub_other": "{{count}} expenses · {{paid}} paid",
"search": "Search what, supplier or notes",
"all": "All",
"unpaidOnly": "Not fully paid",
"allCategories": "All categories",
"what": "What",
"whatHint": "e.g. November invoice: dairy",
"category": "Category",
"entered": "Entered",
"dueBy": "Due by",
"dueByHint": "Optional: when it must be paid.",
"dueOn": "Due by {{date}}",
"total": "Total",
"paid": "Paid",
"due": "Still due",
"status": "Status",
"amount": "Amount",
"supplier": "Supplier",
"noSupplier": "No supplier",
"newSupplier": "New supplier…",
"none": "No expenses yet.",
"noneHint": "Enter what the venue buys or pays (supplies, bills, rent) and record payments as they are made.",
"noMatch": "No expense matches.",
"payOf": "Pay {{what}}",
"editOf": "Edit {{what}}",
"deleteOf": "Delete {{what}}",
"edit": "Edit",
"pay": "Record a payment",
"payments": "Payments",
"noPayments": "Nothing paid yet.",
"enteredBy": "entered {{date}} by {{name}}",
"added": "{{what}} added",
"saved": "{{what}} saved",
"deleted": "{{what}} deleted",
"deleteTitle": "Delete {{what}}?",
"deleteBody": "The expense goes from the list and the reports.",
"deleteBodyPaid_one": "The expense and its payment go from the list and the reports.",
"deleteBodyPaid_other": "The expense and its {{count}} payments go from the list and the reports.",
"deleteYes": "Delete",
"payTitle": "Record a payment",
"payAmount": "Amount paid",
"payAmountHint": "All of what is due, or part of it.",
"payNoteHint": "e.g. cash, bank transfer, receipt number",
"payYes": "Record the payment",
"paidAll": "{{amount}} paid: nothing more is due",
"paidPart": "{{amount}} paid: {{due}} still due",
"wrong": {
"description": "Say what it is.",
"total_amount": "Enter an amount above zero.",
"below_paid": "{{paid}} has been paid already: the total can't be less.",
"payment": "Enter an amount above zero and no more than {{due}}."
}
},
"contacts": {
"title": "Suppliers and contacts",
"subtitle_one": "{{count}} contact: the people and companies the venue pays.",
"subtitle_other": "{{count}} contacts: the people and companies the venue pays.",
"new": "New contact",
"newTitle": "New contact",
"add": "Add the contact",
"name": "Name",
"type": "Kind",
"phone": "Phone",
"email": "E-mail",
"address": "Address",
"notesHint": "Only for the managers: e.g. delivers on Tuesdays, ask for Nikos.",
"types": {
"supplier": "Supplier",
"staff": "Staff",
"utility": "Utility",
"other": "Other"
},
"allTypes": "All kinds",
"search": "Search name, phone, e-mail or notes",
"owed": "Owed to them",
"bills_one": "{{count}} expense",
"bills_other": "{{count}} expenses",
"none": "No contacts yet.",
"noneHint": "Add your suppliers here, or from a new expense.",
"noMatch": "No contact matches.",
"editOf": "Edit {{name}}",
"removeOf": "Remove {{name}}",
"added": "{{name}} added",
"saved": "{{name}} saved",
"removed": "{{name}} removed",
"removeTitle": "Remove {{name}}?",
"removeBody": "They leave the book and the supplier lists. Their past expenses keep their name.",
"removeYes": "Remove",
"wrong": {
"name": "Enter a name.",
"email": "This doesn't look like an e-mail address."
}
},
"tabs": {
"title": "Tabs",
"subtitle": "What regular customers owe. Lines go on a customer's tab from their order (On the tab).",
"owed": "Owed on tabs",
"openCount_one": "{{count}} open tab",
"openCount_other": "{{count}} open tabs",
"views": {
"open": "Open",
"settled": "Settled"
},
"search": "Search a customer or phone",
"none": {
"open": "No open tabs.",
"settled": "No settled tabs yet."
},
"noneHint": "A tab opens by itself when a line of a customer's order is put on it.",
"noMatch": "No tab matches.",
"openSince_one": "open since {{date}} · {{count}} day",
"openSince_other": "open since {{date}} · {{count}} days",
"settledOn": {
"closed": "paid and closed {{date}}",
"forgiven": "forgiven {{date}}"
},
"status": {
"open": "Open",
"closed": "Closed",
"forgiven": "Forgiven"
},
"charged": "Charged",
"paid": "Paid",
"balance": "Owed",
"charges": "Charges",
"charge": "Charge #{{id}}",
"order": "order #{{id}}",
"noCharges": "Nothing charged.",
"payments": "Payments",
"noPayments": "Nothing paid yet.",
"methods": {
"cash": "Cash",
"card": "Card",
"other": "Other"
},
"pay": "Record a payment",
"close": "Close the tab",
"forgive": "Forgive what is owed",
"closed": "{{name}}'s tab closed",
"payTitle": "Payment on the tab",
"payAmount": "Amount paid",
"method": "Paid with",
"payYes": "Record the payment",
"wrongPayment": "Enter an amount above zero and no more than {{balance}}.",
"paidAll": "{{amount}} paid: nothing more is owed. Close the tab when you're ready.",
"paidPart": "{{amount}} paid: {{balance}} still owed",
"forgiveTitle": "Forgive {{name}}'s tab?",
"forgiveBody": "{{amount}} is written off and the tab closes. This can't be undone.",
"reason": "Why",
"reasonHint": "e.g. a good customer, moved away",
"forgiveYes": "Forgive it",
"forgiven": "{{name}}: {{amount}} forgiven"
}
}
}