update itr and ao from and auto save mat ceadit and utility
This commit is contained in:
@@ -41,21 +41,29 @@ class ITRHandler:
|
||||
# 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', 'edu_cess',
|
||||
'total_tax_payable', 'mat_credit_created', 'mat_credit_utilized',
|
||||
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs',
|
||||
'sat', 'tax_on_assessment', 'refund', 'Remarks','created_at'
|
||||
]
|
||||
values = [data.get(col, 0) for col in columns]
|
||||
try:
|
||||
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', 'edu_cess',
|
||||
'total_tax_payable', 'mat_credit_created', 'mat_credit_utilized',
|
||||
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs',
|
||||
'sat', 'tax_on_assessment', 'refund', 'Remarks','created_at'
|
||||
]
|
||||
values = [data.get(col, 0) for col in columns]
|
||||
|
||||
# Call your stored procedure
|
||||
self.cursor.callproc("InsertITR", values)
|
||||
self.conn.commit()
|
||||
except Exception as e:
|
||||
self.conn.rollback()
|
||||
raise e
|
||||
finally:
|
||||
self.cursor.close()
|
||||
self.conn.close()
|
||||
|
||||
# Call your stored procedure
|
||||
self.cursor.callproc("InsertITR", values)
|
||||
self.conn.commit()
|
||||
|
||||
# update itr by id
|
||||
def update(self, id, data):
|
||||
|
||||
Reference in New Issue
Block a user