The bill reads like a bill - #835
Merged
Merged
Conversation
Release: nutrition that can be filled in, and filters that answer with something
Release: the nutrition chain works end to end
Release: the bill, a number nobody can ring, and the pass driven rather than read
Release: one tap says how hot, and the ordering page stops throwing away its dish facts
Release: the catalogue stops throwing away the market price, and the receipt tab stops throwing
Release: the kitchen says when it is behind, and the spice choice can actually be switched on
Release: a restaurant gets a restaurant, and a kitchen can say how long it takes
Release: an order says when it will usually be ready
Release: a table can call somebody over
Release: the browser download stops using a zip reader that trusts symlinks
Release: a call that was answered stops asking
Release: a shop can hide the busy-kitchen notice, and the demo has photographs
Release: an order that changed under you, and a guard that does not write what it was given
dev to main
Owner, holding a printed bill from Azure: "Table number, order type, covers, total quantity all these information can organize better as per international standards and may be two column or moving total quantity to bottom." Two different mistakes, and he is right about both. FOUR FACTS TOOK FOUR LINES. Table, order type and covers are read at a glance, not down a list, and stacked one per line they pushed the items further down the paper than the things a guest is actually checking. They now sit two to a line with a two-character gutter, because without one the left value runs straight into the right label and prints "6AOrder type". Narrow paper keeps one to a line on purpose. A 58mm roll is 32 characters; halved that turns "Order type" into "Order ty.", and losing a word to save a line is the wrong trade on the document the guest keeps. THE COUNT WAS IN THE WRONG PLACE ENTIRELY. Total quantity is not a fact about the table, it is part of the arithmetic: how many things, what they came to. It sat in the header beside the table number, which is where the restaurant looks and not where the guest does. It now prints immediately above the subtotal, and the test pins that nothing is allowed between the two. 7 new tests, driven through the real renderer and read back out of the bytes with escpos-preview. The switch-liveness test learned where the count went rather than being loosened - it still refuses a switch that changes nothing, it just no longer assumes every switch writes a header row. 2809 desktop tests pass. Two api suites fail to load on main already, from an earlier merge, and are untouched by this.
It asserted the exact contents of serviceRows, including
{ label: 'Total Qty', value: '5' }, so moving the count down to the
totals read as a deletion.
Taught rather than loosened. It still pins every other service row
exactly, and now also asserts the count is on the payload as totalQty,
is NOT in serviceRows, and actually prints - so the row cannot quietly
disappear altogether, which is the thing the original assertion was
there to prevent.
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.
From a printed bill off Azure's till:
Two different mistakes, and right about both.
Four facts took four lines. Table, order type and covers are read at a glance, not down a list, and stacked one per line they pushed the items further down the paper than the things a guest is actually checking. Now two to a line:
The two-character gutter is load bearing - without it the left value runs into the right label and prints
6AOrder type.Narrow paper keeps one to a line on purpose. A 58mm roll is 32 characters; halved, that turns "Order type" into "Order ty.". Losing a word to save a line is the wrong trade on the one document the guest keeps.
The count was in the wrong place entirely. Total quantity is not a fact about the table, it is part of the arithmetic - how many things, what they came to. It sat in the header beside the table number, which is where the restaurant looks and not where the guest does. It now prints immediately above the subtotal, and a test pins that nothing is allowed between the two.
Tests
7 new, driven through the real renderer and read back out of the bytes with
escpos-preview, so they assert on what the paper says rather than on the source.The existing switch-liveness test (
every switch actually changes the bill when it is turned on) needed teaching rather than loosening: it assumed every switch writes a header row. It now accepts a switch that changes the bill anywhere, and still refuses one that changes nothing.2809 desktop tests pass.
Not from this branch
tests/unit/middleware/items.validation.test.jsandtests/unit/routes/items.routes.test.jsfail to load onmainalready - 2 suites, 0 tests run - and reproduce with this branch stashed. Worth someone looking, since main is the deploy source.