]> Softwares of Agnibho - librevax.git/commitdiff
Sort report by inventory
authorAgnibho Mondal <mondal@agnibho.com>
Thu, 11 Jan 2024 20:06:01 +0000 (01:36 +0530)
committerAgnibho Mondal <mondal@agnibho.com>
Thu, 11 Jan 2024 20:06:01 +0000 (01:36 +0530)
vaccination.py

index ec3a17e66cc20cdb58695f1f6bf2a2be6622f062..68ed6ed0737e563d2f7b7228f45da16cef6e6c46 100644 (file)
@@ -67,7 +67,7 @@ def list_by_inventory(cursor, iid):
 
 def list_by_date(cursor, date):
     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 LIKE ?", (date+"%",))
+        result=cursor.execute("SELECT * FROM vaccination LEFT JOIN inventory ON vaccination.iid=inventory.iid LEFT JOIN patients ON vaccination.pid=patients.pid WHERE date LIKE ? ORDER BY vaccination.iid", (date+"%",))
         if(cursor.rowcount==0):
             return (False, "Record not found.")
         else: