add - filter on transaction dashboard
This commit is contained in:
@@ -230,9 +230,20 @@ class InventoryQuotaSaleTransactionViewSet(
|
||||
"""
|
||||
dashboard of full detail of all my transactions
|
||||
"""
|
||||
query_param = self.request.query_params # noqa
|
||||
|
||||
start_date = query_param.get('start') if 'start' in query_param.keys() else None
|
||||
end_date = query_param.get('end') if 'end' in query_param.keys() else None
|
||||
transaction_status = query_param.get('status') if 'status' in query_param.keys() else None
|
||||
|
||||
org = get_organization_by_user(request.user)
|
||||
transaction_dashboard_data = self.get_dashboard(org)
|
||||
# filer by date & transaction status
|
||||
transaction_dashboard_data = self.get_dashboard(
|
||||
org,
|
||||
start_date=start_date,
|
||||
end_date=end_date,
|
||||
status=transaction_status
|
||||
)
|
||||
|
||||
return Response(transaction_dashboard_data, status=status.HTTP_200_OK)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user