> ## Documentation Index
> Fetch the complete documentation index at: https://www.twicecommerce.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to track a stock item's costs and income

> Record what a unit cost you and what it has earned, and read its profitability — including which entries TWICE maintains for you and which ones you cannot edit.

<Card title="Open in TWICE Admin" icon="external-link" href="https://admin.twicecommerce.com/inventory/stock-items" horizontal>
  inventory/stock-items
</Card>

Every unit in a rental fleet has two numbers behind it: what it has cost you, and what it has brought in. The **Income & Expenses** tab on a stock item keeps both, and subtracts one from the other.

The part worth understanding before you start is that the tab holds entries from three different sources, and they do not all behave the same way. One you type, one TWICE keeps in step with a field elsewhere on the item, and one is calculated from orders and cannot be edited at all.

## Prerequisites

<Warning>
  **Required permission:** `inventory:stock_item_cost`.

  This is the one inventory sub-resource the **Member** system role does not hold. If the Income & Expenses tab is missing for you, that is why — the rest of the item is visible, the money is not. Owner, Admin, and Manager hold it.
</Warning>

<Info>
  **Before you start, decide what you are tracking.** Per-unit costs are worth the effort on individually tracked stock, where each unit has its own purchase price and its own repair history. On pooled stock the entries belong to the pool rather than to a unit, which is usually less useful.
</Info>

## The Walkthrough

<Steps>
  <Step title="Open Income & Expenses">
    Open the stock item and go to the **Income & Expenses** tab.

    Three totals sit across the top:

    | Card              | What it is                             |
    | ----------------- | -------------------------------------- |
    | **Total Costs**   | Every cost entry on the unit, added up |
    | **Total Income**  | Everything the unit has earned         |
    | **Profitability** | Total Income minus Total Costs         |

    Profitability is exactly that subtraction — no depreciation, no book value, no time weighting. If you want a residual or depreciated value, that is an attribute formula rather than this tab.
  </Step>

  <Step title="Set the purchase price">
    The purchase price is not added here. It is a field on the item itself, and TWICE mirrors it into this tab as a cost entry named **Purchase price**.

    Set it on the item and the entry appears. Change it and the entry follows. Clear the field and the entry is removed. There is no need — and no way — to keep the two in step by hand.
  </Step>

  <Step title="Add the costs that come up later">
    Everything else you spend on the unit gets typed in: a repair, a replacement part, a service, a cleaning charge.

    Select **Add** and fill in:

    * **Type** — **Cost** or **Income**
    * **Name** — what it was, and this is what you will read in the table later, so make it specific
    * **Description** — optional detail
    * **Amount**

    The entry lands in the table with today's date and counts towards the totals immediately.
  </Step>

  <Step title="Read the income that arrived on its own">
    You do not record rental income. When the unit goes out on an order, TWICE derives an income entry from that order and shows it here, named **Order revenue**, with the order in the **Reference** column.

    These entries are calculated from the orders, not stored alongside your own. That has one visible consequence: **you cannot edit or delete them**. They change when the order changes and disappear if the order does.
  </Step>

  <Step title="Read the table">
    | Column          | What it holds                                            |
    | --------------- | -------------------------------------------------------- |
    | **Date**        | When the entry applies                                   |
    | **Type**        | Cost or Income                                           |
    | **Name**        | *Purchase price*, *Order revenue*, or whatever you typed |
    | **Description** | Your optional detail                                     |
    | **Amount**      | The value                                                |
    | **Reference**   | The order, for order-derived income                      |

    Sorting by **Type** splits the unit's spending from its earnings, which is usually the fastest way to see where a bad profitability number comes from.
  </Step>
</Steps>

## How do I know it worked?

* **A cost you added shows in the table** and **Total Costs** has gone up by that amount.
* **The purchase price appears as a cost entry named Purchase price**, matching the field on the item.
* **Completed rentals show as Order revenue rows** with a reference you can trace back to the order.
* **Profitability equals Total Income minus Total Costs.** If it does not, one of the totals is not what you think it is — work through the pitfalls.

## Troubleshooting / Common Pitfalls

<AccordionGroup>
  <Accordion title="The Income & Expenses tab is not there">
    **Cause:** the `stock_item_cost` permission. It is the one inventory sub-resource the **Member** system role does not hold, and it is deliberately separate so you can let people manage stock without showing them what it cost.

    **What to do:** ask for a role that includes it, or have someone with Owner, Admin, or Manager read the numbers. A custom role can grant it on its own.
  </Accordion>

  <Accordion title="I cannot delete an Order revenue entry">
    **Working as designed.** Order-derived income is calculated from the orders themselves rather than stored as an entry you own. Deleting acts on entries that were typed in; there is nothing of that kind behind an order revenue row to delete.

    **What to do:** if the figure is wrong, the order is wrong. Fix it there and the row follows. If you need to offset it rather than correct it, add a cost entry that explains why.
  </Accordion>

  <Accordion title="Editing the Purchase price entry did not stick, or it vanished">
    **Cause:** that entry is a mirror of the purchase price field on the item, not an independent row. It is kept in step for you.

    **What to do:** change the value on the item. And note the other direction: clearing the purchase price field **deletes** the cost entry rather than zeroing it, so the unit's Total Costs drops by that amount.
  </Accordion>

  <Accordion title="Total Income is zero on a unit that has definitely been rented">
    **Several possibilities, in the order worth checking.**

    The orders went out on a different unit of the same SKU — routine on pooled stock, where the SKU is booked and units are interchangeable. Check the item's [Events](/docs/inventory/stock-items/events) tab for order rows: no rows there means no income here.

    The bookings have not reached the state that produces income yet.

    Or the income calculation itself failed. It fails quietly, returning nothing rather than an error, so a zero can mean "none" or "could not tell". If the Events tab shows orders and this tab shows no revenue against them, that is the case to raise rather than to explain away.
  </Accordion>

  <Accordion title="Profitability looks wrong for a unit we have had for years">
    **Cause:** it is a plain subtraction of two running totals. It does not depreciate the purchase price over the unit's life, and it does not care how long the money took to arrive. A unit bought last week and one bought in 2019 are treated identically.

    **What to do:** for book value or a residual, compute it as an attribute formula from the purchase price and the acquisition date — that is where depreciation lives in TWICE. Read more: [Formulas](/docs/admin/formulas).
  </Accordion>

  <Accordion title="I want this across the whole fleet, not one unit at a time">
    **Wrong surface.** This tab answers the question for one unit.

    **What to do:** the inventory table can sort and filter on cost and income, so the fleet-wide view is there rather than here. For period reporting, use Reports.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Stock Item - Income & Expenses" icon="coins" href="/docs/inventory/stock-items/income-and-expenses">
    The tab reference, field by field.
  </Card>

  <Card title="Formulas" icon="calculator" href="/docs/admin/formulas">
    Where depreciation and residual value are computed.
  </Card>

  <Card title="Read a stock item's history" icon="clock-rotate-left" href="/docs/guides/inventory/read-stock-item-history">
    The orders behind the income, on the Events tab.
  </Card>

  <Card title="Archive stock items" icon="box-archive" href="/docs/guides/inventory/archive-stock-items">
    Retiring a unit once the numbers say it is time.
  </Card>
</CardGroup>
