How to set off advance payments against invoices in purchase module?

set off advance payments against invoices in purchase module

All Collection>purchase expense>How to set off advance payments against invoices in purchase module?