Skip to content

The kitchen is told what it is worth, where that matters - #840

Merged
sridharkalaibala merged 1 commit into
developfrom
feat/the-kitchen-is-told-what-it-is-worth
Sep 16, 2026
Merged

sridharkalaibala merged 1 commit into
developfrom
feat/the-kitchen-is-told-what-it-is-worth

Conversation

@sridharkalaibala

Copy link
Copy Markdown
Contributor

"whenever market price or quick sale we want print the price in the KOT... lets customer wants to have fish for rs500 so that kitchen will prepare according to that."

SEER FISH                                     x1
   Rs 500
CHICKEN BIRYANI                               x2
BIRTHDAY CAKE                                 x1
   Rs 750.50
   ** No nuts **

Where it prints, and where it does not

Five hundred rupees of fish is a particular fish. For a dish priced at the table the price is the specification, and a kitchen cannot pick the right one from the name alone.

For an ordinary dish off the card it is noise. A cook does not choose a biryani differently because it costs 220, and a ticket with money on every line is one where the line that matters stops standing out. So the till marks two kinds of line and no others: a dish priced at the table, and a one-off invented for this bill.

A quick sale needed naming separately: it has a catalogue price - created a moment earlier - so the dynamic test alone would have missed it, and its price was still agreed with a guest rather than chosen on a card.

A dish whose daily price was set this morning prints no price, because then the card prices it like any other dish. That is the whole point of a shop updating it when they open.

Not in the note, though that was the suggestion

The note is what a waiter typed. Putting anything else in it is exactly the bug that printed a marketing paragraph to a kitchen this morning - the same mistake with a different field. The price is its own line, before the note.

Rs, not : a kitchen printer lacking the glyph prints a box or a random character, and a wrong number on a ticket is worse than a plain one. Bold, because on these lines the amount is part of what to cook.

Tests

Renderer (7): carries the price, an ordinary dish does not, only one of two lines shows money, paise shown only when there are any, no unicode rupee, nonsense prints nothing, and the price is before the note rather than inside it.

Till (4, added to the existing daily-price suite - now 25 passed): a dish priced at the table carries it, an ordinary dish does not, a one-off carries it, and a dish priced this morning does not.

One of those tests caught my own helper eating the double E in "SEER": it stripped the letters ESC/POS uses as command parameters, which are the same letters dishes are spelled with.

Owner: "whenever market price or quick sale we want print the price in
the KOT... lets customer wants to have fish for rs500 so that kitchen
will prepare according to that."

Five hundred rupees of fish is a particular fish. For a dish priced at
the table the price IS the specification, and a kitchen cannot pick the
right one from the name alone.

For an ordinary dish off the card it is noise. A cook does not choose a
biryani differently because it costs 220, and a ticket with money on
every line is one where the line that matters stops standing out. So the
till marks two kinds of line and no others: a dish priced at the table,
and a one-off invented for this bill.

A quick sale needed naming separately. It HAS a catalogue price - it was
created a moment ago - so the dynamic test alone would have missed it,
and its price was still agreed with a guest rather than chosen on a card.

A dish whose daily price was set this morning prints no price, because
then the card prices it like any other dish. That is the whole point of a
shop updating it when they open.

NOT IN THE NOTE, though that was the suggestion. The note is what a
waiter typed. Putting anything else in it is exactly the bug that printed
a marketing paragraph to a kitchen this morning, and it would be the same
mistake with a different field.

"Rs" rather than the rupee sign: a kitchen printer that lacks the glyph
prints a box or a random character, and a wrong number on a ticket is
worse than a plain one. Bold, because on these lines the amount is part
of what to cook.

Eleven tests. One of them caught my own test helper eating the double E
in SEER: it stripped the letters ESC/POS uses as command parameters,
which are the same letters dishes are spelled with.
@sridharkalaibala
sridharkalaibala merged commit 7b22651 into develop Sep 16, 2026
8 of 9 checks passed
@github-actions github-actions Bot added the ready for QA Merged to develop and live on develop.posnic.io - anyone can test it label Sep 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Merged to develop. Anyone can test this - you do not need write access.

Try it at https://develop.posnic.io, or run it yourself:

git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev   # then http://localhost:3000

When you have tested it, say what you did and what happened, and set
QA passed or QA failed. If you cannot set labels, just comment -
a maintainer will.

Reporting that something is broken is as useful as fixing it. It is
better found here than by a shopkeeper.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for QA Merged to develop and live on develop.posnic.io - anyone can test it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant