Determining if a Material Document has been fully reversed
I have a seemingly fundamental problem. I want to determine if a Material Document has been fully reversed.
By fully reversed, I mean the movement quantities of all items is equal to zero. This is taking into consideration that a material document can be partially reversed (some items were reversed, or different items were reversed by different documents) and that reversal documents can also be reversed.
It's a pretty recursive tree traversal problem. Challenging as it is, I want to check first if there is already an existing standard facility for this as I don't want to reinvent the wheel.