|
All checks were successful
PR checks / checks (pull_request) Successful in 32s
Managers and superusers can cancel a PO from any state via a confirmation modal that requires typing "cancel" and a mandatory reason. A cancelled PO becomes a terminal CANCELLED state and drops out of every spend tracker/graph (those filter on POST_APPROVAL_STATUSES / explicit whitelists, none of which include CANCELLED). A cancelled PO may optionally be linked to the existing PO that supersedes it (by PO number); the replacement shows the reciprocal "supersedes" link. No vessel/account/vendor match is enforced and the link can be added any time. Cancelled POs remain visible (greyed in history) and exportable, with a diagonal "CANCELLED" watermark on both the PDF and XLSX exports. - schema: POStatus CANCELLED; cancelledAt/cancellationReason; self-referential supersededById relation; ActionType CANCELLED/SUPERSEDED (+ migration) - state machine canCancel(); cancel_po permission (MANAGER + SUPERUSER) - cancelPo / supersedePo server actions + PO_CANCELLED notification - cancel modal + supersede form; cancelled banner with reciprocal links - exhaustive CANCELLED entries in all status label/variant maps - diagonal CANCELLED watermark embedded for PDF (CSS) and XLSX (image) - integration tests (cancel from any state, reason/role guards, supersede) Inventory reversal on cancel is deferred to #55 (inventory is feature-flagged off). Closes #53 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| 20260503171522_add_item_db | ||
| 20260503180801_add_product_catalogue_size_manager_edit | ||
| 20260505114211_add_po_export_fields | ||
| 20260505121423_structured_tc_fields | ||
| 20260510215950_add_line_item_name | ||
| 20260510221329_add_product_vendor_price | ||
| 20260514060941_add_site_inventory_consumption | ||
| 20260514091124_vendor_pincode | ||
| 20260514185519_ | ||
| 20260514191638_vendor_contacts | ||
| 20260516103013_partial_receipt | ||
| 20260516103515_user_profile_signature | ||
| 20260516104351_notification_isread_link | ||
| 20260521000000_remove_vessel_imo_number | ||
| 20260527000000_partial_payment | ||
| 20260527010000_vessel_code | ||
| 20260528000000_optional_password_hash_for_sso | ||
| 20260530000000_vessel_optional_cost_centre | ||
| 20260530000001_account_hierarchy | ||
| 20260530000002_vessel_no_site_po_vessel_required | ||
| 20260530000003_add_company | ||
| 20260531000000_company_invoice_email | ||
| 20260531000001_company_code | ||
| 20260531000002_po_payment_date | ||
| 20260616000000_add_po_date | ||
| 20260621000000_company_branding_assets | ||
| 20260621100000_po_cancel_supersede | ||
| migration_lock.toml | ||