.. _maker-template-construction: Construction in progress (``construction``) =========================================== 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.construction``; the other kinds take the same arguments. .. py:function:: co.bs.construction(name, spend, complete_at=None, life=None, *, opening=None, category='Depreciation expense', actuals=None) Add construction in progress, depreciated straight-line once it is complete. The line's value is the balance at the end of each period: the opening balance, the spend, and any capitalized interest, less depreciation after completion. Without ``complete_at`` the balance stays in construction in progress. :Parameters: **name** : str Asset name; required. It must be unique among the lines of this kind in the entity. **spend** : scalar, Quantity, Series, or dict Spend in each period, in the entity's currency per period; cash pays it. A dict maps period labels, indices, or dates to amounts and spends 0 in the other periods. **complete_at** : int, str, or date, optional Period in which construction completes. Depreciation starts in this period, on the balance at the end of the period before it. **life** : Quantity or Unit, optional Useful life from completion as a time such as ``5 * b.year``; required with ``complete_at``, and must be positive. **opening** : scalar, Quantity, Series, or dict, optional Opening balance before the first period, in the entity's currency. **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 construction line, valued at its balance. Its ``balance`` attribute is the same series; with ``complete_at``, its ``depreciation`` attribute is the depreciation expense line. :Raises: TypeError At construction, if ``complete_at`` is given without ``life``, or 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. 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 ``complete_at`` given as a label or date, or a period of ``spend``, 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. Spending debits the line and credits cash. Depreciation after completion is the balance at the end of the period before ``complete_at``, times the period length over ``life``, never more than the balance, and is booked in the layout's depreciation kind, which ``co.depreciation`` counts. Interest from ``co.bs.loan`` can be added to the cost with ``capitalize_into``. See the `construction row `_. .. rubric:: Examples Spend 100 in each of the first two months, complete the asset in the third, and depreciate it over a year: >>> import boki as b >>> m = b.Model("Plant", start="2027-01", periods=4, step=b.month) >>> co = m.entity("A", standard=b.IFRS) >>> co.bs.opening(cash=1000) >>> plant = co.bs.construction("Plant", {0: 100, 1: 100}, complete_at=2, life=1 * b.year) >>> r = m.render() >>> [round(r.value(plant, month), 2) for month in ("2027-01", "2027-02", "2027-03", "2027-04")] [100.0, 200.0, 183.33, 166.67] Makers that use this template ----------------------------- * :doc:`IFRS general `: ``co.bs.construction`` * :doc:`US GAAP general `: ``co.bs.construction`` * :doc:`J-GAAP general `: ``co.bs.construction``