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

# Batch and Expiry

> Sell the nearest-expiry batch first, block expired stock, and get alerts before batches expire, the pharmacy configuration of the Point of Sale counter.

Batch and expiry picking turns the general counter into a pharmacy till. When it is on, the counter always sells the nearest-expiry stock first and never sells an expired pack, and it warns you before batches reach their date. A **Pharmacist** or **POS Cashier** sells with these checks applied automatically.

## What "First Expiry First Out" means

When a batch-tracked medicine is added to the cart, the counter picks the batch that expires soonest and has stock. This is First Expiry First Out (FEFO). It keeps your shelves rotating and cuts the waste that comes from selling newer stock while older stock expires unseen.

```mermaid theme={null}
flowchart LR
    A[Add batch-tracked item] --> B[Counter finds available batches]
    B --> C[Picks nearest expiry with stock]
    C --> D[Blocks any expired batch]
    D --> E[Line added to cart]
    style A fill:#14f1b1,color:#05133C
    style C fill:#14f1b1,color:#05133C
    style E fill:#14f1b1,color:#05133C
```

## The checks applied while selling

| Check                | What it does                                                  |
| -------------------- | ------------------------------------------------------------- |
| Nearest-expiry first | The soonest-expiring batch with stock is selected for you.    |
| No expired stock     | A batch past its expiry date cannot be sold.                  |
| Batch on every line  | Each batch-tracked line records the exact batch it came from. |

<Info>
  Because every line records its batch, a return restores stock to that same batch, and a recall can trace which sales included a given batch.
</Info>

## Expiry alerts

Set an **Expiry Alert (days before)** in POS Settings, and a daily alert flags batches approaching expiry within that window. A **Low Stock Threshold** works the same way for stock running low. These alerts let you act before a batch becomes waste or a shelf runs empty.

## Turning it on

An administrator enables the pharmacy behaviour in POS Settings:

| Setting                      | What it turns on                                            |
| ---------------------------- | ----------------------------------------------------------- |
| Enable Batch Tracking        | Batch selection at the counter.                             |
| Enable Expiry / FEFO Picking | Nearest-expiry-first selection and the expired-stock block. |
| Expiry Alert (days before)   | The daily expiring-batch alert window.                      |
| Low Stock Threshold          | The daily low-stock alert level.                            |
| Price Lines from Batch MRP   | Prices each line from its batch's printed price.            |

## Prerequisites

Batch-tracked items must have stock **with batches** before they can be sold. Adding stock and batches is done in the platform (BAS); see the shared BAS stock docs.

## Best practices

* Receive medicines with their batch and expiry so the counter can pick correctly.
* Set the expiry alert window to match your reordering and return-to-supplier lead time.
* Review the daily expiring-batch alert and pull or discount stock before it expires.
