feat(shift-closing): default payment counts to 0 instead of null#299
Open
NotAbdelrahmanelsayed wants to merge 1 commit into
Open
Conversation
Previously every payment method in the closing-shift reconciliation started as null with _touched=false, forcing the cashier to click into each row before the form could be submitted. Methods with no cash collected still had to be touched manually. Default closing_amount to 0 and mark rows as touched so the expected amounts compute immediately and the shift can be closed without manually zeroing untouched methods. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
In the Close Shift reconciliation dialog, every payment method now defaults to a counted amount of 0 (and is pre-marked as touched) instead of starting as
null.Why
Previously each row started as
nullwith_touched = false, so the submit button stayed disabled until the cashier clicked into every payment method — including ones where no cash was collected. This was an unnecessary step: a method with nothing counted should simply be 0.Change
POS/src/components/ShiftClosingDialog.vue— inloadClosingData():Differences are computed immediately on load, and the shift can be closed without manually zeroing untouched methods. An existing
closing_amount(e.g. resumed/edited shift) is still preserved via the??fallback.Scope
Single file, two lines. No backend or schema changes.