Merge pull request #1151 from ubavic/f56-billl-denominations

fix: replace puloon list with F56
This commit is contained in:
Rafael Taranto 2022-03-11 10:53:09 +00:00 committed by GitHub
commit 95d146267b
4 changed files with 361 additions and 155 deletions

View file

@ -52,7 +52,7 @@ const Wizard = ({ machine, locale, onClose, save, error }) => {
display: `Cassette ${it}`,
component: Autocomplete,
inputProps: {
options: R.map(it => ({ code: it, display: it }), options),
options: options,
labelProp: 'display',
valueProp: 'code'
}

View file

@ -229,9 +229,7 @@ const overrides = (auxData, currency, auxElements) => {
const percentMax = 100
const getSchema = locale => {
const bills = getBillOptions(locale, denominations).map(it =>
parseInt(it.code)
)
const bills = getBillOptions(locale, denominations).map(it => it.code)
const highestBill = R.isEmpty(bills) ? CURRENCY_MAX : Math.max(...bills)
return Yup.object().shape({

View file

@ -1,189 +1,397 @@
const denomiations = {
AUD: {
5: 130,
10: 137,
20: 144,
50: 151,
100: 158
export default {
AED: {
thickness: 0x0c,
lengths: {
5: [0x99, 0x85],
10: [0x9d, 0x89],
20: [0x9f, 0x8b],
50: [0xa1, 0x8d],
100: [0xa5, 0x91],
200: [0xa7, 0x93],
500: [0xa9, 0x95],
1000: [0xad, 0x99]
},
polymer: false
},
BBD: {
2: 150,
5: 150,
10: 150,
20: 150,
50: 150,
100: 150
ANG: {
thickness: 0x0c,
lengths: {
10: [0x98, 0x8e],
25: [0x98, 0x8e],
50: [0x98, 0x8e],
100: [0x98, 0x8e]
},
polymer: false
},
AUD: {
thickness: 0x0d,
lengths: {
5: [0x8c, 0x78],
10: [0x93, 0x7f],
20: [0x9a, 0x86],
50: [0xa1, 0x8d],
100: [0xa8, 0x94]
},
polymer: true
},
BGN: {
thickness: 0x0d,
lengths: {
1: [0x75, 0x6b],
2: [0x79, 0x6f],
5: [0x7e, 0x74],
10: [0x83, 0x79],
20: [0x88, 0x7e],
50: [0x8d, 0x83],
100: [0x92, 0x88]
},
polymer: false
},
CAD: {
5: 152,
10: 152,
20: 152,
50: 152,
100: 152
thickness: 0x0d,
lengths: {
5: [0xa2, 0x8e],
10: [0xa2, 0x8e],
20: [0xa2, 0x8e],
50: [0xa2, 0x8e],
100: [0xa2, 0x8e]
},
polymer: true
},
CHF: {
10: 126,
20: 137,
50: 148,
100: 159,
200: 170,
1000: 181
thickness: 0x0d,
lengths: {
10: [0x85, 0x71],
20: [0x8c, 0x78],
50: [0x93, 0x7f],
100: [0x9a, 0x86],
200: [0xa1, 0x8d],
1000: [0xa8, 0x94]
},
polymer: false
},
DKK: {
50: 125,
100: 135,
200: 145,
500: 155,
1000: 165
CNY: {
thickness: 0x0d,
lengths: {
1: [0x8c, 0x78],
5: [0x91, 0x7d],
10: [0x96, 0x82],
20: [0x9b, 0x87],
50: [0xa0, 0x8c],
100: [0x91, 0xa5]
},
polymer: false
},
COP: {
thickness: 0x0d,
lengths: {
2000: [0x8a, 0x76],
5000: [0x8f, 0x7b],
10000: [0x94, 0x80],
20000: [0x99, 0x85],
50000: [0x9e, 0x8a],
100000: [0xa3, 0x8f]
},
polymer: false
},
CZK: {
thickness: 0x0c,
lengths: {
100: [0x96, 0x82],
200: [0x9c, 0x88],
500: [0xa2, 0x8e],
1000: [0xa8, 0x94],
2000: [0xae, 0x9a],
5000: [0xb4, 0xa0]
},
polymer: false
},
EUR: {
5: 120,
10: 127,
20: 133,
50: 140,
100: 147,
200: 153,
500: 160
thickness: 0x0c,
lengths: {
5: [0x82, 0x6e],
10: [0x89, 0x75],
20: [0x8f, 0x7b],
50: [0x96, 0x82],
100: [0x9d, 0x89],
200: [0xa3, 0x8f],
500: [0xaa, 0x96]
},
polymer: false
},
GBP: {
5: 135,
10: 142,
20: 149,
50: 156
thickness: 0x0d,
lengths: {
5: [0x91, 0x7d],
10: [0x98, 0x84],
20: [0x95, 0x81],
50: [0xa6, 0x92]
},
polymer: true
},
GHS: {
thickness: 0x0c,
lengths: {
1: [0x93, 0x7f],
2: [0x96, 0x82],
5: [0x97, 0x83],
10: [0x9b, 0x87],
20: [0x9f, 0x8b],
50: [0xa3, 0x8f]
},
polymer: false
},
GIP: {
thickness: 0x0c,
lengths: {
5: [0x8a, 0x80],
10: [0x92, 0x88],
20: [0x9b, 0x91],
50: [0xa2, 0x98],
100: [0xa9, 0x9f]
},
polymer: false
},
GTQ: {
thickness: 0x0c,
lengths: {
1: [0xa0, 0x96],
5: [0xa0, 0x96],
10: [0xa0, 0x96],
20: [0xa0, 0x96],
50: [0xa0, 0x96],
100: [0xa1, 0x97],
200: [0xa0, 0x96]
},
polymer: true
},
HKD: {
10: 134,
20: 143,
50: 148,
100: 153,
500: 158,
1000: 163
thickness: 0x0d,
lengths: {
10: [0x90, 0x7c],
20: [0x99, 0x85],
50: [0x9e, 0x8a],
100: [0xa3, 0x8f],
500: [0xa8, 0x94],
1000: [0xae, 0x9a]
},
polymer: false
},
HUF: {
200: 154,
500: 154,
1000: 154,
2000: 154,
5000: 154,
10000: 154,
20000: 154
HNL: {
thickness: 0x0c,
lengths: {
1: [0xa6, 0x92],
2: [0xa6, 0x92],
5: [0xa6, 0x92],
10: [0xa6, 0x92],
20: [0xa6, 0x92],
50: [0xa6, 0x92],
100: [0xa6, 0x92],
200: [0xa6, 0x92],
500: [0xa6, 0x92]
},
polymer: false
},
HRK: {
thickness: 0x0c,
lengths: {
5: [0x7f, 0x75],
10: [0x83, 0x79],
20: [0x87, 0x7d],
50: [0x8b, 0x81],
100: [0x8f, 0x85],
200: [0x93, 0x89],
500: [0x97, 0x8d],
1000: [0x9b, 0x91]
},
polymer: false
},
ILS: {
20: 129,
50: 136,
100: 143,
200: 150
},
JMD: {
50: 145,
100: 145,
500: 145,
1000: 145,
5000: 145
thickness: 0x0d,
lengths: {
20: [0x8b, 0x77],
50: [0x92, 0x7e],
100: [0x99, 0x85],
200: [0xa0, 0x8c]
},
polymer: false
},
JPY: {
1000: 150,
2000: 154,
5000: 156,
10000: 160
thickness: 0x0d,
lengths: {
1000: [0x99, 0x93],
2000: [0x9c, 0x98],
5000: [0x9d, 0x9a],
10000: [0xa3, 0x9e]
},
polymer: false
},
KZT: {
200: 126,
500: 130,
1000: 134,
2000: 139,
5000: 144,
10000: 155,
20000: 155
KRW: {
thickness: 0x0d,
lengths: {
1000: [0x92, 0x7e],
2000: [0x96, 0x82],
5000: [0x98, 0x84],
10000: [0x9e, 0x8a],
50000: [0xa4, 0x90]
},
polymer: false
},
MDL: {
thickness: 0x0c,
lengths: {
1: [0x7c, 0x6e],
5: [0x7c, 0x6e],
10: [0x83, 0x6f],
20: [0x83, 0x6f],
50: [0x83, 0x6f],
100: [0x83, 0x6f],
200: [0x8f, 0x7b],
500: [0x8f, 0x7b],
1000: [0x8f, 0x7b]
},
polymer: false
},
MXN: {
20: 120,
50: 127,
100: 134,
200: 141,
500: 148,
1000: 155
thickness: 0x0c,
lengths: {
20: [0x7d, 0x73],
50: [0x82, 0x78],
100: [0x89, 0x7f],
200: [0x90, 0x86],
500: [0x97, 0x8d],
1000: [0x9e, 0x94]
},
polymer: true
},
MYR: {
1: 120,
5: 135,
10: 140,
20: 145,
50: 145,
100: 150
thickness: 0x0c,
lengths: {
1: [0x82, 0x6e],
5: [0x91, 0x7d],
10: [0x96, 0x82],
20: [0x9b, 0x87],
50: [0x9b, 0x87],
100: [0xa0, 0x8c]
},
polymer: false
},
NAD: {
thickness: 0x0c,
lengths: {
10: [0x86, 0x7c],
20: [0x8b, 0x81],
50: [0x91, 0x87],
100: [0x97, 0x8d],
200: [0x9d, 0x93]
},
polymer: false
},
NZD: {
5: 135,
10: 140,
20: 145,
50: 150,
100: 155
thickness: 0x0c,
lengths: {
5: [0x8c, 0x82],
10: [0x91, 0x87],
20: [0x96, 0x8c],
50: [0x9b, 0x91],
100: [0xa0, 0x96]
},
polymer: true
},
PHP: {
20: 160,
50: 160,
100: 160,
200: 160,
500: 160,
1000: 160
thickness: 0x0c,
lengths: {
20: [0xaa, 0x96],
100: [0xaa, 0x96],
200: [0xaa, 0x96],
500: [0xaa, 0x96],
1000: [0xaa, 0x96]
},
polymer: false
},
PLN: {
10: 120,
20: 126,
50: 132,
100: 138,
200: 144,
500: 150
thickness: 0x0c,
lengths: {
10: [0x7d, 0x73],
20: [0x83, 0x79],
50: [0x89, 0x7f],
100: [0x8f, 0x85],
200: [0x95, 0x8b],
500: [0x9b, 0x91]
},
polymer: false
},
RON: {
thickness: 0x0c,
lengths: {
1: [0x82, 0x6e],
5: [0x89, 0x75],
10: [0x8f, 0x7b],
50: [0x96, 0x82],
100: [0x9d, 0x89],
200: [0xa0, 0x8c],
500: [0xa3, 0x8f]
},
polymer: true
},
SGD: {
2: 126,
5: 133,
10: 141,
50: 156,
100: 162,
1000: 170
thickness: 0x0c,
lengths: {
2: [0x88, 0x74],
5: [0x8f, 0x7b],
10: [0x97, 0x83],
50: [0xa6, 0x92],
100: [0xac, 0x98],
1000: [0xb4, 0xa0]
},
polymer: false
},
TWD: {
100: 145,
200: 150,
500: 155,
1000: 160,
2000: 165
},
UAH: {
1: 118,
2: 118,
5: 118,
10: 124,
20: 130,
50: 136,
100: 142,
200: 148,
500: 154
thickness: 0x0d,
lengths: {
100: [0x9b, 0x87],
200: [0xa0, 0x8c],
500: [0xa5, 0x91],
1000: [0xaa, 0x96],
2000: [0xaf, 0x9b]
},
polymer: false
},
USD: {
1: 156,
5: 156,
10: 156,
20: 156,
50: 156,
100: 156
thickness: 0x0d,
lengths: {
1: [0xa6, 0x92],
2: [0xa6, 0x92],
5: [0xa6, 0x92],
10: [0xa6, 0x92],
20: [0xa6, 0x92],
50: [0xa6, 0x92],
100: [0xa6, 0x92]
},
polymer: false
},
VND: {
10000: 132,
20000: 136,
50000: 140,
100000: 144,
200000: 148,
500000: 152
UYU: {
thickness: 0x0d,
lengths: {
20: [0xa4, 0x9a],
50: [0x96, 0x8c],
100: [0xa4, 0x9a],
200: [0xa4, 0x9a],
500: [0xa4, 0x9a],
1000: [0xa4, 0x9a],
2000: [0xa4, 0x9a]
},
polymer: false
},
ZAR: {
10: 128,
20: 134,
50: 140,
100: 146,
200: 152
thickness: 0x0c,
lengths: {
10: [0x8a, 0x76],
20: [0x90, 0x7c],
50: [0x96, 0x82],
100: [0x9c, 0x88],
200: [0xa2, 0x8e]
},
polymer: false
}
}
export default denomiations

View file

@ -5,7 +5,7 @@ const getBillOptions = R.curry((locale, denomiations) => {
return R.compose(
R.map(code => ({ code: parseInt(code), display: code })),
R.keys,
R.path([currency])
R.path([currency, 'lengths'])
)(denomiations)
})