don't notify about invoices with amount lower than 1 (#10984)
This commit is contained in:
parent
7f73a8c906
commit
6469bf9e73
|
@ -77,7 +77,7 @@ class Command(BaseCommand):
|
||||||
notification = InvoiceNotificationEmail.objects.filter(invoice_number=invoice.id).latest()
|
notification = InvoiceNotificationEmail.objects.filter(invoice_number=invoice.id).latest()
|
||||||
if notification.date_sent > timezone.now() - timedelta(days=notification_timeout):
|
if notification.date_sent > timezone.now() - timedelta(days=notification_timeout):
|
||||||
continue
|
continue
|
||||||
if invoice.solde == 0:
|
if invoice.solde < 1:
|
||||||
continue
|
continue
|
||||||
except InvoiceNotificationEmail.DoesNotExist:
|
except InvoiceNotificationEmail.DoesNotExist:
|
||||||
pass
|
pass
|
||||||
|
|
Reference in New Issue