Calculation type

FlatPercentageAdjustment

Rescales the allowed amount to a fixed configured Percentage of its current value, applied either per-charge or once at the account (total) level depending on Level.

61
uses
3
customers
Adjustment
category
Varies (configurable)
applies at

What it computes

for i in 1..NumCharges: if !IgnoreCharge(calc,charge,ctx) && Level==Charge: detail.Adjust(MoneyMath.Percentage(detail.Amount, Percentage), calc). Then, unconditionally after the loop (not gated by IgnoreCharge): if Level==Account: Details[0].Adjust(MoneyMath.Percentage(Details[0].Amount, Percentage), calc)

Parameters

KeyMeaning
PercentageFixed percent the current allowed amount is rescaled to (>=100 increases fee, <100 reduces it, per DefaultDescription); defaults to 100.0 in the UI field
LevelCalculationApplicationLevel (Account or Charge) choosing whether the rescale is applied to every individual charge or only to the account-level total at Details[0]; defaults to Charge

Gotchas

Same Adjust()-sets-not-adds semantics and MoneyMath.Percentage double/banker's-rounding as ModifierAdjustment. The Account-level branch is a separate if-block that runs after the per-charge loop regardless of what happened in the loop (it is not mutually exclusive by construction, but Level can only be one enum value at a time so in practice only one branch fires per invocation). Unlike FlatFee/FlatPercentOfCharges (per critique.md), the Account branch here is NOT nested inside the charge loop and is not gated by IgnoreCharge on Details[0], so it always fires when Level==Account.

In the source

class · /home/cary/src/mdc/MdClarity/MDClarity/MDClarityCore/Backend/CustomerDataModel.cs:925
dispatch · CalculationEngine.cs:744-745 (case FlatPercentageAdjustment flatPercentageAdjustment: CalculateFlatPercentageAdjustment(...))

CONFIRMED - class declaration read at CustomerDataModel.cs:925-945 (Calculation, IAdjustment; CalculationLevel returns Level field, constructor defaults Level=Charge), dispatch at CalculationEngine.cs:744-745, algorithm read in full at CalculationEngine.cs:1784-1801, UI field FlatPercentageAdjustmentField read at CustomerSchema.cs:3581-3614 confirming Percentage default of 100.0. Draft matched code exactly.