Hi everyone,
I’m working on a use case where I need to manage stock availability based on a custom field in the Stock Entry doctype.
Problem Statement:
I’ve added a custom field called LTD to the Stock Entry. For example:
I create a Stock Entry for Item A, Batch 001, with Qty = 100 and set the LTD = 11.1.
Later, when creating a new Stock Entry (or another stock transaction), I want the system to show only those 100 qty as available if and only if the LTD value entered is also 11.1.
If I enter a different LTD value (e.g., 12.1) for the same item and batch, it should not show the 100 qty from the previous entry as available, because the LTD values don’t match.
Goal:
I want the stock availability to be filtered or separated based on the custom field (LTD), in addition to the usual Item and Batch.
Question:
Is there a recommended way to implement this? Should I customize the Stock Ledger logic or is there a better way using existing Frappe/ERPNext features
Any guidance, suggestions, or examples would be highly appreciated!
Thanks in advance!