mega-plant/app
David aac440cfef Fold purchase orders into the Running Costs Overview, with incl/excl totals
A purchase order buys parts and repairs against a plant item, so its money is
running cost and belongs in the same per-machine, per-month series the Overview
already reads. Without it September showed nothing at all.

Merged at READ time, never copied into monthly_running_costs: that collection is
deleted and rebuilt by every seed, so a purchase written there would vanish on the
next one and have to be re-uploaded. purchase_lines is never deleted, so the money
lives in one place and the Overview adds it up.

- Month comes from the PO date (when it was ordered), not "Required By":
  MEGPPO50532 is dated 07/10 but required 29/08 and those must not be confused.
- Only lines allocated to a machine are counted. An unallocated line is real money
  not yet on a plant item; it stays on /purchases, reported, rather than being
  hidden or added to the fleet total.
- A PO with no readable date is excluded and named, never guessed into January.
- Bottom total row shows incl ABOVE excl per month and for the YTD. Workbook
  figures carry no VAT column, so RUNNING_VAT_PCT (15, confirmed by every PO line)
  is the single constant to revisit if they are ever restated ex-VAT.

September now reads R 5 842 incl / R 5 080 excl from the two September POs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-10-09 12:10:13 +02:00
..
(dashboard) Fold purchase orders into the Running Costs Overview, with incl/excl totals 2026-10-09 12:10:13 +02:00
actions feat: add user access and improve plant dashboard 2026-10-06 04:02:08 +02:00
api Add Running Costs sub-pages: insurance, financing, purchases, oil, operators, mechanics 2026-10-09 01:06:27 +02:00
change-password feat: add user access and improve plant dashboard 2026-10-06 04:02:08 +02:00
login feat: add user access and improve plant dashboard 2026-10-06 04:02:08 +02:00
globals.css feat: add user access and improve plant dashboard 2026-10-06 04:02:08 +02:00
layout.tsx feat: add user access and improve plant dashboard 2026-10-06 04:02:08 +02:00