Skip to content

Commit

Permalink
Date filter fixed for skipped export logs (#579)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashutosh619-sudo authored Mar 7, 2024
1 parent 83ad5ad commit 10b7c89
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/fyle/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,14 @@ class Meta:
class ExpenseSearchFilter(AdvanceSearchFilter):
org_id = django_filters.CharFilter()
is_skipped = django_filters.BooleanFilter()
updated_at = django_filters.DateTimeFromToRangeFilter()
updated_at__gte = django_filters.DateTimeFilter(lookup_expr='gte', field_name='updated_at')
updated_at__lte = django_filters.DateTimeFilter(lookup_expr='lte', field_name='updated_at')
expense_number = django_filters.CharFilter(field_name='expense_number', lookup_expr='icontains')
employee_name = django_filters.CharFilter(field_name='employee_name', lookup_expr='icontains')
employee_email = django_filters.CharFilter(field_name='employee_email', lookup_expr='icontains')
claim_number = django_filters.CharFilter(field_name='claim_number', lookup_expr='icontains')

class Meta:
model = Expense
fields = ['org_id', 'is_skipped', 'updated_at']
fields = ['org_id', 'is_skipped', 'updated_at__gte', 'updated_at__lte']
or_fields = ['expense_number', 'employee_name', 'employee_email', 'claim_number']

0 comments on commit 10b7c89

Please sign in to comment.