UNAS FIFO Costing

Accurate cost of goods sold with batch-level inventory tracking


What is FIFO?

FIFO (First In, First Out) is an inventory valuation method where each purchase is recorded as a separate batch with its own cost. When a sale occurs, the oldest batch is always used first. This ensures your cost of goods sold (COGS) is based on actual purchase prices, not estimates.


How it works

Here is a simple example showing how FIFO works:

Example: T-shirt inventory

Purchases (batches)

1
January: 50 units
2,000 Ft/unit
2
February: 30 units
2,500 Ft/unit

Order arrives: 60 units

50 units from the January batch (2,000 Ft x 50 = 100,000 Ft)
10 units from the February batch (2,500 Ft x 10 = 25,000 Ft)

COGS = 100,000 + 25,000 = 125 000 Ft

The January batch is fully depleted (50/50 used), so its status automatically changes to "depleted". 20 units remain in the February batch.


Cost priority order

Margyn determines the cost of each product in the following priority order:

ManualFIFODefault margin

1. Manual cost

If you set a product cost manually, it always takes priority. It overrides FIFO.

2. FIFO batch cost

If no manual cost is set, the system uses the oldest available batch to determine the purchase price.

3. Default margin

If there is no manual cost or FIFO batch, the system estimates cost using the default margin percentage.

Manual costs always override FIFO batches. If you set a manual cost for a product, FIFO batches will not be used for that product.


Enabling FIFO

FIFO inventory costing is available for UNAS stores. Follow these steps to enable it:

  1. 1

    Open Cost Settings

    Dashboard → Settings → Cost Settings → Global Settings

  2. 2

    Turn on FIFO mode

    On the "FIFO Costing Mode" card, click the toggle. The status changes to "FIFO Enabled".

  3. 3

    Done! The system sets up everything automatically.

    Your existing inventory and purchase prices are automatically loaded from UNAS. From now on, every order gets its FIFO-based COGS.


Opening balance

When you enable FIFO, the system automatically loads your existing inventory and purchase prices from UNAS. This is called the opening balance, which serves as the starting point for ongoing inventory tracking.

What gets loaded automatically?

  • Product IDs from UNAS
  • Current stock quantity
  • Current purchase price
  • Currency (default: HUF)

The opening balance is created automatically — no manual setup needed on your end. After that, new purchases are recorded through Purchase Orders.



Viewing batch history

You can view the full FIFO batch history for any product:

  1. 1Open the Cost Settings page
  2. 2Find the product in the list
  3. 3Click the "View Batch History" button next to the product

The modal shows the following information:

Batch number

Unique identifier (e.g. 20260228-001)

Purchase price

The unit cost for that batch

Quantity

Initial and remaining quantity

Status

Active or depleted


Features

Key features of the FIFO system:

Automatic cost calculation

Every order automatically gets accurate COGS based on batch costs.

Batch-level tracking

Each purchase receipt appears as a separate batch with its own unit cost and quantity.

Manual override

You can set a manual cost at any time, which overrides FIFO for that product.

Batch history

View the complete batch history for any product: quantity, purchase price, status.


FAQ