tax
Tax services.
add_tax(*, to_value, at_rate)
cached
Add tax to a value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
to
|
Decimal
|
Amount to add tax to. |
required |
at_rate
|
Decimal
|
Rate (percentage) to add tax at. 20% should be written as Decimal("20") |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Decimal |
Decimal
|
The amount with tax added. |
Source code in src/pycountant/services/tax.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | |
remove_tax(*, from_value, at_rate)
cached
Remove tax from a value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
to
|
Decimal
|
Amount to remove tax from. |
required |
at_rate
|
Decimal
|
Rate (percentage) to remove tax at. 20% should be written as Decimal("20") |
required |
Returns:
| Name | Type | Description |
|---|---|---|
Decimal |
Decimal
|
The amount with tax removed. |
Source code in src/pycountant/services/tax.py
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |