Skip to content

feat(reports): owner-only customer sales export - #1357

Merged
itsbkm merged 2 commits into
mainfrom
feat/customer-sales-export
Oct 25, 2026
Merged

itsbkm merged 2 commits into
mainfrom
feat/customer-sales-export

Conversation

@itsbkm

@itsbkm itsbkm commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • New GET /api/reports/customer-sales/export (xlsx or csv): one row per item sold over a business-date range (max 366 days), with the bill's customer name/phone/email repeated on every row.
  • New configurable permission reports.customer-sales.export (owner by default), kept separate from the no-PII daily sales export.
  • Dashboard Export sales menu gains a Customer sales group, available in both day and month views.
  • bill_total is set on the first row of each bill only, so a column sum equals bill totals.

Verification

  • npm run test:customer-sales-export (35/35), test:daily-sales-export, test:authorization-permissions, test:staff-authz, test:script-coverage
  • npm run lint, npm run build, npm run build:frontend, npm run i18n:check, npm run docs:check

Not run: full npm test, Playwright E2E, visual check of the dashboard menu.

🤖 Generated with Claude Code

One row per item sold over a business-date range, with the bill's customer
repeated on each row, as XLSX or CSV. Gated by the new
reports.customer-sales.export permission (owner by default).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@itsbkm
itsbkm enabled auto-merge (squash) October 25, 2026 20:08
@itsbkm
itsbkm merged commit c8897aa into main Oct 25, 2026
23 checks passed
@itsbkm
itsbkm deleted the feat/customer-sales-export branch October 25, 2026 20:12
@itsbkm

itsbkm commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Pull request is closed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant