From 6f4e7dec8ff770fc77f4fc1ea1b96f61bc0099f2 Mon Sep 17 00:00:00 2001 From: Agnibho Mondal Date: Wed, 22 Jan 2025 23:11:52 +0530 Subject: [PATCH] Bugfix: report of single day --- templates/report.html | 2 +- vaccination.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/report.html b/templates/report.html index 17f8748..8992e73 100644 --- a/templates/report.html +++ b/templates/report.html @@ -26,7 +26,7 @@ You should have received a copy of the GNU General Public License along with Lib - +
{{config["TITLE"]}} / {{center["center"]}}Vaccination Report: {{toDate}} to {{fromDate}}
{{config["TITLE"]}} / {{center["center"]}}Vaccination Report: {{fromDate}} to {{toDate}}
{% for i in data %} diff --git a/vaccination.py b/vaccination.py index 058fb17..b780d90 100644 --- a/vaccination.py +++ b/vaccination.py @@ -77,6 +77,8 @@ def list_by_inventory(cursor, iid): def list_by_date(cursor, fromDate, toDate): try: + fromDate=fromDate+"T00:00:00" + toDate=toDate+"T23:59:59" result=cursor.execute("SELECT * FROM vaccination LEFT JOIN inventory ON vaccination.iid=inventory.iid LEFT JOIN patients ON vaccination.pid=patients.pid WHERE vaccination.date BETWEEN ? AND ? ORDER BY vaccination.date, vaccination.iid", (fromDate, toDate)) if(cursor.rowcount==0): return (False, "Record not found.") -- 2.39.5