gobl 0.19.0 → 0.21.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/data/regimes/at.json +155 -0
  4. data/data/regimes/be.json +164 -0
  5. data/data/regimes/ca.json +9 -0
  6. data/data/regimes/ch.json +153 -0
  7. data/data/regimes/co.json +80 -14686
  8. data/data/regimes/de.json +2 -2
  9. data/data/regimes/es.json +99 -561
  10. data/data/regimes/fr.json +2 -2
  11. data/data/regimes/gb.json +8 -0
  12. data/data/regimes/gr.json +591 -0
  13. data/data/regimes/it.json +46 -666
  14. data/data/regimes/mx.json +27 -3
  15. data/data/regimes/nl.json +8 -0
  16. data/data/regimes/pl.json +65 -8
  17. data/data/regimes/pt.json +51 -200
  18. data/data/regimes/us.json +9 -0
  19. data/lib/generated/gobl/bill/charge.rb +6 -7
  20. data/lib/generated/gobl/bill/correction_options.rb +7 -3
  21. data/lib/generated/gobl/bill/delivery.rb +0 -1
  22. data/lib/generated/gobl/bill/discount.rb +5 -6
  23. data/lib/generated/gobl/bill/document_reference.rb +2 -3
  24. data/lib/generated/gobl/bill/invoice.rb +6 -6
  25. data/lib/generated/gobl/bill/line.rb +3 -4
  26. data/lib/generated/gobl/bill/line_charge.rb +0 -1
  27. data/lib/generated/gobl/bill/line_discount.rb +0 -1
  28. data/lib/generated/gobl/bill/ordering.rb +0 -1
  29. data/lib/generated/gobl/bill/outlay.rb +3 -4
  30. data/lib/generated/gobl/bill/payment.rb +0 -1
  31. data/lib/generated/gobl/bill/preceding.rb +16 -6
  32. data/lib/generated/gobl/bill/tax.rb +5 -1
  33. data/lib/generated/gobl/bill/totals.rb +0 -1
  34. data/lib/generated/gobl/cal/date.rb +0 -1
  35. data/lib/generated/gobl/cal/date_time.rb +0 -1
  36. data/lib/generated/gobl/cal/period.rb +0 -1
  37. data/lib/generated/gobl/cbc/code.rb +0 -1
  38. data/lib/generated/gobl/{tax → cbc}/code_definition.rb +7 -3
  39. data/lib/generated/gobl/cbc/code_map.rb +0 -1
  40. data/lib/generated/gobl/cbc/key.rb +0 -1
  41. data/lib/generated/gobl/{tax → cbc}/key_definition.rb +16 -7
  42. data/lib/generated/gobl/cbc/meta.rb +0 -1
  43. data/lib/generated/gobl/cbc/note.rb +0 -1
  44. data/lib/generated/gobl/currency/amount.rb +33 -0
  45. data/lib/generated/gobl/currency/code.rb +118 -105
  46. data/lib/generated/gobl/currency/exchange_rate.rb +17 -7
  47. data/lib/generated/gobl/dsig/digest.rb +0 -1
  48. data/lib/generated/gobl/dsig/signature.rb +0 -1
  49. data/lib/generated/gobl/envelope.rb +0 -1
  50. data/lib/generated/gobl/head/header.rb +2 -3
  51. data/lib/generated/gobl/head/stamp.rb +0 -1
  52. data/lib/generated/gobl/i18n/string.rb +0 -1
  53. data/lib/generated/gobl/l10n/code.rb +0 -1
  54. data/lib/generated/gobl/l10n/country_code.rb +0 -1
  55. data/lib/generated/gobl/note/message.rb +5 -1
  56. data/lib/generated/gobl/org/address.rb +3 -4
  57. data/lib/generated/gobl/org/coordinates.rb +0 -1
  58. data/lib/generated/gobl/org/email.rb +3 -4
  59. data/lib/generated/gobl/org/identity.rb +3 -4
  60. data/lib/generated/gobl/org/image.rb +3 -4
  61. data/lib/generated/gobl/org/inbox.rb +3 -4
  62. data/lib/generated/gobl/org/item.rb +10 -6
  63. data/lib/generated/gobl/org/name.rb +3 -4
  64. data/lib/generated/gobl/org/party.rb +10 -6
  65. data/lib/generated/gobl/org/person.rb +3 -4
  66. data/lib/generated/gobl/org/registration.rb +7 -3
  67. data/lib/generated/gobl/org/telephone.rb +3 -4
  68. data/lib/generated/gobl/org/unit.rb +0 -1
  69. data/lib/generated/gobl/org/website.rb +4 -5
  70. data/lib/generated/gobl/pay/advance.rb +3 -4
  71. data/lib/generated/gobl/pay/card.rb +0 -1
  72. data/lib/generated/gobl/pay/credit_transfer.rb +0 -1
  73. data/lib/generated/gobl/pay/direct_debit.rb +0 -1
  74. data/lib/generated/gobl/pay/due_date.rb +0 -1
  75. data/lib/generated/gobl/pay/instructions.rb +0 -1
  76. data/lib/generated/gobl/pay/online.rb +12 -8
  77. data/lib/generated/gobl/pay/terms.rb +0 -1
  78. data/lib/generated/gobl/regimes/mx/food_vouchers.rb +0 -1
  79. data/lib/generated/gobl/regimes/mx/food_vouchers_employee.rb +0 -1
  80. data/lib/generated/gobl/regimes/mx/food_vouchers_line.rb +0 -1
  81. data/lib/generated/gobl/regimes/mx/fuel_account_balance.rb +0 -1
  82. data/lib/generated/gobl/regimes/mx/fuel_account_item.rb +0 -1
  83. data/lib/generated/gobl/regimes/mx/fuel_account_line.rb +0 -2
  84. data/lib/generated/gobl/regimes/mx/fuel_account_tax.rb +11 -9
  85. data/lib/generated/gobl/schema/object.rb +0 -1
  86. data/lib/generated/gobl/tax/category.rb +1 -2
  87. data/lib/generated/gobl/tax/category_total.rb +0 -1
  88. data/lib/generated/gobl/tax/combo.rb +3 -4
  89. data/lib/generated/gobl/tax/correction_definition.rb +0 -1
  90. data/lib/generated/gobl/tax/{ext_map.rb → extensions.rb} +2 -3
  91. data/lib/generated/gobl/tax/identity.rb +10 -21
  92. data/lib/generated/gobl/tax/rate.rb +0 -1
  93. data/lib/generated/gobl/tax/rate_total.rb +3 -4
  94. data/lib/generated/gobl/tax/rate_total_surcharge.rb +0 -1
  95. data/lib/generated/gobl/tax/rate_value.rb +9 -5
  96. data/lib/generated/gobl/tax/regime.rb +23 -24
  97. data/lib/generated/gobl/tax/scenario.rb +0 -1
  98. data/lib/generated/gobl/tax/scenario_set.rb +0 -1
  99. data/lib/generated/gobl/tax/set.rb +0 -1
  100. data/lib/generated/gobl/tax/source.rb +0 -1
  101. data/lib/generated/gobl/tax/total.rb +0 -1
  102. data/lib/gobl/operations/validation_result.rb +1 -3
  103. data/lib/gobl/version.rb +1 -1
  104. metadata +10 -7
  105. data/lib/generated/gobl/tax/zone.rb +0 -48
  106. data/lib/generated/gobl/uuid/uuid.rb +0 -17
data/data/regimes/it.json CHANGED
@@ -144,27 +144,33 @@
144
144
  }
145
145
  }
146
146
  ],
147
- "identity_types": [
148
- {
149
- "key": "business",
150
- "name": {
151
- "en": "Legal Person"
152
- }
153
- },
147
+ "extensions": [
154
148
  {
155
- "key": "government",
149
+ "key": "it-sdi-format",
156
150
  "name": {
157
- "en": "Public Administration"
158
- }
151
+ "en": "SDI Transmission Format",
152
+ "it": "Formato Trasmissione SDI"
153
+ },
154
+ "desc": {
155
+ "en": "Code used to describe the transmission format of the invoice. By default\nthe value \"FPR12\" is used unless the user explicitly sets the value\nto something else.\n\nNormally this will only be needed when the invoice is to be sent to governmental\nbodies and must use the \"FPA12\" format."
156
+ },
157
+ "codes": [
158
+ {
159
+ "code": "FPA12",
160
+ "name": {
161
+ "en": "Public Administration",
162
+ "it": "Pubblica Amministrazione"
163
+ }
164
+ },
165
+ {
166
+ "code": "FPR12",
167
+ "name": {
168
+ "en": "Private Parties (default)",
169
+ "it": "Soggetti Privati (predefinito)"
170
+ }
171
+ }
172
+ ]
159
173
  },
160
- {
161
- "key": "individual",
162
- "name": {
163
- "en": "Natural Person"
164
- }
165
- }
166
- ],
167
- "extensions": [
168
174
  {
169
175
  "key": "it-sdi-fiscal-regime",
170
176
  "name": {
@@ -690,7 +696,16 @@
690
696
  ]
691
697
  }
692
698
  ],
693
- "charge_types": [
699
+ "identity_keys": [
700
+ {
701
+ "key": "it-fiscal-code",
702
+ "name": {
703
+ "en": "Fiscal Code",
704
+ "it": "Codice Fiscale"
705
+ }
706
+ }
707
+ ],
708
+ "charge_keys": [
694
709
  {
695
710
  "key": "stamp-duty",
696
711
  "name": {
@@ -703,7 +718,7 @@
703
718
  }
704
719
  }
705
720
  ],
706
- "payment_means": [
721
+ "payment_means_keys": [
707
722
  {
708
723
  "key": "cash",
709
724
  "name": {
@@ -1322,6 +1337,15 @@
1322
1337
  ]
1323
1338
  }
1324
1339
  ],
1340
+ "corrections": [
1341
+ {
1342
+ "schema": "bill/invoice",
1343
+ "types": [
1344
+ "credit-note",
1345
+ "debit-note"
1346
+ ]
1347
+ }
1348
+ ],
1325
1349
  "categories": [
1326
1350
  {
1327
1351
  "code": "VAT",
@@ -1397,8 +1421,8 @@
1397
1421
  {
1398
1422
  "key": "exempt",
1399
1423
  "name": {
1400
- "en": "None",
1401
- "it": "Natura"
1424
+ "en": "Exempt",
1425
+ "it": "Esente"
1402
1426
  },
1403
1427
  "exempt": true,
1404
1428
  "extensions": [
@@ -1497,649 +1521,5 @@
1497
1521
  "fatturapa-tipo-ritenuta": "RT05"
1498
1522
  }
1499
1523
  }
1500
- ],
1501
- "zones": [
1502
- {
1503
- "code": "AG",
1504
- "region": {
1505
- "it": "Agrigento"
1506
- }
1507
- },
1508
- {
1509
- "code": "AL",
1510
- "region": {
1511
- "it": "Alessandria"
1512
- }
1513
- },
1514
- {
1515
- "code": "AN",
1516
- "region": {
1517
- "it": "Ancona"
1518
- }
1519
- },
1520
- {
1521
- "code": "AO",
1522
- "region": {
1523
- "it": "Aosta/Aoste"
1524
- }
1525
- },
1526
- {
1527
- "code": "AR",
1528
- "region": {
1529
- "it": "Arezzo"
1530
- }
1531
- },
1532
- {
1533
- "code": "AP",
1534
- "region": {
1535
- "it": "Ascoli Piceno"
1536
- }
1537
- },
1538
- {
1539
- "code": "AT",
1540
- "region": {
1541
- "it": "Asti"
1542
- }
1543
- },
1544
- {
1545
- "code": "AV",
1546
- "region": {
1547
- "it": "Avellino"
1548
- }
1549
- },
1550
- {
1551
- "code": "BA",
1552
- "region": {
1553
- "it": "Bari"
1554
- }
1555
- },
1556
- {
1557
- "code": "BT",
1558
- "region": {
1559
- "it": "Barletta-Andria-Trani"
1560
- }
1561
- },
1562
- {
1563
- "code": "BL",
1564
- "region": {
1565
- "it": "Belluno"
1566
- }
1567
- },
1568
- {
1569
- "code": "BN",
1570
- "region": {
1571
- "it": "Benevento"
1572
- }
1573
- },
1574
- {
1575
- "code": "BG",
1576
- "region": {
1577
- "it": "Bergamo"
1578
- }
1579
- },
1580
- {
1581
- "code": "BI",
1582
- "region": {
1583
- "it": "Biella"
1584
- }
1585
- },
1586
- {
1587
- "code": "BO",
1588
- "region": {
1589
- "it": "Bologna"
1590
- }
1591
- },
1592
- {
1593
- "code": "BZ",
1594
- "region": {
1595
- "it": "Bolzano"
1596
- }
1597
- },
1598
- {
1599
- "code": "BS",
1600
- "region": {
1601
- "it": "Brescia"
1602
- }
1603
- },
1604
- {
1605
- "code": "BR",
1606
- "region": {
1607
- "it": "Brindisi"
1608
- }
1609
- },
1610
- {
1611
- "code": "CA",
1612
- "region": {
1613
- "it": "Cagliari"
1614
- }
1615
- },
1616
- {
1617
- "code": "CL",
1618
- "region": {
1619
- "it": "Caltanissetta"
1620
- }
1621
- },
1622
- {
1623
- "code": "CB",
1624
- "region": {
1625
- "it": "Campobasso"
1626
- }
1627
- },
1628
- {
1629
- "code": "CE",
1630
- "region": {
1631
- "it": "Caserta"
1632
- }
1633
- },
1634
- {
1635
- "code": "CT",
1636
- "region": {
1637
- "it": "Catania"
1638
- }
1639
- },
1640
- {
1641
- "code": "CZ",
1642
- "region": {
1643
- "it": "Catanzaro"
1644
- }
1645
- },
1646
- {
1647
- "code": "CH",
1648
- "region": {
1649
- "it": "Chieti"
1650
- }
1651
- },
1652
- {
1653
- "code": "CO",
1654
- "region": {
1655
- "it": "Como"
1656
- }
1657
- },
1658
- {
1659
- "code": "CS",
1660
- "region": {
1661
- "it": "Cosenza"
1662
- }
1663
- },
1664
- {
1665
- "code": "CR",
1666
- "region": {
1667
- "it": "Cremona"
1668
- }
1669
- },
1670
- {
1671
- "code": "KR",
1672
- "region": {
1673
- "it": "Crotone"
1674
- }
1675
- },
1676
- {
1677
- "code": "CN",
1678
- "region": {
1679
- "it": "Cuneo"
1680
- }
1681
- },
1682
- {
1683
- "code": "EN",
1684
- "region": {
1685
- "it": "Enna"
1686
- }
1687
- },
1688
- {
1689
- "code": "FM",
1690
- "region": {
1691
- "it": "Fermo"
1692
- }
1693
- },
1694
- {
1695
- "code": "FE",
1696
- "region": {
1697
- "it": "Ferrara"
1698
- }
1699
- },
1700
- {
1701
- "code": "FI",
1702
- "region": {
1703
- "it": "Firenze"
1704
- }
1705
- },
1706
- {
1707
- "code": "FG",
1708
- "region": {
1709
- "it": "Foggia"
1710
- }
1711
- },
1712
- {
1713
- "code": "FC",
1714
- "region": {
1715
- "it": "Forlì-Cesena"
1716
- }
1717
- },
1718
- {
1719
- "code": "FR",
1720
- "region": {
1721
- "it": "Frosinone"
1722
- }
1723
- },
1724
- {
1725
- "code": "GE",
1726
- "region": {
1727
- "it": "Genova"
1728
- }
1729
- },
1730
- {
1731
- "code": "GO",
1732
- "region": {
1733
- "it": "Gorizia"
1734
- }
1735
- },
1736
- {
1737
- "code": "GR",
1738
- "region": {
1739
- "it": "Grosseto"
1740
- }
1741
- },
1742
- {
1743
- "code": "IM",
1744
- "region": {
1745
- "it": "Imperia"
1746
- }
1747
- },
1748
- {
1749
- "code": "IS",
1750
- "region": {
1751
- "it": "Isernia"
1752
- }
1753
- },
1754
- {
1755
- "code": "AQ",
1756
- "region": {
1757
- "it": "L'Aquila"
1758
- }
1759
- },
1760
- {
1761
- "code": "SP",
1762
- "region": {
1763
- "it": "La Spezia"
1764
- }
1765
- },
1766
- {
1767
- "code": "LT",
1768
- "region": {
1769
- "it": "Latina"
1770
- }
1771
- },
1772
- {
1773
- "code": "LE",
1774
- "region": {
1775
- "it": "Lecce"
1776
- }
1777
- },
1778
- {
1779
- "code": "LC",
1780
- "region": {
1781
- "it": "Lecco"
1782
- }
1783
- },
1784
- {
1785
- "code": "LI",
1786
- "region": {
1787
- "it": "Livorno"
1788
- }
1789
- },
1790
- {
1791
- "code": "LO",
1792
- "region": {
1793
- "it": "Lodi"
1794
- }
1795
- },
1796
- {
1797
- "code": "LU",
1798
- "region": {
1799
- "it": "Lucca"
1800
- }
1801
- },
1802
- {
1803
- "code": "MC",
1804
- "region": {
1805
- "it": "Macerata"
1806
- }
1807
- },
1808
- {
1809
- "code": "MN",
1810
- "region": {
1811
- "it": "Mantova"
1812
- }
1813
- },
1814
- {
1815
- "code": "MS",
1816
- "region": {
1817
- "it": "Massa-Carrara"
1818
- }
1819
- },
1820
- {
1821
- "code": "MT",
1822
- "region": {
1823
- "it": "Matera"
1824
- }
1825
- },
1826
- {
1827
- "code": "ME",
1828
- "region": {
1829
- "it": "Messina"
1830
- }
1831
- },
1832
- {
1833
- "code": "MI",
1834
- "region": {
1835
- "it": "Milano"
1836
- }
1837
- },
1838
- {
1839
- "code": "MO",
1840
- "region": {
1841
- "it": "Modena"
1842
- }
1843
- },
1844
- {
1845
- "code": "MB",
1846
- "region": {
1847
- "it": "Monza e Brianza"
1848
- }
1849
- },
1850
- {
1851
- "code": "NA",
1852
- "region": {
1853
- "it": "Napoli"
1854
- }
1855
- },
1856
- {
1857
- "code": "NO",
1858
- "region": {
1859
- "it": "Novara"
1860
- }
1861
- },
1862
- {
1863
- "code": "NU",
1864
- "region": {
1865
- "it": "Nuoro"
1866
- }
1867
- },
1868
- {
1869
- "code": "OR",
1870
- "region": {
1871
- "it": "Oristano"
1872
- }
1873
- },
1874
- {
1875
- "code": "PD",
1876
- "region": {
1877
- "it": "Padova"
1878
- }
1879
- },
1880
- {
1881
- "code": "PA",
1882
- "region": {
1883
- "it": "Palermo"
1884
- }
1885
- },
1886
- {
1887
- "code": "PR",
1888
- "region": {
1889
- "it": "Parma"
1890
- }
1891
- },
1892
- {
1893
- "code": "PV",
1894
- "region": {
1895
- "it": "Pavia"
1896
- }
1897
- },
1898
- {
1899
- "code": "PG",
1900
- "region": {
1901
- "it": "Perugia"
1902
- }
1903
- },
1904
- {
1905
- "code": "PU",
1906
- "region": {
1907
- "it": "Pesaro e Urbino"
1908
- }
1909
- },
1910
- {
1911
- "code": "PE",
1912
- "region": {
1913
- "it": "Pescara"
1914
- }
1915
- },
1916
- {
1917
- "code": "PC",
1918
- "region": {
1919
- "it": "Piacenza"
1920
- }
1921
- },
1922
- {
1923
- "code": "PI",
1924
- "region": {
1925
- "it": "Pisa"
1926
- }
1927
- },
1928
- {
1929
- "code": "PT",
1930
- "region": {
1931
- "it": "Pistoia"
1932
- }
1933
- },
1934
- {
1935
- "code": "PN",
1936
- "region": {
1937
- "it": "Pordenone"
1938
- }
1939
- },
1940
- {
1941
- "code": "PZ",
1942
- "region": {
1943
- "it": "Potenza"
1944
- }
1945
- },
1946
- {
1947
- "code": "PO",
1948
- "region": {
1949
- "it": "Prato"
1950
- }
1951
- },
1952
- {
1953
- "code": "RG",
1954
- "region": {
1955
- "it": "Ragusa"
1956
- }
1957
- },
1958
- {
1959
- "code": "RA",
1960
- "region": {
1961
- "it": "Ravenna"
1962
- }
1963
- },
1964
- {
1965
- "code": "RC",
1966
- "region": {
1967
- "it": "Reggio Calabria"
1968
- }
1969
- },
1970
- {
1971
- "code": "RE",
1972
- "region": {
1973
- "it": "Reggio Emilia"
1974
- }
1975
- },
1976
- {
1977
- "code": "RI",
1978
- "region": {
1979
- "it": "Rieti"
1980
- }
1981
- },
1982
- {
1983
- "code": "RN",
1984
- "region": {
1985
- "it": "Rimini"
1986
- }
1987
- },
1988
- {
1989
- "code": "RM",
1990
- "region": {
1991
- "it": "Roma"
1992
- }
1993
- },
1994
- {
1995
- "code": "RO",
1996
- "region": {
1997
- "it": "Rovigo"
1998
- }
1999
- },
2000
- {
2001
- "code": "SA",
2002
- "region": {
2003
- "it": "Salerno"
2004
- }
2005
- },
2006
- {
2007
- "code": "SS",
2008
- "region": {
2009
- "it": "Sassari"
2010
- }
2011
- },
2012
- {
2013
- "code": "SV",
2014
- "region": {
2015
- "it": "Savona"
2016
- }
2017
- },
2018
- {
2019
- "code": "SI",
2020
- "region": {
2021
- "it": "Siena"
2022
- }
2023
- },
2024
- {
2025
- "code": "SR",
2026
- "region": {
2027
- "it": "Siracusa"
2028
- }
2029
- },
2030
- {
2031
- "code": "SO",
2032
- "region": {
2033
- "it": "Sondrio"
2034
- }
2035
- },
2036
- {
2037
- "code": "SU",
2038
- "region": {
2039
- "it": "Sud Sardegna"
2040
- }
2041
- },
2042
- {
2043
- "code": "TA",
2044
- "region": {
2045
- "it": "Taranto"
2046
- }
2047
- },
2048
- {
2049
- "code": "TE",
2050
- "region": {
2051
- "it": "Teramo"
2052
- }
2053
- },
2054
- {
2055
- "code": "TR",
2056
- "region": {
2057
- "it": "Terni"
2058
- }
2059
- },
2060
- {
2061
- "code": "TO",
2062
- "region": {
2063
- "it": "Torino"
2064
- }
2065
- },
2066
- {
2067
- "code": "TP",
2068
- "region": {
2069
- "it": "Trapani"
2070
- }
2071
- },
2072
- {
2073
- "code": "TN",
2074
- "region": {
2075
- "it": "Trento"
2076
- }
2077
- },
2078
- {
2079
- "code": "TV",
2080
- "region": {
2081
- "it": "Treviso"
2082
- }
2083
- },
2084
- {
2085
- "code": "TS",
2086
- "region": {
2087
- "it": "Trieste"
2088
- }
2089
- },
2090
- {
2091
- "code": "UD",
2092
- "region": {
2093
- "it": "Udine"
2094
- }
2095
- },
2096
- {
2097
- "code": "VA",
2098
- "region": {
2099
- "it": "Varese"
2100
- }
2101
- },
2102
- {
2103
- "code": "VE",
2104
- "region": {
2105
- "it": "Venezia"
2106
- }
2107
- },
2108
- {
2109
- "code": "VB",
2110
- "region": {
2111
- "it": "Verbano-Cusio-Ossola"
2112
- }
2113
- },
2114
- {
2115
- "code": "VC",
2116
- "region": {
2117
- "it": "Vercelli"
2118
- }
2119
- },
2120
- {
2121
- "code": "VR",
2122
- "region": {
2123
- "it": "Verona"
2124
- }
2125
- },
2126
- {
2127
- "code": "VV",
2128
- "region": {
2129
- "it": "Vibo Valentia"
2130
- }
2131
- },
2132
- {
2133
- "code": "VI",
2134
- "region": {
2135
- "it": "Vicenza"
2136
- }
2137
- },
2138
- {
2139
- "code": "VT",
2140
- "region": {
2141
- "it": "Viterbo"
2142
- }
2143
- }
2144
1524
  ]
2145
1525
  }