Skip to content

CAP-ACC-PRD-005Withdraw a product from sale and restore it

Markdown

CAP-ACC-PRD-005

Withdraw a product from sale and restore it

Markdown
  • DocumentDraft
  • Product intentProposed
  • ImplementationObserved

KindCapabilityProduct areaAccountingModuleProductsRevision3

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
Finance can preserve withdrawn products and restore their use.
Surfaces
consoleapi
Intent sources
services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#D4services-accounting:docs/milestones/ACCT-M1-books-and-invoices.md#D11

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-DAT-001 TC-LOG-001 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-003 TC-PI-005

Permissions

KeyChecked atScope
accounting.products.updateapitenant

Business Rules

8 rules, 6 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
Ordinary replacement changes active products to inactive and back; inactive products leave sale while existing invoices remain valid.
lifecycleapi, servicetest
02must prove
Proposed
Retirement advances the read version and changes only status, rejecting an already retired product.
lifecycleservicetest
03must prove
Proposed
Reactivation makes inactive or retired products active and rejects products already active.
lifecycleservicetest
04must prove
Proposed
Retirement and reactivation reject requests missing the read version or carrying an obsolete version.
validationapi, servicetest
services-accounting:modules/products/tests/e2e/products.e2e.spec.js#answers 400 to a lifecycle request without the version read
05must prove
Proposed
An update lock prevents both retirement and reactivation.
permissionservicetest
06must prove
Proposed
Both lifecycle actions require product update permission.
permissionapitest
07
Proposed
Recorded product intent excludes retired products from new invoice selection while preserving existing invoices.
policydocumented
08
Proposed
Row actions ask for confirmation before activation, deactivation, retirement and reactivation; retired names do not open the editor.
policyconsoleobserved

Scenarios

IdGivenWhenThenProvenance
01A currently active workshop product is in the catalogue.Finance retires it, attempts correction and reactivates it.Correction fails during retirement and succeeds after restoration to active.test

Edge Cases

IdGivenWhenThenProvenance
02An inactive product remains in the catalogue.Finance requests reactivation.Its status becomes active directly.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.