The kitchen is told what it is worth, where that matters - #840
Merged
sridharkalaibala merged 1 commit intoSep 16, 2026
Merged
Conversation
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.
Contributor
|
Merged to 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:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
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.
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.