From d7ccd7fa8016127f8539401d68a8aa6fcc43d01a Mon Sep 17 00:00:00 2001 From: David Date: Fri, 2 Oct 2026 06:37:54 +0200 Subject: [PATCH] Invoices: add PHI 168 (Castle Gate) Fifth line set from the September 2026 plant-hire run. All five codes map cleanly to register assets, so nothing is left unbooked this time: MPLANT05 to SC01, RV-01-CAT to RV01, TLB06-CASE to TLB06, TP601-TATA to TP601, TP602-TATA to TP602. Extracted by coordinate and confirmed against both rendered pages. The R14,548.50 column is PLUS VAT (15%), not escalation - escalation is R0.00. SC01 and TP601 each pick up a second site this period, which the multi-site ruling covers, so those lines book to the same machine as before. Verified through the real buildIncomeRows: September now totals R341,041.13 across 11 machines, matching the sum of all four invoice totals, and every machine's month cells still equal its own YTD. Co-Authored-By: Claude Opus 4.8 (1M context) --- data/source/invoice-phi168.json | 93 +++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 data/source/invoice-phi168.json diff --git a/data/source/invoice-phi168.json b/data/source/invoice-phi168.json new file mode 100644 index 0000000..2fa5475 --- /dev/null +++ b/data/source/invoice-phi168.json @@ -0,0 +1,93 @@ +{ + "_comment": "Extracted from PHI 168.pdf (Std_ReqHireInvoice_DN.rpt) by coordinate-aware extraction AND confirmed by reading both rendered pages visually. Totals span two pages: page 2 shows SUB TOTAL 96,990.00 / Escalation 0.00 / PLUS VAT 14,548.50 / INVOICE TOTAL 111,538.50. The 14,548.50 sits under the column headed PLUS VAT - it is 15% VAT, NOT an escalation; escalation is zero. INVOICE TOTAL is VAT-INCLUSIVE. Site is taken from the invoice's own description text.", + "invoice_no": "PHI 168", + "invoice_date": "2026-09-18", + "order_no": "PHR 172", + "debtor": "Mega Infrastructure", + "debtor_no": "09MIS001", + "period_from": "2026-08-21", + "period_to": "2026-09-18", + "description": "Plant Hire Sep 2026 Castle Gate", + "site": "Castle Gate", + "section": "Plant Hire", + "category": "External Plant Hire", + "currency": "ZAR", + "vat_reg_no": "4830324812", + "source_file": "PHI 168.pdf", + "vat_pct": 15, + "subtotal": 96990, + "escalation": 0, + "vat": 14548.5, + "total_excl": 96990, + "total_incl": 111538.5, + "lines": [ + { + "line_no": 1, + "machine_code": "MPLANT05", + "asset_code": "SC01", + "_note": "Same machine as PHI 166 (West Park) and PHI 171 (Cosmo City). Client ruling 2026-10-01: a machine hired to more than one site in a month is normal, not a duplicate - all three lines book to the single machine SC01. This is now SC01's THIRD site this period (1.00 Month here vs 2.00 on each of the others); worth a sanity check that it is one container being moved, not one code reused for three.", + "description": "Storage Container", + "qty": 1, + "unit": "Month", + "rate": 1200, + "rate_type": "Dry Rate", + "amount_excl": 1200, + "vat": 180, + "total_incl": 1380 + }, + { + "line_no": 2, + "machine_code": "RV-01-CAT", + "asset_code": "RV01", + "_note": "Invoice prints 'RV-01-CATCB22 2.2 TON Roller Vibration'; the register's RV01 is 'CAT 2,4TON RV' - same machine, so RV-01 maps to RV01.", + "description": "CB22 2.2 TON Roller Vibration", + "qty": 128, + "unit": "Hr", + "rate": 185, + "rate_type": "Dry Rate", + "amount_excl": 23680, + "vat": 3552, + "total_incl": 27232 + }, + { + "line_no": 3, + "machine_code": "TLB06-CASE", + "asset_code": "TLB06", + "description": "570 V", + "qty": 128, + "unit": "Hr", + "rate": 280, + "rate_type": "Dry Rate", + "amount_excl": 35840, + "vat": 5376, + "total_incl": 41216 + }, + { + "line_no": 4, + "machine_code": "TP601-TATA", + "asset_code": "TP601", + "_note": "Also billed on PHI 166 (West Park, 43.50 Hr) over the same period. Per the client ruling this is multi-site use of the same machine, so both book to TP601.", + "description": "1518 6 Cube Tipper Truck", + "qty": 98.5, + "unit": "Hr", + "rate": 260, + "rate_type": "Dry Rate", + "amount_excl": 25610, + "vat": 3841.5, + "total_incl": 29451.5 + }, + { + "line_no": 5, + "machine_code": "TP602-TATA", + "asset_code": "TP602", + "description": "1518 6 Cube Tipper Truck", + "qty": 41, + "unit": "Hr", + "rate": 260, + "rate_type": "Dry Rate", + "amount_excl": 10660, + "vat": 1599, + "total_incl": 12259 + } + ] +} \ No newline at end of file