Commit 8c338f19 authored by Patrick's avatar Patrick
Browse files

Max payment date may be less or equal to next permanence not invoiced, permanence date

parent 3c8b26c2
......@@ -143,7 +143,7 @@ class PermanenceDoneAdmin(TranslatableAdmin):
permanence_date__gte=permanence.permanence_date) \
.exclude(id=permanence.id).order_by("permanence_date").first()
if next_permanence_not_invoiced is not None:
max_payment_date = next_permanence_not_invoiced.permanence_date - datetime.timedelta(days=1)
max_payment_date = next_permanence_not_invoiced.permanence_date # - datetime.timedelta(days=1)
else:
max_payment_date = timezone.now().date()
bank_account = BankAccount.objects.filter(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment