From 91b7932a2f713e1fa3059c958107c34d2b4b15ca Mon Sep 17 00:00:00 2001 From: pjpatil12 Date: Tue, 6 Jan 2026 15:52:08 +0530 Subject: [PATCH] changes of ITAT from new desing and sql insert update proce chnage code of v2 --- AppCode/AOHandler.py | 15 +- AppCode/CITHandler.py | 23 +- AppCode/ITATHandler.py | 38 +-- AppCode/ITRHandler.py | 5 +- AppCode/YearGet.py | 1 - AppCode/__pycache__/AOHandler.cpython-313.pyc | Bin 5546 -> 5548 bytes .../__pycache__/CITHandler.cpython-313.pyc | Bin 5156 -> 5236 bytes .../__pycache__/ITATHandler.cpython-313.pyc | Bin 4836 -> 4839 bytes .../__pycache__/ITRHandler.cpython-313.pyc | Bin 5907 -> 5909 bytes main.py | 23 +- static/js/ao_calc.js | 11 +- static/js/cit_calc.js | 119 ++++---- static/js/itr_calc.js | 17 +- templates/add_ao.html | 142 +++++---- templates/add_cit.html | 141 +++++---- templates/add_itat.html | 161 ++++++++++- templates/add_itr.html | 140 +++++---- templates/ao_form.html | 152 ---------- templates/cit_form.html | 147 ---------- templates/display_itat.html | 8 +- templates/itat_form.html | 150 ---------- templates/itr_form.html | 270 ------------------ templates/update_ao.html | 16 +- templates/update_cit.html | 18 +- templates/update_itat.html | 22 +- templates/update_itr.html | 16 +- 26 files changed, 516 insertions(+), 1119 deletions(-) delete mode 100644 templates/ao_form.html delete mode 100644 templates/cit_form.html delete mode 100644 templates/itat_form.html delete mode 100644 templates/itr_form.html diff --git a/AppCode/AOHandler.py b/AppCode/AOHandler.py index 4d36c10..a103f9a 100644 --- a/AppCode/AOHandler.py +++ b/AppCode/AOHandler.py @@ -36,24 +36,13 @@ class AOHandler: return None - """ variable of AO model - year, gross_total_income, disallowance_14a, disallowance_37, - deduction_80ia_business, deduction_sec37_disallowance, deduction_80g, - net_taxable_income, tax_30_percent, tax_book_profit_18_5, - surcharge_12, edu_cess_3, total_tax_payable, mat_credit, - interest_234c, total_tax, advance_tax, tds, tcs, - tax_on_assessment, refund - - """ - - def add_ao(self, data): fields = [ "year","gross_total_income", "disallowance_14a", "disallowance_37", "deduction_80ia_business", "deduction_sec37_disallowance", "deduction_80g", "net_taxable_income", "tax_30_percent", "tax_book_profit_18_5", "surcharge_12", "edu_cess_3", "total_tax_payable", "mat_credit", - "interest_234c", "total_tax", "advance_tax", "tds", "tcs", + "interest_234c", "total_tax", "advance_tax", "tds", "tcs","sat", "tax_on_assessment", "refund","Remarks" ] @@ -72,7 +61,7 @@ class AOHandler: "deduction_80ia_business", "deduction_sec37_disallowance", "deduction_80g", "net_taxable_income", "tax_30_percent", "tax_book_profit_18_5", "surcharge_12", "edu_cess_3", "total_tax_payable", "mat_credit", - "interest_234c", "total_tax", "advance_tax", "tds", "tcs", + "interest_234c", "total_tax", "advance_tax", "tds", "tcs","sat", "tax_on_assessment", "refund","Remarks" ] diff --git a/AppCode/CITHandler.py b/AppCode/CITHandler.py index 2839853..1612d8a 100644 --- a/AppCode/CITHandler.py +++ b/AppCode/CITHandler.py @@ -38,10 +38,12 @@ class CITHandler: # INSERT CIT RECORD def add_cit(self, data): columns = [ - "year", "gross_total_income", "deduction_80ia_business", "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","Remarks" + '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] @@ -54,13 +56,12 @@ class CITHandler: # UPDATE CIT RECORD def update_cit(self, id, data): columns = [ - "year", "gross_total_income", "deduction_80ia_business", - "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","Remarks" + '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] diff --git a/AppCode/ITATHandler.py b/AppCode/ITATHandler.py index f90f5a4..14a66e6 100644 --- a/AppCode/ITATHandler.py +++ b/AppCode/ITATHandler.py @@ -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() diff --git a/AppCode/ITRHandler.py b/AppCode/ITRHandler.py index 4891506..93665e7 100644 --- a/AppCode/ITRHandler.py +++ b/AppCode/ITRHandler.py @@ -28,7 +28,6 @@ class ITRHandler: self.cursor.callproc("GetAllItr") records = [] - for result in self.cursor.stored_results(): records = result.fetchall() @@ -62,7 +61,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', 'Remarks' + 'total_tax', 'advance_tax', 'tds', 'tcs','sat', 'tax_on_assessment', 'refund', 'Remarks' ] values = [data.get(col, 0) for col in columns] @@ -79,7 +78,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','Remarks' + 'total_tax', 'advance_tax', 'tds', 'tcs', 'sat','tax_on_assessment', 'refund','Remarks' ] values = [id] + [data.get(col, 0) for col in columns] diff --git a/AppCode/YearGet.py b/AppCode/YearGet.py index 19c998b..4aca65a 100644 --- a/AppCode/YearGet.py +++ b/AppCode/YearGet.py @@ -33,7 +33,6 @@ class YearGet: # return years - def close(self): self.cursor.close() self.conn.close() diff --git a/AppCode/__pycache__/AOHandler.cpython-313.pyc b/AppCode/__pycache__/AOHandler.cpython-313.pyc index 509b185489a1bb6fb67fc6cb06ec8aab9c7ed635..c5761ff0746d21ce53ff35dddc9fa047ad7102f4 100644 GIT binary patch delta 268 zcmZ3by+)hwGcPX}0}xcKh|WwC*vPk;k$uNga87{xc2vS~1~Fc&A5OrFEO zg;9NTAjcd=MQfl2O|~LlAXOv>BJ4qg1Bh@05l)l&xQrPsH#>1DGcwvuPUCiG^qstp z`w^qx)9rFD0?KC_CJ)h;RTAj*|trj2T@vyKpHpGTKhg;C5$>n7o1e zk(e(~_7=aRzei$TN=|B#UUE);accbL6+Hi#8G|P;7wBM%0O=2!Y%18uXft`c;9ADy z&8b2bOrlO8aW@d*1tLHO6_rokB;w90%F6S}VDdi^FS9J5;4QWSpxKGVMbRJ?$smFi oMAU%@K@h-r`3QF*d&?o|2kUnp~2ZpBHaokeL{tR9c*wms(tWOBhWeH?uhTmI#_) zeo01Z(d3P6_gR>W6H6xdv#(=k7v}0<|0uNCg(H+v(GKW9O|~K)AXOv>A{;@46NqpI z5iXN=ahi!(0-41TK%#-+6BAhf2cgX@Tb%7 delta 289 zcmeyOu|$LKGcPX}0}#|d^2^-Gw~_BKBcuJ~ON?sFx@AV2e=s(&Fp5sDW|Ni>Pf1NF zO)kmI&x^M($V`k+DlN{;OD!&*{D_CM5WG*f<5py83I08sCFnnU-0O|iAvN?o{osrRcatyZ}qu1ow+)o(2 zCpYkjGWu_x#v{eTXghhMzyDYkjA4p>=X>`FwASM{lYNRPD!iq^rZ-=?Va=Ul$-OkLS zJYnB3eQ9&ks1Kx@_@Fj@p``r_`r4+3)R=klp@~VK6w`;kdFFy2G|s~>XU_cQoHM`q z{e9%wk=B>lYzo1;zcK4IvumxtXdjN8JvBQMvg)i)Xx(=%v+zqw1fLxbNLZuO_{P){ z7qqtC(0?+br|Fi--{AiDsEDStNiERJdI!2{aJ`5)L>KZ1h5c7F)nn%>8&mp8eJgia zpV*C18g-+<42*JQYn{~VA-}KQyP+cTvuy;y*PMtDB10nNjKNp5o zr_RE8PdNR<&Pkb8+4?eGQdeb$HyByKtO74PAye=Shrr-YN!nW?#O!Tys)mI_7g0MeH}ALIMcg-O=yXvE!2v-b9%wte9&=Wh1nNY^Ov~5f?HYV!< zUMz@AmFu7b9iJYXW~U+Bn~c?A2Nh#X!5IZ-6?_c9lK>#iiXN+qa1nG8@ib0f`t@4gdfE delta 1051 zcmaixPe|Kv6vy+YN!#?-m=xRjr`9@KXXi3)M|;@VP&UNUDPy$?Td{;T%z|wtshz@x z+fI5?`7yS`4uM@f?4ZaFJMOd{l`2Y39tMNKpeQ@+w%@NB-4xsp^5MPjd&&E~Z@ve= z1^Gj#lOxdi@+^^m#jW!n$@#B$Z>Ce4qH5`ZTp?df-zz;WPL<@GmL7{p@nW`AP)6n1 zJlwErGir8HR-Y(_C97zf0m`MaJayb-SmqR2g}<#m&9v&o z{g#|umJPNdPtBliycQg`N%IvHydd_4#y7SV+h%iUHCz>>y`%JPt1efCZZq@fVpZrg zGv6x8dd%#oR&%f(eqpf26Haj{v6$Ee{w?6wy{naN5ZeR7QhYJK3%pyvy90cxh(`Of z_$KB#G2C-(I5GiQ4t0v7jzWO^LN$C$fj%o({uLUMj4AZ8Mf%iYHbrBLheFm7wF`Yv zy^PU`5x@u{7+h)^8K=ZY2S(LyB!nz=J5?X<=)t&#pji+g%k_?5$5{yhnF@Hk^U&hZ z@>mskkK;{uunM}&!s9CFFyp_PmM5wpP;**c+yYw@2)h%OxDKZ77}U9S@+y4j7$$FR z=#Cxw$^ag@S07oUE;+sUXF66KyFy?~2q?J!qj2KojHr6@$aBSlb}#G1zIjn3Fa24t}8@gTZ(N WbypKP0YACg8^%ep<$%DfU-}Q>3l5wB diff --git a/AppCode/__pycache__/ITRHandler.cpython-313.pyc b/AppCode/__pycache__/ITRHandler.cpython-313.pyc index 6b0dc3b4697f4891640aae3aee94da3a3138e005..ddfb03f0552f6d926bde4f4014adbd7364884ead 100644 GIT binary patch delta 354 zcmW;Ey-LGS6bJC0*nIROHZ3HTZni3@n5BzK5!x7yMKFjiV#Q!1sJB)V9g0N|CtW%m zTt$5Yx!^k#C)Yei^#RQ39e$jz|3&k~RDV@9orvGZ@bIkusa6H3VO^Nx=fV#lNELpR zyaSl!k+=g;;tTRIBqu`e2A`C7SmukV0jxISd@xPqh$&){uwv$=AWwCfSSM^^gV@Bs zvv)%K z<_G2p>xMpJRe#VO%4`!Z(Ifge)ElBA7DonZh6@ZmqwKWeRU}{aI=%3k1wM7+Df7aM mK%|gF$V7^GBy^$>6DhS$w|&d}wcr`Qjg_1wKxvd9$4CDJu2MMw delta 336 zcmbQLH(8JOGcPX}0}v=a@XIvc$ZO2RXg}GJNsU>z%xH5u(?v$c2b2G^Ds7Htsb*wU z+kBnXpOH~=vpRbM~Kkui01gU~!C#_GxPqN0pbCYy>jin@cOy+MROh^PP&)ss()I1dm_0dJOvxh#D0Pdypfb0zxG<+E1;k@b%SkNGE@A~~VgnKEAc7M_G=T_F k5FrF4ZgJS;=BJeAq}mmAPChGU$?w9%DD{Z}M1mCo05|4Qga7~l diff --git a/main.py b/main.py index 33b96c9..f57112a 100644 --- a/main.py +++ b/main.py @@ -261,16 +261,14 @@ def display_itat(): # 2.Add new ITAT records @app.route('/itat/add', methods=['GET', 'POST']) def add_itat(): - itat = ITATHandler() - if request.method == 'POST': - data = {k: request.form.get(k, 0) for k in request.form} - itat.add_itat(data) + itat = ITATHandler() + # data = {k: request.form.get(k, 0) for k in request.form} + itat.add_itat(request.form) itat.close() flash("ITAT record added successfully!", "success") return redirect(url_for('display_itat')) - itat.close() return render_template('add_itat.html') # 3.Update ITAT records by id @@ -284,15 +282,7 @@ def update_itat(id): return redirect(url_for('display_itat')) if request.method == 'POST': - data = { - "year": request.form.get("year"), - "mat_tax_credit": request.form.get("mat_tax_credit"), - "surcharge": request.form.get("surcharge"), - "cess": request.form.get("cess"), - "total_credit": request.form.get("total_credit") - } - - itat.update_itat(id, data) + itat.update_itat(id, request.form) itat.close() flash("ITAT Record Updated!", "success") return redirect(url_for('display_itat')) @@ -310,8 +300,6 @@ def delete_itat(id): return redirect(url_for('display_itat')) - - ## ======================================================= ## All Report Routes ## ======================================================= @@ -457,5 +445,4 @@ def check_year(): # run if __name__ == '__main__': - app.run(host='0.0.0.0', port=5003, debug=True) - \ No newline at end of file + app.run(host='0.0.0.0', port=5003, debug=True) \ No newline at end of file diff --git a/static/js/ao_calc.js b/static/js/ao_calc.js index 04ade9c..241182f 100644 --- a/static/js/ao_calc.js +++ b/static/js/ao_calc.js @@ -17,10 +17,7 @@ document.addEventListener("DOMContentLoaded", function () { var disallowance_14a = getValue("disallowance_14a"); var disallowance_37 = getValue("disallowance_37"); - // // Auto-calculations (your logic) - // setValue("gross_total_income", disallowance_37 + gross_total_income); - // setValue("disallowance_37", disallowance_14a + disallowance_37); - + // -- total gross income --- var gross_total = gross_total_income + disallowance_37 + disallowance_14a console.log("gross_total income:: " + gross_total) @@ -71,11 +68,11 @@ document.addEventListener("DOMContentLoaded", function () { var adv_tax = getValue("advance_tax"); var tds = getValue("tds"); var tcs = getValue("tcs"); + var tax_on_regular_assessment = getValue("tax_on_assessment"); - var tax_on_assessment = adv_tax + tds + tcs; - setValue("tax_on_assessment", tax_on_assessment); + var all_tax = adv_tax + tds + tcs + tax_on_regular_assessment; - var refund = total_tax - tax_on_assessment; + var refund = total_tax - all_tax; setValue("refund", refund); }; }); diff --git a/static/js/cit_calc.js b/static/js/cit_calc.js index b18503e..cc1b530 100644 --- a/static/js/cit_calc.js +++ b/static/js/cit_calc.js @@ -1,89 +1,78 @@ document.addEventListener("DOMContentLoaded", function () { - const fields = [ - "gross_total_income", "disallowance_14a", "disallowance_37", - "deduction_80ia_business", "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" - ]; - - function getVal(id) { - let el = document.getElementsByName(id)[0]; + function getValue(id) { + var el = document.getElementsByName(id)[0]; return el ? parseFloat(el.value) || 0 : 0; } - function setVal(id, value) { - let el = document.getElementsByName(id)[0]; - if (el) el.value = Number(value).toFixed(2); + function setValue(id, val) { + var el = document.getElementsByName(id)[0]; + if (el) el.value = Number(val).toFixed(2); } - function calculate() { + window.calculate = function () { - // Base values - let gross_total_income = getVal("gross_total_income"); - let disallowance_14a = getVal("disallowance_14a"); - let disallowance_37 = getVal("disallowance_37"); + // --- BASIC INPUTS --- + var gross_total_income = getValue("gross_total_income"); + var disallowance_14a = getValue("disallowance_14a"); + var disallowance_37 = getValue("disallowance_37"); - // Deductions - let d80_business = getVal("deduction_80ia_business"); - let deduction_sec37 = getVal("deduction_sec37_disallowance"); - let deduction_80g = getVal("deduction_80g"); + // -- total gross income -- + var gross_total = gross_total_income + disallowance_37 + disallowance_14a + console.log("gross_total income:: " + gross_total) - // Net Taxable Income - let net_taxable_income = - (gross_total_income + disallowance_14a + disallowance_37) - - (d80_business + deduction_sec37) - - deduction_80g; + // --- DEDUCTIONS --- + var d80_business = getValue("deduction_80ia_business"); + var d80_misc = getValue("deduction_80ia_misc"); + var d80_other = getValue("deduction_80ia_other"); + var d80_sec37 = getValue("deduction_sec37_disallowance"); - setVal("net_taxable_income", net_taxable_income); + var deduction = d80_business + d80_misc + d80_other + d80_sec37; - // 30% tax - let tax_30_percent = net_taxable_income * 0.30; - setVal("tax_30_percent", tax_30_percent); + var deduction_80g = getValue("deduction_80g"); - // Book profit tax (user input) - let tax_payable = getVal("tax_book_profit_18_5"); - setVal("tax_payable", tax_payable); + // --- NET TAXABLE INCOME --- + var net_taxable_income = gross_total - deduction - deduction_80g; + setValue("net_taxable_income", net_taxable_income); - // Surcharge 12% - let surcharge_12 = tax_payable * 0.12; - setVal("surcharge_12", surcharge_12); + // --- TAX 30% --- + var tax30 = net_taxable_income * 0.30; + setValue("tax_30_percent", tax30); - // Education Cess 3% - let edu_cess_3 = (tax_payable + surcharge_12) * 0.03; - setVal("edu_cess_3", edu_cess_3); + // --- TAX PAYABLE (18.5%) --- + var tax185 = getValue("tax_book_profit_18_5"); - // Total Tax Payable - let total_tax_payable = tax_payable + surcharge_12 + edu_cess_3; - setVal("total_tax_payable", total_tax_payable); + var tax_payable = (tax30 > tax185) ? tax30 : tax185; + setValue("tax_payable", tax_payable); - // MAT + Interest - let mat_credit = getVal("mat_credit"); - let interest_234c = getVal("interest_234c"); + // --- SURCHARGE --- + var percent = getValue("persentage"); + var surcharge = tax_payable * (percent / 100); + setValue("surcharge_12", surcharge); - // Total Tax - let total_tax = total_tax_payable + mat_credit + interest_234c; - setVal("total_tax", total_tax); + var edu_cess = (tax_payable + surcharge) * 0.03; + setValue("edu_cess_3", edu_cess); - // Assessment → Advance Tax + TDS + TCS - let advance_tax = getVal("advance_tax"); - let tds = getVal("tds"); - let tcs = getVal("tcs"); + // --- total tax payable --- + var total_tax_payable = tax_payable + surcharge + edu_cess; + setValue("total_tax_payable", total_tax_payable); - let tax_on_assessment = advance_tax + tds + tcs; - setVal("tax_on_assessment", tax_on_assessment); + // --- FINAL TAX --- + var mat_credit = getValue("mat_credit"); + var interest_234c = getValue("interest_234c"); - // Refund (or payable) - let refund = total_tax - tax_on_assessment; - setVal("refund", refund); - } + var total_tax = total_tax_payable + mat_credit + interest_234c; + setValue("total_tax", total_tax); - // Attach listeners - fields.forEach(id => { - let el = document.getElementsByName(id)[0]; - if (el) el.addEventListener("input", calculate); - }); + // --- ASSESSMENT --- + var adv_tax = getValue("advance_tax"); + var tds = getValue("tds"); + var tcs = getValue("tcs"); + var tax_on_regular_assessment = getValue("tax_on_assessment"); + var all_tax = adv_tax + tds + tcs + tax_on_regular_assessment; + + var refund = total_tax - all_tax; + setValue("refund", refund); + }; }); diff --git a/static/js/itr_calc.js b/static/js/itr_calc.js index f603bd1..4e4e9b5 100644 --- a/static/js/itr_calc.js +++ b/static/js/itr_calc.js @@ -17,10 +17,7 @@ document.addEventListener("DOMContentLoaded", function () { var disallowance_14a = getValue("disallowance_14a"); var disallowance_37 = getValue("disallowance_37"); - // // Auto-calculations (your logic) - // setValue("gross_total_income", disallowance_37 + gross_total_income); - // setValue("disallowance_37", disallowance_14a + disallowance_37); - + // -- total gross income -- var gross_total = gross_total_income + disallowance_37 + disallowance_14a console.log("gross_total income:: " + gross_total) @@ -28,14 +25,14 @@ document.addEventListener("DOMContentLoaded", function () { var d80_business = getValue("deduction_80ia_business"); var d80_misc = getValue("deduction_80ia_misc"); var d80_other = getValue("deduction_80ia_other"); + var d80_sec37 = getValue("deduction_sec37_disallowance"); - var deduction_sec37 = d80_business + d80_misc + d80_other - 1.35; - setValue("deduction_sec37_disallowance", deduction_sec37); + var deduction = d80_business + d80_misc + d80_other + d80_sec37 - 1.35; var deduction_80g = getValue("deduction_80g"); // --- NET TAXABLE INCOME --- - var net_taxable_income = gross_total - deduction_sec37 - deduction_80g; + var net_taxable_income = gross_total - deduction - deduction_80g; setValue("net_taxable_income", net_taxable_income); // --- TAX 30% --- @@ -71,11 +68,11 @@ document.addEventListener("DOMContentLoaded", function () { var adv_tax = getValue("advance_tax"); var tds = getValue("tds"); var tcs = getValue("tcs"); + var tax_on_regular_assessment = getValue("tax_on_assessment"); - var tax_on_assessment = adv_tax + tds + tcs; - setValue("tax_on_assessment", tax_on_assessment); + var all_tax = adv_tax + tds + tcs + tax_on_regular_assessment; - var refund = total_tax - tax_on_assessment; + var refund = total_tax - all_tax; setValue("refund", refund); }; }); diff --git a/templates/add_ao.html b/templates/add_ao.html index 031aa53..cc71b75 100644 --- a/templates/add_ao.html +++ b/templates/add_ao.html @@ -11,15 +11,16 @@

New Assessing Officer Form

-
- - -
- - -
- - +
+
+ + + +
+
+ + +
@@ -33,35 +34,39 @@
-
- - +
+
+ + +
+
+ + +
-
- - +
+
+ + +
+
+ + +
-
- - -
- -
- - -
- -
- - -
- -
- - +
+
+ + +
+
+ + +
@@ -77,7 +82,7 @@
- +
@@ -91,34 +96,37 @@
-
- - +
+
+ + +
+
+ + +
-
- - +
+
+ + +
+
+ + +
-
- - -
- -
- - -
- -
- - -
- -
- - +
+
+ + +
+
+ + +
@@ -130,22 +138,32 @@
+
-
- - +
+
+ + +
+
+ + +
+
+
+
diff --git a/templates/add_cit.html b/templates/add_cit.html index a518f16..832fd5d 100644 --- a/templates/add_cit.html +++ b/templates/add_cit.html @@ -11,16 +11,18 @@

New CIT Form

-
- - +
+
+ + + +
+
+ + +
- -
- - -
@@ -32,35 +34,39 @@
-
- - +
+
+ + +
+
+ + +
-
- - +
+
+ + +
+
+ + +
-
- - -
- -
- - -
- -
- - -
- -
- - +
+
+ + +
+
+ + +
@@ -90,35 +96,37 @@
- -
- - +
+
+ + +
+
+ + +
-
- - +
+
+ + +
+
+ + +
-
- - -
- -
- - -
- -
- - -
- -
- - +
+
+ + +
+
+ + +
@@ -130,13 +138,20 @@
+
-
- - -
+
+
+ + +
+
+ + +
+
@@ -147,7 +162,7 @@
- +
{% endblock %} diff --git a/templates/add_itat.html b/templates/add_itat.html index b953fd2..0fe26ec 100644 --- a/templates/add_itat.html +++ b/templates/add_itat.html @@ -4,7 +4,7 @@ {% block extra_css %} - + {% endblock %} {% block content %} @@ -14,21 +14,156 @@
- - - +
+
+ + + +
+
+ + +
+
- - +
+
+ + +
+
+ + +
+
- - +
+
+ + +
+
+ + +
+
- - +
+
+ + +
+
+ + +
+
- - +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ +
+ + +
+ +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+ +
+ +
+
+ + +
+
+ + +
+ +
+
+ + +
+ +
+ + +
@@ -37,7 +172,7 @@ {% block extra_js %} - + {% endblock %} diff --git a/templates/add_itr.html b/templates/add_itr.html index f84f3c4..beef5ff 100644 --- a/templates/add_itr.html +++ b/templates/add_itr.html @@ -12,16 +12,18 @@

New Income Tax Return Form

-
- - +
+
+ + + +
+
+ + +
- -
- - -
@@ -33,35 +35,39 @@
-
- - +
+
+ + +
+
+ + +
-
- - +
+
+ + +
+
+ + +
-
- - -
- -
- - -
- -
- - -
- -
- - +
+
+ + +
+
+ + +
@@ -91,35 +97,37 @@
- -
- - +
+
+ + +
+
+ + +
-
- - +
+
+ + +
+
+ + +
-
- - -
- -
- - -
- -
- - -
- -
- - +
+
+ + +
+
+ + +
@@ -131,12 +139,20 @@
-
-
- - +
+
+
+ + +
+
+ + +
+ +
diff --git a/templates/ao_form.html b/templates/ao_form.html deleted file mode 100644 index f471bae..0000000 --- a/templates/ao_form.html +++ /dev/null @@ -1,152 +0,0 @@ - - - - - AO Form Entry - - - - - -
- - ← Back to Dashboard - -

AO Form Entry

- - - - {% for field in [ - "gross_total_income", "disallowance_14a", "disallowance_37", - "deduction_80ia_business", "deduction_sec37_disallowance", "deduction_80g", - "net_taxable_income", "tax_30_percent", "tax_book_profit_18_5", - "surcharge_12", "edu_cess_3", "total_tax_payable", "mat_credit", - "interest_234c", "total_tax", "advance_tax", "tds", "tcs", - "tax_on_assessment", "refund" - ] %} - - - {% endfor %} - - -
- - - - - - \ No newline at end of file diff --git a/templates/cit_form.html b/templates/cit_form.html deleted file mode 100644 index ba40745..0000000 --- a/templates/cit_form.html +++ /dev/null @@ -1,147 +0,0 @@ - - - - - CIT Form Entry - - - - - -
- - ← Back to Dashboard - -

CIT Form Entry

-
- - - - {% for field in [ - "gross_total_income", "deduction_80ia_business", "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" - ] %} - - - {% endfor %} - -
-
- - - - - \ No newline at end of file diff --git a/templates/display_itat.html b/templates/display_itat.html index 37c7245..2eeeb0b 100644 --- a/templates/display_itat.html +++ b/templates/display_itat.html @@ -43,10 +43,10 @@ {% for record in records %} AY {{ record.year }}-{{ record.year+1 }} - {{ "{:,.2f}".format(record.mat_tax_credit) }} - {{ "{:,.2f}".format(record.surcharge) }} - {{ "{:,.2f}".format(record.cess) }} - {{ "{:,.2f}".format(record.total_credit) }} + {{ "{:,.2f}".format(record.gross_total_income) }} + {{ "{:,.2f}".format(record.net_taxable_income) }} + {{ "{:,.2f}".format(record.total_tax_payable) }} + {{ "{:,.2f}".format(record.refund) }}> Edit diff --git a/templates/itat_form.html b/templates/itat_form.html deleted file mode 100644 index 568361a..0000000 --- a/templates/itat_form.html +++ /dev/null @@ -1,150 +0,0 @@ - - - - - ITAT Form Entry - - - - - -
- - ← Back to Dashboard - -

ITAT Form Entry

-
- - - - - - - - - - - - - - - - -
-
- - - - - \ No newline at end of file diff --git a/templates/itr_form.html b/templates/itr_form.html deleted file mode 100644 index b6b25cd..0000000 --- a/templates/itr_form.html +++ /dev/null @@ -1,270 +0,0 @@ - - - - - - - ITR Form Entry - - - - - - - - - -
- - ← Back to Dashboard - - - -

Income Tax Return Form

- -
- - - - - - - - {% for field in [ - - "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" - - ] %} - - - - - - {% endfor %} - - - -
- -
- - - - - - - - - - \ No newline at end of file diff --git a/templates/update_ao.html b/templates/update_ao.html index d75558b..8e47dad 100644 --- a/templates/update_ao.html +++ b/templates/update_ao.html @@ -17,21 +17,13 @@ - {% for field in record.keys() if field not in ['id', 'year'] %} + {% for field in record.keys() if field not in ['id', 'year', 'remarks'] %} {% endfor %} - - - - - - - - - - + + @@ -43,6 +35,6 @@ {% block extra_js %} - + {% endblock %} \ No newline at end of file diff --git a/templates/update_cit.html b/templates/update_cit.html index 2953221..595ca1c 100644 --- a/templates/update_cit.html +++ b/templates/update_cit.html @@ -17,22 +17,12 @@ - {% for field in record.keys() if field not in ['id', 'year'] %} + {% for field in record.keys() if field not in ['id', 'year','Remarks'] %} {% endfor %} - - - - - - - - - - - - + + @@ -44,6 +34,6 @@ {% block extra_js %} - + {% endblock %} \ No newline at end of file diff --git a/templates/update_itat.html b/templates/update_itat.html index 21f80d8..9098846 100644 --- a/templates/update_itat.html +++ b/templates/update_itat.html @@ -12,20 +12,16 @@
- - + + - - + {% for field in record.keys() if field not in ['id', 'year', 'Remarks'] %} + + + {% endfor %} - - - - - - - - + +
@@ -36,6 +32,6 @@ {% block extra_js %} - + {% endblock %} \ No newline at end of file diff --git a/templates/update_itr.html b/templates/update_itr.html index 6ec2025..4949ac4 100644 --- a/templates/update_itr.html +++ b/templates/update_itr.html @@ -17,21 +17,13 @@ - {% for field in record.keys() if field not in ['id', 'year'] %} + {% for field in record.keys() if field not in ['id', 'year', 'Remarks'] %} {% endfor %} - - - - - - - - - - + + @@ -43,6 +35,6 @@ {% block extra_js %} - + {% endblock %} \ No newline at end of file