Skip to main content

DefaultMoneyStrategy

DefaultMoneyStrategy

A MoneyStrategy that stores monetary values as a int type in the database. The storage configuration and rounding logic replicates the behaviour of Vendure pre-2.0.

Signature
class DefaultMoneyStrategy implements MoneyStrategy {
readonly moneyColumnOptions: ColumnOptions = {
type: 'int',
};
readonly precision: number = 2;
round(value: number, quantity: = 1) => number;
}

moneyColumnOptions

property
ColumnOptions

precision

property
number

round

method
(value: number, quantity: = 1) => number