ERPNext Foundation ERPNext Cloud Chat Blog Discuss Frappé* Donate

Handling Expired, Damaged and Discarded Stock



Stock in the warehouse can be expired, damaged or discarded because of various reasons and needs to be taken out from system. We are thinking doing this using Stock Entry of type Material Issue.

The default account selected for all ‘Material Issue’ type stock entries is ‘Stock adjustment’. We however want to keep track of this movement under different account head for each type of movement.

We plan to create following additional accounts under chart of accounts under ‘Stock Write Off’ parent account -

Also, we plan to introduce following 3 new Stock Entry purposes -
‘Material Issue - Expired goods’
‘Material Issue - Damaged goods’
‘Material Issue - Discarded goods’

When any stock entry of this above type is created, by default above account heads will be selected.

Does this change makes sense from larger ErpNext usage perspective, if yes can it be pulled into the core codebase?

How to handle damage item and lost of goods?
Production Order - Handling Under Production / Over Production


You can create required expense accounts under Direct Expenses. In the Material Issue, you will have to manually select Expense Account for the item.


Hi Umair, The manual selection is something I wanted to avoid and it may be missed. Thats why we were plannign to introduce new Stock Entry purposes and default to the correct expense account instead of relying on user to select the account. The account selection would automatically change based on the purpose of stock entry.


@umair do you have any suggestions on above? Basically we want to force the correct expense account and not leave it for user to select.

Another approach we are thinking is to introduce a new field called - Reason and give option to configure expense account against each reason as follows -

Material Issue Reason to Account mapping

  1. Expired Stock ----------> Expired Goods Write Off
  2. Damaged Stock ----------> Damaged Goods Write Off
  3. Discarded Stock ----------> Discarded Goods Write Off
  4. Default ----------> Stock Adjustment


you should write a custom script to set account based on Reason …


I think this is a really good idea. I vote for this change/update!!


We require this feature.


In this case how we can write off stock with tax???

Product : XYZ
Qty : 2
Purchase Rate : 500
Tax : 10%
Grand Total : 500*2=1000
Net Total : 1100 (500 * 2=1000 + 10% Tax )

want to write off RS. 1100


@Sachin_Mane did you go ahead with this ? Also, how did you go about doing this ?


@root13F we are doing it via custom logic as of now.