From 21eb55d4b4f174fb7ee1472faaba3b3ca297edbf Mon Sep 17 00:00:00 2001 From: pjpatil12 Date: Wed, 3 Dec 2025 10:49:31 +0530 Subject: [PATCH] testing code and modify commit. --- AppCode/AOHandler.py | 1 + AppCode/DocumentHandler.py | 2 +- AppCode/__pycache__/AOHandler.cpython-313.pyc | Bin 5499 -> 5531 bytes .../DocumentHandler.cpython-313.pyc | Bin 8932 -> 8932 bytes AppCode/__pycache__/YearGet.cpython-313.pyc | Bin 1878 -> 1878 bytes main.py | 80 +++++++++--------- templates/update_cit.html | 65 +++++++++++--- 7 files changed, 95 insertions(+), 53 deletions(-) diff --git a/AppCode/AOHandler.py b/AppCode/AOHandler.py index c90af37..b0002eb 100644 --- a/AppCode/AOHandler.py +++ b/AppCode/AOHandler.py @@ -58,6 +58,7 @@ class AOHandler: ] values = [data.get(f, 0) for f in fields] + print("---- values ---- ",values) self.cursor.callproc("InsertAO", values) self.conn.commit() diff --git a/AppCode/DocumentHandler.py b/AppCode/DocumentHandler.py index e59d6b4..7e7b006 100644 --- a/AppCode/DocumentHandler.py +++ b/AppCode/DocumentHandler.py @@ -206,7 +206,7 @@ class DocumentHandler: worksheet.write(row, col, df.iloc[row - 1, col], cell) output.seek(0) - + return send_file( output, download_name=f"Summary_Report_{year}.xlsx", diff --git a/AppCode/__pycache__/AOHandler.cpython-313.pyc b/AppCode/__pycache__/AOHandler.cpython-313.pyc index a1d3fca281b78972fa469cbf94c679026b6e5ebd..6f2f3279fee2bcc184cd2ce0f30d187a89dd01a4 100644 GIT binary patch delta 371 zcmeyZHCvnaGcPX}0}yDO(aZe3k++tW@y_IKR)3~w=E;9pB`5#o&|+kntikEd%ACfa z$+|g&&5Kd1N>CRF6v`5FN>hs!!0cNbo_WQoMJ0~@E7@)_r>Bfe3pL;V}6=r!k|;W??R6Mn;>-=G^X#5tHk=ABp(@WpD92`gOpG$07(gUg5deISUTOdU delta 371 zcmbQO{acIoGcPX}0}!n4(#<@xk++tW@yO(ER)5CO$^49>llL--On$;D$jCOikV%-4 zbMk&BsmU>H{ERG{bJ)BX1#WS8<`t(Fl{orqvfg4&Po4aLJ&iG7vO9<76mbLDMWP@Ax+0h!6x3d_dwBhfQvNN@-52T~Wj2 STv2)cdPYW>PYfUutOx-4>0BoO diff --git a/AppCode/__pycache__/DocumentHandler.cpython-313.pyc b/AppCode/__pycache__/DocumentHandler.cpython-313.pyc index 915c4e3b74da15a5e13e6a4888e0a5e9ef5b0135..9be5c9a238aa05448a21af6101518f1bfe81f5d2 100644 GIT binary patch delta 22 ccmaFj`oxv@GcPX}0}yB(*U!AOk@vb109Wb') +# def download_report(doc_id): +# conn = get_db_connection() +# cursor = conn.cursor(dictionary=True) -@app.route('/download/') -def download_report(doc_id): - conn = get_db_connection() - cursor = conn.cursor(dictionary=True) +# cursor.execute("SELECT * FROM documents WHERE id = %s", (doc_id,)) +# document = cursor.fetchone() +# conn.close() - cursor.execute("SELECT * FROM documents WHERE id = %s", (doc_id,)) - document = cursor.fetchone() - conn.close() +# if not document: +# return "Document not found", 404 - if not document: - return "Document not found", 404 - - file_path = os.path.join('static', 'uploads', document['filename']) # adjust as per your storage - return send_from_directory(directory='static/uploads', path=document['filename'], as_attachment=True) +# file_path = os.path.join('static', 'uploads', document['filename']) # adjust as per your storage +# return send_from_directory(directory='static/uploads', path=document['filename'], as_attachment=True) # @app.route('/summary_report', methods=['GET']) diff --git a/templates/update_cit.html b/templates/update_cit.html index 7a32d7f..090cae8 100644 --- a/templates/update_cit.html +++ b/templates/update_cit.html @@ -1,29 +1,74 @@ + Update CIT Record +

Update CIT Record for Year {{ record.year }}

{% for field in record.keys() if field != 'id' %} - - + + {% endfor %}
- + + \ No newline at end of file