There seems to be some duplicated code and logic between here and `ding_debt_debts_form_submit_pay_all()`.

Consider amount calculation and invoice filtering to the shared `ding_debt_debts_perform_payment()` method.