]> Softwares of Agnibho - librevax.git/commitdiff
Report order by date
authorAgnibho Mondal <mondal@agnibho.com>
Tue, 21 Jan 2025 21:03:13 +0000 (02:33 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Tue, 21 Jan 2025 21:03:13 +0000 (02:33 +0530)
vaccination.py

index a219baff108eba29b2d1b0515806babf28e7a0a8..058fb172faefc822ce2614738b1b8f51d4ba357c 100644 (file)
@@ -77,7 +77,7 @@ def list_by_inventory(cursor, iid):
 
 def list_by_date(cursor, fromDate, toDate):
     try:
-        result=cursor.execute("SELECT * FROM vaccination LEFT JOIN inventory ON vaccination.iid=inventory.iid LEFT JOIN patients ON vaccination.pid=patients.pid WHERE date BETWEEN ? AND ? ORDER BY vaccination.iid", (fromDate, toDate))
+        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.")
         else: