Hello Community,
I hope you all are doing well.


The image above shows my current output capturing info about the required finished goods (FG), the raw material required for them (RM_reqd), I have calculated the number of FG possible and the FG balance after fulfillment of the order.

The current scenario doesn't satisfy partial deliveries like in Row 2, required FG is 5 but 4 are possible. So, RM final should be updated to 11 and FG balance should be 0. Similarly for the 3rd row, RM available should be 11.. in the format above.
Please help me get this output.
If you face any difficulty in understanding the use case, please let me know.
~Thank You
Rhitik Krishnani