While this should be impossible in practice already, this ensures that no registations/renewals are deleted outside of dataminimisation that were actually paid/completed.
This makes it more certain that invoices for paid registrations are not accidentally getting deleted.
This is related to CONCREXIT-1ER. There, old renewals were deleted by this task, and then their invoices were marked to be deleted from moneybird, even though they should not be.
The problem was that they should actually have been deleted by dataminimisation, which would not mark the invoices for deletion. This PR changes the task to not touch paid or rejected or completed registrations and renewals, because those should already be handled by dataminimisation.
While this should be impossible in practice already, this ensures that no registations/renewals are deleted outside of dataminimisation that were actually paid/completed.
This makes it more certain that invoices for paid registrations are not accidentally getting deleted.
This is related to CONCREXIT-1ER. There, old renewals were deleted by this task, and then their invoices were marked to be deleted from moneybird, even though they should not be.
The problem was that they should actually have been deleted by dataminimisation, which would not mark the invoices for deletion. This PR changes the task to not touch paid or rejected or completed registrations and renewals, because those should already be handled by dataminimisation.