Debian Codegraph @

addons/point_of_sale/static/src/app/models/utils/currency.js

raw
1 import { formatMonetary } from "@web/views/fields/formatters";
2
3 export const formatCurrency = (value, currency, hasSymbol = true) =>
4 formatMonetary(value, {
5 currencyId: currency.id,
6 noSymbol: !hasSymbol,
7 });
8
9 export const roundCurrency = (value, currency) => currency.round(value);