If you are talking about supplier, I suppose it is Accounts Payable transaction. So advance paid to supplier is either result of paying Proforma/Advance invoice (resulting in SUPIA open supplier item) or payment on account (SUPOA open supplier item).
Then expenses are documented by supplier invoice.
When SUPIA item exists, you can connect advance invoice to final delivery invoice (using Advance Invoice option in supplier invoice entry window), when SUPOA is used - you should book manual supplier offset.
In both cases it would be good to create instalment plan for supplier invoice - indicate regular payment method for amount exceeding paid advance, and manual method for advance paid.