gobl 0.10.0 → 0.11.0
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/es.json +55 -3
- data/data/regimes/it.json +1707 -0
- data/data/regimes/pt.json +272 -7
- 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 +1 -1
- data/lib/{gobl → generated/gobl}/bill/line.rb +1 -1
- 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 +1 -1
- data/lib/{gobl → generated/gobl}/bill/payment.rb +1 -1
- data/lib/{gobl → generated/gobl}/bill/preceding.rb +1 -2
- data/lib/{gobl → generated/gobl}/bill/tax.rb +1 -1
- data/lib/{gobl → generated/gobl}/bill/totals.rb +1 -1
- data/lib/{gobl → generated/gobl}/cal/date.rb +1 -1
- data/lib/{gobl → generated/gobl}/cal/period.rb +1 -1
- data/lib/{gobl → generated/gobl}/cbc/code.rb +1 -1
- data/lib/{gobl → generated/gobl}/cbc/key.rb +1 -1
- data/lib/{gobl → generated/gobl}/cbc/meta.rb +1 -1
- data/lib/generated/gobl/cbc/note.rb +68 -0
- data/lib/{gobl → generated/gobl}/cbc/stamp.rb +1 -1
- data/lib/{gobl → generated/gobl}/currency/code.rb +1 -1
- data/lib/{gobl → generated/gobl}/currency/exchange_rate.rb +1 -1
- data/lib/{gobl → generated/gobl}/document.rb +2 -2
- data/lib/{gobl → generated/gobl}/dsig/digest.rb +1 -1
- data/lib/{gobl → generated/gobl}/dsig/signature.rb +1 -1
- data/lib/{gobl → generated/gobl}/envelope.rb +1 -1
- data/lib/{gobl → generated/gobl}/header.rb +1 -1
- data/lib/{gobl → generated/gobl}/i18n/string.rb +1 -1
- data/lib/{gobl → generated/gobl}/l10n/code.rb +1 -1
- data/lib/{gobl → generated/gobl}/l10n/country_code.rb +1 -1
- data/lib/{gobl → generated/gobl}/note/message.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/address.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/coordinates.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/email.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/identity.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/image.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/inbox.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/item.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/name.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/party.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/person.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/registration.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/telephone.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/unit.rb +1 -1
- data/lib/{gobl → generated/gobl}/org/website.rb +1 -1
- data/lib/{gobl → generated/gobl}/pay/advance.rb +1 -1
- data/lib/{gobl → generated/gobl}/pay/card.rb +1 -1
- 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 +1 -1
- data/lib/{gobl → generated/gobl}/pay/instructions.rb +1 -1
- data/lib/{gobl → generated/gobl}/pay/online.rb +1 -1
- data/lib/{gobl → generated/gobl}/pay/terms.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/category.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/category_total.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/combo.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/identity.rb +4 -14
- data/lib/generated/gobl/tax/identity_type.rb +33 -0
- data/lib/{gobl → generated/gobl}/tax/key_definition.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/preceding_definitions.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/rate.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/rate_total.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/rate_total_surcharge.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/rate_value.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/regime.rb +6 -1
- data/lib/{gobl → generated/gobl}/tax/scenario.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/scenario_set.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/set.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/tag.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/total.rb +1 -1
- data/lib/{gobl → generated/gobl}/tax/zone.rb +1 -1
- data/lib/{gobl → generated/gobl}/uuid/uuid.rb +1 -1
- data/lib/gobl/version.rb +1 -1
- data/lib/gobl.rb +1 -0
- metadata +75 -74
- data/lib/gobl/cbc/note.rb +0 -38
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d162daa116b9e2561aaed411ca059fcb926f150685dfd0682d403f5c0885f88c
|
4
|
+
data.tar.gz: 3aa58e456a8cbaa5bf1330020eeb6aca7b5a8afcbd151e414464dacd007899bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f2bd0ce77302a5286172352dd6d438ef6f36258ff7633a7aaf59b73f51b2c822c7051f29cfb09cdaf850fff6b225bc681c8a23287e2aa9d78fdbb1fae839850
|
7
|
+
data.tar.gz: dc18b7b9ea9ad8003da892bd91f3e4f78340f5b457322732f89d36400b142f118a339675d47b747bd97fd9a0d3fc1ded1a76784a738bc5c70a2e3a186ee96252
|
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/es.json
CHANGED
@@ -503,6 +503,58 @@
|
|
503
503
|
}
|
504
504
|
],
|
505
505
|
"currency": "EUR",
|
506
|
+
"identity_types": [
|
507
|
+
{
|
508
|
+
"key": "fiscal",
|
509
|
+
"name": {
|
510
|
+
"en": "National Tax Identity",
|
511
|
+
"es": "Número de Identificación Fiscal"
|
512
|
+
},
|
513
|
+
"meta": {
|
514
|
+
"ticketbai-id-type": "02"
|
515
|
+
}
|
516
|
+
},
|
517
|
+
{
|
518
|
+
"key": "passport",
|
519
|
+
"name": {
|
520
|
+
"en": "Passport",
|
521
|
+
"es": "Pasaporte"
|
522
|
+
},
|
523
|
+
"meta": {
|
524
|
+
"ticketbai-id-type": "03"
|
525
|
+
}
|
526
|
+
},
|
527
|
+
{
|
528
|
+
"key": "foreign",
|
529
|
+
"name": {
|
530
|
+
"en": "National ID Card or similar from a foreign country",
|
531
|
+
"es": "Documento oficial de identificación expedido por el país o territorio de residencia"
|
532
|
+
},
|
533
|
+
"meta": {
|
534
|
+
"ticketbai-id-type": "04"
|
535
|
+
}
|
536
|
+
},
|
537
|
+
{
|
538
|
+
"key": "resident",
|
539
|
+
"name": {
|
540
|
+
"en": "Residential permit",
|
541
|
+
"es": "Certificado de residencia"
|
542
|
+
},
|
543
|
+
"meta": {
|
544
|
+
"ticketbai-id-type": "05"
|
545
|
+
}
|
546
|
+
},
|
547
|
+
{
|
548
|
+
"key": "other",
|
549
|
+
"name": {
|
550
|
+
"en": "An other type of source not listed",
|
551
|
+
"es": "Otro documento probatorio"
|
552
|
+
},
|
553
|
+
"meta": {
|
554
|
+
"ticketbai-id-type": "06"
|
555
|
+
}
|
556
|
+
}
|
557
|
+
],
|
506
558
|
"tags": [
|
507
559
|
{
|
508
560
|
"key": "simplified",
|
@@ -1171,10 +1223,10 @@
|
|
1171
1223
|
],
|
1172
1224
|
"tags": [
|
1173
1225
|
{
|
1174
|
-
"key": "
|
1226
|
+
"key": "resale",
|
1175
1227
|
"name": {
|
1176
|
-
"en": "
|
1177
|
-
"es": "
|
1228
|
+
"en": "Resale of goods without modification by vendor in the simplified regime",
|
1229
|
+
"es": "Reventa de bienes sin modificación por vendedor en regimen simplificado"
|
1178
1230
|
}
|
1179
1231
|
},
|
1180
1232
|
{
|