changes of report and models
This commit is contained in:
@@ -40,18 +40,16 @@ class ITRHandler:
|
||||
|
||||
# INSERT ITR RECORD using procedure "add_itr"
|
||||
def add_itr(self, data):
|
||||
|
||||
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'
|
||||
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', 'per_tax_a', 'tax_a_cal', 'per_surcharge_a', 'surcharge_a_cal', 'per_cess_a', 'edu_cess_a_cal', 'sum_of_a',
|
||||
'per_tax_b', 'tax_b_cal', 'per_surcharge_b', 'surcharge_b_cal', 'per_cess_b', 'edu_cess_b_cal', 'sum_of_b',
|
||||
'tax_payable','total_tax_payable', 'opening_balance', 'mat_credit_created', 'mat_credit_utilized', 'closing_balance',
|
||||
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs', 'sat', 'tax_on_assessment', 'refund',
|
||||
'interest_244a_per143', 'refund_received', 'balance_receivable', 'remarks', 'created_at'
|
||||
]
|
||||
|
||||
values = [data.get(col, 0) for col in columns]
|
||||
|
||||
# Call your stored procedure
|
||||
@@ -67,23 +65,21 @@ class ITRHandler:
|
||||
|
||||
# update itr by id
|
||||
def update(self, id, 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'
|
||||
]
|
||||
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', 'per_tax_a', 'tax_a_cal', 'per_surcharge_a', 'surcharge_a_cal', 'per_cess_a', 'edu_cess_a_cal', 'sum_of_a',
|
||||
'per_tax_b', 'tax_b_cal', 'per_surcharge_b', 'surcharge_b_cal', 'per_cess_b', 'edu_cess_b_cal', 'sum_of_b',
|
||||
'tax_payable','total_tax_payable', 'opening_balance', 'mat_credit_created', 'mat_credit_utilized', 'closing_balance',
|
||||
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs', 'sat', 'tax_on_assessment', 'refund',
|
||||
'interest_244a_per143', 'refund_received', 'balance_receivable', 'remarks', 'updated_at'
|
||||
]
|
||||
|
||||
values = [id] + [data.get(col, 0) for col in columns]
|
||||
self.cursor.callproc("UpdateITR", values)
|
||||
self.conn.commit()
|
||||
|
||||
|
||||
# DELETE RECORD by ITR id
|
||||
# DELETE RECORD by ITR id
|
||||
def delete_itr_by_id(self, id):
|
||||
self.cursor.callproc('DeleteITRById', [id])
|
||||
self.conn.commit()
|
||||
@@ -109,20 +105,35 @@ class ITRHandler:
|
||||
"gross_total_income": "Gross Total Income",
|
||||
"disallowance_14a": "Add: Disallowance u/s 14A",
|
||||
"disallowance_37": "Add: Disallowance u/s 37",
|
||||
"-" : "-",
|
||||
"deduction_80ia_business": "Less: Deduction u/s 80IA - On Business Income",
|
||||
"deduction_80ia_misc": "On Misc Receipts",
|
||||
"deduction_80ia_other": "On Other",
|
||||
"deduction_sec37_disallowance": "On Sec 37 Disallowance",
|
||||
"deduction_80g": "Less: Deduction u/s 80G",
|
||||
"net_taxable_income": "Net Taxable Income",
|
||||
"tax_30_percent": "Tax @ 30%",
|
||||
"tax_book_profit_18_5": "Tax @ 18.5% on Book Profit",
|
||||
"-" : "-",
|
||||
"per_tax_a" : "Per% Tax @(A)",
|
||||
"tax_a_cal" : "Tax cal(A)",
|
||||
"per_surcharge_a" : "Per% surcharge @(A)",
|
||||
"surcharge_a_cal" : "Surcharge cal (A)",
|
||||
"per_cess_a" : "Per% cess(A)",
|
||||
"edu_cess_a_cal" : "Edu cess cal(A)",
|
||||
"sum_of_a" : "Sum of tax_cal(A)",
|
||||
"-" : "-",
|
||||
"per_tax_b" : "Per% Tax @(B)",
|
||||
"tax_b_cal" : "Tax cal(B)",
|
||||
"per_surcharge_b" : "Per% surcharge @(B)",
|
||||
"surcharge_b_cal" : "Surcharge cal (B)",
|
||||
"per_cess_b" : "Per% cess(B)",
|
||||
"edu_cess_b_cal" : "Edu cess cal(B)",
|
||||
"sum_of_b" : "Sum of tax_cal(B)",
|
||||
"tax_payable": "Tax Payable",
|
||||
"surcharge": "Surcharge @ %",
|
||||
"edu_cess": "Education Cess @ %",
|
||||
"total_tax_payable": "Total Tax Payable",
|
||||
"opening_balance": "Opening Balance",
|
||||
"mat_credit_created": "Add: MAT Credit Created",
|
||||
"mat_credit_utilized": "Less: MAT Credit Utilized",
|
||||
"closing_balance": "Closing Balance",
|
||||
"interest_234c": "Add: Interest u/s 234C",
|
||||
"total_tax": "Total Tax",
|
||||
"advance_tax": "Advance Tax",
|
||||
@@ -130,10 +141,14 @@ class ITRHandler:
|
||||
"tcs": "TCS",
|
||||
"sat": "SAT",
|
||||
"tax_on_assessment": "Tax on Regular Assessment",
|
||||
"refund": "Refund"
|
||||
"refund" : "Refund",
|
||||
"interest_244a_per143" : "Add : Interest u/s 244A as per 143",
|
||||
"refund_received" : "Less : Refund Received on",
|
||||
"balance_receivable" : "Balance Receivable",
|
||||
"Remarks" : "Remarks"
|
||||
}
|
||||
|
||||
# Convert to vertical structure
|
||||
# Convert to vertical structures
|
||||
data = []
|
||||
for key, label in field_mapping.items():
|
||||
value = rows[0].get(key, 0)
|
||||
|
||||
Reference in New Issue
Block a user