Click or drag to resize

MoneyRoundToUnit Method (Decimal, Decimal, CurrencyRoundingMethod)

Rounds values to nearest currency unit, i.e 16,45 kr. rounded up if the smallest coin is 10 kr will give 20 kr. or if the smallest coin is 24 aurar(0,25 kr.) then if rounded up it will give 16,50 kr.

Namespace:  LSRetail.Omni.Domain.DataModel.Base.Retail
Assembly:  LSRetail.Omni.Domain.DataModel.Base (in LSRetail.Omni.Domain.DataModel.Base.dll) Version: LS Omni 3.7.0
Syntax
C#
public decimal RoundToUnit(
	decimal value,
	decimal unit,
	CurrencyRoundingMethod roundMethod
)

Parameters

value
Type: SystemDecimal
The currency value or value to be rounded.
unit
Type: SystemDecimal
The smallest unit to be rounded to.
roundMethod
Type: LSRetail.Omni.Domain.DataModel.Base.SetupCurrencyRoundingMethod
The method of rounding, Nearest,up and down

Return Value

Type: Decimal
Returns a value rounded to the nearest unit.
See Also