f0f1f2.studio Template reference
English
Open application
Method

FormatMoneyFractional

Definition

Namespace
Resto.Front.PrintTemplates.Cheques.Razor

Formats money using the current currency precision without denomination rounding.

string TemplateBase<T>.FormatMoneyFractional(decimal money)
Returns
string
Nullability
Not specified
Declared in
Resto.Front.PrintTemplates.Cheques.Razor.TemplateBase<T>
Model purpose
Base class for Legacy Razor print templates. Model contains the document data of type T. Provides formatting and markup output methods.

Parameters

decimal money
Amount in the selected currency; this method does not convert currencies.

Return value

A numeric string with the number of fractional digits defined by the current currency.

Remarks

Rounds midpoint values away from zero. Uses CurrentCulture, including its decimal and digit-group separators; does not append a currency symbol. Ignores MinimumDenomination; this differs from FormatMoney.

Exceptions

System.InvalidOperationException
The engine currency provider has not been initialized.
System.Collections.Generic.KeyNotFoundException
The current currency ISO code is absent from the engine currency catalog.

Example

// en-GB, currency precision: 2
FormatMoneyFractional(12.345m); // "12.35"