feat(erpsetup): sales catalogue — SKU items, units, SEPA mandate fields #48

Merged
sharang merged 1 commits from feat/erpsetup-catalog into main 2026-09-29 16:25:01 +00:00
Owner

The live ERPNext has none of the registry's SKUs; there are only the 10 ERPNext demo items (T-shirt, Laptop, …) and no prices. A sales order for the pilot therefore couldn't unlock anything, because the registry maps order lines to products by SKU.

erpsetup also creates the following, each only if missing (idempotent, -dry-run first as always):

  • Units Monat, Jahr and Prüfung; item group "BreakPilot Abonnements".
  • 22 service items (is_stock_item: 0): the 19 product SKUs of the registry (Prüfwerk, Werkbank, Werkpilot, Firmwerk, cloud and on-prem) plus the platform fee PLT-CORE-CLD-STD/BUS/ENT. The platform fee is billed but unlocks nothing on its own. Names and short German descriptions come from the SKU sheet (Breakpilot SKU + SLA). No prices; they're set in ERPNext.
  • Customer fields for the SEPA mandate in a section "SEPA-Lastschriftmandat": Mandatsreferenz, Mandat unterschrieben am, Mandatsart (Basislastschrift (CORE) / Firmenlastschrift (B2B)).
  • Payment method "SEPA-Lastschrift" (type Bank).

Tests:

  • 40 steps on the first run, no changes on the second;
  • the dry run changes nothing;
  • the item list covers exactly the registry's SKUs (tied to store.DefaultProducts(), so a new SKU without an item fails CI).

The live run needs the admin key (System Manager), as on 09-24; the registry's day-to-day key gets 403 on setup objects, which is correct.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB

The live ERPNext has **none** of the registry's SKUs; there are only the 10 ERPNext demo items (T-shirt, Laptop, …) and no prices. A sales order for the pilot therefore couldn't unlock anything, because the registry maps order lines to products by SKU. `erpsetup` also creates the following, each only if missing (idempotent, `-dry-run` first as always): - **Units** Monat, Jahr and Prüfung; **item group** "BreakPilot Abonnements". - **22 service items** (`is_stock_item: 0`): the 19 product SKUs of the registry (Prüfwerk, Werkbank, Werkpilot, Firmwerk, cloud and on-prem) plus the platform fee `PLT-CORE-CLD-STD/BUS/ENT`. The platform fee is billed but unlocks nothing on its own. Names and short German descriptions come from the SKU sheet (`Breakpilot SKU + SLA`). **No prices**; they're set in ERPNext. - **Customer fields for the SEPA mandate** in a section "SEPA-Lastschriftmandat": Mandatsreferenz, Mandat unterschrieben am, Mandatsart (Basislastschrift (CORE) / Firmenlastschrift (B2B)). - **Payment method** "SEPA-Lastschrift" (type Bank). Tests: - 40 steps on the first run, no changes on the second; - the dry run changes nothing; - the item list covers exactly the registry's SKUs (tied to `store.DefaultProducts()`, so a new SKU without an item fails CI). The live run needs the admin key (System Manager), as on 09-24; the registry's day-to-day key gets 403 on setup objects, which is correct. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
sharang added 1 commit 2026-09-29 15:57:37 +00:00
feat(erpsetup): sales catalogue — SKU items, units, SEPA mandate fields
ci / shared (pull_request) Successful in 14s
ci / test (pull_request) Successful in 23m45s
ci / image (pull_request) Skipped
5af7061708
The live ERPNext had none of the registry's SKUs (only the demo items), so a
sales order could not unlock anything. erpsetup now also creates, where
missing:
- units Monat, Jahr, Prüfung and the item group BreakPilot Abonnements
- 22 service items: the registry's 19 product SKUs plus the platform fee
  PLT-CORE-CLD-STD/BUS/ENT (billed, unlocks nothing), names and German
  descriptions from the SKU sheet; no prices (set in ERPNext)
- Customer fields for the SEPA mandate (reference, date, CORE/B2B)
- the payment method SEPA-Lastschrift
A test keeps the item list in step with the registry's product SKUs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
sharang merged commit 8a03be188d into main 2026-09-29 16:25:01 +00:00
Sign in to join this conversation.