gobl 0.9.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -13
- data/data/regimes/co.json +55 -1
- data/data/regimes/es.json +570 -64
- data/data/regimes/it.json +1182 -0
- data/lib/{gobl → generated/gobl}/bill/charge.rb +1 -1
- data/lib/{gobl → generated/gobl}/bill/delivery.rb +1 -1
- data/lib/{gobl → generated/gobl}/bill/discount.rb +1 -1
- data/lib/{gobl → generated/gobl}/bill/document_reference.rb +1 -1
- data/lib/{gobl → generated/gobl}/bill/invoice.rb +19 -8
- data/lib/{gobl → generated/gobl}/bill/line.rb +3 -3
- data/lib/{gobl → generated/gobl}/bill/line_charge.rb +1 -1
- data/lib/{gobl → generated/gobl}/bill/line_discount.rb +1 -1
- data/lib/{gobl → generated/gobl}/bill/ordering.rb +1 -1
- data/lib/{gobl → generated/gobl}/bill/outlay.rb +3 -3
- data/lib/{gobl → generated/gobl}/bill/payment.rb +1 -1
- data/lib/{gobl → generated/gobl}/bill/preceding.rb +23 -23
- data/lib/{gobl → generated/gobl}/bill/tax.rb +4 -4
- data/lib/{gobl → generated/gobl}/bill/totals.rb +5 -5
- data/lib/{gobl → generated/gobl}/cal/date.rb +2 -2
- data/lib/{gobl → generated/gobl}/cal/period.rb +3 -3
- data/lib/{gobl → generated/gobl}/cbc/code.rb +3 -3
- data/lib/{gobl → generated/gobl}/cbc/key.rb +2 -2
- data/lib/{gobl → generated/gobl}/cbc/meta.rb +1 -1
- data/lib/{gobl → generated/gobl}/cbc/note.rb +6 -6
- data/lib/{gobl → generated/gobl}/cbc/stamp.rb +3 -3
- data/lib/{gobl → generated/gobl}/currency/code.rb +7 -4
- data/lib/{gobl → generated/gobl}/currency/exchange_rate.rb +3 -3
- data/lib/generated/gobl/document.rb +16 -0
- data/lib/{gobl → generated/gobl}/dsig/digest.rb +3 -3
- data/lib/{gobl → generated/gobl}/dsig/signature.rb +2 -2
- data/lib/{gobl → generated/gobl}/envelope.rb +5 -5
- data/lib/{gobl → generated/gobl}/header.rb +4 -4
- data/lib/{gobl → generated/gobl}/i18n/string.rb +1 -1
- data/lib/{gobl → generated/gobl}/l10n/code.rb +2 -2
- data/lib/{gobl → generated/gobl}/l10n/country_code.rb +7 -4
- data/lib/{gobl → generated/gobl}/note/message.rb +4 -4
- data/lib/{gobl → generated/gobl}/org/address.rb +2 -2
- data/lib/{gobl → generated/gobl}/org/coordinates.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/email.rb +2 -2
- data/lib/generated/gobl/org/identity.rb +38 -0
- data/lib/{gobl → generated/gobl}/org/image.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/inbox.rb +3 -3
- data/lib/{gobl → generated/gobl}/org/item.rb +10 -10
- data/lib/{gobl → generated/gobl}/org/name.rb +3 -3
- data/lib/{gobl → generated/gobl}/org/party.rb +7 -7
- data/lib/{gobl → generated/gobl}/org/person.rb +2 -7
- data/lib/{gobl → generated/gobl}/org/registration.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/telephone.rb +2 -2
- data/lib/{gobl → generated/gobl}/org/unit.rb +8 -3
- data/lib/{gobl → generated/gobl}/org/website.rb +2 -2
- data/lib/{gobl → generated/gobl}/pay/advance.rb +3 -3
- data/lib/{gobl → generated/gobl}/pay/card.rb +3 -3
- data/lib/{gobl → generated/gobl}/pay/credit_transfer.rb +1 -1
- data/lib/{gobl → generated/gobl}/pay/direct_debit.rb +1 -1
- data/lib/{gobl → generated/gobl}/pay/due_date.rb +3 -3
- data/lib/{gobl → generated/gobl}/pay/instructions.rb +19 -4
- data/lib/{gobl → generated/gobl}/pay/online.rb +2 -2
- data/lib/{gobl → generated/gobl}/pay/terms.rb +19 -4
- data/lib/{gobl → generated/gobl}/tax/category.rb +14 -4
- data/lib/{gobl → generated/gobl}/tax/category_total.rb +5 -5
- data/lib/{gobl → generated/gobl}/tax/combo.rb +7 -2
- data/lib/{gobl → generated/gobl}/tax/identity.rb +16 -6
- data/lib/generated/gobl/tax/key_definition.rb +38 -0
- data/lib/generated/gobl/tax/preceding_definitions.rb +27 -0
- data/lib/{gobl → generated/gobl}/tax/rate.rb +11 -4
- data/lib/{gobl → generated/gobl}/tax/rate_total.rb +4 -4
- data/lib/{gobl → generated/gobl}/tax/rate_total_surcharge.rb +3 -3
- data/lib/{gobl → generated/gobl}/tax/rate_value.rb +2 -2
- data/lib/{gobl → generated/gobl}/tax/regime.rb +19 -9
- data/lib/generated/gobl/tax/scenario.rb +37 -0
- data/lib/generated/gobl/tax/scenario_set.rb +29 -0
- data/lib/{gobl → generated/gobl}/tax/set.rb +1 -1
- data/lib/generated/gobl/tax/tag.rb +33 -0
- data/lib/{gobl → generated/gobl}/tax/total.rb +2 -2
- data/lib/{gobl → generated/gobl}/tax/zone.rb +2 -2
- data/lib/{gobl → generated/gobl}/uuid/uuid.rb +2 -2
- data/lib/gobl/enum.rb +8 -56
- data/lib/gobl/version.rb +1 -1
- data/lib/gobl.rb +1 -0
- metadata +75 -76
- data/lib/gobl/bill/invoice_type.rb +0 -30
- data/lib/gobl/cbc/note_key.rb +0 -48
- data/lib/gobl/document.rb +0 -13
- data/lib/gobl/org/item_code.rb +0 -28
- data/lib/gobl/pay/method_key.rb +0 -30
- data/lib/gobl/pay/term_key.rb +0 -33
- data/lib/gobl/tax/scheme.rb +0 -44
- data/lib/gobl/tax/source_key.rb +0 -28
- data/lib/gobl/value.rb +0 -77
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bff66b8750d72848acd28331e82d9c91a951d093331400a0d2942119d83b2f9b
|
4
|
+
data.tar.gz: 23d17b39a899ddc36293d2b070338bc30f4011acf08b299854f027ee06f8f758
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cc83e91eeefd2ef016b1a7a079e158c4b40cd1ba88b995b13ea46926dd7dbce06cc27547f755d18acb1e74b6ea1c81af99b7c6e5a190ecaeba1f596e9185a37
|
7
|
+
data.tar.gz: 22cfc2a7a0eb8c2c244bc04589033bd3f0a7e0fa6d77a76704c6775d79ba9f53bcd9ce8e84e225430a651da788a36ab8679e06e0ded107b773636479e93dec95
|
data/README.md
CHANGED
@@ -215,28 +215,22 @@ The command `mage setup` fetches and installs all the required dependencies to u
|
|
215
215
|
|
216
216
|
#### Code generation
|
217
217
|
|
218
|
-
Ensure all the GOBL JSON Schema files are available by manually copying the base GOBL project's `build
|
218
|
+
Ensure all the GOBL JSON Schema and Regime files are available by manually copying the [base GOBL project](https://github.com/invopop/gobl)'s `build/` path to the `data/` path in this repository. For example, assuming you have GOBL at `../gobl/`, you can run this:
|
219
219
|
|
220
220
|
```bash
|
221
|
-
rm -rf ./data
|
222
|
-
cp -r ../gobl/build
|
221
|
+
rm -rf ./data/*
|
222
|
+
cp -r ../gobl/build/* ./data
|
223
223
|
```
|
224
224
|
|
225
|
-
|
225
|
+
Please note that `schemas` is _.gitignored_ as we only need it to generate the code. However, the previous command also copies `regimes` which content is used by the library and so, it is part of the git repo and the gem.
|
226
226
|
|
227
|
-
|
228
|
-
rm -rf ./data/regimes
|
229
|
-
cp -r ../gobl/build/regimes ./data
|
230
|
-
```
|
231
|
-
|
232
|
-
Now you can delete any previously generated code with
|
227
|
+
Now, with the help of [the GOBL generator](https://github.com/invopop/gobl.generator), you can regenerate the code. For example, assuming the GOBL generator is at `../gobl.generator`, you can run this:
|
233
228
|
|
234
229
|
```bash
|
235
|
-
|
230
|
+
rm -rf lib/generated/gobl
|
231
|
+
../gobl.generator/bin/generate -l ruby -o lib/generated/gobl/
|
236
232
|
```
|
237
233
|
|
238
|
-
The command `mage -v generate` generates the Ruby files from the JSON Schema. If the schema is updated, it will update the Ruby files.
|
239
|
-
|
240
234
|
#### Tests
|
241
235
|
|
242
236
|
Use the `mage spec` command to run the entire test suite.
|
data/data/regimes/co.json
CHANGED
@@ -14581,6 +14581,60 @@
|
|
14581
14581
|
}
|
14582
14582
|
],
|
14583
14583
|
"currency": "COP",
|
14584
|
+
"preceding": {
|
14585
|
+
"correction_methods": [
|
14586
|
+
{
|
14587
|
+
"key": "partial",
|
14588
|
+
"desc": {
|
14589
|
+
"en": "Partial refund of part of the goods or services.",
|
14590
|
+
"es": "Devolución de parte de los bienes; no aceptación de partes del servicio."
|
14591
|
+
},
|
14592
|
+
"meta": {
|
14593
|
+
"dian": "1"
|
14594
|
+
}
|
14595
|
+
},
|
14596
|
+
{
|
14597
|
+
"key": "revoked",
|
14598
|
+
"desc": {
|
14599
|
+
"en": "Previous document has been completely cancelled.",
|
14600
|
+
"es": "Anulación de la factura anterior."
|
14601
|
+
},
|
14602
|
+
"meta": {
|
14603
|
+
"dian": "2"
|
14604
|
+
}
|
14605
|
+
},
|
14606
|
+
{
|
14607
|
+
"key": "discount",
|
14608
|
+
"desc": {
|
14609
|
+
"en": "Partial or total discount.",
|
14610
|
+
"es": "Rebaja o descuento parcial o total."
|
14611
|
+
},
|
14612
|
+
"meta": {
|
14613
|
+
"dian": "3"
|
14614
|
+
}
|
14615
|
+
},
|
14616
|
+
{
|
14617
|
+
"key": "price-adjustment",
|
14618
|
+
"desc": {
|
14619
|
+
"en": "Ajuste de precio.",
|
14620
|
+
"es": "Price adjustment."
|
14621
|
+
},
|
14622
|
+
"meta": {
|
14623
|
+
"dian": "4"
|
14624
|
+
}
|
14625
|
+
},
|
14626
|
+
{
|
14627
|
+
"key": "other",
|
14628
|
+
"desc": {
|
14629
|
+
"en": "Otros.",
|
14630
|
+
"es": "Other."
|
14631
|
+
},
|
14632
|
+
"meta": {
|
14633
|
+
"dian": "5"
|
14634
|
+
}
|
14635
|
+
}
|
14636
|
+
]
|
14637
|
+
},
|
14584
14638
|
"categories": [
|
14585
14639
|
{
|
14586
14640
|
"code": "VAT",
|
@@ -14597,7 +14651,7 @@
|
|
14597
14651
|
"key": "zero",
|
14598
14652
|
"name": {
|
14599
14653
|
"en": "Zero Rate",
|
14600
|
-
"es": "
|
14654
|
+
"es": "Cero"
|
14601
14655
|
},
|
14602
14656
|
"values": [
|
14603
14657
|
{
|