Kaizen
Browse modulesPricingpricing/sharedFunctions

Function: summarizeByResponsibleParty()

function summarizeByResponsibleParty(calculation: PricingCalculation<LineItemContext>): Partial<Record<ResponsibleParty, number>>;

Defined in: shared/pricing/summarize-adjustments.ts:73

Sums signed delta_cents (the actual money moved — never the raw action.value) across every line's applied[] plus the order's applied[], bucketed by ResponsibleParty. Actions without a responsibleParty are skipped.

Limitation: base revenue from the line_item.base_price_cents fallback (when no base-phase rule matched) has no AppliedAction and therefore does not appear in this rollup. Consumers authoring BASE_PRICE rules get full coverage.

Parameters

ParameterType
calculationPricingCalculation<LineItemContext>

Returns

Partial<Record<ResponsibleParty, number>>

On this page