MoneyBagConversionRoundingPolicy Enum
Definition
- Assembly
- Bodu.Financial.dll
- Package
- Bodu.Financial 1.0.0
Selects the rounding policy used by ConvertTo<TTarget>(IRateProvider, MoneyBagConversionRoundingPolicy) when aggregating per-currency balances into a single target-currency total.
public enum MoneyBagConversionRoundingPolicy
- Extension Methods
Fields
SumRawThenRound = 0Sum every converted balance as a raw decimal first, then round the aggregate once to the destination currency's minor-unit precision. This is the default - it minimises the cumulative rounding error in a portfolio FX total.
RoundEachCurrencyThenSum = 1Round each converted per-currency balance to the destination currency's minor-unit precision before adding it into the total. Use this for ledger and tax workflows where each settled line must be representable at the destination precision before aggregation.
Remarks
The two policies are deliberately spelled out because both are common - neither is wrong, and the choice depends on the accounting workflow. Aggregate-then-round (the default) suits FX position totals where per-line precision is irrelevant; per-line rounding suits ledger / tax workflows where each converted balance must settle independently at the destination precision before aggregation.
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |