Advance Payment transaction will be available to be applied on a bill only when both are entered in same financial year. If the bill date falls in different financial year the advance payment will not be available for linking with bill. This is done because the TDS deducted for the advance payment needs to be considered in the financial year in which advance payment was paid. While entering the bill if you use 'Calculate TDS' link to calculate TDS, adjust the TDS amount by reducing the TDS deducted in the Advance Payment transaction.
To apply the advance payment paid to the supplier in the previous financial year while receiving payment on a bill we will have to pass a journal entry and create a credit for the supplier and then apply that credit on the bill.
Following will be the journal entry that needs to be passed:
Accounts Payable A/c (Select supplier name).......... Dr. <Amount of the advance payment>Advance Payment Assets A/c...................................Cr. <Amount of the advance payment>
Once this credit is created, you can apply this while making payment for the bill.