@bookipi/htmlgenerator 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2024 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import Moment from 'moment';
3
+
4
+ var currencies = {
5
+ "AED": {
6
+ "symbol": "AED",
7
+ "name": "United Arab Emirates Dirham",
8
+ "symbol_native": "د.إ.‏",
9
+ "decimal_digits": 2,
10
+ "rounding": 0,
11
+ "code": "AED",
12
+ "name_plural": "UAE dirhams",
13
+ "rtl": true
14
+ },
15
+ "AFN": {
16
+ "symbol": "Af",
17
+ "name": "Afghan Afghani",
18
+ "symbol_native": "Af",
19
+ "decimal_digits": 0,
20
+ "rounding": 0,
21
+ "code": "AFN",
22
+ "name_plural": "Afghan Afghanis",
23
+ "rtl": true
24
+ },
25
+ "ALL": {
26
+ "symbol": "ALL",
27
+ "name": "Albanian Lek",
28
+ "symbol_native": "Lek",
29
+ "decimal_digits": 0,
30
+ "rounding": 0,
31
+ "code": "ALL",
32
+ "name_plural": "Albanian lekë"
33
+ },
34
+ "AOA": {
35
+ "symbol": "Kz",
36
+ "name": "Angolan kwanza",
37
+ "symbol_native": "Kz",
38
+ "decimal_digits": 2,
39
+ "rounding": 0,
40
+ "code": "AOA",
41
+ "name_plural": "Angolan kwanza"
42
+ },
43
+ "AMD": {
44
+ "symbol": "AMD",
45
+ "name": "Armenian Dram",
46
+ "symbol_native": "դր.",
47
+ "decimal_digits": 0,
48
+ "rounding": 0,
49
+ "code": "AMD",
50
+ "name_plural": "Armenian drams"
51
+ },
52
+ "ANG": {
53
+ "symbol": "ANG",
54
+ "name": "Dutch Guilder",
55
+ "symbol_native": "ƒ",
56
+ "decimal_digits": 2,
57
+ "rounding": 0,
58
+ "code": "ANG",
59
+ "name_plural": "Dutch Guilders"
60
+ },
61
+ "ARS": {
62
+ "symbol": "AR$",
63
+ "name": "Argentine Peso",
64
+ "symbol_native": "$",
65
+ "decimal_digits": 2,
66
+ "rounding": 0,
67
+ "code": "ARS",
68
+ "name_plural": "Argentine pesos"
69
+ },
70
+ "AUD": {
71
+ "symbol": "AU$",
72
+ "name": "Australian Dollar",
73
+ "symbol_native": "$",
74
+ "decimal_digits": 2,
75
+ "rounding": 0,
76
+ "code": "AUD",
77
+ "name_plural": "Australian dollars"
78
+ },
79
+ "AZN": {
80
+ "symbol": "man.",
81
+ "name": "Azerbaijani Manat",
82
+ "symbol_native": "ман.",
83
+ "decimal_digits": 2,
84
+ "rounding": 0,
85
+ "code": "AZN",
86
+ "name_plural": "Azerbaijani manats"
87
+ },
88
+ "BAM": {
89
+ "symbol": "KM",
90
+ "name": "Bosnia-Herzegovina Convertible Mark",
91
+ "symbol_native": "KM",
92
+ "decimal_digits": 2,
93
+ "rounding": 0,
94
+ "code": "BAM",
95
+ "name_plural": "Bosnia-Herzegovina convertible marks"
96
+ },
97
+ "BBD": {
98
+ "symbol": "Bds$",
99
+ "name": "Barbadian Dollar",
100
+ "symbol_native": "Bds$",
101
+ "decimal_digits": 2,
102
+ "rounding": 0,
103
+ "code": "BBD",
104
+ "name_plural": "Barbadian Dollars"
105
+ },
106
+ "BDT": {
107
+ "symbol": "Tk",
108
+ "name": "Bangladeshi Taka",
109
+ "symbol_native": "Tk",
110
+ "decimal_digits": 2,
111
+ "rounding": 0,
112
+ "code": "BDT",
113
+ "name_plural": "Bangladeshi takas"
114
+ },
115
+ "BGN": {
116
+ "symbol": "BGN",
117
+ "name": "Bulgarian Lev",
118
+ "symbol_native": "лв.",
119
+ "decimal_digits": 2,
120
+ "rounding": 0,
121
+ "code": "BGN",
122
+ "name_plural": "Bulgarian leva"
123
+ },
124
+ "BHD": {
125
+ "symbol": "BD",
126
+ "name": "Bahraini Dinar",
127
+ "symbol_native": "د.ب.‏",
128
+ "decimal_digits": 3,
129
+ "rounding": 0,
130
+ "code": "BHD",
131
+ "name_plural": "Bahraini dinars",
132
+ "rtl": true
133
+ },
134
+ "BIF": {
135
+ "symbol": "FBu",
136
+ "name": "Burundian Franc",
137
+ "symbol_native": "FBu",
138
+ "decimal_digits": 0,
139
+ "rounding": 0,
140
+ "code": "BIF",
141
+ "name_plural": "Burundian francs"
142
+ },
143
+ "BND": {
144
+ "symbol": "BN$",
145
+ "name": "Brunei Dollar",
146
+ "symbol_native": "$",
147
+ "decimal_digits": 2,
148
+ "rounding": 0,
149
+ "code": "BND",
150
+ "name_plural": "Brunei dollars"
151
+ },
152
+ "BOB": {
153
+ "symbol": "Bs",
154
+ "name": "Bolivian Boliviano",
155
+ "symbol_native": "Bs",
156
+ "decimal_digits": 2,
157
+ "rounding": 0,
158
+ "code": "BOB",
159
+ "name_plural": "Bolivian bolivianos"
160
+ },
161
+ "BRL": {
162
+ "symbol": "R$",
163
+ "name": "Brazilian Real",
164
+ "symbol_native": "R$",
165
+ "decimal_digits": 2,
166
+ "rounding": 0,
167
+ "code": "BRL",
168
+ "name_plural": "Brazilian reals"
169
+ },
170
+ "BWP": {
171
+ "symbol": "BWP",
172
+ "name": "Botswanan Pula",
173
+ "symbol_native": "P",
174
+ "decimal_digits": 2,
175
+ "rounding": 0,
176
+ "code": "BWP",
177
+ "name_plural": "Botswanan pulas"
178
+ },
179
+ "BYR": {
180
+ "symbol": "BYR",
181
+ "name": "Belarusian Ruble",
182
+ "symbol_native": "BYR",
183
+ "decimal_digits": 0,
184
+ "rounding": 0,
185
+ "code": "BYR",
186
+ "name_plural": "Belarusian rubles"
187
+ },
188
+ "BZD": {
189
+ "symbol": "BZ$",
190
+ "name": "Belize Dollar",
191
+ "symbol_native": "$",
192
+ "decimal_digits": 2,
193
+ "rounding": 0,
194
+ "code": "BZD",
195
+ "name_plural": "Belize dollars"
196
+ },
197
+ "CAD": {
198
+ "symbol": "CA$",
199
+ "name": "Canadian Dollar",
200
+ "symbol_native": "$",
201
+ "decimal_digits": 2,
202
+ "rounding": 0,
203
+ "code": "CAD",
204
+ "name_plural": "Canadian dollars"
205
+ },
206
+ "CDF": {
207
+ "symbol": "CDF",
208
+ "name": "Congolese Franc",
209
+ "symbol_native": "FrCD",
210
+ "decimal_digits": 2,
211
+ "rounding": 0,
212
+ "code": "CDF",
213
+ "name_plural": "Congolese francs"
214
+ },
215
+ "CHF": {
216
+ "symbol": "CHF",
217
+ "name": "Swiss Franc",
218
+ "symbol_native": "CHF",
219
+ "decimal_digits": 2,
220
+ "rounding": 0.05,
221
+ "code": "CHF",
222
+ "name_plural": "Swiss francs"
223
+ },
224
+ "CLP": {
225
+ "symbol": "CL$",
226
+ "name": "Chilean Peso",
227
+ "symbol_native": "$",
228
+ "decimal_digits": 0,
229
+ "rounding": 0,
230
+ "code": "CLP",
231
+ "name_plural": "Chilean pesos"
232
+ },
233
+ "CNY": {
234
+ "symbol": "¥",
235
+ "name": "Chinese Yuan",
236
+ "symbol_native": "¥",
237
+ "decimal_digits": 2,
238
+ "rounding": 0,
239
+ "code": "CNY",
240
+ "name_plural": "Chinese yuan"
241
+ },
242
+ "COP": {
243
+ "symbol": "CO$",
244
+ "name": "Colombian Peso",
245
+ "symbol_native": "$",
246
+ "decimal_digits": 0,
247
+ "rounding": 0,
248
+ "code": "COP",
249
+ "name_plural": "Colombian pesos"
250
+ },
251
+ "CRC": {
252
+ "symbol": "₡",
253
+ "name": "Costa Rican Colón",
254
+ "symbol_native": "₡",
255
+ "decimal_digits": 0,
256
+ "rounding": 0,
257
+ "code": "CRC",
258
+ "name_plural": "Costa Rican colóns"
259
+ },
260
+ "CVE": {
261
+ "symbol": "CV$",
262
+ "name": "Cape Verdean Escudo",
263
+ "symbol_native": "CV$",
264
+ "decimal_digits": 2,
265
+ "rounding": 0,
266
+ "code": "CVE",
267
+ "name_plural": "Cape Verdean escudos"
268
+ },
269
+ "CZK": {
270
+ "symbol": "Kč",
271
+ "name": "Czech Republic Koruna",
272
+ "symbol_native": "Kč",
273
+ "decimal_digits": 2,
274
+ "rounding": 0,
275
+ "code": "CZK",
276
+ "name_plural": "Czech Republic korunas"
277
+ },
278
+ "DJF": {
279
+ "symbol": "Fdj",
280
+ "name": "Djiboutian Franc",
281
+ "symbol_native": "Fdj",
282
+ "decimal_digits": 0,
283
+ "rounding": 0,
284
+ "code": "DJF",
285
+ "name_plural": "Djiboutian francs"
286
+ },
287
+ "DKK": {
288
+ "symbol": "Dkr",
289
+ "name": "Danish Krone",
290
+ "symbol_native": "kr",
291
+ "decimal_digits": 2,
292
+ "rounding": 0,
293
+ "code": "DKK",
294
+ "name_plural": "Danish kroner"
295
+ },
296
+ "DOP": {
297
+ "symbol": "RD$",
298
+ "name": "Dominican Peso",
299
+ "symbol_native": "RD$",
300
+ "decimal_digits": 2,
301
+ "rounding": 0,
302
+ "code": "DOP",
303
+ "name_plural": "Dominican pesos"
304
+ },
305
+ "DZD": {
306
+ "symbol": "DA",
307
+ "name": "Algerian Dinar",
308
+ "symbol_native": "د.ج.‏",
309
+ "decimal_digits": 2,
310
+ "rounding": 0,
311
+ "code": "DZD",
312
+ "name_plural": "Algerian dinars",
313
+ "rtl": true
314
+ },
315
+ "EEK": {
316
+ "symbol": "Ekr",
317
+ "name": "Estonian Kroon",
318
+ "symbol_native": "kr",
319
+ "decimal_digits": 2,
320
+ "rounding": 0,
321
+ "code": "EEK",
322
+ "name_plural": "Estonian kroons"
323
+ },
324
+ "EGP": {
325
+ "symbol": "EGP",
326
+ "name": "Egyptian Pound",
327
+ "symbol_native": "ج.م.‏",
328
+ "decimal_digits": 2,
329
+ "rounding": 0,
330
+ "code": "EGP",
331
+ "name_plural": "Egyptian pounds",
332
+ "rtl": true
333
+ },
334
+ "ERN": {
335
+ "symbol": "Nfk",
336
+ "name": "Eritrean Nakfa",
337
+ "symbol_native": "Nfk",
338
+ "decimal_digits": 2,
339
+ "rounding": 0,
340
+ "code": "ERN",
341
+ "name_plural": "Eritrean nakfas"
342
+ },
343
+ "ETB": {
344
+ "symbol": "Br",
345
+ "name": "Ethiopian Birr",
346
+ "symbol_native": "Br",
347
+ "decimal_digits": 2,
348
+ "rounding": 0,
349
+ "code": "ETB",
350
+ "name_plural": "Ethiopian birrs"
351
+ },
352
+ "EUR": {
353
+ "symbol": "€",
354
+ "name": "Euro",
355
+ "symbol_native": "€",
356
+ "decimal_digits": 2,
357
+ "rounding": 0,
358
+ "code": "EUR",
359
+ "name_plural": "euros"
360
+ },
361
+ "GBP": {
362
+ "symbol": "£",
363
+ "name": "British Pound Sterling",
364
+ "symbol_native": "£",
365
+ "decimal_digits": 2,
366
+ "rounding": 0,
367
+ "code": "GBP",
368
+ "name_plural": "British pounds sterling"
369
+ },
370
+ "GEL": {
371
+ "symbol": "GEL",
372
+ "name": "Georgian Lari",
373
+ "symbol_native": "GEL",
374
+ "decimal_digits": 2,
375
+ "rounding": 0,
376
+ "code": "GEL",
377
+ "name_plural": "Georgian laris"
378
+ },
379
+ "GHS": {
380
+ "symbol": "GH₵",
381
+ "name": "Ghanaian Cedi",
382
+ "symbol_native": "GH₵",
383
+ "decimal_digits": 2,
384
+ "rounding": 0,
385
+ "code": "GHS",
386
+ "name_plural": "Ghanaian cedis"
387
+ },
388
+ "GNF": {
389
+ "symbol": "FG",
390
+ "name": "Guinean Franc",
391
+ "symbol_native": "FG",
392
+ "decimal_digits": 0,
393
+ "rounding": 0,
394
+ "code": "GNF",
395
+ "name_plural": "Guinean francs"
396
+ },
397
+ "GTQ": {
398
+ "symbol": "GTQ",
399
+ "name": "Guatemalan Quetzal",
400
+ "symbol_native": "Q",
401
+ "decimal_digits": 2,
402
+ "rounding": 0,
403
+ "code": "GTQ",
404
+ "name_plural": "Guatemalan quetzals"
405
+ },
406
+ "HKD": {
407
+ "symbol": "HK$",
408
+ "name": "Hong Kong Dollar",
409
+ "symbol_native": "HKD",
410
+ "decimal_digits": 2,
411
+ "rounding": 0,
412
+ "code": "HKD",
413
+ "name_plural": "Hong Kong dollars"
414
+ },
415
+ "HNL": {
416
+ "symbol": "HNL",
417
+ "name": "Honduran Lempira",
418
+ "symbol_native": "L",
419
+ "decimal_digits": 2,
420
+ "rounding": 0,
421
+ "code": "HNL",
422
+ "name_plural": "Honduran lempiras"
423
+ },
424
+ "HRK": {
425
+ "symbol": "kn",
426
+ "name": "Croatian Kuna",
427
+ "symbol_native": "kn",
428
+ "decimal_digits": 2,
429
+ "rounding": 0,
430
+ "code": "HRK",
431
+ "name_plural": "Croatian kunas"
432
+ },
433
+ "HTG": {
434
+ "symbol": "HTG",
435
+ "name": "Haitian gourde",
436
+ "symbol_native": "G",
437
+ "decimal_digits": 2,
438
+ "rounding": 0,
439
+ "code": "HTG",
440
+ "name_plural": "Haitian gourde"
441
+ },
442
+ "HUF": {
443
+ "symbol": "Ft",
444
+ "name": "Hungarian Forint",
445
+ "symbol_native": "Ft",
446
+ "decimal_digits": 0,
447
+ "rounding": 0,
448
+ "code": "HUF",
449
+ "name_plural": "Hungarian forints"
450
+ },
451
+ "IDR": {
452
+ "symbol": "Rp",
453
+ "name": "Indonesian Rupiah",
454
+ "symbol_native": "Rp",
455
+ "decimal_digits": 0,
456
+ "rounding": 0,
457
+ "code": "IDR",
458
+ "name_plural": "Indonesian rupiahs"
459
+ },
460
+ "ILS": {
461
+ "symbol": "₪",
462
+ "name": "Israeli New Sheqel",
463
+ "symbol_native": "₪",
464
+ "decimal_digits": 2,
465
+ "rounding": 0,
466
+ "code": "ILS",
467
+ "name_plural": "Israeli new sheqels"
468
+ },
469
+ "INR": {
470
+ "symbol": "Rs",
471
+ "name": "Indian Rupee",
472
+ "symbol_native": "₹",
473
+ "decimal_digits": 2,
474
+ "rounding": 0,
475
+ "code": "INR",
476
+ "name_plural": "Indian rupees"
477
+ },
478
+ "IQD": {
479
+ "symbol": "IQD",
480
+ "name": "Iraqi Dinar",
481
+ "symbol_native": "د.ع.‏",
482
+ "decimal_digits": 0,
483
+ "rounding": 0,
484
+ "code": "IQD",
485
+ "name_plural": "Iraqi dinars",
486
+ "rtl": true
487
+ },
488
+ "IRR": {
489
+ "symbol": "IRR",
490
+ "name": "Iranian Rial",
491
+ "symbol_native": "﷼",
492
+ "decimal_digits": 0,
493
+ "rounding": 0,
494
+ "code": "IRR",
495
+ "name_plural": "Iranian rials",
496
+ "rtl": true
497
+ },
498
+ "ISK": {
499
+ "symbol": "Ikr",
500
+ "name": "Icelandic Króna",
501
+ "symbol_native": "kr",
502
+ "decimal_digits": 0,
503
+ "rounding": 0,
504
+ "code": "ISK",
505
+ "name_plural": "Icelandic krónur"
506
+ },
507
+ "JMD": {
508
+ "symbol": "J$",
509
+ "name": "Jamaican Dollar",
510
+ "symbol_native": "$",
511
+ "decimal_digits": 2,
512
+ "rounding": 0,
513
+ "code": "JMD",
514
+ "name_plural": "Jamaican dollars"
515
+ },
516
+ "JOD": {
517
+ "symbol": "JD",
518
+ "name": "Jordanian Dinar",
519
+ "symbol_native": "د.أ.‏",
520
+ "decimal_digits": 3,
521
+ "rounding": 0,
522
+ "code": "JOD",
523
+ "name_plural": "Jordanian dinars",
524
+ "rtl": true
525
+ },
526
+ "JPY": {
527
+ "symbol": "¥",
528
+ "name": "Japanese Yen",
529
+ "symbol_native": "¥",
530
+ "decimal_digits": 0,
531
+ "rounding": 0,
532
+ "code": "JPY",
533
+ "name_plural": "Japanese yen"
534
+ },
535
+ "KES": {
536
+ "symbol": "Ksh",
537
+ "name": "Kenyan Shilling",
538
+ "symbol_native": "Ksh",
539
+ "decimal_digits": 2,
540
+ "rounding": 0,
541
+ "code": "KES",
542
+ "name_plural": "Kenyan shillings"
543
+ },
544
+ "KHR": {
545
+ "symbol": "KHR",
546
+ "name": "Cambodian Riel",
547
+ "symbol_native": "KHR",
548
+ "decimal_digits": 2,
549
+ "rounding": 0,
550
+ "code": "KHR",
551
+ "name_plural": "Cambodian riels"
552
+ },
553
+ "KMF": {
554
+ "symbol": "CF",
555
+ "name": "Comorian Franc",
556
+ "symbol_native": "FC",
557
+ "decimal_digits": 0,
558
+ "rounding": 0,
559
+ "code": "KMF",
560
+ "name_plural": "Comorian francs"
561
+ },
562
+ "KRW": {
563
+ "symbol": "₩",
564
+ "name": "Korean Won(₩)",
565
+ "symbol_native": "₩",
566
+ "decimal_digits": 0,
567
+ "rounding": 0,
568
+ "code": "KRW",
569
+ "name_plural": "Korean won"
570
+ },
571
+ "KRW2": {
572
+ "symbol": "원",
573
+ "name": "Korean Won(원)",
574
+ "symbol_native": "원",
575
+ "decimal_digits": 0,
576
+ "rounding": 0,
577
+ "code": "KRW2",
578
+ "name_plural": "Korean won"
579
+ },
580
+ "KWD": {
581
+ "symbol": "KD",
582
+ "name": "Kuwaiti Dinar",
583
+ "symbol_native": "د.ك.‏",
584
+ "decimal_digits": 3,
585
+ "rounding": 0,
586
+ "code": "KWD",
587
+ "name_plural": "Kuwaiti dinars",
588
+ "rtl": true
589
+ },
590
+ "KZT": {
591
+ "symbol": "KZT",
592
+ "name": "Kazakhstani Tenge",
593
+ "symbol_native": "тңг.",
594
+ "decimal_digits": 2,
595
+ "rounding": 0,
596
+ "code": "KZT",
597
+ "name_plural": "Kazakhstani tenges"
598
+ },
599
+ "LBP": {
600
+ "symbol": "LB£",
601
+ "name": "Lebanese Pound",
602
+ "symbol_native": "ل.ل.‏",
603
+ "decimal_digits": 0,
604
+ "rounding": 0,
605
+ "code": "LBP",
606
+ "name_plural": "Lebanese pounds",
607
+ "rtl": true
608
+ },
609
+ "LKR": {
610
+ "symbol": "SLRs",
611
+ "name": "Sri Lankan Rupee",
612
+ "symbol_native": "LKR Rs",
613
+ "decimal_digits": 2,
614
+ "rounding": 0,
615
+ "code": "LKR",
616
+ "name_plural": "Sri Lankan rupees"
617
+ },
618
+ "LTL": {
619
+ "symbol": "Lt",
620
+ "name": "Lithuanian Litas",
621
+ "symbol_native": "Lt",
622
+ "decimal_digits": 2,
623
+ "rounding": 0,
624
+ "code": "LTL",
625
+ "name_plural": "Lithuanian litai"
626
+ },
627
+ "LVL": {
628
+ "symbol": "Ls",
629
+ "name": "Latvian Lats",
630
+ "symbol_native": "Ls",
631
+ "decimal_digits": 2,
632
+ "rounding": 0,
633
+ "code": "LVL",
634
+ "name_plural": "Latvian lati"
635
+ },
636
+ "LYD": {
637
+ "symbol": "LD",
638
+ "name": "Libyan Dinar",
639
+ "symbol_native": "د.ل.‏",
640
+ "decimal_digits": 3,
641
+ "rounding": 0,
642
+ "code": "LYD",
643
+ "name_plural": "Libyan dinars",
644
+ "rtl": true
645
+ },
646
+ "MAD": {
647
+ "symbol": "MAD",
648
+ "name": "Moroccan Dirham",
649
+ "symbol_native": "د.م.‏",
650
+ "decimal_digits": 2,
651
+ "rounding": 0,
652
+ "code": "MAD",
653
+ "name_plural": "Moroccan dirhams",
654
+ "rtl": true
655
+ },
656
+ "MDL": {
657
+ "symbol": "MDL",
658
+ "name": "Moldovan Leu",
659
+ "symbol_native": "MDL",
660
+ "decimal_digits": 2,
661
+ "rounding": 0,
662
+ "code": "MDL",
663
+ "name_plural": "Moldovan lei"
664
+ },
665
+ "MGA": {
666
+ "symbol": "MGA",
667
+ "name": "Malagasy Ariary",
668
+ "symbol_native": "MGA",
669
+ "decimal_digits": 0,
670
+ "rounding": 0,
671
+ "code": "MGA",
672
+ "name_plural": "Malagasy Ariaries"
673
+ },
674
+ "MKD": {
675
+ "symbol": "MKD",
676
+ "name": "Macedonian Denar",
677
+ "symbol_native": "MKD",
678
+ "decimal_digits": 2,
679
+ "rounding": 0,
680
+ "code": "MKD",
681
+ "name_plural": "Macedonian denari"
682
+ },
683
+ "MMK": {
684
+ "symbol": "MMK",
685
+ "name": "Myanma Kyat",
686
+ "symbol_native": "K",
687
+ "decimal_digits": 0,
688
+ "rounding": 0,
689
+ "code": "MMK",
690
+ "name_plural": "Myanma kyats"
691
+ },
692
+ "MOP": {
693
+ "symbol": "MOP$",
694
+ "name": "Macanese Pataca",
695
+ "symbol_native": "MOP$",
696
+ "decimal_digits": 2,
697
+ "rounding": 0,
698
+ "code": "MOP",
699
+ "name_plural": "Macanese patacas"
700
+ },
701
+ "MUR": {
702
+ "symbol": "MURs",
703
+ "name": "Mauritian Rupee",
704
+ "symbol_native": "MURs",
705
+ "decimal_digits": 0,
706
+ "rounding": 0,
707
+ "code": "MUR",
708
+ "name_plural": "Mauritian rupees"
709
+ },
710
+ "MXN": {
711
+ "symbol": "MX$",
712
+ "name": "Mexican Peso",
713
+ "symbol_native": "$",
714
+ "decimal_digits": 2,
715
+ "rounding": 0,
716
+ "code": "MXN",
717
+ "name_plural": "Mexican pesos"
718
+ },
719
+ "MVR": {
720
+ "symbol": "MVR",
721
+ "name": "Maldivian rufiyaa",
722
+ "symbol_native": "MVR",
723
+ "decimal_digits": 2,
724
+ "rounding": 0,
725
+ "code": "MVR",
726
+ "name_plural": "Maldivian rufiyaas"
727
+ },
728
+ "MYR": {
729
+ "symbol": "RM",
730
+ "name": "Malaysian Ringgit",
731
+ "symbol_native": "RM",
732
+ "decimal_digits": 2,
733
+ "rounding": 0,
734
+ "code": "MYR",
735
+ "name_plural": "Malaysian ringgits"
736
+ },
737
+ "MZN": {
738
+ "symbol": "MTn",
739
+ "name": "Mozambican Metical",
740
+ "symbol_native": "MTn",
741
+ "decimal_digits": 2,
742
+ "rounding": 0,
743
+ "code": "MZN",
744
+ "name_plural": "Mozambican meticals"
745
+ },
746
+ "NAD": {
747
+ "symbol": "N$",
748
+ "name": "Namibian Dollar",
749
+ "symbol_native": "N$",
750
+ "decimal_digits": 2,
751
+ "rounding": 0,
752
+ "code": "NAD",
753
+ "name_plural": "Namibian dollars"
754
+ },
755
+ "NGN": {
756
+ "symbol": "₦",
757
+ "name": "Nigerian Naira",
758
+ "symbol_native": "₦",
759
+ "decimal_digits": 2,
760
+ "rounding": 0,
761
+ "code": "NGN",
762
+ "name_plural": "Nigerian nairas"
763
+ },
764
+ "NIO": {
765
+ "symbol": "C$",
766
+ "name": "Nicaraguan Córdoba",
767
+ "symbol_native": "C$",
768
+ "decimal_digits": 2,
769
+ "rounding": 0,
770
+ "code": "NIO",
771
+ "name_plural": "Nicaraguan córdobas"
772
+ },
773
+ "NOK": {
774
+ "symbol": "Nkr",
775
+ "name": "Norwegian Krone",
776
+ "symbol_native": "kr",
777
+ "decimal_digits": 2,
778
+ "rounding": 0,
779
+ "code": "NOK",
780
+ "name_plural": "Norwegian kroner"
781
+ },
782
+ "NPR": {
783
+ "symbol": "NPRs",
784
+ "name": "Nepalese Rupee",
785
+ "symbol_native": "NPRs",
786
+ "decimal_digits": 2,
787
+ "rounding": 0,
788
+ "code": "NPR",
789
+ "name_plural": "Nepalese rupees"
790
+ },
791
+ "NZD": {
792
+ "symbol": "NZ$",
793
+ "name": "New Zealand Dollar",
794
+ "symbol_native": "$",
795
+ "decimal_digits": 2,
796
+ "rounding": 0,
797
+ "code": "NZD",
798
+ "name_plural": "New Zealand dollars"
799
+ },
800
+ "OMR": {
801
+ "symbol": "OMR",
802
+ "name": "Omani Rial",
803
+ "symbol_native": "OMR",
804
+ "decimal_digits": 3,
805
+ "rounding": 0,
806
+ "code": "OMR",
807
+ "name_plural": "Omani rials"
808
+ },
809
+ "PAB": {
810
+ "symbol": "B/.",
811
+ "name": "Panamanian Balboa",
812
+ "symbol_native": "B/.",
813
+ "decimal_digits": 2,
814
+ "rounding": 0,
815
+ "code": "PAB",
816
+ "name_plural": "Panamanian balboas"
817
+ },
818
+ "PEN": {
819
+ "symbol": "S/.",
820
+ "name": "Peruvian Nuevo Sol",
821
+ "symbol_native": "S/.",
822
+ "decimal_digits": 2,
823
+ "rounding": 0,
824
+ "code": "PEN",
825
+ "name_plural": "Peruvian nuevos soles"
826
+ },
827
+ "PGK": {
828
+ "symbol": "K",
829
+ "name": "Papua New Guinea Kina",
830
+ "symbol_native": "K",
831
+ "decimal_digits": 2,
832
+ "rounding": 0,
833
+ "code": "PGK",
834
+ "name_plural": "Papua New Guinea Kina"
835
+ },
836
+ "PHP": {
837
+ "symbol": "₱",
838
+ "name": "Philippine Peso",
839
+ "symbol_native": "₱",
840
+ "decimal_digits": 2,
841
+ "rounding": 0,
842
+ "code": "PHP",
843
+ "name_plural": "Philippine pesos"
844
+ },
845
+ "PKR": {
846
+ "symbol": "PKRs",
847
+ "name": "Pakistani Rupee",
848
+ "symbol_native": "₨",
849
+ "decimal_digits": 0,
850
+ "rounding": 0,
851
+ "code": "PKR",
852
+ "name_plural": "Pakistani rupees"
853
+ },
854
+ "PLN": {
855
+ "symbol": "zł",
856
+ "name": "Polish Zloty",
857
+ "symbol_native": "zł",
858
+ "decimal_digits": 2,
859
+ "rounding": 0,
860
+ "code": "PLN",
861
+ "name_plural": "Polish zlotys"
862
+ },
863
+ "PYG": {
864
+ "symbol": "₲",
865
+ "name": "Paraguayan Guarani",
866
+ "symbol_native": "₲",
867
+ "decimal_digits": 0,
868
+ "rounding": 0,
869
+ "code": "PYG",
870
+ "name_plural": "Paraguayan guaranis"
871
+ },
872
+ "QAR": {
873
+ "symbol": "QR",
874
+ "name": "Qatari Rial",
875
+ "symbol_native": "ر.ق.‏",
876
+ "decimal_digits": 2,
877
+ "rounding": 0,
878
+ "code": "QAR",
879
+ "name_plural": "Qatari rials",
880
+ "rtl": true
881
+ },
882
+ "RON": {
883
+ "symbol": "lei",
884
+ "name": "Romanian Leu",
885
+ "symbol_native": "lei",
886
+ "decimal_digits": 2,
887
+ "rounding": 0,
888
+ "code": "RON",
889
+ "name_plural": "Romanian lei"
890
+ },
891
+ "RSD": {
892
+ "symbol": "din.",
893
+ "name": "Serbian Dinar",
894
+ "symbol_native": "дин.",
895
+ "decimal_digits": 2,
896
+ "rounding": 0,
897
+ "code": "RSD",
898
+ "name_plural": "Serbian dinars"
899
+ },
900
+ "RUB": {
901
+ "symbol": "RUB",
902
+ "name": "Russian Ruble",
903
+ "symbol_native": "руб.",
904
+ "decimal_digits": 2,
905
+ "rounding": 0,
906
+ "code": "RUB",
907
+ "name_plural": "Russian rubles"
908
+ },
909
+ "RWF": {
910
+ "symbol": "RWF",
911
+ "name": "Rwandan Franc",
912
+ "symbol_native": "FR",
913
+ "decimal_digits": 0,
914
+ "rounding": 0,
915
+ "code": "RWF",
916
+ "name_plural": "Rwandan francs"
917
+ },
918
+ "SAR": {
919
+ "symbol": "SR",
920
+ "name": "Saudi Riyal",
921
+ "symbol_native": "ر.س.‏",
922
+ "decimal_digits": 2,
923
+ "rounding": 0,
924
+ "code": "SAR",
925
+ "name_plural": "Saudi riyals",
926
+ "rtl": true
927
+ },
928
+ "SDG": {
929
+ "symbol": "SDG",
930
+ "name": "Sudanese Pound",
931
+ "symbol_native": "SDG",
932
+ "decimal_digits": 2,
933
+ "rounding": 0,
934
+ "code": "SDG",
935
+ "name_plural": "Sudanese pounds"
936
+ },
937
+ "SEK": {
938
+ "symbol": "Skr",
939
+ "name": "Swedish Krona",
940
+ "symbol_native": "kr",
941
+ "decimal_digits": 2,
942
+ "rounding": 0,
943
+ "code": "SEK",
944
+ "name_plural": "Swedish kronor"
945
+ },
946
+ "SGD": {
947
+ "symbol": "S$",
948
+ "name": "Singapore Dollar",
949
+ "symbol_native": "$",
950
+ "decimal_digits": 2,
951
+ "rounding": 0,
952
+ "code": "SGD",
953
+ "name_plural": "Singapore dollars"
954
+ },
955
+ "SLL": {
956
+ "symbol": "SLL",
957
+ "name": "Sierra Leonean Leone",
958
+ "symbol_native": "SLL",
959
+ "decimal_digits": 2,
960
+ "rounding": 0,
961
+ "code": "SLL",
962
+ "name_plural": "Sierra Leonean Leones"
963
+ },
964
+ "SOS": {
965
+ "symbol": "Ssh",
966
+ "name": "Somali Shilling",
967
+ "symbol_native": "Ssh",
968
+ "decimal_digits": 0,
969
+ "rounding": 0,
970
+ "code": "SOS",
971
+ "name_plural": "Somali shillings"
972
+ },
973
+ "SRD": {
974
+ "symbol": "SRD",
975
+ "name": "Surinamese dollar",
976
+ "symbol_native": "SRD",
977
+ "decimal_digits": 0,
978
+ "rounding": 0,
979
+ "code": "SRD",
980
+ "name_plural": "Surinamese dollars"
981
+ },
982
+ "SYP": {
983
+ "symbol": "SY£",
984
+ "name": "Syrian Pound",
985
+ "symbol_native": "ل.س.‏",
986
+ "decimal_digits": 0,
987
+ "rounding": 0,
988
+ "code": "SYP",
989
+ "name_plural": "Syrian pounds",
990
+ "rtl": true
991
+ },
992
+ "THB": {
993
+ "symbol": "฿",
994
+ "name": "Thai Baht",
995
+ "symbol_native": "฿",
996
+ "decimal_digits": 2,
997
+ "rounding": 0,
998
+ "code": "THB",
999
+ "name_plural": "Thai baht"
1000
+ },
1001
+ "TND": {
1002
+ "symbol": "DT",
1003
+ "name": "Tunisian Dinar",
1004
+ "symbol_native1": "د.ت.‏",
1005
+ "symbol_native": "TND",
1006
+ "decimal_digits": 3,
1007
+ "rounding": 0,
1008
+ "code": "TND",
1009
+ "name_plural": "Tunisian dinars"
1010
+ },
1011
+ "TOP": {
1012
+ "symbol": "T$",
1013
+ "name": "Tongan Paʻanga",
1014
+ "symbol_native": "T$",
1015
+ "decimal_digits": 2,
1016
+ "rounding": 0,
1017
+ "code": "TOP",
1018
+ "name_plural": "Tongan paʻanga"
1019
+ },
1020
+ "TRY": {
1021
+ "symbol": "TL",
1022
+ "name": "Turkish Lira",
1023
+ "symbol_native": "TL",
1024
+ "decimal_digits": 2,
1025
+ "rounding": 0,
1026
+ "code": "TRY",
1027
+ "name_plural": "Turkish Lira"
1028
+ },
1029
+ "TTD": {
1030
+ "symbol": "TT$",
1031
+ "name": "Trinidad and Tobago Dollar",
1032
+ "symbol_native": "$",
1033
+ "decimal_digits": 2,
1034
+ "rounding": 0,
1035
+ "code": "TTD",
1036
+ "name_plural": "Trinidad and Tobago dollars"
1037
+ },
1038
+ "TWD": {
1039
+ "symbol": "NT$",
1040
+ "name": "New Taiwan Dollar",
1041
+ "symbol_native": "NT$",
1042
+ "decimal_digits": 2,
1043
+ "rounding": 0,
1044
+ "code": "TWD",
1045
+ "name_plural": "New Taiwan dollars"
1046
+ },
1047
+ "TZS": {
1048
+ "symbol": "TSh",
1049
+ "name": "Tanzanian Shilling",
1050
+ "symbol_native": "TSh",
1051
+ "decimal_digits": 0,
1052
+ "rounding": 0,
1053
+ "code": "TZS",
1054
+ "name_plural": "Tanzanian shillings"
1055
+ },
1056
+ "UAH": {
1057
+ "symbol": "₴",
1058
+ "name": "Ukrainian Hryvnia",
1059
+ "symbol_native": "₴",
1060
+ "decimal_digits": 2,
1061
+ "rounding": 0,
1062
+ "code": "UAH",
1063
+ "name_plural": "Ukrainian hryvnias"
1064
+ },
1065
+ "UGX": {
1066
+ "symbol": "USh",
1067
+ "name": "Ugandan Shilling",
1068
+ "symbol_native": "USh",
1069
+ "decimal_digits": 0,
1070
+ "rounding": 0,
1071
+ "code": "UGX",
1072
+ "name_plural": "Ugandan shillings"
1073
+ },
1074
+ "USD": {
1075
+ "symbol": "US$",
1076
+ "name": "US Dollar",
1077
+ "symbol_native": "$",
1078
+ "decimal_digits": 2,
1079
+ "rounding": 0,
1080
+ "code": "USD",
1081
+ "name_plural": "US dollars"
1082
+ },
1083
+ "UYU": {
1084
+ "symbol": "$U",
1085
+ "name": "Uruguayan Peso",
1086
+ "symbol_native": "$",
1087
+ "decimal_digits": 2,
1088
+ "rounding": 0,
1089
+ "code": "UYU",
1090
+ "name_plural": "Uruguayan pesos"
1091
+ },
1092
+ "UZS": {
1093
+ "symbol": "UZS",
1094
+ "name": "Uzbekistan Som",
1095
+ "symbol_native": "UZS",
1096
+ "decimal_digits": 0,
1097
+ "rounding": 0,
1098
+ "code": "UZS",
1099
+ "name_plural": "Uzbekistan som"
1100
+ },
1101
+ "VEF": {
1102
+ "symbol": "Bs.F.",
1103
+ "name": "Venezuelan Bolívar",
1104
+ "symbol_native": "Bs.F.",
1105
+ "decimal_digits": 2,
1106
+ "rounding": 0,
1107
+ "code": "VEF",
1108
+ "name_plural": "Venezuelan bolívars"
1109
+ },
1110
+ "VES": {
1111
+ "symbol": "VES",
1112
+ "name": "Bolívar Soberano",
1113
+ "symbol_native": "Bs.S ",
1114
+ "decimal_digits": 2,
1115
+ "rounding": 0,
1116
+ "code": "VES",
1117
+ "name_plural": "Bolívares Soberanos"
1118
+ },
1119
+ "VND": {
1120
+ "symbol": "Dong",
1121
+ "name": "Vietnamese Dong",
1122
+ "symbol_native": "Dong",
1123
+ "decimal_digits": 0,
1124
+ "rounding": 0,
1125
+ "code": "VND",
1126
+ "name_plural": "Vietnamese dong"
1127
+ },
1128
+ "XAF": {
1129
+ "symbol": "FCFA",
1130
+ "name": "CFA Franc BEAC",
1131
+ "symbol_native": "FCFA",
1132
+ "decimal_digits": 0,
1133
+ "rounding": 0,
1134
+ "code": "XAF",
1135
+ "name_plural": "CFA francs BEAC"
1136
+ },
1137
+ "XCD": {
1138
+ "symbol": "XCD$",
1139
+ "name": "East Caribbean Dollar",
1140
+ "symbol_native": "$",
1141
+ "decimal_digits": 2,
1142
+ "rounding": 0,
1143
+ "code": "XCD",
1144
+ "name_plural": "East Caribbean Dollars"
1145
+ },
1146
+ "XOF": {
1147
+ "symbol": "CFA",
1148
+ "name": "CFA Franc BCEAO",
1149
+ "symbol_native": "CFA",
1150
+ "decimal_digits": 0,
1151
+ "rounding": 0,
1152
+ "code": "XOF",
1153
+ "name_plural": "CFA francs BCEAO"
1154
+ },
1155
+ "XPF": {
1156
+ "symbol": "XPF",
1157
+ "name": "Central Pacific Franc",
1158
+ "symbol_native": "F",
1159
+ "decimal_digits": 2,
1160
+ "rounding": 0,
1161
+ "code": "XPF",
1162
+ "name_plural": "Central Pacific Franc"
1163
+ },
1164
+ "YER": {
1165
+ "symbol": "YR",
1166
+ "name": "Yemeni Rial",
1167
+ "symbol_native": "ر.ي.‏",
1168
+ "decimal_digits": 0,
1169
+ "rounding": 0,
1170
+ "code": "YER",
1171
+ "name_plural": "Yemeni rials",
1172
+ "rtl": true
1173
+ },
1174
+ "ZAR": {
1175
+ "symbol": "R",
1176
+ "name": "South African Rand",
1177
+ "symbol_native": "R",
1178
+ "decimal_digits": 2,
1179
+ "rounding": 0,
1180
+ "code": "ZAR",
1181
+ "name_plural": "South African rand"
1182
+ },
1183
+ "ZMK": {
1184
+ "symbol": "ZK",
1185
+ "name": "Zambian Kwacha",
1186
+ "symbol_native": "ZK",
1187
+ "decimal_digits": 0,
1188
+ "rounding": 0,
1189
+ "code": "ZMK",
1190
+ "name_plural": "Zambian kwachas"
1191
+ }
1192
+ };
1193
+
1194
+ var numberFormat = {
1195
+ "am": {
1196
+ "decimal": ".",
1197
+ "group": ",",
1198
+ "format": "$$###",
1199
+ "currency": "AMD"
1200
+ },
1201
+ "ar": {
1202
+ "decimal": ".",
1203
+ "group": ",",
1204
+ "format": "$$ ###",
1205
+ "currency": "ARS"
1206
+ },
1207
+ "bg": {
1208
+ "decimal": ",",
1209
+ "group": " ",
1210
+ "format": "### $$",
1211
+ "currency": "BGN"
1212
+ },
1213
+ "bn": {
1214
+ "decimal": ".",
1215
+ "group": ",",
1216
+ "format": "###$$",
1217
+ "currency": "BND"
1218
+ },
1219
+ "ca": {
1220
+ "decimal": ",",
1221
+ "group": ".",
1222
+ "format": "### $$",
1223
+ "currency": "CAD"
1224
+ },
1225
+ "cs": {
1226
+ "decimal": ",",
1227
+ "group": " ",
1228
+ "format": "### $$",
1229
+ "currency": "EUR"
1230
+ },
1231
+ "da": {
1232
+ "decimal": ",",
1233
+ "group": ".",
1234
+ "format": "### $$",
1235
+ "currency": "DKK"
1236
+ },
1237
+ "de": {
1238
+ "decimal": ",",
1239
+ "group": ".",
1240
+ "format": "### $$",
1241
+ "currency": ""
1242
+ },
1243
+ "el": {
1244
+ "decimal": ",",
1245
+ "group": ".",
1246
+ "format": "### $$",
1247
+ "currency": ""
1248
+ },
1249
+ "en": {
1250
+ "decimal": ".",
1251
+ "group": ",",
1252
+ "format": "$$###",
1253
+ "currency": ""
1254
+ },
1255
+ "en-GB": {
1256
+ "decimal": ".",
1257
+ "group": ",",
1258
+ "format": "$$###",
1259
+ "currency": ""
1260
+ },
1261
+ "es": {
1262
+ "decimal": ",",
1263
+ "group": ".",
1264
+ "format": "### $$",
1265
+ "currency": ""
1266
+ },
1267
+ "es-419": {
1268
+ "decimal": ".",
1269
+ "group": ",",
1270
+ "format": "$$###",
1271
+ "currency": ""
1272
+ },
1273
+ "et": {
1274
+ "decimal": ",",
1275
+ "group": " ",
1276
+ "format": "### $$",
1277
+ "currency": ""
1278
+ },
1279
+ "fa": {
1280
+ "decimal": ".",
1281
+ "group": ",",
1282
+ "format": "‎$$ ###",
1283
+ "currency": ""
1284
+ },
1285
+ "fi": {
1286
+ "decimal": ",",
1287
+ "group": " ",
1288
+ "format": "### $$",
1289
+ "currency": ""
1290
+ },
1291
+ "fil": {
1292
+ "decimal": ".",
1293
+ "group": ",",
1294
+ "format": "$$###",
1295
+ "currency": ""
1296
+ },
1297
+ "fr": {
1298
+ "decimal": ",",
1299
+ "group": " ",
1300
+ "format": "### $$",
1301
+ "currency": ""
1302
+ },
1303
+ "he": {
1304
+ "decimal": ".",
1305
+ "group": ",",
1306
+ "format": "### $$",
1307
+ "currency": ""
1308
+ },
1309
+ "hi": {
1310
+ "decimal": ".",
1311
+ "group": ",",
1312
+ "format": "$$###",
1313
+ "currency": ""
1314
+ },
1315
+ "hr": {
1316
+ "decimal": ",",
1317
+ "group": ".",
1318
+ "format": "### $$",
1319
+ "currency": ""
1320
+ },
1321
+ "gu": {
1322
+ "decimal": ".",
1323
+ "group": ",",
1324
+ "format": "$$###",
1325
+ "currency": ""
1326
+ },
1327
+ "hu": {
1328
+ "decimal": ",",
1329
+ "group": " ",
1330
+ "format": "### $$",
1331
+ "currency": ""
1332
+ },
1333
+ "id": {
1334
+ "decimal": ",",
1335
+ "group": ".",
1336
+ "format": "$$###",
1337
+ "currency": ""
1338
+ },
1339
+ "it": {
1340
+ "decimal": ",",
1341
+ "group": ".",
1342
+ "format": "### $$",
1343
+ "currency": ""
1344
+ },
1345
+ "ja": {
1346
+ "decimal": ".",
1347
+ "group": ",",
1348
+ "format": "$$###",
1349
+ "currency": ""
1350
+ },
1351
+ "kn": {
1352
+ "decimal": ".",
1353
+ "group": ",",
1354
+ "format": "$$###",
1355
+ "currency": ""
1356
+ },
1357
+ "ko": {
1358
+ "decimal": ".",
1359
+ "group": ",",
1360
+ "format": "$$###",
1361
+ "currency": ""
1362
+ },
1363
+ "lv": {
1364
+ "decimal": ",",
1365
+ "group": " ",
1366
+ "format": "### $$",
1367
+ "currency": ""
1368
+ },
1369
+ "lt": {
1370
+ "decimal": ",",
1371
+ "group": " ",
1372
+ "format": "### $$",
1373
+ "currency": ""
1374
+ },
1375
+ "ml": {
1376
+ "decimal": ".",
1377
+ "group": ",",
1378
+ "format": "$$###",
1379
+ "currency": ""
1380
+ },
1381
+ "mr": {
1382
+ "decimal": ".",
1383
+ "group": ",",
1384
+ "format": "$$###",
1385
+ "currency": ""
1386
+ },
1387
+ "ms": {
1388
+ "decimal": ".",
1389
+ "group": ",",
1390
+ "format": "$$###",
1391
+ "currency": ""
1392
+ },
1393
+ "nb": {
1394
+ "decimal": ",",
1395
+ "group": " ",
1396
+ "format": "$$ ###",
1397
+ "currency": ""
1398
+ },
1399
+ "nl": {
1400
+ "decimal": ",",
1401
+ "group": ".",
1402
+ "format": "$$ ###",
1403
+ "currency": ""
1404
+ },
1405
+ "pt": {
1406
+ "decimal": ",",
1407
+ "group": ".",
1408
+ "format": "$$ ###",
1409
+ "currency": ""
1410
+ },
1411
+ "pl": {
1412
+ "decimal": ",",
1413
+ "group": " ",
1414
+ "format": "### $$",
1415
+ "currency": ""
1416
+ },
1417
+ "pt-PT": {
1418
+ "decimal": ",",
1419
+ "group": " ",
1420
+ "format": "### $$",
1421
+ "currency": ""
1422
+ },
1423
+ "ro": {
1424
+ "decimal": ",",
1425
+ "group": ".",
1426
+ "format": "### $$",
1427
+ "currency": ""
1428
+ },
1429
+ "ru": {
1430
+ "decimal": ",",
1431
+ "group": " ",
1432
+ "format": "### $$",
1433
+ "currency": ""
1434
+ },
1435
+ "sk": {
1436
+ "decimal": ",",
1437
+ "group": " ",
1438
+ "format": "### $$",
1439
+ "currency": ""
1440
+ },
1441
+ "sl": {
1442
+ "decimal": ",",
1443
+ "group": ".",
1444
+ "format": "### $$",
1445
+ "currency": ""
1446
+ },
1447
+ "sr": {
1448
+ "decimal": ",",
1449
+ "group": ".",
1450
+ "format": "### $$",
1451
+ "currency": ""
1452
+ },
1453
+ "sv": {
1454
+ "decimal": ",",
1455
+ "group": " ",
1456
+ "format": "### $$",
1457
+ "currency": ""
1458
+ },
1459
+ "sw": {
1460
+ "decimal": ".",
1461
+ "group": ",",
1462
+ "format": "$$###",
1463
+ "currency": ""
1464
+ },
1465
+ "ta": {
1466
+ "decimal": ".",
1467
+ "group": ",",
1468
+ "format": "$$ ###",
1469
+ "currency": ""
1470
+ },
1471
+ "te": {
1472
+ "decimal": ".",
1473
+ "group": ",",
1474
+ "format": "$$###",
1475
+ "currency": ""
1476
+ },
1477
+ "th": {
1478
+ "decimal": ".",
1479
+ "group": ",",
1480
+ "format": "$$###",
1481
+ "currency": ""
1482
+ },
1483
+ "tr": {
1484
+ "decimal": ",",
1485
+ "group": ".",
1486
+ "format": "$$###",
1487
+ "currency": ""
1488
+ },
1489
+ "uk": {
1490
+ "decimal": ",",
1491
+ "group": " ",
1492
+ "format": "### $$",
1493
+ "currency": ""
1494
+ },
1495
+ "vi": {
1496
+ "decimal": ",",
1497
+ "group": ".",
1498
+ "format": "### $$",
1499
+ "currency": ""
1500
+ },
1501
+ "zh-Hans": {
1502
+ "decimal": ".",
1503
+ "group": ",",
1504
+ "format": "$$###",
1505
+ "currency": ""
1506
+ },
1507
+ "zh": {
1508
+ "decimal": ".",
1509
+ "group": ",",
1510
+ "format": "$$###",
1511
+ "currency": ""
1512
+ },
1513
+ "zh-Hant": {
1514
+ "decimal": ".",
1515
+ "group": ",",
1516
+ "format": "$$###",
1517
+ "currency": ""
1518
+ },
1519
+ "c_1": {
1520
+ "decimal": ".",
1521
+ "group": ",",
1522
+ "format": "$$###",
1523
+ "currency": ""
1524
+ },
1525
+ "c_2": {
1526
+ "decimal": ".",
1527
+ "group": ",",
1528
+ "format": "$$ ###",
1529
+ "currency": ""
1530
+ },
1531
+ "c_3": {
1532
+ "decimal": ",",
1533
+ "group": ".",
1534
+ "format": "### $$",
1535
+ "currency": ""
1536
+ },
1537
+ "c_4": {
1538
+ "decimal": ",",
1539
+ "group": " ",
1540
+ "format": "### $$",
1541
+ "currency": ""
1542
+ }
1543
+ };
1544
+
1545
+ Number.prototype.formatMoney = function (c, d, t) {
1546
+ var n = this,
1547
+ c = isNaN(c = Math.abs(c)) ? 2 : c,
1548
+ d = d == undefined ? "." : d,
1549
+ t = t == undefined ? "," : t,
1550
+ s = n < 0 ? "-" : "",
1551
+ i = String(parseInt(n = Math.abs(Number(n) || 0).toFixed(c))),
1552
+ j = (j = i.length) > 3 ? j % 3 : 0;
1553
+ return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
1554
+ };
1555
+
1556
+ var currencyFormat = function currencyFormat(value, currency, lang, cFormat, rtl, removeDecimal, showLongSymbol) {
1557
+ var currencyName = currency || "USD";
1558
+
1559
+ if (!currencies[currencyName]) {
1560
+ currencyName = "USD";
1561
+ }
1562
+
1563
+ var symbol = currency === "none" ? "" : currencies[currencyName][showLongSymbol ? "symbol" : "symbol_native"];
1564
+ var decimal = removeDecimal ? 0 : currencies[currencyName].decimal_digits;
1565
+ var language = lang || "en";
1566
+ language = language.substring(0, 2);
1567
+ var numberFormatObj = cFormat ? "c_" + cFormat.toString() : language;
1568
+
1569
+ if (!numberFormat[numberFormatObj]) {
1570
+ numberFormatObj = "c_1";
1571
+ }
1572
+
1573
+ var format = numberFormat[numberFormatObj];
1574
+ var formattedValue = parseFloat(value).formatMoney(decimal, format.decimal, format.group);
1575
+
1576
+ if (rtl && currencies[currencyName].rtl) {
1577
+ formattedValue = formattedValue.split("").reverse().join("");
1578
+ }
1579
+
1580
+ formattedValue = format.format.replace("###", formattedValue);
1581
+ formattedValue = formattedValue.replace("$$", symbol);
1582
+ return formattedValue;
1583
+ };
1584
+ var FormatCurrency = function FormatCurrency(value, currency, language, cFormat) {
1585
+ return currencyFormat(value, currency, language, cFormat);
1586
+ };
1587
+
1588
+ var nl2br = function nl2br(str, is_xhtml) {
1589
+ if (typeof str === "undefined" || str === null) {
1590
+ return "";
1591
+ }
1592
+
1593
+ var breakTag = is_xhtml || typeof is_xhtml === "undefined" ? "<br />" : "<br>";
1594
+ return (str + "").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, "$1" + breakTag + "$2");
1595
+ };
1596
+
1597
+ var PreviewDocument = function PreviewDocument(_ref) {
1598
+ var previewDocument = _ref.invoice,
1599
+ documentDefinitions = _ref.documentDefinitions;
1600
+ var lang = {};
1601
+
1602
+ var _useState = useState(null),
1603
+ company = _useState[0],
1604
+ setCompany = _useState[1];
1605
+
1606
+ var _useState2 = useState(null),
1607
+ document = _useState2[0],
1608
+ setDocument = _useState2[1];
1609
+
1610
+ var _useState3 = useState(null),
1611
+ logoBase64 = _useState3[0],
1612
+ setLogoBase64 = _useState3[1];
1613
+
1614
+ var _useState4 = useState(null),
1615
+ attachments = _useState4[0],
1616
+ setAttachments = _useState4[1];
1617
+
1618
+ var _useState5 = useState(null),
1619
+ customerSignBase64 = _useState5[0],
1620
+ setCustomerSignBase64 = _useState5[1];
1621
+
1622
+ var _useState6 = useState(null),
1623
+ signatureBase64 = _useState6[0],
1624
+ setSignatureBase64 = _useState6[1];
1625
+
1626
+ useEffect(function () {
1627
+ if (previewDocument != null) {
1628
+ setCompany(previewDocument.company);
1629
+ setDocument(previewDocument.document);
1630
+ setLogoBase64(previewDocument.logoBase64);
1631
+ setAttachments(previewDocument.attachments);
1632
+ setCustomerSignBase64(previewDocument.customerSignBase64);
1633
+ setSignatureBase64(previewDocument.signatureBase64);
1634
+ }
1635
+ }, [previewDocument]);
1636
+
1637
+ if (!company || !document || !document.customer || !document.items) {
1638
+ return false;
1639
+ }
1640
+
1641
+ var formatDate = function formatDate(date) {
1642
+ return Moment(date).format(company.dateFormat === 1 ? 'D/MM/YYYY' : company.dateFormat === 3 ? 'MM/D/YYYY' : company.dateFormat === 4 ? 'YYYY/MM/DD' : 'MMM DD, YYYY');
1643
+ };
1644
+
1645
+ var convertTypeIntoVal = function convertTypeIntoVal(type) {
1646
+ switch (type) {
1647
+ case 'estimate':
1648
+ return 0;
1649
+
1650
+ case 'invoice':
1651
+ return 1;
1652
+
1653
+ default:
1654
+ return 1;
1655
+ }
1656
+ };
1657
+
1658
+ var documentName;
1659
+
1660
+ if (company.doc && company.doc[convertTypeIntoVal(document.type)] && company.doc[convertTypeIntoVal(document.type)].n) {
1661
+ documentName = company.doc[convertTypeIntoVal(document.type)].n;
1662
+ } else {
1663
+ documentName = documentDefinitions[document.type].name;
1664
+ }
1665
+
1666
+ var businessNumberName = company.businessNumber ? company.businessNumber : 'Tax no.';
1667
+ var companyAddress = {
1668
+ address1: company && (company.address && company.address.address1 || company.address1) || null,
1669
+ address2: company && (company.address && company.address.address2 || company.address2) || null,
1670
+ address3: company && (company.address && company.address.address3 || company.address3) || null,
1671
+ city: company && company.address && company.address.city || null,
1672
+ state: company && company.address && company.address.state || null,
1673
+ zip: company && company.address && company.address.zip || null,
1674
+ country: company && company.address && company.address.country || null
1675
+ };
1676
+ var customer = document.customer;
1677
+ var customerAddress = {
1678
+ address1: customer && (customer.address && customer.address.address1 || customer.address1) || null,
1679
+ address2: customer && (customer.address && customer.address.address2 || customer.address2) || null,
1680
+ address3: customer && (customer.address && customer.address.address3 || customer.address3) || null,
1681
+ city: customer && customer.address && customer.address.city || null,
1682
+ state: customer && customer.address && customer.address.state || null,
1683
+ zip: customer && customer.address && customer.address.zip || null,
1684
+ country: customer && customer.address && customer.address.country || null
1685
+ };
1686
+ var customerShippingAddress = {
1687
+ address1: customer && (customer.shippingAddress && customer.shippingAddress.address1 || customer.shippingAddress1) || null,
1688
+ address2: customer && (customer.shippingAddress && customer.shippingAddress.address2 || customer.shippingAddress2) || null,
1689
+ address3: customer && (customer.shippingAddress && customer.shippingAddress.address3 || customer.shippingAddress3) || null,
1690
+ city: customer && customer.shippingAddress && customer.shippingAddress.city || null,
1691
+ state: customer && customer.shippingAddress && customer.shippingAddress.state || null,
1692
+ zip: customer && customer.shippingAddress && customer.shippingAddress.zip || null,
1693
+ country: customer && customer.shippingAddress && customer.shippingAddress.country || null
1694
+ };
1695
+ var shippingAddressExists = customerShippingAddress.address1 || customerShippingAddress.address2 || customerShippingAddress.address3 || customerShippingAddress.city || customerShippingAddress.state || customerShippingAddress.zip || document.shippingInfo;
1696
+ var invoiceDate = formatDate(document.date);
1697
+ var dueDate = new Date(document.date);
1698
+ dueDate.setDate(dueDate.getDate() + parseInt(document.dueIn));
1699
+ var invoiceDue = formatDate(dueDate);
1700
+ var taxPercent1 = document.taxPercentage ? parseFloat(document.taxPercentage) : 0;
1701
+ var taxPercent2 = document.taxPercentage2 ? parseFloat(document.taxPercentage2) : 0;
1702
+ var discountOnItem = false;
1703
+ document.items.map(function (item, i) {
1704
+ if (item.discount && item.discount > 0) {
1705
+ discountOnItem = true;
1706
+ }
1707
+
1708
+ if (taxPercent1 > 0 && item.taxAmount) {
1709
+ if (document.taxInclusive && !document.taxDeductible) {
1710
+ var totalTaxRate;
1711
+
1712
+ if (document.twoTaxes && !document.taxDeductible2) {
1713
+ totalTaxRate = taxPercent1 + taxPercent2;
1714
+ } else {
1715
+ totalTaxRate = taxPercent1;
1716
+ }
1717
+
1718
+ document.items[i].taxAmount1 = item.total * (1 - 1 / (1 + totalTaxRate / 100)) * (taxPercent1 / totalTaxRate);
1719
+ } else {
1720
+ document.items[i].taxAmount1 = item.total * taxPercent1 / 100;
1721
+ }
1722
+ }
1723
+
1724
+ if (document.ttx && taxPercent2 > 0 && item.tax2) {
1725
+ if (document.taxInclusive && !document.taxDeductible2) {
1726
+ var _totalTaxRate = taxPercent1 + taxPercent2;
1727
+
1728
+ document.items[i].taxAmount2 = item.total * (1 - 1 / (1 + _totalTaxRate / 100)) * (taxPercent2 / _totalTaxRate);
1729
+ } else {
1730
+ document.items[i].taxAmount2 = item.total * taxPercent2 / 100;
1731
+ }
1732
+ }
1733
+ });
1734
+ var taxName1;
1735
+ var taxIncluded1;
1736
+ var taxName2;
1737
+ var taxIncluded2;
1738
+ var paymentLabel;
1739
+
1740
+ if (document.tx != 0) {
1741
+ taxName1 = document.taxName ? document.taxName : 'Tax';
1742
+ taxIncluded1 = document.taxInclusive ? ' ' + (company.template.included ? company.template.included : 'included') : ' ';
1743
+ }
1744
+
1745
+ if (document.tax2 != 0) {
1746
+ taxName2 = document.taxName2 ? document.taxName2 : 'Tax 2';
1747
+ taxIncluded2 = document.taxInclusive2 ? ' ' + (company.template.included ? company.template.included : 'included') : ' ';
1748
+ }
1749
+
1750
+ function payment_on(date, brand, endNumber) {
1751
+ if (brand && endNumber) {
1752
+ return 'Paid on ' + date + ' using ' + brand + ' ending in ' + endNumber;
1753
+ } else if (brand && !endNumber) {
1754
+ return 'Paid on ' + date + ' using ' + brand;
1755
+ } else {
1756
+ return 'Paid on ' + date;
1757
+ }
1758
+ }
1759
+
1760
+ if (document.type == 'invoice') {
1761
+ if (document.paymentAmount) {
1762
+ for (var i = 0; i < document.payments.length; i++) {
1763
+ if (document.payments[i].brand) {
1764
+ paymentLabel = payment_on(formatDate(document.payments[i].date), document.payments[i].brand);
1765
+ } else {
1766
+ paymentLabel = payment_on(formatDate(document.payments[i].date));
1767
+ }
1768
+ }
1769
+ }
1770
+ }
1771
+
1772
+ var signatureContainer = document.signDate && "\n <div class=\"col-6\" style={textAlign:'center'}>\n <strong>{document.customerSignature || customerSignBase64 ? company.name : ''}</strong>\n <div style={{height:'130px',borderBottom:'2px solid #dee2e6', marginRight:'40px', marginLeft:'40px'}}>\n { signatureBase64 && <img src=" + signatureBase64 + " style={{width:'220px',marginTop:'20px'}} />}\n </div>\n <div>{document.signDate && formatDate(document.signDate) }</div>\n </div>" || '';
1773
+ var clientSignature = (document.customer || customerSignBase64) && "\n <div class=\"col-6\" style={{textAlign: 'center'}}>\n <strong>{customer.companyName}</strong>\n <div style={{height:'130px',borderBottom:'2px solid #dee2e6', marginRight:'40px', marginLeft:'40px'}}>\n { customerSignBase64 && <img src=" + customerSignBase64 + " style={{width:'220px',marginTop:'20px'}} />}\n </div>\n <div>{customerSignBase64 ? formatDate(new Date()) : '( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp/ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp)'}</div>\n </div>" || '';
1774
+ return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("link", {
1775
+ rel: "stylesheet",
1776
+ href: "https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css",
1777
+ integrity: "sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh",
1778
+ crossOrigin: "anonymous"
1779
+ }), /*#__PURE__*/React.createElement("div", {
1780
+ id: "invoice",
1781
+ className: "print"
1782
+ }, /*#__PURE__*/React.createElement("div", {
1783
+ className: "invoice-body"
1784
+ }, /*#__PURE__*/React.createElement("div", {
1785
+ className: "row"
1786
+ }, /*#__PURE__*/React.createElement("div", {
1787
+ className: "col-sm",
1788
+ style: {
1789
+ paddingTop: '10px'
1790
+ }
1791
+ }, logoBase64 ? /*#__PURE__*/React.createElement("img", {
1792
+ src: logoBase64,
1793
+ id: "invoice-logo",
1794
+ className: "img-fluid",
1795
+ style: {
1796
+ width: company.ls * 2 || 200,
1797
+ height: 'auto'
1798
+ }
1799
+ }) : /*#__PURE__*/React.createElement("h1", null, company.name)), /*#__PURE__*/React.createElement("div", {
1800
+ className: "col-sm text-right"
1801
+ }, /*#__PURE__*/React.createElement("h1", null, documentName), /*#__PURE__*/React.createElement("div", {
1802
+ className: "text-inverse mb-1",
1803
+ style: {
1804
+ fontSize: '20px'
1805
+ }
1806
+ }, /*#__PURE__*/React.createElement("strong", null, company.name)), /*#__PURE__*/React.createElement("address", {
1807
+ className: "m-t-5 m-b-5"
1808
+ }, /*#__PURE__*/React.createElement("div", {
1809
+ className: "mb-2"
1810
+ }, companyAddress.address1 && /*#__PURE__*/React.createElement("div", null, companyAddress.address1), companyAddress.address2 && /*#__PURE__*/React.createElement("div", null, companyAddress.address2), companyAddress.address3 && /*#__PURE__*/React.createElement("div", null, companyAddress.address3), (companyAddress.city || companyAddress.state || companyAddress.zip) && /*#__PURE__*/React.createElement("div", null, (companyAddress.city ? companyAddress.city + ' ' : '') + (companyAddress.state ? companyAddress.state + ' ' : '') + (companyAddress.zip ? companyAddress.zip + ' ' : '')), companyAddress.country && /*#__PURE__*/React.createElement("div", null, companyAddress.country)), company.additionalInfo && /*#__PURE__*/React.createElement("div", null, company.additionalInfo), company.phoneNumber && /*#__PURE__*/React.createElement("div", null, company.phoneNumber), company.displayEmail && /*#__PURE__*/React.createElement("div", null, company.displayEmail), company.TFN && /*#__PURE__*/React.createElement("div", null, businessNumberName + ' : ' + company.TFN)))), /*#__PURE__*/React.createElement("div", {
1811
+ className: "invoice-header"
1812
+ }, /*#__PURE__*/React.createElement("div", {
1813
+ className: "invoice-to"
1814
+ }, /*#__PURE__*/React.createElement("strong", null, company.template.billTo ? company.template.billTo : 'Bill to'), /*#__PURE__*/React.createElement("div", {
1815
+ className: "text-inverse mb-1"
1816
+ }, /*#__PURE__*/React.createElement("small", {
1817
+ style: {
1818
+ fontSize: '18px'
1819
+ }
1820
+ }, customer.companyName)), /*#__PURE__*/React.createElement("address", {
1821
+ className: "m-t-5 m-b-5"
1822
+ }, customerAddress.address1 && /*#__PURE__*/React.createElement("div", null, customerAddress.address1), customerAddress.address2 && /*#__PURE__*/React.createElement("div", null, customerAddress.address2), customerAddress.address3 && /*#__PURE__*/React.createElement("div", null, customerAddress.address3), customerAddress.city || customerAddress.state || customerAddress.zip && /*#__PURE__*/React.createElement("div", null, (customerAddress.city ? customerAddress.city + ' ' : '') + (customerAddress.state ? customerAddress.state + ' ' : '') + (customerAddress.zip ? customerAddress.zip + ' ' : '')), customerAddress.country && /*#__PURE__*/React.createElement("div", null, customerAddress.country), document.customer.TFN && /*#__PURE__*/React.createElement("div", null, document.cu.TFN ? businessNumberName + ' : ' + document.cu.TFN : ''), document.customer.phone && /*#__PURE__*/React.createElement("div", null, document.cu.phone)), shippingAddressExists && /*#__PURE__*/React.createElement("strong", {
1823
+ style: {
1824
+ marginTop: '10px'
1825
+ }
1826
+ }, company.template.shipTo ? company.template.shipTo : 'Ship to'), shippingAddressExists && /*#__PURE__*/React.createElement("address", {
1827
+ className: "m-t-5 m-b-5"
1828
+ }, customerShippingAddress.address1 && /*#__PURE__*/React.createElement("div", null, customerShippingAddress.address1), customerShippingAddress.address2 && /*#__PURE__*/React.createElement("div", null, customerShippingAddress.address2), customerShippingAddress.address3 && /*#__PURE__*/React.createElement("div", null, customerShippingAddress.address3), customerShippingAddress.city || customerShippingAddress.state || customerShippingAddress.zip && /*#__PURE__*/React.createElement("div", null, (customerShippingAddress.city ? customerShippingAddress.city + ' ' : '') + (customerShippingAddress.state ? customerShippingAddress.state + ' ' : '') + (customerShippingAddress.zip ? customerShippingAddress.zip + ' ' : '')), customerShippingAddress.country && /*#__PURE__*/React.createElement("div", null, customerShippingAddress.country), document.shippingInfo && /*#__PURE__*/React.createElement("div", null, document.shippingInfo))), /*#__PURE__*/React.createElement("div", {
1829
+ className: "invoice-date"
1830
+ }, /*#__PURE__*/React.createElement("small", null, "\xA0"), /*#__PURE__*/React.createElement("div", {
1831
+ className: "row"
1832
+ }, /*#__PURE__*/React.createElement("div", {
1833
+ className: "col text-right"
1834
+ }, /*#__PURE__*/React.createElement("strong", null, documentName, " #")), /*#__PURE__*/React.createElement("div", {
1835
+ className: "col text-right",
1836
+ style: {
1837
+ maxWidth: '200px'
1838
+ }
1839
+ }, document.no ? document.no : '')), /*#__PURE__*/React.createElement("div", {
1840
+ className: "row"
1841
+ }, /*#__PURE__*/React.createElement("div", {
1842
+ className: "col"
1843
+ }, /*#__PURE__*/React.createElement("strong", null, company.template.date ? company.template.date : 'date' )), /*#__PURE__*/React.createElement("div", {
1844
+ className: "col",
1845
+ style: {
1846
+ maxWidth: '200px'
1847
+ }
1848
+ }, invoiceDate)), document.type == 'invoice' && !document.removeDueDate && /*#__PURE__*/React.createElement("div", {
1849
+ className: "row"
1850
+ }, /*#__PURE__*/React.createElement("div", {
1851
+ className: "col text-right"
1852
+ }, /*#__PURE__*/React.createElement("strong", null, company.template.dueDate ? company.template.dueDate : 'Due date')), /*#__PURE__*/React.createElement("div", {
1853
+ className: "col",
1854
+ style: {
1855
+ maxWidth: '200px'
1856
+ }
1857
+ }, invoiceDue)), !!document.purchaseOrderNumber && /*#__PURE__*/React.createElement("div", {
1858
+ className: "row"
1859
+ }, /*#__PURE__*/React.createElement("div", {
1860
+ className: "col text-right"
1861
+ }, /*#__PURE__*/React.createElement("strong", null, company.template.postCode ? company.template.postCode : 'PO #')), /*#__PURE__*/React.createElement("div", {
1862
+ className: "col",
1863
+ style: {
1864
+ maxWidth: '200px'
1865
+ }
1866
+ }, document.purchaseOrderNumber)))), /*#__PURE__*/React.createElement("div", {
1867
+ className: "invoice-content"
1868
+ }, /*#__PURE__*/React.createElement("div", {
1869
+ className: "table-responsive"
1870
+ }, /*#__PURE__*/React.createElement("table", {
1871
+ className: "table table-invoice"
1872
+ }, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", {
1873
+ className: "table table-invoice"
1874
+ }, /*#__PURE__*/React.createElement("th", {
1875
+ className: "text-left"
1876
+ }, company.template.item ? company.template.item : 'Item'), /*#__PURE__*/React.createElement("th", {
1877
+ className: "text-right",
1878
+ width: "15%"
1879
+ }, document.unitMeasure ? document.unitMeasure : company.template.quantity ? company.template.quantity : 'Quantity'), /*#__PURE__*/React.createElement("th", {
1880
+ className: "text-right",
1881
+ width: "15%"
1882
+ }, company.template.price ? company.template.price : 'Price'), discountOnItem && /*#__PURE__*/React.createElement("th", {
1883
+ className: "text-right",
1884
+ width: "15%"
1885
+ }, company.r_dc ? company.r_dc : 'Discount'), /*#__PURE__*/React.createElement("th", {
1886
+ className: "text-right",
1887
+ width: "15%"
1888
+ }, company.template.amount ? company.template.amount : 'Amount'))), /*#__PURE__*/React.createElement("tbody", null, document.items.map(function (item, idx) {
1889
+ return /*#__PURE__*/React.createElement("tr", {
1890
+ key: "item-" + idx
1891
+ }, /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("span", {
1892
+ className: "text-inverse"
1893
+ }, /*#__PURE__*/React.createElement("strong", null, item.name || '')), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("small", null, item.description || '')), /*#__PURE__*/React.createElement("td", {
1894
+ className: "text-center"
1895
+ }, (item.price || item.price == 0) && (item.quantity || item.quantity == 0) ? item.quantity : ''), /*#__PURE__*/React.createElement("td", {
1896
+ className: "text-right"
1897
+ }, item.price || item.price == 0 ? FormatCurrency(item.price, company.defaultCurrency, company.language, company.currencyFormat) : ''), discountOnItem && /*#__PURE__*/React.createElement("td", {
1898
+ className: "text-right"
1899
+ }, (item.price || item.price == 0) && item.discount ? FormatCurrency(item.dc, company.defaultCurrency, company.language, company.currencyFormat) : ''), /*#__PURE__*/React.createElement("td", {
1900
+ className: "text-right"
1901
+ }, item.price || item.price == 0 ? FormatCurrency(item.total, company.defaultCurrency, company.language, company.currencyFormat) : ''));
1902
+ })))), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("hr", null), /*#__PURE__*/React.createElement("div", {
1903
+ className: "row"
1904
+ }, /*#__PURE__*/React.createElement("div", {
1905
+ className: "col-12"
1906
+ }, /*#__PURE__*/React.createElement("table", {
1907
+ className: "table table-borderless table-small"
1908
+ }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null), /*#__PURE__*/React.createElement("td", {
1909
+ className: "text-right",
1910
+ width: "25%"
1911
+ }, company.template.subtotal ? company.template.subtotal : 'Subtotal' ), /*#__PURE__*/React.createElement("td", {
1912
+ className: "text-right",
1913
+ width: "25%"
1914
+ }, /*#__PURE__*/React.createElement("strong", null, FormatCurrency(document.total, company.currency, company.language, company.currencyFormat)))), !!document.discount && document.discount != 0 && /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null), /*#__PURE__*/React.createElement("td", {
1915
+ className: "text-right",
1916
+ width: "25%"
1917
+ }, (company.r_dc ? company.r_dc : 'Discount' ) + (document.discountPercentageOption && document.discountPercentage ? ' (' + document.discountPercentage + '%)' : '')), /*#__PURE__*/React.createElement("td", {
1918
+ className: "text-right",
1919
+ width: "25%"
1920
+ }, FormatCurrency(document.discount, company.currency, company.language, company.currencyFormat))), !!document.shippingCost && !document.shippingNonTax && /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null), /*#__PURE__*/React.createElement("td", {
1921
+ className: "text-right",
1922
+ width: "25%"
1923
+ }, company.template.shipping ? company.template.shipping : 'Shipping' ), /*#__PURE__*/React.createElement("td", {
1924
+ className: "text-right",
1925
+ width: "25%"
1926
+ }, FormatCurrency(document.shippingCost, company.currency, company.language, company.currencyFormat))), !!document.tax1 && document.tax1_total != 0 && /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null), /*#__PURE__*/React.createElement("td", {
1927
+ className: "text-right",
1928
+ width: "25%"
1929
+ }, taxName1 + taxIncluded1 + '(' + document.taxPercentage + '%)'), /*#__PURE__*/React.createElement("td", {
1930
+ className: "text-right",
1931
+ width: "25%"
1932
+ }, FormatCurrency(document.tax1_total, company.currency, company.language, company.currencyFormat))), !!document.twoTaxes && !!document.tax2 && document.tax2_total != 0 && /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null), /*#__PURE__*/React.createElement("td", {
1933
+ className: "text-right",
1934
+ width: "25%"
1935
+ }, taxName2 + taxIncluded2 + '(' + document.taxPercentage2 + '%)'), /*#__PURE__*/React.createElement("td", {
1936
+ className: "text-right",
1937
+ width: "25%"
1938
+ }, FormatCurrency(document.tax2_total, company.currency, company.language, company.currencyFormat))), !!document.shippingCost && document.shippingNonTax && /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null), /*#__PURE__*/React.createElement("td", {
1939
+ className: "text-right",
1940
+ width: "25%"
1941
+ }, company.r_sp ? company.r_sp : 'Shipping' ), /*#__PURE__*/React.createElement("td", {
1942
+ className: "text-right",
1943
+ width: "25%"
1944
+ }, FormatCurrency(document.shippingCost, company.currency, company.language, company.currencyFormat))), !!document.taxInclusive && /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null), /*#__PURE__*/React.createElement("td", {
1945
+ className: "text-right",
1946
+ width: "25%",
1947
+ style: {
1948
+ borderTop: '1px solid #ddd'
1949
+ }
1950
+ }, company.template.net ? company.template.net : 'Net' ), /*#__PURE__*/React.createElement("td", {
1951
+ className: "text-right",
1952
+ width: "25%",
1953
+ style: {
1954
+ borderTop: '1px solid #ddd'
1955
+ }
1956
+ }, FormatCurrency(document.total + (document.taxInclusive ? 0 : document.tax1_total || 0) + (document.taxInclusive2 ? 0 : document.tax2_total || 0), company.currency, company.language, company.currencyFormat))), document.type == 'invoice' || document.type != 'invoice' && (document.taxDeductible || document.twoTaxes && document.tax2 > 0 && document.taxDeductible2) && /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null), /*#__PURE__*/React.createElement("td", {
1957
+ className: "text-right",
1958
+ width: "25%",
1959
+ style: {
1960
+ borderBottom: '1px solid #ddd'
1961
+ }
1962
+ }, company.template.total ? company.template.total : 'Total' ), /*#__PURE__*/React.createElement("td", {
1963
+ className: "text-right",
1964
+ width: "25%",
1965
+ style: {
1966
+ borderBottom: '1px solid #ddd'
1967
+ }
1968
+ }, FormatCurrency(document.subTotal ? document.subTotal : 0, company.currency, company.language, company.currencyFormat))), !!document.surchargeAmount && /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", null), /*#__PURE__*/React.createElement("td", {
1969
+ className: "text-right",
1970
+ width: "25%"
1971
+ }, 'Credit Card Surcharge' ), /*#__PURE__*/React.createElement("td", {
1972
+ className: "text-right",
1973
+ width: "25%"
1974
+ }, FormatCurrency(document.surchargeAmount, company.currency, company.language, company.currencyFormat))), !!document.paymentAmount && document.payments && document.payments.map(function (payment, idx, index) {
1975
+ return /*#__PURE__*/React.createElement("tr", {
1976
+ key: "paymeny-" + idx
1977
+ }, /*#__PURE__*/React.createElement("td", null), /*#__PURE__*/React.createElement("td", {
1978
+ className: "text-right",
1979
+ width: "25%"
1980
+ }, payment_on(formatDate(payment.date), payment.brand)), /*#__PURE__*/React.createElement("td", {
1981
+ className: "text-right",
1982
+ width: "25%"
1983
+ }, FormatCurrency(payment.amount, company.currency, company.language, company.currencyFormat)));
1984
+ })))))), /*#__PURE__*/React.createElement("div", {
1985
+ className: "invoice-price"
1986
+ }, /*#__PURE__*/React.createElement("div", {
1987
+ className: "invoice-price-left"
1988
+ }, /*#__PURE__*/React.createElement("div", {
1989
+ className: "invoice-price-row"
1990
+ })), /*#__PURE__*/React.createElement("div", {
1991
+ className: "invoice-price-right"
1992
+ }, /*#__PURE__*/React.createElement("small", null, document.ty == 1 ? company.template.amountDue ? company.template.amountDue : 'Amount Due' : company.template.grandTotal ? company.template.grandTotal : 'Grand total' ), /*#__PURE__*/React.createElement("span", {
1993
+ className: "f-w-600"
1994
+ }, FormatCurrency(document.amountDue, company.currency, company.language, company.currencyFormat)))), company.hasPaymentInstruction && document.amountDue > 0 && /*#__PURE__*/React.createElement("h2", null, company.template.payInt ? company.template.payInt : 'Payment Instruction' ), company.paymentInstruction1 && /*#__PURE__*/React.createElement(Fragment, null, company.paymentInstruction1, /*#__PURE__*/React.createElement("br", null)), company.paymentInstruction2 && /*#__PURE__*/React.createElement(Fragment, null, company.paymentInstruction2, /*#__PURE__*/React.createElement("br", null)), company.paymentInstruction3 && /*#__PURE__*/React.createElement(Fragment, null, company.paymentInstruction3, /*#__PURE__*/React.createElement("br", null)), /*#__PURE__*/React.createElement("div", {
1995
+ className: "mt-4"
1996
+ }, document.note && /*#__PURE__*/React.createElement(Fragment, null, document.note && /*#__PURE__*/React.createElement("div", {
1997
+ className: "mt-4"
1998
+ }, /*#__PURE__*/React.createElement("small", null, /*#__PURE__*/React.createElement("strong", null, company.template.note ? company.template.note : 'Note' )), /*#__PURE__*/React.createElement("div", {
1999
+ dangerouslySetInnerHTML: {
2000
+ __html: nl2br(document.note)
2001
+ }
2002
+ })), document.tc && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("small", null, /*#__PURE__*/React.createElement("strong", null, company.template.Tos ? company.template.Tos : 'Terms' )), /*#__PURE__*/React.createElement("div", {
2003
+ dangerouslySetInnerHTML: {
2004
+ __html: nl2br(document.tc)
2005
+ }
2006
+ })))), document.signDate || document.customerSignature || customerSignBase64 && /*#__PURE__*/React.createElement("hr", {
2007
+ className: "mt-5"
2008
+ }, /*#__PURE__*/React.createElement("div", null, company.template.bySigning || 'By signing this document, the customer agrees to the services and conditions described in this document.' || ''), /*#__PURE__*/React.createElement("div", {
2009
+ className: "row mt-4"
2010
+ }, signatureContainer || clientSignature || '', signatureContainer && clientSignature || '')), /*#__PURE__*/React.createElement("div", {
2011
+ style: {
2012
+ textAlign: 'center'
2013
+ }
2014
+ }, attachments && attachments.map(function (photo, idx) {
2015
+ return /*#__PURE__*/React.createElement("div", {
2016
+ key: "photo-" + idx
2017
+ }, /*#__PURE__*/React.createElement("img", {
2018
+ src: photo.imageBase64
2019
+ }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("strong", null, photo.text)), /*#__PURE__*/React.createElement("div", null, photo.description));
2020
+ }))), lang.empowered_by));
2021
+ };
2022
+
2023
+ export { PreviewDocument as Invoice };
2024
+ //# sourceMappingURL=index.modern.js.map