If you use the "invoicee" function you can select which invoicee should the pending payment will be charged (optional)assigned to. The option "as used in booking" will assign the pending payment to the first invoicee which has already been used in the booking for a charge or payment.