S28 — Merge counts, and a customer's history on the till
One app, two doors. In Desk, a stock user ticks several draft stock counts and presses Merge counts: one new draft count appears holding every item of the ticked counts, to check and submit. A cashier presses Customer history with a customer on the sale, or a back-office user opens the page for a customer, and sees that customer's last sales: the date, the store, who served, and each discount.
The recipe: A customer's history on the till: who served, and each discount
Industries: every industry
Start from it
ivn new acme_merge --from s28
What to change
What a partner usually changes:
- How the same item merges:
SumorLastin the settings record PP MHS Settings (merge.pyholds the rule). - How many sales the page shows: the settings' number (10 by default, at most 50), read in
history.py. - What the page shows:
service/history.html, drawn with the design kit. - The words and refusals:
merge.pyandhistory.py. - The roles: PP MHS Counts, PP MHS History and PP MHS Integration in
manifest.json.
More: the recipe for merging and the recipe for the history page.
The customer sets: the settings record named Default (Sum or Last, and the number of sales); who gets PP MHS Counts (those who merge) and PP MHS History (those who open the page). The PP MHS Integration role's rights are in the manifest (role_rights); the administrator gives none.
Run it
ivn check
ivn try
Try it at the till
- Choose a customer and press Customer history; the till shows their last sales and who served.
- In Desk, tick two draft stock counts and press Merge counts; one new draft count holds both.
- Not yet pressed by us: the button on the Desk list and its dialog, and the till's own Customer history key; both were driven through the same server calls only.
- Close the till day when you are done.
Versions
0.3.1
- The manifest marks its event feed
"reads_events": false: this app reads its records itself and follows the feed only to get its own user, so the package's connection test (the oneivn tryand the hosting dashboard read) answers the feed Passed, on POS build 2.1.0.728 or later. No logic changed.
0.3.0
- The role's rights beyond the feed's reads move into the manifest (
role_rights): the install gives the feed's user its reads and the manifest the rest, so the retailer's administrator grants none. Needs POS build2.1.0.691or later. Write on Stock Reconciliation is dropped: the service only creates drafts.
0.2.2
- The merge press asks no confirmation.
0.2.1
- The page no longer refuses a context it has seen: it may open again until it runs out.
0.2.0
- New app makes it into an app we host, for many sites (
Hostedinservice/app.py,app.json); the install makes the app's own user.
0.1.0
- First version in the kit: merged stock counts, and a customer's history on the till.
- A cut-short answer from a retailer's site is handled as an unknown outcome, like a site that cannot be reached, never a crash.
- The set-up steps say the install makes the app's own user (POS 2.1.0.667 or later).
Needs this serves
- A customer's shopping history or trend on the till: recent visits, the store, who served and the discount on each — Ready, with limits (5)
- Find what a customer bought before by typing their phone number — Ready, with limits (3)
- Merge several stock counts into one — Ready, with limits (5)