mega-plant/app
David 876619c3ac Invoices: keep the PDF on the invoice, and search the invoice's own words
Two things this question turned up.

The upload DID store the PDF, but on the intake record, never on the invoice
— so "Open invoice PDF" 404'd for every invoice imported through the app
while working for the older ones. The file now lives on invoices.source_pdf
and the intake record keeps only the provenance (who sent it, what was
parsed), rather than a second copy of the file. The document endpoint also
falls back to the intake record, which makes the seven already-stored
documents reachable again without a migration. All 10 now open.

The machine combobox searched only the register's own words, so an invoice
line reading "CB22 2.2 TON Roller Vibration" could never be matched to the
asset filed as "CAT 2,4TON RV" — the words simply were not in the list. The
line's own invoice code and description are now searchable too, so the two
sides of the same machine can actually be found from either direction.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-10-02 19:09:16 +02:00
..
api Invoices: keep the PDF on the invoice, and search the invoice's own words 2026-10-02 19:09:16 +02:00
charts Round 4: regressions fixed + mobile standard 2026-09-12 12:05:43 +02:00
expenses Fix: the mobile table was mislabelled and clipping its own totals 2026-10-02 15:34:19 +02:00
income Invoices: Add Invoice becomes a real dialog; quieten the invoice table 2026-10-02 14:35:27 +02:00
overheads Fix: the mobile table was mislabelled and clipping its own totals 2026-10-02 15:34:19 +02:00
plant Sites: auto-allocate container lines to the container the site hires 2026-10-02 18:32:12 +02:00
running Round 4: regressions fixed + mobile standard 2026-09-12 12:05:43 +02:00
sites Invoices: keep the PDF on the invoice, and search the invoice's own words 2026-10-02 19:09:16 +02:00
globals.css Sites: give every site coordinates 2026-10-02 16:33:43 +02:00
layout.tsx Sites: auto-allocate container lines to the container the site hires 2026-10-02 18:32:12 +02:00
page.tsx Fix: the mobile table was mislabelled and clipping its own totals 2026-10-02 15:34:19 +02:00