You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(reports): date-range daily sales export with per-tax-rate summary for accountants #1335
Parent: #830 (S1 accountant export). Verified against main @ 8e39053.
Problem
Accountants want one file per month or period. Today owners have to download one business day at a time.
Current behavior (verified)
GET /reports/daily-sales/export (main/routes/reports.ts ~L1410) exports a single business day. docs/reference/daily-sales-export.md says "One business day at a time (no multi-day ranges)" and "No tips".
Add from / to business-date parameters (inclusive, store timezone, business-day cutoff respected), capped at 93 days per request so memory stays bounded.
Keep the existing single-day call working unchanged (date=).
Add a per-tax-rate summary sheet: taxable base, tax and gross per rate per day. This is what accountants file from.
Scope
main/services/daily-sales-export.ts, daily-sales-export-files.ts, the route in reports.ts, and the date-range picker in the dashboard export UI.
Update docs/reference/daily-sales-export.md in the same PR (replace the "one day" limitation).
Out of scope: accounting-software specific formats (Tally, QuickBooks, Xero) and tips (#364).
Acceptance criteria
A range export over N days equals the sum of N single-day exports (orders, payments, tax).
Ranges over 93 days, or with to < from, return 400 with a clear message.
The tax summary sheet totals equal the tax totals of the orders sheet.
CSV parts and xlsx sheets are consistent.
Verification
tests/daily-sales-export.test.ts: add range equivalence, cutoff boundary and cap tests.
Activity
khaira777 commentedon Oct 27, 2026
Looking into this issue now.