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