Repository navigation
Fix/order delete - #304
Fix/order delete#304shipeast-beep wants to merge 3 commits into
Conversation
itsbkm
left a comment
There was a problem hiding this comment.
Thanks for the PR. I can’t approve this as-is.
This mixes two unrelated changes: Czech receipt currency formatting and restoring an order deletion endpoint. Please split those into separate PRs.
The DELETE /api/orders/:id endpoint is risky as implemented:
- It hard-deletes orders, bills, print logs, WhatsApp records, and order items instead of using the existing cancellation lifecycle.
- It can bypass inventory restoration rules for active/pending order items, causing stock drift.
- It deletes transaction/audit history, which conflicts with the project’s data-safety expectations for POS records.
- It does not emit a cloud sync deletion/tombstone event, only notifyOrderUpdated().
- It has no regression tests or API docs.
- Several comments in main/routes/orders.ts are mojibake/garbled encoded text.
If order deletion is still needed, please define the intended policy first: hard delete only draft/unpaid orders, or soft-delete/void/archive behavior with inventory, bills, audit, cloud sync, and tests covered.
|
Closing because destructive order deletion bypasses inventory and audit semantics, and this PR also mixes unrelated receipt changes. Design replacement: #703. Receipt work should be re-proposed separately with focused acceptance criteria if it is still needed. |
Summary
Fixes #
Changes
Checklist
npm run buildpasses (no TypeScript errors)npm run lintpassesScreenshots