Calculation type
Applies a fixed configured dollar Amount to qualifying charges only, either once (redundantly, per qualifying charge) at the account level plus zeroing those charges, or independently to every qualifying charge — with no fee schedule and no percentage logic.
for i in 1..NumCharges: if !IgnoreCharge(calc, Charges[i], ctx): if calc.Level==Account: Details[0].SetBase(calc.Amount, calc) AND Details[i].SetBase(0, calc); else (Level==Charge): Details[i].SetBase(calc.Amount, calc). A charge that fails IgnoreCharge triggers no SetBase call at all for that index — it is left with whatever amount it already had.
| Key | Meaning |
|---|---|
| Amount | decimal, default 0.0M; the fixed dollar amount set as the base allowed amount. |
| Level | CalculationApplicationLevel (Account or Charge), defaults to Account in the constructor; controls whether Amount is applied once (redundantly, inside the per-charge loop) to Details[0] plus zeroing each qualifying charge, or applied independently per qualifying charge. |
Gotchas
The Account-level Details[0].SetBase(calc.Amount) line lives INSIDE the per-charge for-loop, guarded by IgnoreCharge, not as a single top-level statement before the loop — two consequences a reimplementer would miss: (1) if EVERY charge on the account fails IgnoreCharge, Details[0] is never set at all and an Account-level FlatFee silently produces no allowed amount whatsoever (not even a zero) despite being configured; (2) if multiple charges qualify, Details[0] is redundantly overwritten with the identical calc.Amount once per qualifying charge — harmless here since the value never changes, but it means the account total is NOT the sum of anything, just calc.Amount restated. Charges that fail IgnoreCharge are left untouched, not zeroed — the draft's original phrasing ('every charge-level detail is zeroed') was wrong. No RuleMultipliers, no rounding call — calc.Amount is used as-is.
class · /home/cary/src/mdc/MdClarity/MDClarity/MDClarityCore/Backend/CustomerDataModel.cs:660
dispatch · /home/cary/src/mdc/MdClarity/MDClarity/MDClarityCore/Backend/CalculationEngine.cs:665
CORRECTED — verified against CalculateFlatFee (CalculationEngine.cs:1171-1188). The draft's formula described the account-level write as a single unconditional step and implied all charge-level details get zeroed; in fact the account write is nested inside the IgnoreCharge-guarded per-charge loop (re-executed per qualifying charge, and skipped entirely if none qualify) and only qualifying charges are zeroed. Matches critique.md's finding for this type.