To settle the purchase invoice with advance payment please make sure that you have recorded the advance payment paid to the vendor in the vendor ledger.
If not please check the steps from the below link to know how to record the advance payment for the vendor.
How to record advance payment paid for vendor?
After recording the advance payment follow the below steps.
Step 1: Go to purchase >> Select the purchase invoice >> Click on record payment option.
Step 2: Select settle from advance payments option >> Select the amount >> Click on update payment option.