Skip to content

CAP-ACC-PRD-011Offer a collection of products as a bundle

Markdown

CAP-ACC-PRD-011

Offer a collection of products as a bundle

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationPartially observed

KindCapabilityProduct areaAccountingModuleProductsRevision4

Read atservices-accounting f47cb263react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
Bundle allocations stay within validated product relationships.
Surfaces
api
Intent sources
services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#D10.1services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#D12services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#R24

Controls

22 controls apply, from the corpus control catalogue.

TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-AZ-005 TC-AZ-006 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-TEN-004 TC-DAT-001 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-PI-001 TC-PI-003 TC-PI-005

Permissions

KeyChecked atScope
accounting.products.updateapitenant

Business Rules

9 rules, 8 to be proved before approval. A rule's product intent is derived from its origin: 0 confirmed by a product decision, the rest inheriting this capability's proposed.

IdRuleKindEnforced atProvenance
01must prove
Proposed
Bundle components are accepted only for kinds supporting bundles, including Accounting Products among Accounting’s kinds.
validationservicetest
02must prove
Proposed
Each component must be a unique, existing sellable product in the bundle’s unit and must differ from the bundle itself.
validationservice, databasetest
03must prove
Proposed
Retired components already held by a bundle may remain, but newly added retired components are rejected.
lifecycleservicetest
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#keeps a retired component the bundle already holds when a replacement resends it, and refuses a new retired one
04must prove
Proposed
Component relationships cannot create a cycle back to the containing bundle.
invariantservicetest
05must prove
Proposed
Each component requires an explicit price, including when its price is zero.
validationservicetest
services-accounting:modules/products/tests/integration/services/persistence/products.integration.spec.js#refuses a component sent without a price, naming it, and stores nothing (ACCT-M1 D10.1, DEF-ACT-0107)
06must prove
Proposed
Quantity-weighted component totals fit set standard and member prices in the always base-currency period, preferring an undated row and otherwise its first dated row; absent member price counts as zero.
✓ Two components allocated 2000 each contribute 4000 to a bundle priced at 5000.✗ Three such components contribute 6000 and exceed the bundle’s price of 5000.
calculationservice, consoleobserved
07
Proposed
Documented posting responsibility treats inline components as fixed revenue splits rather than separate bundled items.
policydocumented
08must prove
Proposed
Bundle replacement accepts at most fifty components and replaces the complete collection.
validationapi, servicetest
09must prove
Proposed
The console hides bundle controls but preserves components configured through the API.
policyconsoletest

Scenarios

IdGivenWhenThenProvenance
01A course costs 5000 minor units and a workbook belongs to the same unit.Staff allocate two workbooks at 2000 each.Two fit within the course price, while three exceed it and are rejected.test

Edge Cases

IdGivenWhenThenProvenance
02Bundle A includes B.A caller makes B include A.The cycle rejects the change.test

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.