Kaizen
Browse modulesPricingpricing/sharedFunctions

Function: summarizeByGlCode()

function summarizeByGlCode(calculation: PricingCalculation<LineItemContext>): Partial<Record<string, number>>;

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

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 GL code string. Actions without a glCode 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<string, number>>

On this page