iVendNextDevelopers Request a sandbox

S58 — Repairs by serial number (pp_rpr)

Start from this sample: python3 tools/manifest/start.py s58_repairs_by_serial --prefix "ACME RPR" copies it into apps/ of your repository under your own prefix (your company's first word, then a short name for the app) and checks it (how).

An electronics or phone store's repairs and services, kept in iVendNext Desk against each unit's serial number (or IMEI): what the customer says is wrong, the unit's condition and what came with it, the tests run and their results, the work done and the parts fitted (each with its own serial where it has one), from the counter to the hand-over. Every repair shows under its serial number, so the unit's service history is one list; a repair slip with a unit tag prints under the retailer's own letter head. The parts leave stock with the engine's own Material Issue, which names the repair. The app moves no money: the till charges the repair as a service item, as it charges anything else. It calls nothing outside: no service, no outside address. The recipe walks a store through it, and through a recall by serial, which needs no app.

It uses the manifest's doctypes (a record type and two child tables), workflows, save_rules (a lock), print_formats, reports, custom_fields (one field on Stock Entry), links and a documentation property setter. When to use it: a store repairs or services the units it sells (phones, laptops, appliances), and its repair jobs are on paper or in a separate system today.

What happens

  1. At the repair counter. Store staff open PP RPR Repair in Desk, + Add. Choose the Serial number: the item, its name and the serial's Warranty until date show beside it, read only. Choose the Customer (blank for a unit of the store's own stock): its name and the phone the till keeps show, read only. Kind of job is Repair, Service, Test only or Recall work. Taken in at is the store; Received on is today; Ready by is the date promised. Type the Fault reported in the customer's words, and the unit's Condition and accessories (a cracked corner, with its charger, no SIM card). Save: the repair is numbered RPR-00001 and is Received. Print › PP RPR Repair slip: the customer's slip, Please bring this slip when you collect, and a tag for the unit.
  2. The work. Start work: In repair. Add a row per Test with its Result (Passed, Failed, Not run) and a reading (82% battery health); type the Work done and the Technician; add a row per Part fitted: the part as an item in your stock, what it is, the part's own serial number and how many. Whoever keeps the stock takes the parts out with a Stock Entry of type Material Issue and chooses the repair in its Repair field (shown on a Material Issue only; settable after submit too). The Stock Entry list, filtered by Repair, shows which parts a repair used.
  3. Ready. Ready: Ready to collect. The slip now shows the work done, each test and each part with its serial. If the customer is not happy, Back to work. A unit that could not be repaired is handed back the same way, with the work done saying so.
  4. The hand-over. Type Collected by if someone else collects, and Paid by sale if the till charged for the repair. Hand over: Collected. From now on the repair's unit, customer, fault, condition, tests, work, parts and dates cannot change: the unit's history holds. Collected by, Paid by sale and the notes can still be filled in.
  5. A repair that will not go ahead. Cancel one still Received (store staff), or one In repair (a store manager only): it is Cancelled, keeps its number and prints Cancelled: this repair was not done. A repair is never deleted by the store.
  6. The history and the queue. Open the serial number (Desk › Serial No): its Repairs list every repair of that unit. The repair list, filtered by Serial number, shows the same. The report PP RPR Open repairs lists the repairs not yet collected, by the date promised. A customer's repairs show under the customer, and a sale's under the sale.

What the retailer does

Recall by serial — no app needed

When a maker recalls a model, or units between two serial numbers:

The files

File What
manifest.json the repair (PP RPR Repair) and its child tables (PP RPR Test, PP RPR Part); the workflow with its five states; the lock (a save rule); the repair slip; the report Open repairs; the field Repair on Stock Entry; repairs listed under Serial No, Customer and POS Invoice; the repair's help address
tests/test_manifest.py the manifest passes the kit's checker and nothing the retailer's install refuses; no outside address and no money field, and the Stock Entry field optional, settable after submit and shown on a Material Issue; no tick box on the record: the slip reads the step; the workflow's moves, nothing leaving Collected or Cancelled, and a repair in work cancelled by a manager only; the lock holds every field the slip prints (the copies from the serial and the customer excepted, below); those copies are read only; the report lists the repairs not collected, by the date promised; no table is required; the slip reads only fields that exist, skips a blank row and shows the work only once the unit is ready; the Connections; the rights; the help
tests/canaries.py each test goes RED when the rule it guards is broken

Run it

The tests need nothing but Python:

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

Install the manifest in a retailer's iVendNext through Extension Packages (guide chapter 3), switch the lock on and give Read on Serial No (above), then open PP RPR Repair.

What is refused, and why

Make it your own

What a partner usually changes:

Technical notes

Why it is built this way

A manifest only. The engine keeps the serial numbers, their warranty dates, the customers, the stock and the sales; what nothing a retailer sees holds is the repair itself. The engine's own Warranty Claim and Maintenance Visit sit in modules iVendNext hides from Desk, and neither holds tests, parts or a hand-over. The history's integrity is a save rule rather than code: a workflow state and a lock, on every door. With no service there is nothing to host, no key to keep and no user to add.

Bounds, stated

Needs this serves

This page in the kit