• It's the type of problem that's often easier if you look at it the other way round. If you can find one line of a PO that's not delivered then mark it as ''. If not, then you can assume all lines are delivered.