changes of summary report

This commit is contained in:
2026-01-07 00:49:42 +05:30
parent f49935d706
commit 9c2486fdd6
8 changed files with 71 additions and 53 deletions

View File

@@ -22,20 +22,18 @@ class AOHandler:
return records
# get ao recourd
def get_ao_by_id(self, id):
# Call stored procedure
self.cursor.callproc('GetAOById', [id])
# Fetch result
records = []
for result in self.cursor.stored_results():
records = result.fetchall()
if records:
return records[0] # return single record
return records[0]
return None
# Add AO record
def add_ao(self, data):
fields = [
"year","gross_total_income", "disallowance_14a", "disallowance_37",
@@ -53,7 +51,7 @@ class AOHandler:
self.conn.commit()
# UPDATE ITR RECORD by AO id
# UPDATE AO RECORD by AO id
def update_ao(self, id, data):
fields = [
@@ -75,7 +73,6 @@ class AOHandler:
# DELETE RECORD by AO id
def delete_ao_by_id(self, id):
# Call the stored procedure
self.cursor.callproc('DeleteAOById', [id])
self.conn.commit()
@@ -85,6 +82,7 @@ class AOHandler:
self.cursor.close()
self.conn.close()
# report download by year
def ao_report_download(self, selected_year):
try:
# Call stored proc to fetch year-wise records