MEGAINFRA-WEBAPP/docs
DEls a41653ce87 fix(dn): date deliveries by the slip and orders by the PO's order date
The reader always read the slip date (and receiver, site name, customer
VAT, supplier registration), but dn_batch_notes never had those fields,
so they were dropped on save and every receipt was dated the moment it
was posted. The Financial dashboard dated orders by upload date, so 24
of 41 POs (R7.08M) sat in no month and deliveries piled up in the month
they were booked: 'R1.1M ordered, R2.4M delivered'.

- scripts/pb-add-dn-dates.py: adds the five header fields,
  delivery_notes.posted_at and purchase_orders.order_date (applied).
- scripts/dn-backfill-dates.py: filled 270 documents from the stored
  readings, moved 192 receipts to their slip date (booking time kept in
  posted_at) and read 36 PO order dates from the PDFs (applied; replaced
  values in docs/audits/2026-10-11-dates-backfill-backup.json).
- Posting refuses a slip without a delivery date instead of using today;
  receipts record posted_at. The review page shows the date and locks
  Post with a plain message when it is missing.
- PO intake reads 'PO Creation Date' from the PDF text (pdftotext).
- Dashboard tile and monthly chart date orders by order_date only; an
  order without one is undated, never put on its upload month.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 00:35:00 +02:00
..
audits fix(dn): date deliveries by the slip and orders by the PO's order date 2026-10-11 00:35:00 +02:00
handoffs docs: add the Hermes brief for the needs-attention queue 2026-09-18 00:23:47 +02:00
n8n Integrate agent work and add dashboard attention indicators 2026-10-04 21:53:32 +02:00
setup feat(management): add admin planning dashboards 2026-10-09 10:16:50 +02:00
superpowers docs(dn): plan for deletion flags a person can act on 2026-10-09 20:26:05 +02:00
api-reference.md docs(ask): agent actions 2026-09-26 21:32:53 +02:00
architecture.md fix(auth): remove the ?demo=1 PIN bypass 2026-09-26 17:37:20 +02:00
ask-architecture.md Integrate agent work and add dashboard attention indicators 2026-10-04 21:53:32 +02:00
clock-daily-exceptions-rollout.md feat(clock): pay against the real work schedule 2026-10-09 19:51:24 +02:00
cooler-env.template feat(auth): add PocketBase logins and site access controls 2026-09-28 23:51:47 +02:00
data-flows.md
data-model.md feat(workforce): add timesheet exports and duplicate protection 2026-10-07 23:53:47 +02:00
minimax-multi-site-audit-prompt.md
modules.md docs(ask): agent actions 2026-09-26 21:32:53 +02:00
multi-site-assessment.md
operations.md feat(auth): add Office access and restrict Clock users 2026-10-07 14:22:57 +02:00
pwa-install-verification.md