changes of ITAT from new desing and sql insert update proce chnage code of v2

This commit is contained in:
2026-01-06 15:52:08 +05:30
parent a65e7efa63
commit 91b7932a2f
26 changed files with 516 additions and 1119 deletions

View File

@@ -32,26 +32,31 @@ class ITATHandler:
# INSERT ITAT (PROC)
def add_itat(self, data):
values = [
data.get("mat_tax_credit", 0),
data.get("surcharge", 0),
data.get("cess", 0),
data.get("total_credit", 0),
data.get("year", 0)
]
self.cursor.callproc("InsertITAT", values)
self.conn.commit()
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','sat', 'tax_on_assessment', 'refund', 'Remarks'
]
values = [data.get(col, 0) for col in columns]
self.cursor.callproc("InsertITAT", values)
self.conn.commit()
# UPDATE ITAT (PROC)
def update_itat(self, id, data):
values = [
id,
data.get("year"),
data.get("mat_tax_credit"),
data.get("surcharge"),
data.get("cess"),
data.get("total_credit")
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', 'sat','tax_on_assessment', 'refund','Remarks'
]
values = [id] + [data.get(col, 0) for col in columns]
self.cursor.callproc("UpdateITAT", values)
self.conn.commit()
@@ -66,7 +71,6 @@ class ITATHandler:
try:
# Call stored procedure
self.cursor.callproc("GetITATByYear", [selected_year])
rows = []
for result in self.cursor.stored_results():
rows = result.fetchall()