Do not send late invoice mails for deleted invoices

At least the late invoice job do send mails for deleted invoices. This should not be the case. Other related jobs should also be checked for the same bug.