mirror of
https://github.com/hay-kot/homebox.git
synced 2025-08-01 15:20:29 +00:00
Adding Omani riyals (OMR) currency
This commit is contained in:
parent
b5592167a2
commit
99a6abf001
2 changed files with 4 additions and 1 deletions
|
@ -149,6 +149,7 @@ const (
|
|||
CurrencyMxn Currency = "mxn"
|
||||
CurrencyNok Currency = "nok"
|
||||
CurrencyNzd Currency = "nzd"
|
||||
CurrencyOmr Currency = "omr"
|
||||
CurrencyPln Currency = "pln"
|
||||
CurrencyRmb Currency = "rmb"
|
||||
CurrencyRon Currency = "ron"
|
||||
|
@ -171,7 +172,7 @@ func (c Currency) String() string {
|
|||
// CurrencyValidator is a validator for the "currency" field enum values. It is called by the builders before save.
|
||||
func CurrencyValidator(c Currency) error {
|
||||
switch c {
|
||||
case CurrencyAed, CurrencyAud, CurrencyBgn, CurrencyBrl, CurrencyCad, CurrencyChf, CurrencyCzk, CurrencyDkk, CurrencyEur, CurrencyGbp, CurrencyHkd, CurrencyIdr, CurrencyInr, CurrencyJpy, CurrencyKrw, CurrencyMxn, CurrencyNok, CurrencyNzd, CurrencyPln, CurrencyRmb, CurrencyRon, CurrencyRub, CurrencySar, CurrencySek, CurrencySgd, CurrencyThb, CurrencyTry, CurrencyUsd, CurrencyXag, CurrencyXau, CurrencyZar:
|
||||
case CurrencyAed, CurrencyAud, CurrencyBgn, CurrencyBrl, CurrencyCad, CurrencyChf, CurrencyCzk, CurrencyDkk, CurrencyEur, CurrencyGbp, CurrencyHkd, CurrencyIdr, CurrencyInr, CurrencyJpy, CurrencyKrw, CurrencyMxn, CurrencyNok, CurrencyNzd, CurrencyOmr, CurrencyPln, CurrencyRmb, CurrencyRon, CurrencyRub, CurrencySar, CurrencySek, CurrencySgd, CurrencyThb, CurrencyTry, CurrencyUsd, CurrencyXag, CurrencyXau, CurrencyZar:
|
||||
return nil
|
||||
default:
|
||||
return fmt.Errorf("group: invalid enum value for currency field: %q", c)
|
||||
|
|
|
@ -17,6 +17,7 @@ export type Codes =
|
|||
| "MXN"
|
||||
| "NOK"
|
||||
| "NZD"
|
||||
| "OMR"
|
||||
| "PLN"
|
||||
| "RMB"
|
||||
| "RUB"
|
||||
|
@ -57,6 +58,7 @@ export const currencies: Currency[] = [
|
|||
{ code: "MXN", local: "Mexico", symbol: "Mex$", name: "Mexican Peso" },
|
||||
{ code: "NOK", local: "Norway", symbol: "kr", name: "Norwegian Krone" },
|
||||
{ code: "NZD", local: "New Zealand", symbol: "NZ$", name: "New Zealand Dollar" },
|
||||
{ code: "OMR", local: "Omani Rial", symbol: "OMR", name: "Omani Riyal" },
|
||||
{ code: "PLN", local: "Poland", symbol: "zł", name: "Polish Zloty" },
|
||||
{ code: "RMB", local: "zh-CN", symbol: "¥", name: "Chinese Yuan" },
|
||||
{ code: "RON", local: "ro-RO", symbol: "lei", name: "Romanian Leu" },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue