Commit graph

4 commits

Author SHA1 Message Date
DEls
b2ce17814d feat(foreman): add checked receiving operator package 2026-10-12 22:48:46 +02:00
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
DEls
e66ac520dc fix(dn): agent board shows only the open site question; Foreman skill lessons from run 1
- inbox_board: while a site question is open, blocking lists only that
  question (the reader's older doubts were misleading Foreman, e.g. the
  corrected FH Chamberlain order). next now points agents at
  prepare_delivery, and at the site manager for Ready-to-post slips;
  agents no longer book.
- Foreman skill: describe parked documents only from the open question;
  VERDICT counts only what is new this run (still-waiting items become a
  count line); quote refusals and their hint instead of guessing a cause;
  candidate_closed on regrouping means a document in the batch is set
  aside or posted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 18:42:18 +02:00
DEls
009ac0e30f docs(dn): Foreman inbox-clerk skill and the Claude review skill
Foreman (MiniMax) works the delivery-note inbox: checks every slip
against its photo and PO, fixes misreads, groups kits, prepares clean
slips with prepare_delivery (Ready to post, never booked) and asks the
site about the rest. The review skill spot-checks his work, moves
answered site questions on to Ready to post and applies site-confirmed
receipt corrections. The site manager pulls the trigger.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 17:49:18 +02:00