fix: Submitter can set an optional PO date (back/forward-datable) #16

Merged
shad0w merged 1 commit from claude/issue-4 into master 2026-06-18 21:08:10 +00:00
Owner

Automated fix by Claude Code for #4.

Closes #4

Review, merge, then create a release tag (vX.Y.Z) to deploy.

Automated fix by Claude Code for #4. Closes #4 Review, merge, then create a release tag (vX.Y.Z) to deploy.
shad0w added 1 commit 2026-06-16 07:36:29 +00:00
Add an optional PO Date field to the create and edit PO forms.
Submitters can pick any date (back-dated or forward-dated). If left
blank, the exported PO document falls back to the approved date, then
to the creation date.

Changes:
- Prisma schema: add `poDate DateTime?` to PurchaseOrder
- Migration 20260616000000_add_po_date: ALTER TABLE to add the column
- createPoSchema: add optional `poDate` string field
- new-po-form, edit-po-form: add PO Date picker in Order Information
- create/edit actions: persist poDate to DB
- edit action resubmit snapshot: track poDate changes for manager diff
- po-detail: show PO Date in Order Details; include in resubmit diff banner
- export route: use poDate ?? approvedAt ?? createdAt as the date on
  the exported PDF/XLSX document
- validations.test: fix pre-existing costCentreRef→vesselId mismatch
  and add poDate test cases

Fixes #4

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
shad0w merged commit feb6fb745a into master 2026-06-18 21:08:10 +00:00
Sign in to join this conversation.
No description provided.