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": "Η επαφή δεν βρέθηκε."
},
"expense": {
"not_found": "Το έξοδο δεν βρέθηκε."
"not_found": "Το έξοδο δεν βρέθηκε.",
"over_due": "Είναι περισσότερα από όσα οφείλονται ακόμα ({{due}}).",
"below_paid": "Έχουν ήδη πληρωθεί {{paid}}: το σύνολο δεν μπορεί να είναι λιγότερο."
},
"flag": {
"not_found": "Η σήμανση δεν βρέθηκε.",
+186 -14
View File
@@ -3045,23 +3045,195 @@
"what": "Τι",
"supplier": "Προμηθευτής",
"total": "Σύνολο",
"status": {
"due": "Οφείλεται",
"partial": "Μερικώς",
"paid": "Πληρώθηκε"
},
"categories": {
"supplier": "Προμηθευτές",
"utilities": "Κοινή χρεία",
"rent": "Ενοίκιο",
"maintenance": "Συντήρηση",
"staff": "Προσωπικό",
"equipment": "Εξοπλισμός",
"other": "Άλλο"
},
"dueDate": "Λήξη {{date}}",
"payments": "Πληρωμές",
"noPayments": "Δεν έχει πληρωθεί τίποτα ακόμα."
}
},
"finance": {
"back": "Πίσω",
"save": "Αποθήκευση",
"notes": "Σημειώσεις",
"categories": {
"supplier": "Προμηθευτές",
"utilities": "Κοινή χρεία",
"rent": "Ενοίκιο",
"maintenance": "Συντήρηση",
"staff": "Προσωπικό",
"equipment": "Εξοπλισμός",
"other": "Άλλο"
},
"status": {
"due": "Οφείλεται",
"partial": "Μερικώς",
"paid": "Πληρώθηκε"
},
"exp": {
"title": "Δαπάνες",
"subtitle": "Τι οφείλει και τι έχει πληρώσει το κατάστημα. Η ανάλυση μιας περιόδου είναι στις Αναφορές → Δαπάνες.",
"new": "Νέα δαπάνη",
"newTitle": "Νέα δαπάνη",
"add": "Προσθήκη δαπάνης",
"owed": "Οφείλονται",
"unpaid_one": "{{count}} δεν έχει εξοφληθεί",
"unpaid_other": "{{count}} δεν έχουν εξοφληθεί",
"lateTitle": "Εκπρόθεσμες",
"lateSub": "πέρασε η ημερομηνία λήξης, δεν πληρώθηκαν",
"late": "Εκπρόθεσμη",
"shown": "Σε αυτή τη λίστα",
"shownSub_one": "{{count}} δαπάνη · πληρώθηκαν {{paid}}",
"shownSub_other": "{{count}} δαπάνες · πληρώθηκαν {{paid}}",
"search": "Αναζήτηση: τι, προμηθευτής ή σημειώσεις",
"all": "Όλες",
"unpaidOnly": "Ανεξόφλητες",
"allCategories": "Όλες οι κατηγορίες",
"what": "Τι",
"whatHint": "π.χ. Τιμολόγιο Νοεμβρίου: γαλακτοκομικά",
"category": "Κατηγορία",
"entered": "Καταχωρήθηκε",
"dueBy": "Λήξη",
"dueByHint": "Προαιρετικά: έως πότε πρέπει να πληρωθεί.",
"dueOn": "Λήξη {{date}}",
"total": "Σύνολο",
"paid": "Πληρώθηκαν",
"due": "Οφείλονται",
"status": "Κατάσταση",
"amount": "Ποσό",
"supplier": "Προμηθευτής",
"noSupplier": "Χωρίς προμηθευτή",
"newSupplier": "Νέος προμηθευτής…",
"none": "Δεν υπάρχουν δαπάνες ακόμα.",
"noneHint": "Καταχωρήστε ό,τι αγοράζει ή πληρώνει το κατάστημα (προμήθειες, λογαριασμοί, ενοίκιο) και τις πληρωμές καθώς γίνονται.",
"noMatch": "Καμία δαπάνη δεν ταιριάζει.",
"payOf": "Πληρωμή: {{what}}",
"editOf": "Επεξεργασία: {{what}}",
"deleteOf": "Διαγραφή: {{what}}",
"edit": "Επεξεργασία",
"pay": "Καταγραφή πληρωμής",
"payments": "Πληρωμές",
"noPayments": "Δεν έχει πληρωθεί τίποτα ακόμα.",
"enteredBy": "καταχωρήθηκε {{date}} από {{name}}",
"added": "Προστέθηκε: {{what}}",
"saved": "Αποθηκεύτηκε: {{what}}",
"deleted": "Διαγράφηκε: {{what}}",
"deleteTitle": "Διαγραφή: {{what}};",
"deleteBody": "Η δαπάνη φεύγει από τη λίστα και τις αναφορές.",
"deleteBodyPaid_one": "Η δαπάνη και η πληρωμή της φεύγουν από τη λίστα και τις αναφορές.",
"deleteBodyPaid_other": "Η δαπάνη και οι {{count}} πληρωμές της φεύγουν από τη λίστα και τις αναφορές.",
"deleteYes": "Διαγραφή",
"payTitle": "Καταγραφή πληρωμής",
"payAmount": "Ποσό που πληρώθηκε",
"payAmountHint": "Όλο το υπόλοιπο ή μέρος του.",
"payNoteHint": "π.χ. μετρητά, τραπεζική μεταφορά, αριθμός απόδειξης",
"payYes": "Καταγραφή πληρωμής",
"paidAll": "Πληρώθηκαν {{amount}}: δεν οφείλεται τίποτα άλλο",
"paidPart": "Πληρώθηκαν {{amount}}: οφείλονται ακόμα {{due}}",
"wrong": {
"description": "Γράψτε τι είναι.",
"total_amount": "Βάλτε ποσό πάνω από μηδέν.",
"below_paid": "Έχουν ήδη πληρωθεί {{paid}}: το σύνολο δεν μπορεί να είναι λιγότερο.",
"payment": "Βάλτε ποσό πάνω από μηδέν και έως {{due}}."
}
},
"contacts": {
"title": "Προμηθευτές και επαφές",
"subtitle_one": "{{count}} επαφή: όσοι πληρώνει το κατάστημα.",
"subtitle_other": "{{count}} επαφές: όσοι πληρώνει το κατάστημα.",
"new": "Νέα επαφή",
"newTitle": "Νέα επαφή",
"add": "Προσθήκη επαφής",
"name": "Όνομα",
"type": "Είδος",
"phone": "Τηλέφωνο",
"email": "Email",
"address": "Διεύθυνση",
"notesHint": "Μόνο για τους υπευθύνους: π.χ. φέρνει Τρίτη, ζητήστε τον Νίκο.",
"types": {
"supplier": "Προμηθευτής",
"staff": "Προσωπικό",
"utility": "Κοινή χρεία",
"other": "Άλλο"
},
"allTypes": "Όλα τα είδη",
"search": "Αναζήτηση: όνομα, τηλέφωνο, email ή σημειώσεις",
"owed": "Τους οφείλονται",
"bills_one": "{{count}} δαπάνη",
"bills_other": "{{count}} δαπάνες",
"none": "Δεν υπάρχουν επαφές ακόμα.",
"noneHint": "Προσθέστε εδώ τους προμηθευτές σας, ή από μια νέα δαπάνη.",
"noMatch": "Καμία επαφή δεν ταιριάζει.",
"editOf": "Επεξεργασία: {{name}}",
"removeOf": "Αφαίρεση: {{name}}",
"added": "Προστέθηκε: {{name}}",
"saved": "Αποθηκεύτηκε: {{name}}",
"removed": "Αφαιρέθηκε: {{name}}",
"removeTitle": "Αφαίρεση: {{name}};",
"removeBody": "Φεύγει από τις επαφές και τις λίστες προμηθευτών. Οι παλιές δαπάνες κρατούν το όνομά του.",
"removeYes": "Αφαίρεση",
"wrong": {
"name": "Γράψτε ένα όνομα.",
"email": "Δεν μοιάζει με διεύθυνση email."
}
},
"tabs": {
"title": "Καρτέλες",
"subtitle": "Τι χρωστούν οι τακτικοί πελάτες. Οι γραμμές μπαίνουν στην καρτέλα ενός πελάτη από την παραγγελία του (Στην καρτέλα).",
"owed": "Οφειλές σε καρτέλες",
"openCount_one": "{{count}} ανοιχτή καρτέλα",
"openCount_other": "{{count}} ανοιχτές καρτέλες",
"views": {
"open": "Ανοιχτές",
"settled": "Εξοφλημένες"
},
"search": "Αναζήτηση πελάτη ή τηλεφώνου",
"none": {
"open": "Δεν υπάρχουν ανοιχτές καρτέλες.",
"settled": "Δεν υπάρχουν εξοφλημένες καρτέλες ακόμα."
},
"noneHint": "Μια καρτέλα ανοίγει μόνη της όταν μια γραμμή της παραγγελίας ενός πελάτη μπαίνει σε αυτήν.",
"noMatch": "Καμία καρτέλα δεν ταιριάζει.",
"openSince_one": "ανοιχτή από {{date}} · {{count}} μέρα",
"openSince_other": "ανοιχτή από {{date}} · {{count}} μέρες",
"settledOn": {
"closed": "εξοφλήθηκε και έκλεισε {{date}}",
"forgiven": "χαρίστηκε {{date}}"
},
"status": {
"open": "Ανοιχτή",
"closed": "Κλειστή",
"forgiven": "Χαρίστηκε"
},
"charged": "Χρεώσεις",
"paid": "Πληρώθηκαν",
"balance": "Οφείλει",
"charges": "Χρεώσεις",
"charge": "Χρέωση #{{id}}",
"order": "παραγγελία #{{id}}",
"noCharges": "Καμία χρέωση.",
"payments": "Πληρωμές",
"noPayments": "Δεν έχει πληρωθεί τίποτα ακόμα.",
"methods": {
"cash": "Μετρητά",
"card": "Κάρτα",
"other": "Άλλο"
},
"pay": "Καταγραφή πληρωμής",
"close": "Κλείσιμο καρτέλας",
"forgive": "Χάρισμα οφειλής",
"closed": "Η καρτέλα του/της {{name}} έκλεισε",
"payTitle": "Πληρωμή στην καρτέλα",
"payAmount": "Ποσό που πληρώθηκε",
"method": "Τρόπος",
"payYes": "Καταγραφή πληρωμής",
"wrongPayment": "Βάλτε ποσό πάνω από μηδέν και έως {{balance}}.",
"paidAll": "Πληρώθηκαν {{amount}}: δεν οφείλεται τίποτα. Κλείστε την καρτέλα όταν θέλετε.",
"paidPart": "Πληρώθηκαν {{amount}}: οφείλονται ακόμα {{balance}}",
"forgiveTitle": "Χάρισμα της καρτέλας: {{name}};",
"forgiveBody": "Τα {{amount}} διαγράφονται και η καρτέλα κλείνει. Δεν αναιρείται.",
"reason": "Γιατί",
"reasonHint": "π.χ. καλός πελάτης, έφυγε από την περιοχή",
"forgiveYes": "Χάρισμα",
"forgiven": "{{name}}: χαρίστηκαν {{amount}}"
}
}
}
+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"
}
}
}