-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from invopop/fix-simplified-op-code
Fixing invalid tax op code for simplified invoices
- Loading branch information
Showing
7 changed files
with
428 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
{ | ||
"$schema": "https://gobl.org/draft-0/envelope", | ||
"head": { | ||
"uuid": "0192d3c7-2dc5-74cf-b263-5892feb44432", | ||
"dig": { | ||
"alg": "sha256", | ||
"val": "23d0b836e1ae2222abad42dd134fb2b972f27d991e97b1fc06db5b0dc0788e46" | ||
} | ||
}, | ||
"doc": { | ||
"$schema": "https://gobl.org/draft-0/bill/invoice", | ||
"$regime": "ES", | ||
"$tags": [ | ||
"simplified" | ||
], | ||
"uuid": "7fe11346-a0ce-11ee-b8f0-e6a7901137ed", | ||
"type": "standard", | ||
"series": "SIMPL", | ||
"code": "0002", | ||
"issue_date": "2023-12-18", | ||
"currency": "EUR", | ||
"supplier": { | ||
"name": "Provide One S.L.", | ||
"tax_id": { | ||
"country": "ES", | ||
"code": "B98602642" | ||
}, | ||
"addresses": [ | ||
{ | ||
"num": "42", | ||
"street": "San Frantzisko", | ||
"locality": "Bilbo", | ||
"region": "Bizkaia", | ||
"code": "48003", | ||
"country": "ES" | ||
} | ||
], | ||
"emails": [ | ||
{ | ||
"addr": "billing@example.com" | ||
} | ||
] | ||
}, | ||
"lines": [ | ||
{ | ||
"i": 1, | ||
"quantity": "20", | ||
"item": { | ||
"name": "Development services", | ||
"price": "90.00", | ||
"unit": "h" | ||
}, | ||
"sum": "1800.00", | ||
"discounts": [ | ||
{ | ||
"percent": "10%", | ||
"amount": "180.00", | ||
"reason": "Special discount" | ||
} | ||
], | ||
"taxes": [ | ||
{ | ||
"cat": "VAT", | ||
"rate": "standard", | ||
"percent": "21.0%", | ||
"ext": { | ||
"es-tbai-product": "services" | ||
} | ||
} | ||
], | ||
"total": "1620.00" | ||
}, | ||
{ | ||
"i": 2, | ||
"quantity": "1", | ||
"item": { | ||
"name": "Some merch", | ||
"price": "90.00" | ||
}, | ||
"sum": "90.00", | ||
"taxes": [ | ||
{ | ||
"cat": "VAT", | ||
"rate": "standard", | ||
"percent": "21.0%", | ||
"ext": { | ||
"es-tbai-product": "goods" | ||
} | ||
} | ||
], | ||
"total": "90.00" | ||
}, | ||
{ | ||
"i": 3, | ||
"quantity": "1", | ||
"item": { | ||
"name": "Some essential needs merch", | ||
"price": "30.00" | ||
}, | ||
"sum": "30.00", | ||
"taxes": [ | ||
{ | ||
"cat": "VAT", | ||
"rate": "reduced", | ||
"percent": "10.0%", | ||
"ext": { | ||
"es-tbai-product": "goods" | ||
} | ||
} | ||
], | ||
"total": "30.00" | ||
} | ||
], | ||
"totals": { | ||
"sum": "1740.00", | ||
"total": "1740.00", | ||
"taxes": { | ||
"categories": [ | ||
{ | ||
"code": "VAT", | ||
"rates": [ | ||
{ | ||
"key": "standard", | ||
"ext": { | ||
"es-tbai-product": "services" | ||
}, | ||
"base": "1620.00", | ||
"percent": "21.0%", | ||
"amount": "340.20" | ||
}, | ||
{ | ||
"key": "standard", | ||
"ext": { | ||
"es-tbai-product": "goods" | ||
}, | ||
"base": "90.00", | ||
"percent": "21.0%", | ||
"amount": "18.90" | ||
}, | ||
{ | ||
"key": "reduced", | ||
"ext": { | ||
"es-tbai-product": "goods" | ||
}, | ||
"base": "30.00", | ||
"percent": "10.0%", | ||
"amount": "3.00" | ||
} | ||
], | ||
"amount": "362.10" | ||
} | ||
], | ||
"sum": "362.10" | ||
}, | ||
"tax": "362.10", | ||
"total_with_tax": "2102.10", | ||
"payable": "2102.10" | ||
}, | ||
"notes": [ | ||
{ | ||
"key": "general", | ||
"text": "Some random description" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
$schema: "https://gobl.org/draft-0/bill/invoice" | ||
$tags: | ||
- "simplified" | ||
uuid: "7fe11346-a0ce-11ee-b8f0-e6a7901137ed" | ||
currency: "EUR" | ||
issue_date: "2023-12-18" | ||
series: "SIMPL" | ||
code: "0002" | ||
|
||
supplier: | ||
tax_id: | ||
country: "ES" | ||
code: "B98602642" # random | ||
name: "Provide One S.L." | ||
emails: | ||
- addr: "billing@example.com" | ||
addresses: | ||
- num: "42" | ||
street: "San Frantzisko" | ||
locality: "Bilbo" | ||
region: "Bizkaia" | ||
code: "48003" | ||
country: "ES" | ||
|
||
lines: | ||
- quantity: 20 | ||
item: | ||
name: "Development services" | ||
price: "90.00" | ||
unit: "h" | ||
discounts: | ||
- percent: "10%" | ||
reason: "Special discount" | ||
taxes: | ||
- cat: VAT | ||
rate: standard | ||
ext: | ||
es-tbai-product: "services" | ||
# es-tbai-not-subject: "RL" # set automatically | ||
- quantity: 1 | ||
item: | ||
name: "Some merch" | ||
price: "90.00" | ||
taxes: | ||
- cat: VAT | ||
rate: standard | ||
ext: | ||
es-tbai-product: "goods" | ||
# es-tbai-not-subject: "RL" # set automatically | ||
- quantity: 1 | ||
item: | ||
name: "Some essential needs merch" | ||
price: "30.00" | ||
taxes: | ||
- cat: VAT | ||
rate: reduced | ||
ext: | ||
es-tbai-product: "goods" | ||
# es-tbai-not-subject: "RL" # set automatically | ||
notes: | ||
- key: "general" | ||
text: "Some random description" |
Oops, something went wrong.