This method either work in on load or during refresh. This method Im using to show data.
But I need to have to save thing without refresh or onload.
Suppose I have batch BATCH001 have qty = 100kg. Now I’m in batch BATCH001 and click Split Batch then when new batch is created at that time it should set all the values in new batch as well as from which batch i created new batch.
Note: during split we don’t know new batch ID or doc.name.
By splitting you just updating the values in batch but what about stock, for stock movement you need to create stock entry, that is only option you have else your stock will remain in older Batch.