Skip to content

fix: offer warned draft saves for receipt discrepancies - #38

Draft
Kamitoad wants to merge 2 commits into
mainfrom
codex/issue-24-save-warning
Draft

Kamitoad wants to merge 2 commits into
mainfrom
codex/issue-24-save-warning

Conversation

@Kamitoad

Copy link
Copy Markdown
Owner

The primary save button is disabled when corrected item totals do not match the printed receipt total, making manual corrections appear impossible to retain. It now opens an explicit warning and offers “Trotzdem als Entwurf speichern”; the entered prices, printed totals and extraction evidence are preserved. Balanced receipts with reviewed currency still save as confirmed.

Existing receipts use the same update path and become drafts after an acknowledged discrepancy save. Returning to review or dismissing the dialog does not save. Incomplete amounts/currency remain draft-only, and invalid money syntax still requires correction. No persistence schema, backup format, extraction provider, or confirmed-save invariant changes.

Validation

  • pnpm check: 150 tests in 15 files passed, including seven new rendered warning/save/reopen/cancel/retry cases.
  • pnpm build and git diff --check: passed; existing Zod/Rollup annotation warnings remain.
  • Targeted Opera smoke check against a loopback-only server with an isolated synthetic SQLite database: native modal at 360×800 without horizontal overflow, initial focus/keyboard/Escape, retained edits on return, real draft save/reload/reopen, and same-ID draft update. Printed 1.29 CAD remains unchanged with corrected 1.32 CAD item totals.
  • jsdom dialog lifecycle is simulated; physical Samsung/Android Back/touch/virtual-keyboard acceptance remains pending.
  • No installable APK was requested. This draft PR does not close the issue or deliver an Android update.

Refs #24. Related workflow and test coverage: #1 and #27.

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