## Spare parts & warehouses

The **Parts** and **Warehouse** modules are part of the [Service add-on](/service):

- **Parts** — a catalog of spare parts with price, VAT and own cost. A catalog part fills the name, price and cost of a job or quote item.
- **Warehouse** — warehouses (e.g. a central one and the technicians' vans), part stock in each warehouse and a register of stock changes.

Both are available in the main menu: **Parts** and **Warehouse**.

You can use the parts catalog without keeping stock — stock management is **off** by default and is switched on in the warehouse settings (see [Settings](#settings)).

{% callout title="Permissions" %}
**Spare parts** group: **Parts list**, **View parts**, **Add and import parts**, **Edit parts**, **Delete parts**.

**Warehouse** group: **Warehouse list**, **View warehouse**, **Add warehouses**, **Edit warehouses**, **Delete warehouses**, **Stock settings (mode, shortage)**, **View stock**, **Receipts, adjustments and stock import**, **Add a part despite a shortage**, **View stock changes**.

A part's own cost is visible only to people with the **View costs and margin** permission (in the **Service work** group).
{% /callout %}

## Parts catalog

The parts list shows: **Code**, **Name**, **Unit**, **Net price**, **VAT (%)**, **Own cost** (only with the cost permission) and **Active**. You can filter the list by status: **All**, **Active**, **Inactive**.

### Adding and editing a part

Click **Add part** and fill in:

| Field | Description |
|---|---|
| **Code** | Unique part code (up to 64 characters). A duplicate shows: *"A part with this code already exists"* |
| **Name** | Part name (up to 255 characters) |
| **Unit** | E.g. pcs, set, m |
| **Net price** | Selling price of one unit |
| **VAT (%)** | Rate from 0 to 100 |
| **Own cost** | What one unit costs you — visible only with the cost permission; the customer never sees it |
| **Active** | An inactive part cannot be added to a new job item; existing items keep working |

A job item keeps a **copy** of the price and cost from the moment it was added — changing the price in the catalog does not change existing items.

### Deleting a part

A part can be deleted only if it has never been used. A part used on a job, a quote or holding stock cannot be deleted — you will see *"Could not delete. A part used on a job, a quote or holding stock can only be deactivated."* In that case, clear **Active**.

### Importing parts from CSV

The **CSV import** button on the parts list opens the **Import parts from CSV** window.

- Columns: `code`, `name`, `unit`, `unit_price_net`, `tax_rate`, `unit_cost`.
- Separator `;` or `,`; a decimal comma is accepted.
- UTF-8 encoding (Windows-1250 is accepted too, which is a typical export from Polish Excel).
- Limit: 2 MB or 5000 rows.

A row with a new code adds a part; a row with an existing code **updates** it. After the import you see a summary *Added: …, updated: …* and a list of rows with errors (*Row N: …*). Valid rows are saved even when other rows have errors.

| Row error | Meaning |
|---|---|
| missing code / missing name | Empty `code` or `name` |
| code longer than 64 characters / name longer than 255 characters / unit longer than 20 characters | Value too long |
| invalid price / invalid VAT / invalid cost | The value is not a valid number |
| the part exists — updating it needs the edit permission | The code is already in the catalog and the importing user lacks **Edit parts**; new codes are still added |

{% callout type="warning" title="The unit_cost column" %}
If the `unit_cost` column is filled in and the importing user lacks **View costs and margin**, the whole import is rejected with *"The unit_cost column needs the own-cost permission"* — nothing is saved.
{% /callout %}

## Warehouse

The **Warehouse** screen has the **Warehouses**, **Stock**, **Stock changes** and **Settings** tabs. Each tab requires its own permission, and the **Stock** and **Stock changes** tabs are visible only when stock management is on.

### Warehouses

Part stock is counted separately for each warehouse. A typical setup is a central warehouse plus one warehouse per technician's van.

| Field | Description |
|---|---|
| **Code** | Unique warehouse code — used e.g. in the stock import |
| **Name** | Warehouse name |
| **Default** | Parts are taken from the default warehouse when neither the item nor the issue's organization names another. There can be only one default — marking a new one unmarks the previous one |
| **Active** | An inactive warehouse cannot be picked on a new item |

A warehouse with stock, stock changes or job items can only be deactivated, not deleted.

### Organization default warehouse

In **System → Organizations**, in the **Warehouse** section, you can set the organization's **Default warehouse**. Parts on this organization's jobs are taken from this warehouse unless the item names another. The **Account default warehouse** option means the warehouse marked as default.

The item's warehouse is therefore chosen in this order:

1. the warehouse picked on the job item,
2. the default warehouse of the issue's organization,
3. the account's default warehouse.

### Stock

The **Stock** tab shows, for each part + warehouse pair:

| Column | Meaning |
|---|---|
| **Part code**, **Part**, **Warehouse** | What and where the level refers to |
| **Level** | Quantity physically in the warehouse |
| **Reserved** | Quantity on open jobs, not yet issued from stock |
| **Available** | Level minus reserved |
| **Minimum** | Minimum level — set manually with **Change minimum** |

Filters: warehouse (**All** or a specific one) and **Below minimum only**. A level appears after the first receipt, adjustment or after a part is added to a job.

### Stock change — receipt and adjustment

The **Receipt / adjustment** button opens the **Stock change** form:

| Kind | Effect |
|---|---|
| **Receipt** | Adds the **Received quantity** to the level (must be greater than zero) |
| **Adjustment** | Sets the level to the entered value (**Level after adjustment**) and requires a **Reason** — e.g. after a stocktake |

Pick a part (search from 2 characters) and a warehouse — the form shows the **Current level**. The quantity can have up to 3 decimal places. An adjustment to a value equal to the current level ends with *"The level already equals the entered value — nothing to change"*.

There is no separate operation for moving stock between warehouses — use two adjustments (or an adjustment and a receipt).

### Importing stock from CSV

The **CSV import** button in the **Stock** tab opens the **Import stock from CSV** window.

- Columns: `code` (part code), `warehouse_code` (warehouse code), `quantity`.
- Each row **sets** the level to the given value — like an adjustment with the reason "import".
- Encoding and limits as in the parts import (UTF-8 or Windows-1250, 2 MB or 5000 rows).

The summary shows *Changed: …, unchanged: …* and rows with errors: *missing part code*, *missing warehouse code*, *invalid quantity*, *no part with this code*, *no warehouse with this code*.

### Stock changes

The **Stock changes** tab is a register of every change — append-only; entries cannot be edited or deleted.

| Kind | When it is created |
|---|---|
| **Receipt** | A manual receipt into a warehouse |
| **Adjustment** | A manual adjustment or a stock import |
| **Issue from stock** | A job closed as **Done** or **Failed** |
| **Return to stock** | Deleting a job that was already done or failed (correcting a mistake) |

Columns: **Date**, **Kind**, **Part**, **Warehouse**, **Quantity**, **Level after change**, **Reason**, **By**. For changes coming from jobs, the **Reason** column links to the issue.

Filters: kind, part code, warehouse and the **From** / **To** date range. Above the table you see a summary *Changes: … · total quantity: …* — e.g. the **Issue from stock** filter with a date range gives a parts consumption report.

### XLSX export

The **Stock** and **Stock changes** tabs have an **XLSX export** button — the file contains the rows matching the current filters. Change dates in the file are in the account's time zone. The export covers at most 10,000 rows.

## Settings

The **Settings** tab (permission **Stock settings (mode, shortage)**):

| Setting | Options |
|---|---|
| **Stock management** | **Off** — parts can be added to jobs and quotes (with price and cost from the catalog), but nothing is reserved or issued. **On — stock kept in Reklamator** — a part added to a job is reserved and closing the job issues it from stock |
| **Not enough available stock** | **Warn and allow** — the item is saved with a shortage warning. **Block adding the item** — the item cannot be added; the block can be bypassed by a user with the **Add a part despite a shortage** permission |

Add at least one warehouse before switching stock on.

With stock management off, the **Stock** and **Stock changes** tabs are unavailable, and receipts, adjustments and stock imports are blocked (*"Stock is switched off"*).

## Parts on a job

Parts are added on a service job in the **Parts and labor** section → **Add item**, choosing the **Item source**: **Manual**, **Product** or **Part**. Once you pick a catalog part (search from 3 characters), the name, net price, VAT and cost are filled in automatically. The **Warehouse** field lets you choose a warehouse; by default it is the **Default warehouse** (see [the warehouse selection order](#organization-default-warehouse)). More about job items in [Service jobs](/service/jobs).

With stock management on:

| What happens on the job | Effect on the warehouse |
|---|---|
| Adding an item with a part | The part is **reserved** (**Reserved** goes up, **Available** goes down) |
| Changing the quantity, part or warehouse | The reservation is recalculated |
| Deleting the item | The reservation disappears |
| Closing the job as **Done** or **Failed** | **Issue from stock** — the item is marked *issued from stock* |
| Cancelling the job (**Cancelled**) | The reservation disappears, the level is unchanged |
| Deleting a done or failed job | **Return to stock** |

The quantity of an item with a part must be greater than zero.

### Stock shortage

When the available quantity is lower than needed:

- in **Warn and allow** mode, the item is saved and the panel shows *"Item saved, but stock is short: available …, needed …"*,
- in **Block adding the item** mode, the item is not saved (*"Not enough available stock (available / needed): …"*). A person with the **Add a part despite a shortage** permission can click **Add despite the shortage** — the job history keeps an entry about the part being added despite a stock shortage.

A shortage never blocks closing a job — the level can then drop below zero.

Reducing the quantity of an existing item is not blocked, even if stock is still short.

### Job history

Issues and returns are recorded in the job history as *issued from stock: …* and *returned to stock: …*.

### Business rules

In [business rules](/config/business-rules), job events offer the **Job - part stock shortage** condition — e.g. to create an "order the part" task or notify the warehouse keeper when a job is missing a part. Outside job events the condition is never met.

## Parts on a quote

On a [quote](/service/quotes) item you can pick a catalog part (**Pick a part from the catalogue**) — price, VAT and cost are filled in automatically. A quote **does not reserve** parts and does not check stock.

---

## FAQ

### Can I use the parts catalog without a warehouse?
Yes. With **Stock management** set to **Off**, parts fill the name, price and cost on jobs and quotes, but no stock is kept.

### What happens to reservations after stock is switched off?
Closing a job while stock is off releases its reservations without issuing from stock. Deleting a job whose parts were issued earlier still returns them to stock — the register stays consistent.

### How do I move parts between warehouses?
There is no separate transfer operation. Make an adjustment in the source warehouse and a receipt (or adjustment) in the target one.

### Will the system notify me when stock drops below the minimum?
There is no automatic notification. Use the **Below minimum only** filter in the **Stock** tab.

### Is the warehouse integrated with an ERP system?
No. Parts and stock can be imported from CSV and exported to XLSX.

### Why can't a technician see the part cost?
Own cost is visible only to people with the **View costs and margin** permission. The cost is still saved on the item from the catalog — even when the part is added by someone without that permission.
