do not send notification if amount to pay is zero (#10984)

This commit is contained in:
Serghei Mihai 2016-05-18 18:17:44 +02:00
parent 6503468bad
commit 23131faba1
1 changed files with 2 additions and 0 deletions

View File

@ -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