Prepaid Allocation

Can we allocate uncleared prepaid invoice to tax invoice and clear(client first cleared the tax invoice and then cleared the prepaid invoice)