iVendNextDevelopers Request a sandbox

S19 — Unit codes at the scan (a scan source)

The shop's own unit codes, read by the till's scan: one record per unit (its unique code, its item, its batch, Available or Sold) and a scan source over that table. A scanned unit lands as its item with its batch; a sold unit is refused. Data only: no service, nothing leaves the shop.

The recipe: recipes/unit_codes.md.

File What it is
manifest.json the unit table PP UNC Unit and the scan source PP UNC Units, installed switched off
tests/ the manifest against the kit's checker, and the installed source against the published contract

After install the shop switches the source on and, if it wants the unit's code on the sale's line, sets Record the code as to one of its own active line attributes. Your own service writes Sold after a sale (from the event feed) and Available after a return.

python3 -m unittest discover -s samples/s19_unit_codes/tests -p 'test_*.py'

This page in the kit