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:
@@ -2715,5 +2715,78 @@
|
||||
"opens": "Opens",
|
||||
"closes": "Closes",
|
||||
"openingHint": "Shaded on the timeline."
|
||||
},
|
||||
"reports": {
|
||||
"failed": "This report couldn't be loaded.",
|
||||
"retry": "Try again",
|
||||
"nothing": "Nothing in this period.",
|
||||
"showing": "Showing {{shown}} of {{total}}.",
|
||||
"export": "Export (Excel)",
|
||||
"period": "Period",
|
||||
"modes": {
|
||||
"range": "Dates",
|
||||
"day": "Business day"
|
||||
},
|
||||
"from": "From",
|
||||
"to": "To",
|
||||
"quick": {
|
||||
"today": "Today",
|
||||
"week": "Last 7 days",
|
||||
"month": "This month",
|
||||
"thirty": "Last 30 days"
|
||||
},
|
||||
"businessDay": "Business day",
|
||||
"noDays": "No business days yet",
|
||||
"open": "open",
|
||||
"rangeProblem": {
|
||||
"order": "The start is after the end.",
|
||||
"long": "Pick at most a year."
|
||||
},
|
||||
"revenue": "Revenue",
|
||||
"revenueTip": "Products sold, minus what was refunded. Delivery fees are counted apart.",
|
||||
"fees": "Delivery fees",
|
||||
"feesTip": "Money taken for delivery: not a product, so it's not in the revenue.",
|
||||
"refunded": "Refunded",
|
||||
"refundedTip": "Money given back. Already taken off the revenue and the products.",
|
||||
"profit": "Profit",
|
||||
"profitTip": "Revenue minus the cost of what was sold. Products without a cost count without profit, so this is at least the profit.",
|
||||
"margin": "{{pct}} margin",
|
||||
"partial": "at least",
|
||||
"partialTip": "Some products have no cost: the real figure is at least this.",
|
||||
"products": "Products",
|
||||
"place": "Table",
|
||||
"noTable": "No table",
|
||||
"opened": "Opened",
|
||||
"closed": "Closed",
|
||||
"by": "By",
|
||||
"status": "Status",
|
||||
"byHour": "Revenue by hour",
|
||||
"byHourTip": "Products sold, by the hour their order was opened (venue time).",
|
||||
"openOrder": "Open the order",
|
||||
"orderTabs": {
|
||||
"lines": "Lines",
|
||||
"prices": "Price changes",
|
||||
"history": "History"
|
||||
},
|
||||
"today": {
|
||||
"title": "Today",
|
||||
"closed": "The business day isn't open",
|
||||
"closedHint": "Open the day from the overview to see it here.",
|
||||
"since": "Business day open since {{time}}",
|
||||
"finished_one": "{{count}} finished order · {{avg}} average",
|
||||
"finished_other": "{{count}} finished orders · {{avg}} average",
|
||||
"refunds_one": "{{count}} refund",
|
||||
"refunds_other": "{{count}} refunds",
|
||||
"open": "Open orders",
|
||||
"openSub": "still to be paid",
|
||||
"staff": "Staff on shift",
|
||||
"top": "Best seller",
|
||||
"topSub": "{{qty}} sold",
|
||||
"cancellations": "Cancellations",
|
||||
"cancelSub": "{{orders}} orders / {{items}} items",
|
||||
"noCancels": "none",
|
||||
"orders_one": "{{count}} order today",
|
||||
"orders_other": "{{count}} orders today"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user