From 2058cfed95740c64331281d40409418827ef33ef Mon Sep 17 00:00:00 2001 From: pjpatil12 Date: Sat, 14 Feb 2026 17:32:30 +0530 Subject: [PATCH] changes of report and models --- AppCode/AOHandler.py | 65 +++--- AppCode/CITHandler.py | 62 +++--- AppCode/DocumentHandler.py | 142 ++++++++++--- AppCode/ITATHandler.py | 71 ++++--- AppCode/ITRHandler.py | 69 +++--- AppCode/LoginAuth.py | 55 +++-- AppCode/__pycache__/AOHandler.cpython-313.pyc | Bin 8290 -> 9296 bytes .../__pycache__/CITHandler.cpython-313.pyc | Bin 7818 -> 8816 bytes AppCode/__pycache__/Config.cpython-313.pyc | Bin 1260 -> 1260 bytes .../DocumentHandler.cpython-313.pyc | Bin 12225 -> 13012 bytes .../__pycache__/ITRHandler.cpython-313.pyc | Bin 8456 -> 9469 bytes AppCode/__pycache__/LoginAuth.cpython-313.pyc | Bin 2735 -> 3954 bytes static/js/ao_calc.js | 1 - static/js/itr_calc.js | 40 ++-- templates/add_ao.html | 23 +- templates/add_cit.html | 19 +- templates/add_itat.html | 20 +- templates/add_itr.html | 17 +- templates/display_ao.html | 4 +- templates/display_cit.html | 2 + templates/display_itat.html | 11 +- templates/update_ao.html | 201 +++++++++++++----- templates/update_cit.html | 131 ++++++++++-- templates/update_itat.html | 143 +++++++++++-- templates/update_itr.html | 159 +++++++++++--- 25 files changed, 897 insertions(+), 338 deletions(-) diff --git a/AppCode/AOHandler.py b/AppCode/AOHandler.py index 9e0979d..b5dd22d 100644 --- a/AppCode/AOHandler.py +++ b/AppCode/AOHandler.py @@ -34,17 +34,14 @@ class AOHandler: def add_ao(self, data): try: - fields = [ - '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' - ] - + fields= [ '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(f, 0) for f in fields] self.cursor.callproc("InsertAO", values) self.conn.commit() @@ -57,15 +54,13 @@ class AOHandler: # UPDATE AO RECORD by AO id def update_ao(self, id, data): - fields = [ - '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' + fields= [ '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(f, 0) for f in fields] @@ -106,20 +101,35 @@ class AOHandler: "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", @@ -127,8 +137,11 @@ class AOHandler: "tcs": "TCS", "sat": "SAT", "tax_on_assessment": "Tax on Regular Assessment", - "refund": "Refund", - "Remarks": "Remarks" + "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" } # Vertical AO structure diff --git a/AppCode/CITHandler.py b/AppCode/CITHandler.py index e214620..50d4c79 100644 --- a/AppCode/CITHandler.py +++ b/AppCode/CITHandler.py @@ -35,15 +35,13 @@ class CITHandler: # INSERT CIT RECORD def add_cit(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' + 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] @@ -53,15 +51,13 @@ class CITHandler: # UPDATE CIT RECORD def update_cit(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] @@ -100,20 +96,35 @@ class CITHandler: "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", @@ -121,8 +132,11 @@ class CITHandler: "tcs": "TCS", "sat": "SAT", "tax_on_assessment": "Tax on Regular Assessment", - "refund": "Refund", - "Remarks": "Remarks" + "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" } # Vertical CIT structure (single record per year) diff --git a/AppCode/DocumentHandler.py b/AppCode/DocumentHandler.py index 833cd35..b264735 100644 --- a/AppCode/DocumentHandler.py +++ b/AppCode/DocumentHandler.py @@ -23,13 +23,6 @@ class DocumentHandler: # Utility: Parse Year # ========================= def parse_year(self, year_value): - """ - Accepts: - - '2026' - - 'AY 2026-2027' - Returns: - - 2026 (int) - """ if not year_value: return None @@ -166,24 +159,46 @@ class DocumentHandler: columns = [ 'gross_total_income', 'disallowance_14a', - 'disallowance_37', '-', + 'disallowance_37', + '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', + '-', + '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', 'Remarks' + 'refund', + 'interest_244a_per143', + 'refund_received', + 'balance_receivable', + 'Remarks' ] particulars = [ @@ -192,18 +207,36 @@ class DocumentHandler: "Less: Deduction u/s 80IA - On Business Income", "- On Misc Receipts", "- On Other", "- On Sec 37 Disallowance", - "Less: Deduction u/s 80G", " ", - "Net Taxable Income", "Tax @ 30%", - "Tax @ 18.5% on Book Profit", - "Tax Payable", "Surcharge @ %", - "Education Cess @ %", "Total Tax Payable", + "Less: Deduction u/s 80G", "-", + "Net Taxable Income", "-", + "Per% Tax @(A)", + "Tax cal(A)", + "Per% surcharge @(A)", + "Surcharge cal (A)", + "Per% cess(A)", + "Edu cess cal(A)", + "Sum of tax_cal(A)", + "-", + "Per% Tax @(B)", + "Tax cal(B)", + "Per% surcharge @(B)", + "Surcharge cal (B)", + "Per% cess(B)", + "Edu cess cal(B)", + "Sum of tax_cal(B)", + "-", + "Tax Payable", + "Total Tax Payable", + "Opening Balance:", "Add: MAT Credit Created", "Less: MAT Credit Utilized", + "Closing Balance", "Add: Interest u/s 234C", - "Total Tax", " ", + "Total Tax", "-", "Advance Tax", "TDS", "TCS", "SAT", "Tax on Regular Assessment", - "Refund", "Remarks" + "Refund", "Add : Interest u/s 244A as per 143", + "Less : Refund Received on:","Balance Receivable","Remarks" ] def safe_get(df, col): @@ -275,40 +308,80 @@ class DocumentHandler: "Less: Deduction u/s 80IA - On Business Income", "- On Misc Receipts", "- On Other", "- On Sec 37 Disallowance", - "Less: Deduction u/s 80G", " ", - "Net Taxable Income", "Tax @ 30%", - "Tax @ 18.5% on Book Profit", - "Tax Payable", "Surcharge @ %", - "Education Cess @ %", "Total Tax Payable", + "Less: Deduction u/s 80G", "-", + "Net Taxable Income", "-", + "Per% Tax @(A)", + "Tax cal(A)", + "Per% surcharge @(A)", + "Surcharge cal (A)", + "Per% cess(A)", + "Edu cess cal(A)", + "Sum of tax_cal(A)", + "-", + "Per% Tax @(B)", + "Tax cal(B)", + "Per% surcharge @(B)", + "Surcharge cal (B)", + "Per% cess(B)", + "Edu cess cal(B)", + "Sum of tax_cal(B)", + "-", + "Tax Payable", + "Total Tax Payable", + "Opening Balance", "Add: MAT Credit Created", "Less: MAT Credit Utilized", + "Closing Balance", "Add: Interest u/s 234C", - "Total Tax", " ", + "Total Tax", "-", "Advance Tax", "TDS", "TCS", "SAT", "Tax on Regular Assessment", - "Refund", "Remarks" + "Refund", "Add : Interest u/s 244A as per 143", + "Less : Refund Received on","Balance Receivable","Remarks" ] columns = [ 'gross_total_income', 'disallowance_14a', - 'disallowance_37', '-', + 'disallowance_37', + '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', + '-', + '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', 'Remarks' + 'refund', + 'interest_244a_per143', + 'refund_received', + 'balance_receivable', + 'Remarks' ] data = { @@ -372,5 +445,4 @@ class DocumentHandler: ) finally: - connection.close() - + connection.close() \ No newline at end of file diff --git a/AppCode/ITATHandler.py b/AppCode/ITATHandler.py index 9b1ae3e..aef05d9 100644 --- a/AppCode/ITATHandler.py +++ b/AppCode/ITATHandler.py @@ -31,16 +31,15 @@ class ITATHandler: # INSERT ITAT (PROC) def add_itat(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' - ] + 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] self.cursor.callproc("InsertITAT", values) @@ -48,16 +47,14 @@ class ITATHandler: # UPDATE ITAT (PROC) def update_itat(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("UpdateITAT", values) @@ -94,20 +91,35 @@ class ITATHandler: "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", - "mat_credit_created": "Add: MAT Credit created", + "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", @@ -115,10 +127,13 @@ class ITATHandler: "tcs": "TCS", "sat": "SAT", "tax_on_assessment": "Tax on Regular Assessment", - "refund": "Refund", - "Remarks": "Remarks" + "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" } - + # Vertical ITAT structure data = [] for key, label in field_mapping.items(): diff --git a/AppCode/ITRHandler.py b/AppCode/ITRHandler.py index 0714ca1..3fc83fb 100644 --- a/AppCode/ITRHandler.py +++ b/AppCode/ITRHandler.py @@ -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) diff --git a/AppCode/LoginAuth.py b/AppCode/LoginAuth.py index caa85a2..39d8655 100644 --- a/AppCode/LoginAuth.py +++ b/AppCode/LoginAuth.py @@ -1,40 +1,71 @@ from flask import Blueprint, render_template, request, redirect, url_for, flash, session -from flask import flash,redirect,url_for from functools import wraps -from flask import session +from ldap3 import Server, Connection, ALL +from ldap3.core.exceptions import LDAPException + class LoginAuth: def __init__(self): + # Create Blueprint self.bp = Blueprint("auth", __name__) + # ------------------------------- + # LDAP CONFIGURATION + # ------------------------------- + self.LDAP_SERVER = "ldap://localhost:389" + + self.BASE_DN = "ou=users,dc=lcepl,dc=org" # LDAP Users DN + + # ------------------------------- # LOGIN ROUTE + # ------------------------------- @self.bp.route('/login', methods=['GET', 'POST']) def login(): if request.method == 'POST': username = request.form.get("username") password = request.form.get("password") - # Dummy validation — REPLACE with DB check later - if username == "admin" and password == "admin123": - session['user'] = username - flash("Login successful!", "success") - return redirect(url_for('welcome')) - else: - flash("Invalid username or password!", "danger") + if not username or not password: + flash("Username and password are required!", "danger") + return render_template("login.html") + user_dn = f"uid={username},{self.BASE_DN}" + server = Server(self.LDAP_SERVER, get_info=ALL) + + try: + # Attempt LDAP bind + conn = Connection(server, user=user_dn, password=password, auto_bind=True) + if conn.bound: + session['user'] = username + flash(f"Login successful! Welcome {username}", "success") + return redirect(url_for('welcome')) + else: + flash("Invalid username or password!", "danger") + except LDAPException as e: + flash(f"LDAP login failed: {str(e)}", "danger") + finally: + if 'conn' in locals(): + conn.unbind() + + # GET request: show login form return render_template("login.html") + # ------------------------------- # LOGOUT ROUTE + # ------------------------------- @self.bp.route('/logout') def logout(): session.clear() flash("Logged out successfully!", "success") return redirect(url_for('auth.login')) - - # =================================================== - # LOGIN REQUIRED DECORATOR INSIDE CLASS + + # =================================================== + # LOGIN REQUIRED DECORATOR INSIDE CLASS # =================================================== def login_required(self, f): + """ + Protect routes: redirect to login if user not authenticated. + """ @wraps(f) def wrapper(*args, **kwargs): if "user" not in session: diff --git a/AppCode/__pycache__/AOHandler.cpython-313.pyc b/AppCode/__pycache__/AOHandler.cpython-313.pyc index 1f11a88a6b2766ebc79f2e73d9ff82f634ce05b8..c54af7c923509e585359364c6aeb8f2a45e1c5cf 100644 GIT binary patch delta 2379 zcmZWqOHUhD6rS;58yjOYHrU~12F5%bUIxtjX$S-Y1mX+i9cOG035~JQ*v+8}|GXvN1+Wn1g@v-$YBil;9GCs|iwqzxglJ172oJqTdB2p}8Lp7OJA~z-F zh73O2F``A7F(M)-li;+<(R9Jqe8tK1W+<_aDUY&;^V!4iXOCg}@bUEdkhkf>$I|D0 zN9n`466|%@qen z%QxaFS&@^eP`BSNg`n#$e^1V)$m{8NG^EH8dE>Sm&DryL(wpk>2-sv zXw^)Xs8n{*xJ=G<>PV38m!0DXS)mntFS|48^yug}yi1R3!}N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(3MFMrCGp}`xuPDzmytJIi}Vv&VOV9@XUM@- z`GVUmgica6!GF?ipfFdF;Qgb-!+m*J*`-+x<2LP9sE}<|LKp;wj~FBdD@CI@`$}1< oZK)IF6KWBCDnSaJM+p7E$;X`gm~$L+;-5|PJo24zjHl)Q00~-P{Qv*} diff --git a/AppCode/__pycache__/CITHandler.cpython-313.pyc b/AppCode/__pycache__/CITHandler.cpython-313.pyc index 49a4ae87cb37a5efb3e59acab2c2262b036c9a3e..465fe8b024397200fa6d6836de5cf4e2be3bcb8b 100644 GIT binary patch delta 2302 zcmZ`)TTdHT5Z<+eZH#a0*g!BQ3pN--3^tf+xS3nHhRXq(TQO^UNob92t?f3UY22zW zD3L1E^Mcf>QXeWsRis{c=~JbsQXiT~wN$A>R#jE~1sl>xRaI4;S(}tZtp(qi@0&R@ zv&TEfcL(Kh(^I2S&%kG9ZEs84@TDoPVO!~2ns0OEDNzb%gqvZZP_8WDs1PrhQB7y1 z=nX--E`rZ|f+!JsjEIWqG&oISEL*Y_pDvx<4ktG;<#F~%F?;0Y>^V#yIhno~@^AXc ziS$L^ar#K10y|C#w}ePsEO41*Mu;oVax9sXDKW8?xE_uOaUl^E3)XER6OKw^Y)e^$ z4E;=7Z81mV$@GaZ`cS((XxmC;L`h6%!X3e&5QYZ{1Un06N!-jPVqr;)id%1pv4XXf zx}+$bXeDabeWcY|O}pAB)`PEg11y~Ov+`a0AbbVV5W+CR2ttT{tgqUTCegltFoiIU zFoQ4)P|#;nF(D(y!a_z;p)wsnD- zz69_NbEHz*ldT7T>9s7oNKYAt*a1$Kr01m3IkPqRmTjl4?T7MFUR zgy{^d8$_Tfi?a-OMd$~XR!5X56;@Ao;nBc{XGknjxoTYYQdV6BJfpaQ#~psu4ayE2Pm}^EnI~dd9+l(N9iZkg!#1DX zDSvRVWtg=jTH!{Fo%t5u1S>qVu-8 zUS%S8%wxr?;Q5{r+*7ISnJ!%je6~H!cXS5Fq!2jid$yVNod$^D`}r3`g250kqe=8#w!j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oa0Kxg|<&3(yMqL;w5^U$N~U8Bn43b delta 20 acmaFE`G%AGGcPX}0}#BbXxYg9kOcrmnFf>q diff --git a/AppCode/__pycache__/DocumentHandler.cpython-313.pyc b/AppCode/__pycache__/DocumentHandler.cpython-313.pyc index 883fb95d7fb3d94d8228a441ceed64e5efe1d1dc..45d2df3392abd1995d231edb6668350e4ea41aab 100644 GIT binary patch delta 1876 zcmZXVYi!$86vut@TGPtYIL4teiw4`l5{BrKO z|Kq=X&xx}r{2;lP8XD?3_DSwNnu#YqbYHO8xx3LQqKl3oU9#j5qM|k6vTR47;!VJYZ9T&M%m>OP+fEz0v3#Ma_7tz$iOwq>S7LhRa_vmg;c6%Pxd<}|*9 zl$h0c$SOsWIw+D!iS6+<3qw&4ij>5BMa?axi`CfJt5b?OL7ouAH5N(JB58<9Ydn&* z9;W1fk7SL9xwq_*G(B8!?*;JzF`1RLCi5t2Q@mV|@|pakkQB3UD4K_o*3L#gm6es6 zG(FyW&;FK7UX_TXsKT~*Tol-YcE@8HPo#-rJ}nR_C1viH(we7wscOb>-Y_cVL~@@J ziRzvK=n5W(uHZqVD>~)9L5uFEjb1Mw>(T26#s{&eVCJCH5pUP^x@QX>&f{GfC51=9 zr=Ti&y^$MM4}xmm8?fj;y2tA+4H!?Zdv;4I9v2UTf7Qp_Xc&=57&_K3^G@g)UkK^+8(;fgy`9zI z1Z$5uSY}Z?-dpWHW&<`A9D<`wu*Sojnf+&ThUI)h_f+q;nuT7IBlL>zZ%c)vbK%Z% zO8}wfv+#p<6-1(DQpK!D6tX}&gK5XZEU%oV$AbG&kzNkYH*WU1rw1zg(58@k`mV|l zDxU}~IIlg!WTXsQ3j@Za6%q>!+E$ti`svw-gU*CKsEeKoZ!blnMC z0-gdq4R{6suN!i7C3+U3V*m0q+6cXP64C?@cqj1Xy#(2cS9vI6yZB z*vmb9(eWcJFVSy1+R;z+O2=<)pFpAu5Cv=nbOSyGd`ADeVcY@jBj@OzPG#(K2)_V) z30MRe)n7q$69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N@PJ_P^vgmMy^@cbPp8f4PeT z^h;Rre)6Yn|D?yt>dq=l2FM`NMR=r}c#r}aLW;zTl!y=MC&S192_j_@LWW5MIYJa< zl*EuKi6awal#G#MBuS2wagrhvX*;-w@|Ls>wmE-ag(GRuhAwcEBr|CtS$HsX&U%96 zKoaxp6s(F-|cfI5CBI)g> z;>pvGgO|dPrG~HKTu(xj3j!yN+0vChG6^{;X)B=0fF_A-0d}N>b(yTd*HYA4Cads3 z%Cc#ABE8L?fvdhTb`8L{#TiMgd1C@@`h76s|6VRHBS*)E7V0}St-XmAO4ymbz!VJ#8?;50 zXGK)(Wg|}m{!{gOL0LPsp_B~0zS*V^Y{t4V4fBD>@C{!tzS3yxhTdu`JCiNtL~g1C zp9jj8q#bU#l5i~;V3*-m@N&F{6}$bHnnqnWj5-?Q3SGmlrc^bP&Sa7n;|fUfg0;&| zz(qOI-^;1N`|^3V2*1gX*(LZnbemlTE&M9~I?ip~#q+qym=+xl!nNICm_PKyJEH~D zit=|)tP`IzZ79utMu>IPS(Bs2&Irdl;}=Z_HBLqt?Tno?2dEijgt2>0(?vDU2$P-6 zvgxMA!w5Hq^2y!QsF~ihE7$M$C%$Ot8D80gSW|W#(Z(~JMr6$hA3Wwoiha;&&f9StoV*W4~ zJIY~rZ_O+)Uf;f3S+Pu&XPF1VQUo7A&MXAVDeHj{M01dGmJ8g$G)MJpWHoDjC=aft ztPfMR)hv7*`;=XT5jEgnq=)3ef172kQO7n&*S4B1{U>-y{XjZH&+IJ42E|tti|~hf zM)KPtN7KAbK8jlqgO^#`@ZamO7>|h`Vp6w%8;fZz!=N+T@NRsH{T9B953~2+mw3Xx OYhi;&45i`4jDG==IDZ!a diff --git a/AppCode/__pycache__/LoginAuth.cpython-313.pyc b/AppCode/__pycache__/LoginAuth.cpython-313.pyc index 9f22f7cb534d076fdca4d87590e65810b9541c34..f0a43ccc1a52aea560b4245aa7114e237af1cfbb 100644 GIT binary patch literal 3954 zcmbUkTTC0-_0G#<8-oE8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tTfx82|5bEy!T{4Yx ztpEg5$AUYy_$MKYjPh?nH%W%4!golFKMKdxANHAhj=vp= zr^HmBc1>_%j(rdt>xL2Tz=;%7F8r~eDFbas;ghjL{6QqO+z$9}5>H qSFxRL0^vA72zdr8Kf}snSa}BHk74{N#GgX!PkD?CoB)FVhkpR&Z2yt~ diff --git a/static/js/ao_calc.js b/static/js/ao_calc.js index ced978d..5ed073e 100644 --- a/static/js/ao_calc.js +++ b/static/js/ao_calc.js @@ -18,7 +18,6 @@ document.addEventListener("DOMContentLoaded", function () { // -- total gross income -- var gross_total = gross_total_income + disallowance_37 + disallowance_14a; setValue("gti_as_per_ao", gross_total); - // console.log("gross_total income:: " + gross_total) // --- DEDUCTIONS --- var d80_business = getValue("deduction_80ia_business"); diff --git a/static/js/itr_calc.js b/static/js/itr_calc.js index f695d9a..7756341 100644 --- a/static/js/itr_calc.js +++ b/static/js/itr_calc.js @@ -13,11 +13,11 @@ document.addEventListener("DOMContentLoaded", function () { // ---- Track last edited field for Tax(A) ---- let lastEditedTaxA = null; - document.getElementsByName("per_a")[0].addEventListener("input", () => { + document.getElementsByName("per_tax_a")[0].addEventListener("input", () => { lastEditedTaxA = "percentage"; }); - document.getElementsByName("tax_30_percent")[0].addEventListener("input", () => { + document.getElementsByName("tax_a_cal")[0].addEventListener("input", () => { lastEditedTaxA = "amount"; }); @@ -44,47 +44,47 @@ document.addEventListener("DOMContentLoaded", function () { setValue("net_taxable_income", net_taxable_income); // ================= TAX (A) – TWO WAY ================= - var per_a = getValue("per_a"); - var tax30 = getValue("tax_30_percent"); + var per_tax_a = getValue("per_tax_a"); + var tax_a_cal = getValue("tax_a_cal"); if (net_taxable_income > 0) { if (lastEditedTaxA === "percentage") { - tax30 = net_taxable_income * (per_a / 100); - setValue("tax_30_percent", tax30); + tax_a_cal = net_taxable_income * (per_tax_a / 100); + setValue("tax_a_cal", tax_a_cal); } else if (lastEditedTaxA === "amount") { - per_a = (tax30 / net_taxable_income) * 100; - setValue("per_a", per_a); + per_tax_a = (tax_a_cal / net_taxable_income) * 100; + setValue("per_tax_a", per_tax_a); } } var per_surcharge_a = getValue("per_surcharge_a"); - var surcharge_a = tax30 * (per_surcharge_a / 100); - setValue("surcharge_a", surcharge_a); + var surcharge_a_cal = tax_a_cal * (per_surcharge_a / 100); + setValue("surcharge_a_cal", surcharge_a_cal); var per_cess_a = getValue("per_cess_a"); - var edu_cess_a = (tax30 + surcharge_a) * (per_cess_a / 100); - setValue("edu_cess_a", edu_cess_a); + var edu_cess_a_cal = (tax_a_cal + surcharge_a_cal) * (per_cess_a / 100); + setValue("edu_cess_a_cal", edu_cess_a_cal); - var sum_of_a = tax30 + surcharge_a + edu_cess_a; + var sum_of_a = tax_a_cal + surcharge_a_cal + edu_cess_a_cal; setValue("sum_of_a", sum_of_a); // ================= TAX (B) ================= - var tax185 = getValue("tax_book_profit_18_5"); + var tax_b_cal = getValue("tax_b_cal"); var per_surcharge_b = getValue("per_surcharge_b"); - var surcharge_b = tax185 * (per_surcharge_b / 100); - setValue("surcharge_b", surcharge_b); + var surcharge_b_cal = tax_b_cal * (per_surcharge_b / 100); + setValue("surcharge_b_cal", surcharge_b_cal); var per_cess_b = getValue("per_cess_b"); - var edu_cess_b = (tax185 + surcharge_b) * (per_cess_b / 100); - setValue("edu_cess_b", edu_cess_b); + var edu_cess_b_cal = (tax_b_cal + surcharge_b_cal) * (per_cess_b / 100); + setValue("edu_cess_b_cal", edu_cess_b_cal); - var sum_of_b = tax185 + surcharge_b + edu_cess_b; + var sum_of_b = tax_b_cal + surcharge_b_cal + edu_cess_b_cal; setValue("sum_of_b", sum_of_b); // ================= TAX PAYABLE ================= - var tax_payable = (sum_of_a > sum_of_b) ? tax30 : tax185; + var tax_payable = (sum_of_a > sum_of_b) ? tax_a_cal : tax_b_cal; setValue("tax_payable", tax_payable); var total_tax_payable = (sum_of_a > sum_of_b) ? sum_of_a : sum_of_b; diff --git a/templates/add_ao.html b/templates/add_ao.html index 4419879..79ea0a1 100644 --- a/templates/add_ao.html +++ b/templates/add_ao.html @@ -86,22 +86,20 @@
- +
- +
- +
- - + +
-
@@ -111,7 +109,7 @@
- +
@@ -120,7 +118,7 @@
- +
@@ -131,7 +129,7 @@
- +
@@ -139,7 +137,7 @@
- +
@@ -231,6 +229,7 @@
+
@@ -264,6 +263,6 @@ {% endblock %} {% block extra_js %} - + {% endblock %} \ No newline at end of file diff --git a/templates/add_cit.html b/templates/add_cit.html index f7e48a5..8c260a3 100644 --- a/templates/add_cit.html +++ b/templates/add_cit.html @@ -45,7 +45,7 @@
- +
@@ -87,20 +87,19 @@
- +
- +
- +
- +
@@ -111,7 +110,7 @@
- +
@@ -120,7 +119,7 @@
- +
@@ -131,7 +130,7 @@
- +
@@ -139,7 +138,7 @@
- +
diff --git a/templates/add_itat.html b/templates/add_itat.html index 77e18d0..fea8529 100644 --- a/templates/add_itat.html +++ b/templates/add_itat.html @@ -88,20 +88,19 @@
- +
- +
- +
- +
@@ -112,17 +111,19 @@
- +
+
- +
+
@@ -130,7 +131,7 @@
- +
@@ -138,9 +139,10 @@
- +
+
diff --git a/templates/add_itr.html b/templates/add_itr.html index 33569f3..fd03430 100644 --- a/templates/add_itr.html +++ b/templates/add_itr.html @@ -86,19 +86,19 @@
- +
- +
- +
- +
@@ -109,7 +109,7 @@
- +
@@ -118,7 +118,7 @@
- +
@@ -129,7 +129,7 @@
- +
@@ -137,9 +137,10 @@
- +
+
diff --git a/templates/display_ao.html b/templates/display_ao.html index 2877760..5b73996 100644 --- a/templates/display_ao.html +++ b/templates/display_ao.html @@ -22,6 +22,7 @@ Gross Total Income Net Taxable Income Total Tax + Refund Created Record Date Actions @@ -32,7 +33,8 @@ AY {{ ao.year }}-{{ ao.year+1 }} {{ ao.gross_total_income }} {{ ao.net_taxable_income }} - {{ ao.total_tax }} + {{ ao.total_tax_payable }} + {{ "{:,.2f}".format(ao.refund) }} {{ ao.created_at.strftime('%Y-%m-%d') }} Edit diff --git a/templates/display_cit.html b/templates/display_cit.html index fd5f2fe..87c541c 100644 --- a/templates/display_cit.html +++ b/templates/display_cit.html @@ -22,6 +22,7 @@ Net Taxable Income Total Tax Payable Refund + Created Record Date Actions @@ -33,6 +34,7 @@ {{ "{:,.2f}".format(record.net_taxable_income) }} {{ "{:,.2f}".format(record.total_tax_payable) }} {{ "{:,.2f}".format(record.refund) }} + {{ record.created_at.strftime('%Y-%m-%d') }} Edit
Year - MAT Tax Credit - Surcharge - Cess - Total Credit + Gross Total Income + Net Taxable Income + Total Tax Payable + Refund + Created Record Date Actions @@ -35,7 +36,7 @@ {{ "{:,.2f}".format(record.net_taxable_income) }} {{ "{:,.2f}".format(record.total_tax_payable) }} {{ "{:,.2f}".format(record.refund) }} - + {{ record.created_at.strftime('%Y-%m-%d') }} Edit diff --git a/templates/update_ao.html b/templates/update_ao.html index 42a0fdd..72114e1 100644 --- a/templates/update_ao.html +++ b/templates/update_ao.html @@ -15,40 +15,60 @@
+
+ + +
+
+ + +
-
-
-
+
+
+ + +
+
+
+ value="{{ record.deduction_80ia_business }}" oninput="calculate()" required>
-
-
@@ -57,56 +77,117 @@
+ value="{{ record.deduction_sec37_disallowance }}" oninput="calculate()" required>
-
- - -
- -
-
+
- - + + +
+
+ +
+
+ + +
+
+ + +
+
+ +
- + +
+
+
+
+ +
- - Surcharge on Tax(A): + +
+ +
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ +
-
- - + +
- - + +
+
+ + +
+ value="{{ record.total_tax_payable }}" readonly>
+
+
+
+ + +
+
+ +
+
+
+ +
+
+ + +
-
@@ -127,62 +216,64 @@
- +
- +
- +
- +
- +
- +
-
- +
-
- - -
- -
-
- - +
+ +
+
+ + +
+
+ + +
+
-
- - +
+
+ +
diff --git a/templates/update_cit.html b/templates/update_cit.html index 2495d77..38e626f 100644 --- a/templates/update_cit.html +++ b/templates/update_cit.html @@ -16,6 +16,17 @@
+
+ + +
+
+ + +
@@ -35,6 +46,14 @@ oninput="calculate()" required>
+
+
+ + +
+
@@ -65,7 +84,6 @@
-
@@ -73,42 +91,99 @@ value="{{ record.net_taxable_income}}" readonly>
- -
+
- - + + +
+
+ + +
+
+ +
- + +
+
+
+
+ +
- - Surcharge on Tax(A): + +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ +
- - + +
- - + +
-
+
+
+ + +
+
+
+
+ + +
+
+ +
+
+ +
+
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+
diff --git a/templates/update_itat.html b/templates/update_itat.html index bd874fe..2c160cc 100644 --- a/templates/update_itat.html +++ b/templates/update_itat.html @@ -14,6 +14,17 @@
+
+ + +
+
+ + +
@@ -34,6 +45,15 @@
+
+
+ + +
+
+
@@ -64,6 +84,7 @@ oninput="calculate()" required>
+
-
+
- - + + +
+
+ + +
+
+ +
- + +
+
+ +
+
+ +
- - Surcharge on Tax(A): + +
+ +
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ +
-
- - + +
- - + +
+
+ + +
+ value="{{ record.total_tax_payable }}" readonly>
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ + +
-
- - +
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+ + +
diff --git a/templates/update_itr.html b/templates/update_itr.html index d6fe29d..79082fd 100644 --- a/templates/update_itr.html +++ b/templates/update_itr.html @@ -15,6 +15,17 @@
+
+ + +
+
+ + +
@@ -35,6 +46,15 @@
+
+
+ + +
+
+
@@ -76,39 +96,99 @@
- - + + +
+
+ + +
+
+ +
- +
+
+ +
+
+ + +
+
+ + +
+ +
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+ +
-
- -
-
- - -
-
- - -
-
- -
+
+ +
+
+ + +
+
+ +
+
+ +
+
+ + +
-
- - -
-
- - +
+ +
+
+ + +
+
+ + +
+
-
- - +
+
+ +