How can we confirm adjustment issue if its item and its lot number have an open QC order?

Suggestions:
System will not allow adjustment issue, if QC order is opened for a same item code and lot no.
System will allow to confirm adjustment issue if the QC order is closed. System will not allow adjustment issue for invalid item code, lot not, location code and lot SL. If this combination data not found, system should given an error as ‘Failed to confirm because of no data found’