This commit is contained in:
@@ -376,6 +376,24 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
///////////////////////////////////////////
|
||||
// Turn a decimal number into a local
|
||||
// currency display
|
||||
//
|
||||
currencyLocalized(value, languageName, currencyName) {
|
||||
if (!value) return "";
|
||||
if (!languageName) {
|
||||
languageName = this.getBrowserLanguages();
|
||||
}
|
||||
if (!currencyName) {
|
||||
currencyName = window.$gz.store.state.locale.currencyName;
|
||||
}
|
||||
|
||||
return new Intl.NumberFormat(languageName, {
|
||||
style: "currency",
|
||||
currency: currencyName
|
||||
}).format(value);
|
||||
},
|
||||
////////////////////////////////////////////////////////
|
||||
// dynamically set the vuetify language elements from
|
||||
// users localized text (am/pm etc)
|
||||
|
||||
Reference in New Issue
Block a user