Companion to the Q1/Q3 payment decoupling. Iterates active destinatare
with vierteljaehrlicher_betrag > 0 and IBAN set, finds or creates the
matching VierteljahresNachweis, and produces a DestinataerUnterstuetzung
via create_quarterly_support_payment() when the new is_complete_for_payment()
gate passes.
For Q3/2026 where the staff did not record income/assets reviews on every
destinatare before the 15.06. payment date, --force bypasses the gate and
inserts a 'geplant' payment directly, tagged "Backfill STI-107", so the
staff can still process it through the normal pipeline.
Supports --dry-run to preview without writing. Skips destinatare that
already have a payment for the same quarter and lists every skip reason
at the end.
Refs STI-107
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Q3 support payments fall due on 15 June, but the matching study proof
deadline is 15 September of the same year. The previous gate
`VierteljahresNachweis.is_complete()` required the study proof to be
present, so `create_quarterly_support_payment()` returned None for every
Q3 entry — Q3/2026 payments never appeared in the pipeline even after
the staff manually updated the quarterly confirmation. The same
mismatch exists for Q1 (payment 15 December, study proof 15 March).
Introduce `is_complete_for_payment()` on VierteljahresNachweis that
skips the study proof check for Q1 and Q3 (where the study proof
falls due after the matching payment) while keeping the strict
`is_complete()` requirement for Q2 and Q4 (where both deadlines
coincide on 15 March / 15 September).
Use the new check in the payment-creation gate and in the status
transitions in `quarterly_confirmation_update`, `quarterly_confirmation_edit`,
and `quarterly_confirmation_reset`, so Q1/Q3 confirmations can reach
'eingereicht' on income+assets alone and the support payment is
created on the correct due date.
Refs STI-107
Co-Authored-By: Paperclip <noreply@paperclip.ing>