Skip to content

counter: no tender until the cashier chooses one - #148

Merged
futurebuildai merged 10 commits into
refactor/v1from
refactor/g1-tender
Oct 14, 2026
Merged

futurebuildai merged 10 commits into
refactor/v1from
refactor/g1-tender

Conversation

@futurebuildai

Copy link
Copy Markdown
Contributor

The counter no longer assumes a tender. A sale started on cash and put cash back after a sale or an account tender, and Pay completed the sale in cash for the whole amount while the Payment panel showed Cash as chosen. An "on account" sale was paid in cash and the account never carried the charge.

  • No tender is chosen at start, after a completed sale, after New sale, after Clear sale, after Clear tenders and after Add as split tender.
  • With none chosen: Pay is off and reads "Choose how the customer pays"; the amount field and Add as split tender are off; no tender reads as pressed; the summary Tender reads "None yet". Once one is chosen the existing rules apply unchanged.
  • Server unchanged: it already accepts only the four named methods.

Red first: the first commit holds five Vitest legs that fail on the old code (pressed tender and Pay state, Pay not completing, the account tender sent as account, no tender after New sale, none after a split). Older legs that relied on the cash default now press cash first.

Scope: item 130, note N1.

🤖 Generated with Claude Code

futurebuildai and others added 10 commits October 14, 2026 13:16
Five legs that fail on today's counter, which starts every sale on cash,
puts cash back after a sale and after an account tender, and lets Pay
complete the sale in cash for the whole amount.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
The tender starts empty, is empty again after a completed sale, a new
sale, Clear sale, Clear tenders and Add as split tender. With none
chosen, Pay is off and says "Choose how the customer pays", the amount
field and Add as split tender are off, and the summary reads None yet.
Older legs that assumed cash was preselected now press cash first.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…the total

Pay now reads "Choose how the customer pays" until a tender is pressed,
so the walk asserts that, presses cash, and then reads the total on Pay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
typeInto no longer chooses cash when none is pressed; each leg that types
an amount chooses its tender, so a leg that means to type with no method
is not tested on cash without saying so.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…s the method (red)

The Clear sale leg fails today: an $86.50 cash tender added as a split
survives Clear sale, so a $50.00 line is payable with no tender pressed.
The Clear tenders leg guards the existing reset against a later undo.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
… (red)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
…nder

Clear sale drops the tenders added for the cleared lines as well as the
chosen method. Naming another customer or going back to a walk in sale
clears the chosen and added tenders, so an account tender chosen for one
customer never carries to another. A tender cannot be pressed while no
till is open.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
… none

A second arm for the Clear sale reset: press a tender without adding it,
Clear sale, put a new line on the sale, and no tender is pressed and Pay
is off. It fails with the reset removed (the review's M4) and passes with
it back. Clear sale and Clear tenders now use the one reset helper.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: colton <colton@futurebuild.ai>
@futurebuildai
futurebuildai merged commit fc2ac33 into refactor/v1 Oct 14, 2026
17 of 18 checks passed
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