# Stock accounting methods

This feature is used to set the way the product should be sold.

* **FIFO (First In First Out)** -> In this the old stock should be sold first.
* **LIFO (Last In First Out)** -> In this the most recent purchase stock should be sold.

### **Example**

1. Purchase 20 pcs of product A on 20 March 2018. Expiry date 10 April 2018
2. Purchase 20 pcs of the same product A on 23 March 2018. Expiry date 8 April 2018

Lets say today I sold 22 pcs.

If the “Stock Accounting Method” is **FIFO ->** Then the Product purchased on 20 March 2018 will be deduced with 20 pcs and after that product purchased on 23 March 2018 will be deduced with 2 pcs.

So in stock, we will have products from 23 March 2018 with 18 pcs.

If the “Stock Accounting Method” is **LIFO ->** The opposite of the above will happen.

{% hint style="danger" %}
**Important Note:**

You must set the required accounting method before selling the item for that accounting method to be used.
{% endhint %}


---

# 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://docs.kbgfuzion.com/erp/knowledge-base/settings/stock-accounting-methods.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.
