WFDASH-WEBAPP/scripts
SJCoetz 9e118a3b5f feat(stock-purchase): split warehouse confirm from accountant booking
Repositioned booking responsibility: warehouse confirms physical
collection only (records quantity_received + flips header to
"received"); the accountant books into inventory via the new
invoicing flow once the supplier invoice is processed. This way
the payment-cycle reasoning lives at the booking step, not at
receipt.

Changes
- Migration: add booked_at + booked_by to stock_purchases
- Service: bookStockFromInvoice (accountant-side, splits from
  bookStockRows)
- API route: POST /api/v1/invoicing/stock-book
- UI: stock rows surfaced on invoicing page (StockBookingSection)
- UI: stock-purchase detail page
  - Driver picker on header (sentinel "delivery" user auto-collects
    every line, real drivers set assigned_to_driver)
  - "Confirm collection" replaces "Mark received" (warehouse-side
    only — no inventory writes)
  - Cancel button with confirmation dialog
- collection-confirm: confirmStockRows stripped of inventory writes;
  the prior /api/v1/collection-confirm/book-stock route was renamed
  to /confirm-stock and is now strictly the warehouse-side confirm
- Tests for all new flows (5/5 passing on the stock-order detail
  page; 10/10 on StockBookingSection)

Co-Authored-By: Claude <noreply@anthropic.com>

Co-authored-by: Orca <help@stably.ai>
2026-08-06 23:01:15 +02:00
..
dev feat(sprint): add new sprint pricing workflow and supporting code 2026-07-03 07:29:43 +02:00
migrations feat(stock-purchase): split warehouse confirm from accountant booking 2026-08-06 23:01:15 +02:00
perf feat: add new order, invoice, and dashboard management tools 2026-08-05 23:00:54 +02:00
smoke chore: add logos, opencode config and build assets 2026-07-27 08:21:20 +02:00
utils refactor: switch hardcoded UI colors to semantic theme tokens 2026-07-07 17:22:03 +02:00
2026-08-03-load-husqvarna-cart.ts chore(scripts): one-time stock-order loaders + source screenshots 2026-08-03 17:33:28 +02:00
2026-08-03-load-yg1-quote-soq078608.ts chore(scripts): one-time stock-order loaders + source screenshots 2026-08-03 17:33:28 +02:00
2026-08-03-merge-yg1-drafts.ts chore(scripts): one-time stock-order loaders + source screenshots 2026-08-03 17:33:28 +02:00
audit-pb-fields.py chore: add logos, opencode config and build assets 2026-07-27 08:21:20 +02:00
backfill-po-items.mjs refactor: switch hardcoded UI colors to semantic theme tokens 2026-07-07 17:22:03 +02:00
build_v5_workflow.py feat: add quote email intake and atomic numbering 2026-06-22 13:58:24 +02:00
deploy_v5_to_n8n.py feat: add quote email intake and atomic numbering 2026-06-22 13:58:24 +02:00
import-data.ts chore: standardize line endings and add full test + config scaffolding 2026-06-11 20:30:02 +02:00
mrbxnim4-telegram-cloud-photo-size-4-6016860144018328845-y.jpg feat(invoicing): add QuickBooks invoicing flow and print functionality 2026-07-09 09:44:55 +02:00
n8n-v2-error.ts feat(quotes): add email-to-quote pipeline with attachments and replies 2026-06-16 20:46:28 +02:00
n8n-v2-main.ts feat(quotes): add email-to-quote pipeline with attachments and replies 2026-06-16 20:46:28 +02:00
quotes.pb.js refactor: switch hardcoded UI colors to semantic theme tokens 2026-07-07 17:22:03 +02:00
seed-gielie-quotes.py feat(sprint): add new sprint pricing workflow and supporting code 2026-07-03 07:29:43 +02:00
setup-pocketbase.ts refactor: drop order-level status, shift to item-driven workflow 2026-06-29 13:06:01 +02:00
verify_v5.py feat: add quote email intake and atomic numbering 2026-06-22 13:58:24 +02:00