.. _maker-template-income_tax: 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. .. py:function:: 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 ``rate`` and ``base`` to compute the tax with a loss carryforward, or give ``amount`` or ``data`` for a tax computed outside boki (brackets, minimum taxes). The tax is booked as an expense paid in cash, or accrued and paid later with ``settle``. :Parameters: **name** : str Line name; required. It must be unique among the lines of this kind in the entity. **amount** : scalar, Quantity, Series, or dict, optional Tax amount in each period, in the entity's currency per period. When ``amount`` or ``data`` is given, ``rate``, ``base`` and ``nol`` are ignored. A dict maps period labels, indices, or dates to amounts and books 0 in the other periods. **rate** : scalar, Series, or callable, optional Tax rate on the taxable profit, a dimensionless ratio such as ``0.3`` for 30%. A callable receives the taxable profit as a `Series` and returns the tax as a `Series`; use it for progressive brackets. Required with ``base`` unless ``amount`` or ``data`` is given. **base** : scalar 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 unless ``nol`` is ``False``. Required with ``rate`` unless ``amount`` or ``data`` is given. **nol** : bool or amount, default=True Loss carryforward. ``True`` starts the carryforward at zero, an amount in the entity's currency starts it with losses carried in from before the model, and ``False`` has no carryforward: the tax is ``rate`` times the base as it is, which is negative in a period of loss. **data** : dict, optional Tax amounts for selected periods as ``{period: amount}``. Other periods book 0. It replaces ``amount`` when both are given. **settle** : Kernel, 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. **actuals** : dict, optional Historical tax amounts for periods up to ``Model.actual_until``, as ``{period: amount}``. Requires ``Model(..., actual_until=...)``. :Returns: LineItem The tax expense line. When it was computed from ``rate`` and ``base`` with ``nol`` not ``False``, its ``nol`` attribute holds the carryforward as ``balance`` (losses left at the end of each period), ``used`` (losses used against this period's profit), and ``taxable`` (the profit left after them). :Raises: TypeError At construction, if neither ``amount`` nor ``data`` is given and ``rate`` or ``base`` is missing, or an amount has a type boki cannot use in an expression. ValueError At construction, if ``settle`` is not a distribution (weights that do not sum to 1, or a ``b.curve`` that 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 ``amount`` or ``data`` is outside the model timeline. .. rubric:: 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 ``rate`` and ``base``, the tax in each period is ``rate`` times 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 callable ``rate`` is applied to this taxable profit, after the losses are used. The tax is booked as an expense; to pay it later, ``settle`` accrues it in the shared payable (``Accounts payable`` before the standard renames it). Deferred taxes are separate: see ``co.bs.deferred_tax``. See the `P&L rows table `_ for the arguments in context. .. rubric:: 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.nol`` reads 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 ----------------------------- * :doc:`IFRS general `: ``co.pl.income_tax`` * :doc:`US GAAP general `: ``co.pl.income_tax`` * :doc:`J-GAAP general `: ``co.pl.income_tax`` * :doc:`bank `: ``co.pl.income_tax``