How to close the Purchase Order if advance is taken against the Purchase Order?

Suggestion: User can adjust the advance given against PO in misc voucher . For this User can create expense voucher for the advance amount and adjust the amount. Then users can close the Purchase order.