Calculate BR taxes from NF total value, and calculate the original value of a NF from a received payment
Project description
br-regras-fiscais
A lib to calculate taxes on Brasil for NFe, and also get total NFe value from a payment.
It takes in account if Imposto de Renda is less than R$ 10,00, and same for CRF (PIS, COFINS,CSLL)
Installation
br-regras-fiscais can be installed via pypi.
pip install br-regras-fiscais
Usage
original_nota_value
Using the paid valued from a Transaction it returns the original total value of a NF
>>> from br_regras_fiscais.taxes_calc import original_nota_value
>>> original_nota_value(1000)
Decimal('1065.53')
tax_dict
Returns a Data Class with the taxes values:
@dataclass
class TaxesValues:
cofins: Decimal
csll: Decimal
ir: Decimal
pis: Decimal
@property
def sum_crf(self) -> Decimal:
return self.pis + self.csll + self.cofins
>>> from br_regras_fiscais.taxes_calc import tax_dict
>>> tax_dict(1000)
TaxesValues(cofins=Decimal('30.00'), csll=Decimal('10.00'), ir=Decimal('15.000'), pis=Decimal('6.5000'))
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 br_regras_fiscais-0.1.1.tar.gz
.
File metadata
- Download URL: br_regras_fiscais-0.1.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2797b89e6dc61debbd43c4bf6358d570581d6cd506de40c94fc2025723d1ea9d |
|
MD5 | 6d5180f47927805aca18494a57c85814 |
|
BLAKE2b-256 | 6cc3c94254a69969fa4bc81dfb9a46d2ddd23578465a3605aa704186fd1951ba |
File details
Details for the file br_regras_fiscais-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: br_regras_fiscais-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b349afdf2c87d475efb65238d102b0c05b149c738f36c948c71ecbc14bc777b1 |
|
MD5 | 36de306ba2bd89b68229da6a3989eb1d |
|
BLAKE2b-256 | 9976ce387a69aa7145dd82b3d1554ba10d5f0b6880e8a8a977ff9ce350114b0b |