feat: one way to count sales in every report; exports for Excel; the report kit and Today on v2 (platform-v2 step 6.12a)

- services/sales.py: sold = active + paid lines; a line's value net of what
  was refunded of it; system lines (the delivery fee) counted apart as fees;
  cost/profit with has_gap. Products, categories, tables, traffic, revenue
  trends, business days (list and current), per-waiter sales, order history
  totals and the printed products/categories/tables reports all use it (they
  used to differ: closed-only vs all orders, fee as a product, refunds never
  subtracted)
- the overview's day summary values lines with their price change (discounts
  were valued at full price)
- services/csv_export.py: UTF-8 BOM, times in venue time with the zone in the
  header, ';' and decimal commas for a Greek venue (',' and '.' otherwise);
  every report export uses it; orders export has products / fees / refunded
- fix: /api/reports/shift/orders with business_day_id crashed (no window)
- manager: src/pages/reports/kit (page with tabs, period picker, panels,
  figures, sortable table, export button, order dialog reusing the order
  page's parts, hour chart on tokens) and reports/today on it; v1 Today removed
- tests: test_sales_accounting.py (a day with a fee and a partial refund adds
  up the same in every report), test_reports_export.py (Excel format),
  reports.test.mjs, e2e manager.mjs (Today, order dialog, export, Greek)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-19 08:51:13 +02:00
co-authored by Claude Opus 5.5
parent 6643614ff6
commit 4df59c33ef
21 changed files with 1197 additions and 558 deletions
+73
View File
@@ -2715,5 +2715,78 @@
"opens": "Ανοίγει",
"closes": "Κλείνει",
"openingHint": "Σκιασμένα στον άξονα."
},
"reports": {
"failed": "Η αναφορά δεν φορτώθηκε.",
"retry": "Ξανά",
"nothing": "Τίποτα σε αυτή την περίοδο.",
"showing": "Εμφανίζονται {{shown}} από {{total}}.",
"export": "Εξαγωγή (Excel)",
"period": "Περίοδος",
"modes": {
"range": "Ημερομηνίες",
"day": "Εργάσιμη ημέρα"
},
"from": "Από",
"to": "Έως",
"quick": {
"today": "Σήμερα",
"week": "Τελευταίες 7 ημέρες",
"month": "Αυτός ο μήνας",
"thirty": "Τελευταίες 30 ημέρες"
},
"businessDay": "Εργάσιμη ημέρα",
"noDays": "Δεν υπάρχουν εργάσιμες ημέρες ακόμα",
"open": "ανοιχτή",
"rangeProblem": {
"order": "Η αρχή είναι μετά το τέλος.",
"long": "Επιλέξτε έως έναν χρόνο."
},
"revenue": "Έσοδα",
"revenueTip": "Προϊόντα που πουλήθηκαν, μείον όσα επιστράφηκαν. Τα έξοδα αποστολής μετρώνται χωριστά.",
"fees": "Έξοδα αποστολής",
"feesTip": "Χρήματα για την αποστολή: δεν είναι προϊόν, οπότε δεν μπαίνουν στα έσοδα.",
"refunded": "Επιστροφές",
"refundedTip": "Χρήματα που επιστράφηκαν. Έχουν ήδη αφαιρεθεί από τα έσοδα και τα προϊόντα.",
"profit": "Κέρδος",
"profitTip": "Έσοδα μείον το κόστος όσων πουλήθηκαν. Προϊόντα χωρίς κόστος μετρούν χωρίς κέρδος, οπότε είναι τουλάχιστον αυτό.",
"margin": "περιθώριο {{pct}}",
"partial": "τουλάχιστον",
"partialTip": "Κάποια προϊόντα δεν έχουν κόστος: το πραγματικό ποσό είναι τουλάχιστον αυτό.",
"products": "Προϊόντα",
"place": "Τραπέζι",
"noTable": "Χωρίς τραπέζι",
"opened": "Άνοιξε",
"closed": "Έκλεισε",
"by": "Από",
"status": "Κατάσταση",
"byHour": "Έσοδα ανά ώρα",
"byHourTip": "Προϊόντα που πουλήθηκαν, ανά ώρα που άνοιξε η παραγγελία (ώρα καταστήματος).",
"openOrder": "Άνοιγμα παραγγελίας",
"orderTabs": {
"lines": "Γραμμές",
"prices": "Αλλαγές τιμών",
"history": "Ιστορικό"
},
"today": {
"title": "Σήμερα",
"closed": "Η εργάσιμη ημέρα δεν είναι ανοιχτή",
"closedHint": "Ανοίξτε την ημέρα από την επισκόπηση για να τη δείτε εδώ.",
"since": "Εργάσιμη ημέρα ανοιχτή από {{time}}",
"finished_one": "{{count}} ολοκληρωμένη παραγγελία · {{avg}} μέσος όρος",
"finished_other": "{{count}} ολοκληρωμένες παραγγελίες · {{avg}} μέσος όρος",
"refunds_one": "{{count}} επιστροφή",
"refunds_other": "{{count}} επιστροφές",
"open": "Ανοιχτές παραγγελίες",
"openSub": "μένουν να πληρωθούν",
"staff": "Προσωπικό σε βάρδια",
"top": "Πρώτο σε πωλήσεις",
"topSub": "{{qty}} πουλήθηκαν",
"cancellations": "Ακυρώσεις",
"cancelSub": "{{orders}} παραγγελίες / {{items}} είδη",
"noCancels": "καμία",
"orders_one": "{{count}} παραγγελία σήμερα",
"orders_other": "{{count}} παραγγελίες σήμερα"
}
}
}