]> Softwares of Agnibho - librevax.git/commitdiff
Bugfix: report of single day master
authorAgnibho Mondal <mondal@agnibho.com>
Wed, 22 Jan 2025 17:41:52 +0000 (23:11 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Wed, 22 Jan 2025 17:41:52 +0000 (23:11 +0530)
templates/report.html
vaccination.py

index 17f87486ad0fea201f0f8e66934bdc18337a774a..8992e735503f380ff12f757c177c80cb49ea83ae 100644 (file)
@@ -26,7 +26,7 @@ You should have received a copy of the GNU General Public License along with Lib
     </div>
   </form>
   <table class="table">
     </div>
   </form>
   <table class="table">
-    <tr><td>{{config["TITLE"]}} / {{center["center"]}}</td><td>Vaccination Report: {{toDate}} to {{fromDate}}</td></tr>
+    <tr><td>{{config["TITLE"]}} / {{center["center"]}}</td><td>Vaccination Report: {{fromDate}} to {{toDate}}</td></tr>
   </table>
   <table class="table table-bordered">
     {% for i in data %}
   </table>
   <table class="table table-bordered">
     {% for i in data %}
index 058fb172faefc822ce2614738b1b8f51d4ba357c..b780d9048c59cdb53725e455c4d7db95bdeee9d1 100644 (file)
@@ -77,6 +77,8 @@ def list_by_inventory(cursor, iid):
 
 def list_by_date(cursor, fromDate, toDate):
     try:
 
 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.")
         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.")