From 29bba3e131ba2df8ccd9a4edc77b4eefdad24e9c Mon Sep 17 00:00:00 2001
From: Arno Alexander <arno2alexander@gmail.com>
Date: Thu, 10 May 2018 13:35:10 +0700
Subject: [PATCH] Report print keluhan date filter

---
 complaintManager/views.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/complaintManager/views.py b/complaintManager/views.py
index 6b90af5..3fbe9e8 100644
--- a/complaintManager/views.py
+++ b/complaintManager/views.py
@@ -106,6 +106,7 @@ def laporan(request):
     if request.method == 'GET':
         start_date = request.GET['start_date']
         end_date = request.GET['end_date']
+        end_date = str(datetime.datetime.strptime(end_date, '%Y-%m-%d').date() + datetime.timedelta(days=1))
         last_complaints = Complaint.objects.filter(reported__range=(start_date, end_date))
         if request.GET['type'] == 'csv':
             # make the csv file
-- 
GitLab