> For the complete documentation index, see [llms.txt](https://docs.kbgfuzion.com/erp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kbgfuzion.com/erp/knowledge-base/settings/stock-accounting-methods.md).

# 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 %}
