.. _maker-template-fixed_asset: 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. .. py:function:: 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 `` depreciation``, and its credit reduces the asset. :Parameters: **name** : str Asset name; required. It must be unique among the lines of this kind in the entity. **cost** : scalar, Quantity, Series, or dict, optional Purchase price in the entity's currency per period. With ``at``, a single purchase in that period. Without ``at``, 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. **at** : int, str, or date, optional Period of the purchase. Depreciation starts in the period after it. **life** : Quantity or Unit, optional Useful life as a time such as ``5 * b.year``. It is required unless ``depreciation`` is given, and must be positive. **method** : str, default="straight" ``"straight"`` for straight-line depreciation of the cost less ``salvage`` over ``life``, or ``"ddb"`` for double-declining balance on the opening carrying amount. Depreciation never takes the carrying amount below ``salvage``. A capex program accepts only ``"straight"``. **salvage** : scalar, Quantity, or Series, default=0 Residual value in the entity's currency that depreciation does not go below. A capex program needs 0. **sell_at** : int, 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. **depreciation** : scalar, Quantity, Series, or dict, optional Depreciation expense in each period, in the entity's currency per period. It replaces the computed schedule, so ``at`` and ``life`` are not needed. **opening** : scalar, 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``, or ``at`` and ``life``. **category** : str, default="Depreciation expense" Label stored as ``LineItem.category`` on the depreciation expense line. **actuals** : dict, optional Historical carrying amounts for periods up to ``Model.actual_until``, as ``{period: amount}``. Requires ``Model(..., actual_until=...)``. :Returns: LineItem The asset line, valued at its carrying amount. Its ``balance`` attribute is the same series, and its ``depreciation`` attribute is the depreciation expense line. :Raises: TypeError At construction, if ``depreciation`` is not given and ``life`` is missing, or ``at`` and ``cost`` are both missing; if a capex program has a constant ``cost``, a ``method`` other than ``"straight"``, a nonzero ``salvage``, 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 ``life`` is not positive, or a capex program's ``life`` is not a whole number of periods. At evaluation, if ``method`` is not ``"straight"`` or ``"ddb"``. UnitError At construction, if an amount is in a unit other than the entity's currency, or ``life`` is not a time. IndexError At evaluation, if ``at``, a period of ``cost``, or ``sell_at`` given as a label or date 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. 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 by ``co.amortization`` for the ``intangible`` kind. Straight-line depreciation takes the carrying amount at ``at`` less ``salvage``, times the period length over ``life``; double-declining balance takes twice that rate of the opening carrying amount. See the `fixed asset row `_ and the `depreciation measures `_. .. rubric:: 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 ----------------------------- * :doc:`IFRS general `: ``co.bs.fixed_asset``, ``co.bs.intangible`` * :doc:`US GAAP general `: ``co.bs.fixed_asset``, ``co.bs.intangible`` * :doc:`J-GAAP general `: ``co.bs.fixed_asset``, ``co.bs.intangible`` * :doc:`bank `: ``co.bs.fixed_asset``, ``co.bs.intangible``