DoubleAgent finds the earliest unpaid invoice for your contact. If the credit is enough to pay the invoice, DoubleAgent will do so.
If there is money left over from the credit, the process starts again: DoubleAgent looks for the earliest unpaid invoice and pays it if possible.
- you have invoiced your contact Acme Ltd twice: first for £100 and then for £50;
- payments from Acme look like Acme ref ABC123/// on your bank statment.
You could set up a rule like this:
When a credit from Acme for £100 appears in your bank account, DoubleAgent will find your first invoice and pay it with this transaction. The credit is used up so DoubleAgent stops there.
If instead you had a credit from Acme for £150, DoubleAgent would find your first invoice and pay it; and then find your second invoice and pay that too.
On the other hand, if your first invoice had been for £50 and your second for £100, and you received a £100 credit, DoubleAgent would pay off the first invoice and stop there, leaving £50 of the credit unreconciled.
We always recommend doing a dry run (by clicking the Dry Run button) to see whether your rule does what you want.