Kaizen
Browse modulesPricingpricing/sharedFunctions

Function: pricingBasisLabel()

function pricingBasisLabel(unit: string, per?: string | null): string;

Defined in: shared/pricing/unit-labels.ts:114

Label a price's full basis — BOTH axes when it has two: "Per attendee per hour".

The grid caption showed only pricingUnitLabel(unit), so a two-axis cell read exactly "Per attendee" — indistinguishable from a single-axis one. That is not cosmetic: on a 3-hour booking for 10 guests the two are $50 and $150, and an operator scanning the matrix had no way to tell which they had configured.

Composed from PRICING_UNIT_LABELS rather than given its own map, so a wording change to "Per attendee" cannot leave the composed form saying something else. The second axis is lowercased via its "Per " prefix ("Per hour" → "per hour") for the same reason — deriving it beats a parallel map of lowercase spellings.

Renders whatever is stored, including a combination the schema forbids (flat + per, reachable only by direct SQL). Surfacing "Fixed amount per hour" makes the bad row visible; hiding the axis would make it look correct.

Parameters

ParameterType
unitstring
per?string | null

Returns

string

On this page