#49 Annual report improve

* improves the filtering of annual report timespan on a date base instead of timestamp base
This commit is contained in:
mpeltriaux 2022-01-05 15:26:16 +01:00
parent 393f9a4d47
commit 527077cef3

View File

@ -64,8 +64,8 @@ class TimespanReport:
responsible__conservation_office__id=id,
legal__registration_date__gt=LKOMPVZVO_PUBLISH_DATE,
deleted=None,
created__timestamp__gte=date_from,
created__timestamp__lte=date_to,
created__timestamp__date__gte=date_from,
created__timestamp__date__lte=date_to,
)
self.queryset_checked = self.queryset.filter(
checked__isnull=False
@ -231,8 +231,8 @@ class TimespanReport:
intervention__responsible__conservation_office__id=id,
intervention__legal__registration_date__gt=LKOMPVZVO_PUBLISH_DATE,
deleted=None,
intervention__created__timestamp__gte=date_from,
intervention__created__timestamp__lte=date_to,
intervention__created__date__timestamp__gte=date_from,
intervention__created__date__timestamp__lte=date_to,
)
self.queryset_checked = self.queryset.filter(
intervention__checked__isnull=False
@ -400,8 +400,8 @@ class TimespanReport:
self.queryset = EcoAccount.objects.filter(
responsible__conservation_office__id=id,
deleted=None,
created__timestamp__gte=date_from,
created__timestamp__lte=date_to,
created__timestamp__date__gte=date_from,
created__timestamp__date__lte=date_to,
)
self.queryset_recorded = self.queryset.filter(
recorded__isnull=False
@ -479,8 +479,8 @@ class TimespanReport:
legal__registration_date__lte=LKOMPVZVO_PUBLISH_DATE,
responsible__conservation_office__id=id,
deleted=None,
created__timestamp__gte=date_from,
created__timestamp__lte=date_to,
created__timestamp__date__gte=date_from,
created__timestamp__date__lte=date_to,
)
self.queryset_intervention_recorded = self.queryset_intervention.filter(
recorded__isnull=False