Income tax (income_tax)#
One signature and one documentation text are shared by every maker listed at the end of this page. The call is shown for co.pl.income_tax; the other kinds take the same arguments.
- co.pl.income_tax(name, amount=None, *, rate=None, base=None, nol=True, data=None, settle=None, actuals=None)#
Add income tax on a base you choose, or a tax amount computed elsewhere.
The tax law’s base is a modeling decision, so the base is an argument: give
rateandbaseto compute the tax with a loss carryforward, or giveamountordatafor a tax computed outside boki (brackets, minimum taxes). The tax is booked as an expense paid in cash, or accrued and paid later withsettle.- Parameters:
- namestr
Line name; required. It must be unique among the lines of this kind in the entity.
- amountscalar, Quantity, Series, or dict, optional
Tax amount in each period, in the entity’s currency per period. When
amountordatais given,rate,baseandnolare ignored. A dict maps period labels, indices, or dates to amounts and books 0 in the other periods.- ratescalar, Series, or callable, optional
Tax rate on the taxable profit, a dimensionless ratio such as
0.3for 30%. A callable receives the taxable profit as a Series and returns the tax as a Series; use it for progressive brackets. Required withbaseunlessamountordatais given.- basescalar or Series, optional
Profit before tax and before loss carryforwards, in the entity’s currency per period, such as
co.pl.pretax_income. A loss in a period adds to the carryforward unlessnolisFalse. Required withrateunlessamountordatais given.- nolbool or amount, default=True
Loss carryforward.
Truestarts the carryforward at zero, an amount in the entity’s currency starts it with losses carried in from before the model, andFalsehas no carryforward: the tax isratetimes the base as it is, which is negative in a period of loss.- datadict, optional
Tax amounts for selected periods as
{period: amount}. Other periods book 0. It replacesamountwhen both are given.- settleKernel, optional
How the tax is paid after the booking period. The tax accrues in the shared payable and is paid by the kernel weights, which must sum to 1.
- actualsdict, optional
Historical tax amounts for periods up to
Model.actual_until, as{period: amount}. RequiresModel(..., actual_until=...).
- Returns:
- LineItem
The tax expense line. When it was computed from
rateandbasewithnolnotFalse, itsnolattribute holds the carryforward asbalance(losses left at the end of each period),used(losses used against this period’s profit), andtaxable(the profit left after them).
- Raises:
- TypeError
At construction, if neither
amountnordatais given andrateorbaseis missing, or an amount has a type boki cannot use in an expression.- ValueError
At construction, if
settleis not a distribution (weights that do not sum to 1, or ab.curvethat does not end in 0), or an income tax line with this name already exists.- UnitError
At construction, if an amount is in a unit other than the entity’s currency.
- IndexError
At evaluation, if a period of
amountordatais outside the model timeline.
Notes
The documentation of each maker starts this section with the maker’s kind, its side, and the section and cash-flow class of the kind; the layout pages list them.
With
rateandbase, the tax in each period isratetimes the taxable profit. The taxable profit is the base if positive, less the losses carried forward, which are used up to the whole profit. A loss adds to the carryforward and bears no tax. A callablerateis applied to this taxable profit, after the losses are used.The tax is booked as an expense; to pay it later,
settleaccrues it in the shared payable (Accounts payablebefore the standard renames it). Deferred taxes are separate: seeco.bs.deferred_tax.See the P&L rows table for the arguments in context.
Examples
Tax at 30% of the profit before tax in a monthly model:
>>> import boki as b >>> months = ["2027-01", "2027-02", "2027-03"] >>> m = b.Model("Tax", start="2027-01", periods=3, step=b.month) >>> co = m.entity("A", standard=b.IFRS) >>> co.bs.opening(cash=1000) >>> sales = co.pl.revenue("Sales", 100) >>> costs = co.pl.sga("Costs", 40) >>> tax = co.pl.income_tax("Income tax", rate=0.3, base=co.pl.pretax_income) >>> r = m.render() >>> [round(r.value(tax, month)) for month in months] [18, 18, 18]
A first-period loss shelters the profits that follow, and
tax.nolreads the carryforward:>>> m = b.Model("Losses", start="2027-01", periods=3, step=b.month) >>> co = m.entity("A", standard=b.IFRS) >>> co.bs.opening(cash=1000) >>> profit = m.series("Profit", data={0: -100, 1: 60, 2: 80}) >>> tax = co.pl.income_tax("Income tax", rate=0.25, base=profit) >>> r = m.render() >>> [round(r.value(tax, month)) for month in months] [0, 0, 10] >>> [round(r.value(tax.nol.balance, month)) for month in months] [100, 40, 0]
Makers that use this template#
IFRS general:
co.pl.income_taxUS GAAP general:
co.pl.income_taxJ-GAAP general:
co.pl.income_taxbank:
co.pl.income_tax