An Advance Invoice (AD) that is not connected to a customer order is not the same as a normal invoice, therefore when a payment is applied to an Advance Invoice the payment is essentially a CUPIA that can then be applied to one or more other normal invoices.
Also see
Connect Customer Advance Invoice
Explanation
If you have obtained an advance payment for an invoice being entered using an advance invoice, you can connect the advance invoice to the final invoice. As a result, the amount paid in advance will be deducted from the final invoice. The printed invoice will include references to the connected advance invoices if the Print Advance Payments information on Customer Invoice option is enabled in the Company/Invoice tab.
Prerequisites
An advance invoice which is paid or partly paid should exist.
System Effects
The advance invoice will be connected to the final invoice and the final invoice information will be adjusted accordingly. (postings, due amount etc.,). Until the final invoice is paid in full, the status of the invoice would be Partly Paid.