Go to bills >> Select the invoice >> Click on record payment option >> Click on use advance payment to settle >> Click on record.