Calculation type
Looks up a per-unit dollar fee for the charge's code in a fee schedule, multiplies by the charge's units, then applies a RuleMultipliers-or-Percentage multiplier to produce the base allowed amount.
records = GetFeeScheduleRecords(context, calc.ScheduleType); for i in 1..NumCharges: if !IgnoreCharge(calc,charge,ctx) && records[i]!=null: chargeAmount = ApplyMultipliers(calc, MoneyMath.Multiply(records[i].Amount, charge.Units), charge, detail); detail.SetBase(chargeAmount, calc). ApplyMultipliers: baseAmount *= matchedRule.Multiplier if RuleMultipliers.TryEvaluateRules finds a match, else baseAmount *= DefaultMultiplier (Percentage/100, default 1.0); result = Math.Round(baseAmount, 2, MidpointRounding.AwayFromZero).
| Key | Meaning |
|---|---|
| ScheduleType | Key of the fee schedule (ScheduleTypeReferenceField) to look up a per-unit dollar Amount for each charge code; inherited from ScheduleTypeCalculation. |
| Percentage | Decimal, default 100. Feeds DefaultMultiplier = Percentage/100, applied to the schedule fee when no RuleMultipliers rule matches the charge. |
| RuleMultipliers | List of IMultiplierRule; first rule whose criteria match the charge overrides the default Percentage-based multiplier with matchedRule.Multiplier (via IHasRuleMultipliers). |
Gotchas
Charges where records[i] is null (no fee-schedule match for that code) are left entirely uncalculated, not zeroed. CalculationLevel is hardcoded to Charge (CustomerDataModel.cs:609) — there is no Level field, unlike FlatFee/FlatPercentOfCharges. Rounding is decimal Math.Round AwayFromZero, 2dp — different from MoneyMath's double-based rounding used by several Adjustment types, so mixing this Base type with Adjustments in the same pipeline can accumulate rounding drift.
class · /home/cary/src/mdc/MdClarity/MDClarity/MDClarityCore/Backend/CustomerDataModel.cs:607
dispatch · /home/cary/src/mdc/MdClarity/MDClarity/MDClarityCore/Backend/CalculationEngine.cs:659
CONFIRMED — re-read PercentOfFeesCalculation (CustomerDataModel.cs:607-640), CalculatePercentOfFees (CalculationEngine.cs:1149-1169), ApplyMultipliers (CalculationEngine.cs:1534-1547), and PercentOfFeesCalculationField (CustomerSchema.cs:3217). Draft record was accurate; no changes needed.