pytbai allows to create, manage and send TicketBai invoices to the Basque tax authorities
Project description
pytbai
pytbai allows to create, manage and send TicketBai invoices to the Basque tax authorities.
Usage
You need to configure your bussiness and software info in a JSON file:
{
"subject": {
"entity_id": "99999974E",
"name": "BUSSINESS NAME"
},
"software": {
"license": "TBAIGIPRE00000000501",
"dev_entity": "P2000000F",
"soft_name": "TBAI",
"soft_version": "1.0"
}
}
Then create a invoice:
from pytbai import TBai
from decimal import Decimal
tbai = TBai(json)
invoice = tbai.create_invoice("TB-2021-S", 1, "First invoice", "S")
invoice.create_line("First product", Decimal("1"), Decimal("200"), Decimal("20"))
invoice.create_line("Second product", Decimal("2"), Decimal("350"))
The json
parameter is a previous JSON file you've created.
Finally sign and send the invoice:
result = tbai.sign_and_send("/path_to_p12_certificate", "password")
You can also get the full structure of TBai invoice:
json_structure = tbai.get_json(invoice)
TODO
- Recipient data
- Multiple recipient data
- Third party / Recipient's invoices
- Corrective invoices
- Corrected or replaced invoices
- Tax free invoices
- Invoices without national counterparty
- Chaining of previous invoice
How to contribute
Please read the Code of Conduct documentation first, then all contributions are done via Pull Requests on GitHub but don´t hesitate to open a new issue.
Credits
This project is made by CodeSyntax.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pytbai-1.6.3.tar.gz
.
File metadata
- Download URL: pytbai-1.6.3.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2fc8fbff7a11a49e9059cd49e3d1f15d777d04e41c763cdad77d0dee36fb1b7 |
|
MD5 | 833a6f4c9a9f3b0536a96fac5f2fe181 |
|
BLAKE2b-256 | 133149f3141467657b08f3872527beec11d98284df1b1c092a26a300b857c034 |
File details
Details for the file pytbai-1.6.3-py3-none-any.whl
.
File metadata
- Download URL: pytbai-1.6.3-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 803125e83906ec72ba06ce6c962746ebbafafefaa82594b703f9653a122e428c |
|
MD5 | 3e7b8cbe5b0be8be0619d62583f9a428 |
|
BLAKE2b-256 | f5452aed21ea0b345d8e58d12da9b3ddf3678d5302d4e30fdb922c5b68a77c45 |