Skip to content

Packs / erp-public

run-order-to-cash

Run order-to-cash: confirm a sales order against stock, deliver, invoice and record (partial) payments

L2 Checks passed 3 of 3 runsv1.0.0Tech-Realm/space-erp-public

Install

logicpacks pack use erp-public/run-order-to-cash
get_pack erp-public/run-order-to-cash

The second line is the MCP tool call for the LogicPacks connector (Claude Code, Codex, Claude.ai and others). The first run of a pack someone else wrote asks for your yes.

Keys it needs (names only)

None.

Playbooks included

  • Spec: spec/SPEC.md (goal, steps, edge cases, don’ts)
  • Routes: stdlib-sqlite
  • Checks: 1 in outcome/checks.yaml
  • Code: erp.py
  • Tools: python3

Usage, last 8 weeks

New: no recorded use yet.

Purpose (from spec/SPEC.md)

Run order-to-cash: confirm a sales order against stock, deliver, invoice and record (partial) payments

Goal

Every sale reduces stock once, produces one invoice and is marked paid only when fully paid.

Steps

  1. so CUSTOMER SKU:QTY:PRICE... (refused if stock is short).
  2. deliver SO (stock moves out).
  3. invoice SO -> total.
  4. pay INV AMOUNT -> remaining; status partial|paid.

Edge cases

  • Overpayment: remaining goes negative -> refund/credit note.
  • Cancel after delivery: return moves + credit note.

Don'ts

  • Don't invoice undelivered orders unless it's a prepayment flow.