mega-plant/data/source/operators.json
David f85b9378a2 Add Running Costs sub-pages: insurance, financing, purchases, oil, operators, mechanics
Splits the Running Costs group into six purpose-built pages, each with its own
collection and its own source data, plus a coordinate parser for purchase orders.

Insurance (R503 330/yr, 20 vehicles)
  A premium can move every month or three, so it is stored as a RATE PERIOD in
  insurance_rates and each month's cost is resolved against the rate in force
  that month. cost_lines insurance rows are derived from those periods. An absent
  rate is null, never 0 — nobody has entered the date, which is not the same as
  being insured for free.

Financing (20 agreements, R428 585/mo)
  Instalment from the sheet; start date, paid-off date and the settled toggle are
  human-entered and preserved across re-seeds. Months-left and outstanding are
  null until a date is entered, never R0 on a live debt. The two paid-off
  agreements (WB02, DT01) show as settled and are excluded from the run-rate.

Purchases + Oil Stock
  Uploads PO PDFs the way /income/invoices does. The parser reads columns by
  x-position, because plain text extraction reorders them, and refuses any PO
  whose lines do not sum to the sub-total. A cost code either names a machine
  ("SS-02" -> SS02) or a stock store ("MPLANT, ENGOIL") — never both, never
  guessed. Oil POs move litres into oil_stock_movements instead of onto a machine;
  stock is the sum of movements so the first usage is a subtraction from history.

Operators (19) and Mechanics (2)
  Both are people with an employee number, separately reconcilable by the seed so
  someone added in the app survives. Mechanics get a badge QR; a mechanic with no
  employee number cannot be printed, because the code is what the QR encodes.

Cross-cutting
  - The seed no longer deletes operators, mechanics or oil items: people are added
    in the app, and those rows exist in no file.
  - Re-pointing allocations that PocketBase clears because `assets` is rebuilt
    with new ids each seed (operators, purchase lines).
  - One QR encoder for screen and PDF, so a printed code cannot drift from the one
    on screen. pdf-lib writes real vector PDFs; pdfjs-dist only reads them.
  - Every figure is null-safe: unknown is never rendered as zero.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-10-09 01:06:27 +02:00

24 lines
No EOL
2.6 KiB
JSON

[
{ "asset_code": "TLB01", "plant": "Terex TLB 820", "operator": "", "rate": 0, "employee_code": "" },
{ "asset_code": "TLB02", "plant": "CAT 425F (428E)", "operator": "", "rate": 0, "employee_code": "" },
{ "asset_code": "TLB03", "plant": "Terex TLB 820", "operator": "LUNGILE MNYAKA", "rate": 68.15, "employee_code": "MCW067" },
{ "asset_code": "TLB04", "plant": "BELL TLB", "operator": "RESISTANCE MUGUTI", "rate": 68.15, "employee_code": "MCW058" },
{ "asset_code": "TLB05", "plant": "CASE TLB", "operator": "PETER RUITERS", "rate": 68.15, "employee_code": "MCW134" },
{ "asset_code": "TLB06", "plant": "CASE TLB", "operator": "PHLLEMON KGONODI", "rate": 68.15, "employee_code": "MCW071" },
{ "asset_code": "TLB07", "plant": "CASE TLB", "operator": "ROBERT MAPATA", "rate": 63.3, "employee_code": "MCW179" },
{ "asset_code": "SS01", "plant": "CASE420 (430)", "operator": "DANIEL MATHEBULA", "rate": 68.15, "employee_code": "MCW066" },
{ "asset_code": "SS02", "plant": "CASE420 (430)", "operator": "WALTER PHASHA", "rate": 68.15, "employee_code": "MCW068" },
{ "asset_code": "RV01", "plant": "CAT 2,4TON RV", "operator": "", "rate": 0, "employee_code": "" },
{ "asset_code": "RV03", "plant": "CAT 12TON RV", "operator": "FRANS KEKENA", "rate": 57.77, "employee_code": "MCW057" },
{ "asset_code": "RV04", "plant": "Case Compactor", "operator": "ACE BATHINI MBANJANA", "rate": 68.15, "employee_code": "MCW133" },
{ "asset_code": "MG01", "plant": "DEZZI GRADER", "operator": "KAMOHO MOSOEU", "rate": 77.17, "employee_code": "MCW064" },
{ "asset_code": "MG02", "plant": "DEZZI GRADER", "operator": "PETER MONGALE", "rate": 80.68, "employee_code": "MCW061" },
{ "asset_code": "CT01", "plant": "ISUZU 800", "operator": "JOHN NKOSI", "rate": 90.52, "employee_code": "MWC178" },
{ "asset_code": "TP601", "plant": "TATTA 6M3", "operator": "OUPA MAHLANGU", "rate": 68.15, "employee_code": "MCW026" },
{ "asset_code": "TP602", "plant": "TATTA 6M3", "operator": "DAVID MOKGAWA", "rate": 68.15, "employee_code": "MCW054" },
{ "asset_code": "WB01", "plant": "MERC", "operator": "MATIMBA BALOYI", "rate": 68.15, "employee_code": "MCW063" },
{ "asset_code": "WB02", "plant": "MERC", "operator": "RAYMOND SELOWA", "rate": 68.15, "employee_code": "MCW070" },
{ "asset_code": "DT01", "plant": "UD 80", "operator": "MORREL MAKHUBEDU", "rate": 78.5, "employee_code": "MCW052" },
{ "asset_code": null, "plant": "", "operator": "JERRY MATHEBULA", "rate": 77.17, "employee_code": "MCW065" },
{ "asset_code": null, "plant": "", "operator": "AMON MAPONYA", "rate": 87.64, "employee_code": "MCW062" }
]