# Stock Out Validation

**YouTube:** [How to Validate Stock Out Using FIFO by Expiry or Purchase Date in Sale Bill?](https://www.youtube.com/watch?v=ax4ZkXhx4EA)

## How to Validate Stock Out Using FIFO by Expiry or Purchase Date in Sale Bill?

In this tutorial, we'll walk you through the **Stock Out Validation** feature in Logic ERP. This feature helps ensure proper inventory control by validating the order in which stock lots are selected during billing or stock issuance, based on expiry or purchase dates.

***

### **Accessing Stock Out Validation Settings**

* Open **Sale Voucher Configuration**.
* Select the relevant **Billing Series**.
* Select **Other Settings 3**.
* Locate the option titled **"Stock Out Validation"**.

<figure><img src="/files/5H6Jm19ssi9dRQ4qStGK" alt=""><figcaption></figcaption></figure>

* This setting provides **three parameters**:
  * **None**
  * **FIFO on Lot Expiry**
  * **FIFO on Lot Purchase Date**

***

### **Stock Out Validation: None**

* **Behavior**: No validation is applied.
* **Effect During Billing**:
  * The user is free to select **any available lot**, regardless of expiry or purchase date.
  * **No prompts or warnings** are displayed.
* **Example**:
  * An item has multiple lots with different expiry dates.
  * The user can choose any lot — even one with a later expiry date — without any system alerts.

***

### **Stock Out Validation: FIFO on Lot Expiry**

* **Behavior**: Enforces **First-In-First-Out (FIFO)** logic based on **lot expiry dates**.
* **Purpose**: To ensure that stock with the **earliest expiry** is billed first.
* **Effect During Billing**:
  * If the user selects a lot with a **later expiry date**, while an earlier one is available:
    * The software will **display an error message**.
    * It will also **show details of the earlier expiring lot**.

<figure><img src="/files/69W4TNxy9hGGoeIRzcT6" alt=""><figcaption></figcaption></figure>

* **Example**:
  * Two lots available:
    * Lot A: Expiry – 10/08/2025
    * Lot B: Expiry – 05/08/2025
  * If Lot A is selected, the system prompts:

    > “A lot with an earlier expiry date is available: Lot B (05/08/2025)”

***

### **Stock Out Validation: FIFO on Lot Purchase Date**

* **Behavior**: Enforces **FIFO** based on **purchase date** of the lot.
* **Purpose**: To ensure that stock purchased earlier is used first, avoiding stock holding issues.
* **Effect During Billing**:
  * If the user selects a lot with a **later purchase date**, while an earlier one is available:
    * The software will **show an error message**.
    * It will also **display details of the older purchased lot**.

<figure><img src="/files/6VUOsTLlzD4h1VBf0tTW" alt=""><figcaption></figcaption></figure>

* **Example**:
  * Two lots available:
    * Lot A: Purchased – 01/07/2025
    * Lot B: Purchased – 15/07/2025
  * If Lot B is selected, the system alerts:

    > “A lot with an earlier purchase date is available: Lot A (01/07/2025)”

***

### **Summary of Stock Out Validation Modes**

| Mode                          | Validation Based On | System Behavior                                                  |
| ----------------------------- | ------------------- | ---------------------------------------------------------------- |
| **None**                      | No validation       | Any lot can be selected; no system prompt                        |
| **FIFO on Lot Expiry**        | Expiry Date         | Prompts if a later-expiry lot is selected over an earlier one    |
| **FIFO on Lot Purchase Date** | Purchase Date       | Prompts if a later-purchased lot is selected over an earlier one |

***

### **Best Practices**

* Use **FIFO on Expiry** for **perishable goods or pharmaceuticals**.
* Use **FIFO on Purchase Date** for **general inventory rotation**.
* Keep your lot information accurate to get the best results from this feature.

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/setups/configurations/sale-voucher-configuration/other-settings-3/stock-out-validation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
