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

# Production

> Turn raw materials into finished goods with actual costing

The production module records production runs: it consumes raw materials from inventory, adds the finished product and calculates its actual unit cost.

## New production

The screen has the form on the left, in four numbered blocks, and a fixed **production summary** on the right with the costs and the button to register.

**1. Go to Production → New Production**

**2. 1 · Production order**

* **Product source**: *Existing product* (already in the catalog) or *New product* (created during production).
* **Work order** (optional): **no order**, **link an existing one** or **create an internal order**.
* **Finished product** and **quantity to produce**.

**3. 2 · Bill of materials (BOM)**

**Add raw material**: product and quantity used. Each row shows the available stock, the cost and whether it is enough (**OK** or **Insufficient**).

**4. 3 · Conversion costs**

**Add cost**: labor, transport, overhead or special, with quantity, unit and unit cost. Below, you can assign to this production **actual expenses** already registered in purchases; if you leave the assignment empty, the full expense amount is applied.

**5. 4 · Batch and traceability**

If perishable: batch number and expiration date. Production notes.

**6. Register production**

From the side summary. The button is enabled when the form is valid and there is enough raw material.

The **summary** shows the product, the quantity, raw material availability and the cost breakdown (raw material, conversion and associated expenses), with the **total cost** and the **unit cost**.

The run's unit cost is the sum of raw materials, conversion costs and assigned actual costs, divided by the quantity produced.

## Phases and statuses

A production moves through four phases, with no going back: **Order → Processing → Verification → Completed**.

| Status | What happens to inventory |
| - | - |
| **In progress** (Order, Processing and Verification phases) | Raw materials are **reserved** and cannot be used in other productions, but stock does not decrease yet. |
| **Completed** | Raw materials are deducted, the finished product is added, the batch is created and the movements are recorded with their cost. |
| **Voided** | In progress: reservations are released. Completed: the movements are reversed, as long as the finished product has not been sold or consumed. |

## Finished product cost

When the production is completed, the finished product's cost is recalculated with a **weighted average**: (previous stock × current cost + quantity produced × run's unit cost) ÷ total stock. If there was no stock, the cost becomes the run's cost. That cost is the one later used in the cost of sales.

> [!WARNING]
>
> You cannot produce a product configured **with a recipe**: its sales deduct the components directly, so producing it would duplicate inventory consumption. Use a simple product as the finished product.

## Yield and shrinkage

When moving to **Completed**, you are asked for the **actual quantity obtained**. If it is lower than planned, the difference is recorded as **shrinkage** and the total cost is spread over what was actually obtained, so the unit cost goes up. Raw materials are valued at their **current cost** at completion, not at the time the order was created.

## Raw material batches

On completion, consumption is deducted from each raw material's batches: first the one that expires soonest and then the oldest. Whatever is not recorded in batches only affects stock. When a completed production is voided, the batches are restored and the finished product's average cost is reversed.

## Accounting

Each completed production generates its journal entry from **Accounting → Process documents → Completed productions**:

| Account | Movement |
| - | - |
| Finished product | **Debit** for the total cost |
| Inventory (raw materials) | **Credit** for raw material consumption |
| Applied conversion costs | **Credit** for labor, transport, overhead, special costs and assigned expenses |

Configure the accounts and the entry type in **Accounting → Settings → Inventory → Production**. If you don't define a finished product account, the inventory account is used. The entry's status (draft or processed) is the one set for Inventory.

> [!NOTE]
>
> A production with an accounting entry cannot be voided until that entry is deleted or reversed.

## History

**Production** lists the runs with date, finished product, quantity, total cost, unit cost, phase and status (**In progress**, **Completed** or **Voided**). The detail shows the consumption of each raw material, each assigned cost and the phase history.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.