fixing invoice activation criteria
This commit is contained in:
parent
dde45a3fd1
commit
6fdf800604
|
@ -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
|
||||
|
|
Reference in New Issue