Fixed assets (fixed_asset)#
One signature and one documentation text are shared by every maker listed at the end of this page. The call is shown for co.bs.fixed_asset; the other kinds take the same arguments.
- co.bs.fixed_asset(name, cost=None, at=None, *, life=None, method='straight', salvage=0, sell_at=None, depreciation=None, opening=None, category='Depreciation expense', actuals=None)#
Add a fixed asset bought with cash and depreciated, optionally sold at its carrying amount.
The line’s value is the asset’s carrying amount (book value) at the end of each period. The depreciation expense is booked as a separate PL line named
<name> depreciation, and its credit reduces the asset.- Parameters:
- namestr
Asset name; required. It must be unique among the lines of this kind in the entity.
- costscalar, Quantity, Series, or dict, optional
Purchase price in the entity’s currency per period. With
at, a single purchase in that period. Withoutat, the spend of each period, which is a capex program when it is a Series or a dict: each period’s spend is depreciated on its own, from the next period.- atint, str, or date, optional
Period of the purchase. Depreciation starts in the period after it.
- lifeQuantity or Unit, optional
Useful life as a time such as
5 * b.year. It is required unlessdepreciationis given, and must be positive.- methodstr, default=”straight”
"straight"for straight-line depreciation of the cost lesssalvageoverlife, or"ddb"for double-declining balance on the opening carrying amount. Depreciation never takes the carrying amount belowsalvage. A capex program accepts only"straight".- salvagescalar, Quantity, or Series, default=0
Residual value in the entity’s currency that depreciation does not go below. A capex program needs 0.
- sell_atint, str, or date, optional
Period in which the asset is sold at its carrying amount after that period’s depreciation: the cash received equals the carrying amount, so there is no gain or loss.
- depreciationscalar, Quantity, Series, or dict, optional
Depreciation expense in each period, in the entity’s currency per period. It replaces the computed schedule, so
atandlifeare not needed.- openingscalar, Quantity, Series, or dict, optional
Opening carrying amount before the first period, in the entity’s currency. To depreciate an asset that only has an opening balance, give
depreciation, oratandlife.- categorystr, default=”Depreciation expense”
Label stored as
LineItem.categoryon the depreciation expense line.- actualsdict, optional
Historical carrying amounts for periods up to
Model.actual_until, as{period: amount}. RequiresModel(..., actual_until=...).
- Returns:
- LineItem
The asset line, valued at its carrying amount. Its
balanceattribute is the same series, and itsdepreciationattribute is the depreciation expense line.
- Raises:
- TypeError
At construction, if
depreciationis not given andlifeis missing, oratandcostare both missing; if a capex program has a constantcost, amethodother than"straight", a nonzerosalvage, or periods of different lengths; or if an amount has a type boki cannot use in an expression.- ValueError
At construction, if a line with this name already exists for this kind, or
lifeis not positive, or a capex program’slifeis not a whole number of periods. At evaluation, ifmethodis not"straight"or"ddb".- UnitError
At construction, if an amount is in a unit other than the entity’s currency, or
lifeis not a time.- IndexError
At evaluation, if
at, a period ofcost, orsell_atgiven as a label or date is 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.
The purchase debits the asset and credits cash. The expense goes to the layout’s depreciation kind (selling, general and administrative expenses in the general layouts) and is counted by
co.depreciation, or byco.amortizationfor theintangiblekind. Straight-line depreciation takes the carrying amount atatlesssalvage, times the period length overlife; double-declining balance takes twice that rate of the opening carrying amount.See the fixed asset row and the depreciation measures.
Examples
A machine bought in the first year and depreciated over five years in an annual model:
>>> import boki as b >>> m = b.Model("Machine", start="2027-01", periods=3, step=b.year) >>> co = m.entity("A", standard=b.IFRS) >>> co.bs.opening(cash=1000) >>> machine = co.bs.fixed_asset("Machine", cost=500, at=0, life=5 * b.year) >>> r = m.render() >>> [round(r.value(machine, year)) for year in ("2027", "2028", "2029")] [500, 400, 300] >>> [round(r.value(machine.depreciation, year)) for year in ("2027", "2028", "2029")] [0, 100, 100]
In a monthly model the same life is twelve times as many periods; depreciation is a twelfth of a year each month:
>>> m = b.Model("Machine", start="2027-01", periods=3, step=b.month) >>> co = m.entity("A", standard=b.IFRS) >>> co.bs.opening(cash=1000) >>> machine = co.bs.fixed_asset("Machine", cost=600, at=0, life=1 * b.year) >>> r = m.render() >>> [round(r.value(machine.depreciation, month)) for month in ("2027-01", "2027-02", "2027-03")] [0, 50, 50]
Makers that use this template#
IFRS general:
co.bs.fixed_asset,co.bs.intangibleUS GAAP general:
co.bs.fixed_asset,co.bs.intangibleJ-GAAP general:
co.bs.fixed_asset,co.bs.intangiblebank:
co.bs.fixed_asset,co.bs.intangible