Fix/order delete - #304
Open
shipeast-beep wants to merge 3 commits into
Open
Conversation
itsbkm
requested changes
Aug 15, 2026
itsbkm
left a comment
Contributor
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #
Changes
Checklist
npm run buildpasses (no TypeScript errors)npm run lintpassesScreenshots