WFDASH-WEBAPP/src/app/api/invoicing
Dave 12657d126b feat(mcp): order_items.create accepts exclude_from_invoice + doc updates
Task 9 of the non-invoiceable-order-extras plan.

order_items.create MCP tool:
- Input schema gains an optional boolean 'exclude_from_invoice'.
- Tool description rewritten to explain the supplier-side component
  use case, the PO + driver + collection flow, the silent drop from
  the customer invoice and delivery note, and the force-zero selling
  price.
- operationData hint / nextActions block updated — the prior text
  documented a '409 order_locked' refusal that no longer fires
  (Task 2 removed the pending gate).
- Handler forwards the boolean to createOrderItemForOrder (which
  itself forces selling_price=0 when the flag is set — Task 2).

Also fixed a TypeScript strict-mode complaint in the T7 test that
the previous commit left behind (vi.fn mock-call tuple type
needed an explicit parameter so mock.calls[0] is typed).

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-30 17:46:06 +02:00
..
customers
delivery-note feat(mcp): order_items.create accepts exclude_from_invoice + doc updates 2026-08-30 17:46:06 +02:00
delivery-note-pdf
delivery-note-print test(invoicing): lock in picking-slip inclusion of excluded rows 2026-08-30 17:44:12 +02:00
delivery-note-print-tracking
print-bundle test(invoicing): lock in picking-slip inclusion of excluded rows 2026-08-30 17:44:12 +02:00
print-tracking