modification ui changes base pages,login, manus and from chnages and adding filds. V2 commit

This commit is contained in:
2025-12-29 15:22:15 +05:30
parent 425f213606
commit 4da1e92a70
97 changed files with 4761 additions and 2307 deletions

View File

@@ -1,10 +1,18 @@
from AppCode.Config import DBConfig
import mysql.connector
from AppCode.YearGet import YearGet
import pandas as pd
import pymysql
import io
from flask import send_file, render_template, request
# new
from AppCode.Config import DBConfig
from AppCode.YearGet import YearGet
import mysql.connector
import pandas as pd
import io
from flask import send_file, render_template, request
class ITRHandler:
@@ -36,23 +44,25 @@ class ITRHandler:
for result in self.cursor.stored_results():
records = result.fetchall()
# return single record
if records:
print(records[0])
return records[0]
return records[0] # return single record
return None
# INSERT ITR RECORD using procedure "add_itr"
def add_itr(self, data):
columns = [
'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other',
'deduction_sec37_disallowance', 'deduction_80g', 'net_taxable_income',
'tax_30_percent', 'tax_book_profit_18_5', 'tax_payable', 'surcharge_12',
'edu_cess_3', 'total_tax_payable', 'mat_credit', 'interest_234c',
'total_tax', 'advance_tax', 'tds', 'tcs', 'tax_on_assessment', 'refund'
'total_tax', 'advance_tax', 'tds', 'tcs', 'tax_on_assessment', 'refund', 'Remarks'
]
values = [data.get(col, 0) for col in columns]
@@ -62,7 +72,6 @@ class ITRHandler:
self.conn.commit()
def update(self, id, data):
columns = [
'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
@@ -70,7 +79,7 @@ class ITRHandler:
'deduction_sec37_disallowance', 'deduction_80g', 'net_taxable_income',
'tax_30_percent', 'tax_book_profit_18_5', 'tax_payable', 'surcharge_12',
'edu_cess_3', 'total_tax_payable', 'mat_credit', 'interest_234c',
'total_tax', 'advance_tax', 'tds', 'tcs', 'tax_on_assessment', 'refund'
'total_tax', 'advance_tax', 'tds', 'tcs', 'tax_on_assessment', 'refund','Remarks'
]
values = [id] + [data.get(col, 0) for col in columns]
@@ -88,7 +97,7 @@ class ITRHandler:
self.conn.commit()
# dowanload itr report by year
def itr_report_download(self, selected_year):
try:
@@ -104,10 +113,14 @@ class ITRHandler:
# Convert SQL rows to DataFrame
df = pd.DataFrame(rows)
# Transpose
df_transposed = df.transpose()
df_transposed.insert(0, 'Field', df_transposed.index)
print("df-->",df_transposed)
record_cols = {
i: f"Record {i}"
for i in df_transposed.columns if isinstance(i, int)