do not send notification if amount to pay is zero (#10984)
This commit is contained in:
parent
6503468bad
commit
23131faba1
|
@ -77,6 +77,8 @@ class Command(BaseCommand):
|
|||
notification = InvoiceNotificationEmail.objects.filter(invoice_number=invoice.id).latest()
|
||||
if notification.date_sent > make_aware(datetime.now(), get_current_timezone()) - timedelta(days=notification_timeout):
|
||||
continue
|
||||
if invoice.solde == 0:
|
||||
continue
|
||||
except InvoiceNotificationEmail.DoesNotExist:
|
||||
pass
|
||||
|
||||
|
|
Reference in New Issue