active les factures du jour

This commit is contained in:
Thomas NOËL 2014-05-15 17:27:58 +02:00
parent 4b2dfbdb34
commit cd2c76669d
1 changed files with 1 additions and 1 deletions

View File

@ -15,7 +15,7 @@ invoice is present the invoice becomes active and inactive if not."""
for invoice in Facture.objects.all():
active = path.exists(settings.INVOICES_LOCATION_PATTERN.format(invoice_id = invoice.id))
active = active and invoice.date_generation < date.today()
active = active and invoice.date_generation <= date.today()
if active != invoice.active:
invoice.active = active