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.00'), pis=Decimal('6.50'))
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file br_regras_fiscais-0.2.0.tar.gz.
File metadata
- Download URL: br_regras_fiscais-0.2.0.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f537fb2b2f6ae16b730601e19f801a7cac61a963b78aa0bc0603e24dbdc22423
|
|
| MD5 |
64736661d8efe617ba212d726da028b2
|
|
| BLAKE2b-256 |
937b1aa023b075a80e8a8b83020b8ab8652a612f06d930ab6f39748354a1c041
|
Provenance
The following attestation bundles were made for br_regras_fiscais-0.2.0.tar.gz:
Publisher:
deploy.yml on admdocbr/br-regras-fiscais
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
br_regras_fiscais-0.2.0.tar.gz -
Subject digest:
f537fb2b2f6ae16b730601e19f801a7cac61a963b78aa0bc0603e24dbdc22423 - Sigstore transparency entry: 165281270
- Sigstore integration time:
-
Permalink:
admdocbr/br-regras-fiscais@3ee7646b49650c6e1be863d24900d044049f72ff -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/admdocbr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@3ee7646b49650c6e1be863d24900d044049f72ff -
Trigger Event:
release
-
Statement type:
File details
Details for the file br_regras_fiscais-0.2.0-py3-none-any.whl.
File metadata
- Download URL: br_regras_fiscais-0.2.0-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acb082ad277be128425e141debb9bd9ee7830a473f78dd5928e56a7338e529fa
|
|
| MD5 |
c8d4fb8f7bed10b0a32c2482d2606b13
|
|
| BLAKE2b-256 |
3fc5645077dafdcc3c414bef329fda75141b9b2a824d97938acd425d3d813446
|
Provenance
The following attestation bundles were made for br_regras_fiscais-0.2.0-py3-none-any.whl:
Publisher:
deploy.yml on admdocbr/br-regras-fiscais
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
br_regras_fiscais-0.2.0-py3-none-any.whl -
Subject digest:
acb082ad277be128425e141debb9bd9ee7830a473f78dd5928e56a7338e529fa - Sigstore transparency entry: 165281272
- Sigstore integration time:
-
Permalink:
admdocbr/br-regras-fiscais@3ee7646b49650c6e1be863d24900d044049f72ff -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/admdocbr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@3ee7646b49650c6e1be863d24900d044049f72ff -
Trigger Event:
release
-
Statement type: