Can't apply a simple payment to an invoice - help!

I think I see the problem, it seems to be related to the invoice status. If you first mark the invoice as sent it should resolve the problem.

cc @david