The most common cause of this problem is that the invoice has been generated with an item that is of type 'discount'.
Discount items are set up as positive numbers, but apply to an invoice by subtracting that amount. Eg I see a horse for $100 (line 1 - service item), then give the customer a discount of $10 (line 2 - discount item) arriving at an invoice total of $90. If I add the $10 discount item to an invoice by itself, I get a -$10 total, ie I've been overpaid by $10, thus the system considers this invoice paid and will not apply a payment to it.
The remedy is usually to edit the invoice item to be anything other than a discount, then delete the invoice in question and regenerate it with the corrected item.