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

@@ -36,24 +36,13 @@ class AOHandler:
return None 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): def add_ao(self, data):
fields = [ fields = [
"year","gross_total_income", "disallowance_14a", "disallowance_37", "year","gross_total_income", "disallowance_14a", "disallowance_37",
"deduction_80ia_business", "deduction_sec37_disallowance", "deduction_80g", "deduction_80ia_business", "deduction_sec37_disallowance", "deduction_80g",
"net_taxable_income", "tax_30_percent", "tax_book_profit_18_5", "net_taxable_income", "tax_30_percent", "tax_book_profit_18_5",
"surcharge_12", "edu_cess_3", "total_tax_payable", "mat_credit", "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" "tax_on_assessment", "refund","Remarks"
] ]
@@ -72,7 +61,7 @@ class AOHandler:
"deduction_80ia_business", "deduction_sec37_disallowance", "deduction_80g", "deduction_80ia_business", "deduction_sec37_disallowance", "deduction_80g",
"net_taxable_income", "tax_30_percent", "tax_book_profit_18_5", "net_taxable_income", "tax_30_percent", "tax_book_profit_18_5",
"surcharge_12", "edu_cess_3", "total_tax_payable", "mat_credit", "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" "tax_on_assessment", "refund","Remarks"
] ]

View File

@@ -38,10 +38,12 @@ class CITHandler:
# INSERT CIT RECORD # INSERT CIT RECORD
def add_cit(self, data): def add_cit(self, data):
columns = [ columns = [
"year", "gross_total_income", "deduction_80ia_business", "deduction_sec37_disallowance", 'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
"deduction_80g", "net_taxable_income", "tax_30_percent", "tax_book_profit_18_5", 'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other',
"tax_payable", "surcharge_12", "edu_cess_3", "total_tax_payable", "mat_credit", 'deduction_sec37_disallowance', 'deduction_80g', 'net_taxable_income',
"interest_234c", "total_tax", "advance_tax", "tds", "tcs", "tax_on_assessment", "refund","Remarks" '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] values = [data.get(col, 0) for col in columns]
@@ -54,13 +56,12 @@ class CITHandler:
# UPDATE CIT RECORD # UPDATE CIT RECORD
def update_cit(self, id, data): def update_cit(self, id, data):
columns = [ columns = [
"year", "gross_total_income", "deduction_80ia_business", 'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
"deduction_sec37_disallowance", "deduction_80g", 'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other',
"net_taxable_income", "tax_30_percent", "tax_book_profit_18_5", 'deduction_sec37_disallowance', 'deduction_80g', 'net_taxable_income',
"tax_payable", "surcharge_12", "edu_cess_3", 'tax_30_percent', 'tax_book_profit_18_5', 'tax_payable', 'surcharge_12',
"total_tax_payable", "mat_credit", "interest_234c", 'edu_cess_3', 'total_tax_payable', 'mat_credit', 'interest_234c',
"total_tax", "advance_tax", "tds", "tcs", 'total_tax', 'advance_tax', 'tds', 'tcs','sat', 'tax_on_assessment', 'refund', 'Remarks'
"tax_on_assessment", "refund","Remarks"
] ]
values = [id] + [data.get(col, 0) for col in columns] values = [id] + [data.get(col, 0) for col in columns]

View File

@@ -32,26 +32,31 @@ class ITATHandler:
# INSERT ITAT (PROC) # INSERT ITAT (PROC)
def add_itat(self, data): def add_itat(self, data):
values = [ columns = [
data.get("mat_tax_credit", 0), 'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
data.get("surcharge", 0), 'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other',
data.get("cess", 0), 'deduction_sec37_disallowance', 'deduction_80g', 'net_taxable_income',
data.get("total_credit", 0), 'tax_30_percent', 'tax_book_profit_18_5', 'tax_payable', 'surcharge_12',
data.get("year", 0) '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.cursor.callproc("InsertITAT", values)
self.conn.commit() self.conn.commit()
# UPDATE ITAT (PROC) # UPDATE ITAT (PROC)
def update_itat(self, id, data): def update_itat(self, id, data):
values = [ columns = [
id, 'year', 'gross_total_income', 'disallowance_14a', 'disallowance_37',
data.get("year"), 'deduction_80ia_business', 'deduction_80ia_misc', 'deduction_80ia_other',
data.get("mat_tax_credit"), 'deduction_sec37_disallowance', 'deduction_80g', 'net_taxable_income',
data.get("surcharge"), 'tax_30_percent', 'tax_book_profit_18_5', 'tax_payable', 'surcharge_12',
data.get("cess"), 'edu_cess_3', 'total_tax_payable', 'mat_credit', 'interest_234c',
data.get("total_credit") '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.cursor.callproc("UpdateITAT", values)
self.conn.commit() self.conn.commit()
@@ -66,7 +71,6 @@ class ITATHandler:
try: try:
# Call stored procedure # Call stored procedure
self.cursor.callproc("GetITATByYear", [selected_year]) self.cursor.callproc("GetITATByYear", [selected_year])
rows = [] rows = []
for result in self.cursor.stored_results(): for result in self.cursor.stored_results():
rows = result.fetchall() rows = result.fetchall()

View File

@@ -28,7 +28,6 @@ class ITRHandler:
self.cursor.callproc("GetAllItr") self.cursor.callproc("GetAllItr")
records = [] records = []
for result in self.cursor.stored_results(): for result in self.cursor.stored_results():
records = result.fetchall() records = result.fetchall()
@@ -62,7 +61,7 @@ class ITRHandler:
'deduction_sec37_disallowance', 'deduction_80g', 'net_taxable_income', 'deduction_sec37_disallowance', 'deduction_80g', 'net_taxable_income',
'tax_30_percent', 'tax_book_profit_18_5', 'tax_payable', 'surcharge_12', 'tax_30_percent', 'tax_book_profit_18_5', 'tax_payable', 'surcharge_12',
'edu_cess_3', 'total_tax_payable', 'mat_credit', 'interest_234c', '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] values = [data.get(col, 0) for col in columns]
@@ -79,7 +78,7 @@ class ITRHandler:
'deduction_sec37_disallowance', 'deduction_80g', 'net_taxable_income', 'deduction_sec37_disallowance', 'deduction_80g', 'net_taxable_income',
'tax_30_percent', 'tax_book_profit_18_5', 'tax_payable', 'surcharge_12', 'tax_30_percent', 'tax_book_profit_18_5', 'tax_payable', 'surcharge_12',
'edu_cess_3', 'total_tax_payable', 'mat_credit', 'interest_234c', '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] values = [id] + [data.get(col, 0) for col in columns]

View File

@@ -33,7 +33,6 @@ class YearGet:
# return years # return years
def close(self): def close(self):
self.cursor.close() self.cursor.close()
self.conn.close() self.conn.close()

21
main.py
View File

@@ -261,16 +261,14 @@ def display_itat():
# 2.Add new ITAT records # 2.Add new ITAT records
@app.route('/itat/add', methods=['GET', 'POST']) @app.route('/itat/add', methods=['GET', 'POST'])
def add_itat(): def add_itat():
itat = ITATHandler()
if request.method == 'POST': if request.method == 'POST':
data = {k: request.form.get(k, 0) for k in request.form} itat = ITATHandler()
itat.add_itat(data) # data = {k: request.form.get(k, 0) for k in request.form}
itat.add_itat(request.form)
itat.close() itat.close()
flash("ITAT record added successfully!", "success") flash("ITAT record added successfully!", "success")
return redirect(url_for('display_itat')) return redirect(url_for('display_itat'))
itat.close()
return render_template('add_itat.html') return render_template('add_itat.html')
# 3.Update ITAT records by id # 3.Update ITAT records by id
@@ -284,15 +282,7 @@ def update_itat(id):
return redirect(url_for('display_itat')) return redirect(url_for('display_itat'))
if request.method == 'POST': if request.method == 'POST':
data = { itat.update_itat(id, request.form)
"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.close() itat.close()
flash("ITAT Record Updated!", "success") flash("ITAT Record Updated!", "success")
return redirect(url_for('display_itat')) return redirect(url_for('display_itat'))
@@ -310,8 +300,6 @@ def delete_itat(id):
return redirect(url_for('display_itat')) return redirect(url_for('display_itat'))
## ======================================================= ## =======================================================
## All Report Routes ## All Report Routes
## ======================================================= ## =======================================================
@@ -458,4 +446,3 @@ def check_year():
# run # run
if __name__ == '__main__': if __name__ == '__main__':
app.run(host='0.0.0.0', port=5003, debug=True) app.run(host='0.0.0.0', port=5003, debug=True)

View File

@@ -17,10 +17,7 @@ document.addEventListener("DOMContentLoaded", function () {
var disallowance_14a = getValue("disallowance_14a"); var disallowance_14a = getValue("disallowance_14a");
var disallowance_37 = getValue("disallowance_37"); var disallowance_37 = getValue("disallowance_37");
// // Auto-calculations (your logic) // -- total gross income ---
// setValue("gross_total_income", disallowance_37 + gross_total_income);
// setValue("disallowance_37", disallowance_14a + disallowance_37);
var gross_total = gross_total_income + disallowance_37 + disallowance_14a var gross_total = gross_total_income + disallowance_37 + disallowance_14a
console.log("gross_total income:: " + gross_total) console.log("gross_total income:: " + gross_total)
@@ -71,11 +68,11 @@ document.addEventListener("DOMContentLoaded", function () {
var adv_tax = getValue("advance_tax"); var adv_tax = getValue("advance_tax");
var tds = getValue("tds"); var tds = getValue("tds");
var tcs = getValue("tcs"); var tcs = getValue("tcs");
var tax_on_regular_assessment = getValue("tax_on_assessment");
var tax_on_assessment = adv_tax + tds + tcs; var all_tax = adv_tax + tds + tcs + tax_on_regular_assessment;
setValue("tax_on_assessment", tax_on_assessment);
var refund = total_tax - tax_on_assessment; var refund = total_tax - all_tax;
setValue("refund", refund); setValue("refund", refund);
}; };
}); });

View File

@@ -1,89 +1,78 @@
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
const fields = [ function getValue(id) {
"gross_total_income", "disallowance_14a", "disallowance_37", var el = document.getElementsByName(id)[0];
"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];
return el ? parseFloat(el.value) || 0 : 0; return el ? parseFloat(el.value) || 0 : 0;
} }
function setVal(id, value) { function setValue(id, val) {
let el = document.getElementsByName(id)[0]; var el = document.getElementsByName(id)[0];
if (el) el.value = Number(value).toFixed(2); if (el) el.value = Number(val).toFixed(2);
} }
function calculate() { window.calculate = function () {
// Base values // --- BASIC INPUTS ---
let gross_total_income = getVal("gross_total_income"); var gross_total_income = getValue("gross_total_income");
let disallowance_14a = getVal("disallowance_14a"); var disallowance_14a = getValue("disallowance_14a");
let disallowance_37 = getVal("disallowance_37"); var disallowance_37 = getValue("disallowance_37");
// Deductions // -- total gross income --
let d80_business = getVal("deduction_80ia_business"); var gross_total = gross_total_income + disallowance_37 + disallowance_14a
let deduction_sec37 = getVal("deduction_sec37_disallowance"); console.log("gross_total income:: " + gross_total)
let deduction_80g = getVal("deduction_80g");
// Net Taxable Income // --- DEDUCTIONS ---
let net_taxable_income = var d80_business = getValue("deduction_80ia_business");
(gross_total_income + disallowance_14a + disallowance_37) var d80_misc = getValue("deduction_80ia_misc");
- (d80_business + deduction_sec37) var d80_other = getValue("deduction_80ia_other");
- deduction_80g; 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 var deduction_80g = getValue("deduction_80g");
let tax_30_percent = net_taxable_income * 0.30;
setVal("tax_30_percent", tax_30_percent);
// Book profit tax (user input) // --- NET TAXABLE INCOME ---
let tax_payable = getVal("tax_book_profit_18_5"); var net_taxable_income = gross_total - deduction - deduction_80g;
setVal("tax_payable", tax_payable); setValue("net_taxable_income", net_taxable_income);
// Surcharge 12% // --- TAX 30% ---
let surcharge_12 = tax_payable * 0.12; var tax30 = net_taxable_income * 0.30;
setVal("surcharge_12", surcharge_12); setValue("tax_30_percent", tax30);
// Education Cess 3% // --- TAX PAYABLE (18.5%) ---
let edu_cess_3 = (tax_payable + surcharge_12) * 0.03; var tax185 = getValue("tax_book_profit_18_5");
setVal("edu_cess_3", edu_cess_3);
// Total Tax Payable var tax_payable = (tax30 > tax185) ? tax30 : tax185;
let total_tax_payable = tax_payable + surcharge_12 + edu_cess_3; setValue("tax_payable", tax_payable);
setVal("total_tax_payable", total_tax_payable);
// MAT + Interest // --- SURCHARGE ---
let mat_credit = getVal("mat_credit"); var percent = getValue("persentage");
let interest_234c = getVal("interest_234c"); var surcharge = tax_payable * (percent / 100);
setValue("surcharge_12", surcharge);
// Total Tax var edu_cess = (tax_payable + surcharge) * 0.03;
let total_tax = total_tax_payable + mat_credit + interest_234c; setValue("edu_cess_3", edu_cess);
setVal("total_tax", total_tax);
// Assessment → Advance Tax + TDS + TCS // --- total tax payable ---
let advance_tax = getVal("advance_tax"); var total_tax_payable = tax_payable + surcharge + edu_cess;
let tds = getVal("tds"); setValue("total_tax_payable", total_tax_payable);
let tcs = getVal("tcs");
let tax_on_assessment = advance_tax + tds + tcs; // --- FINAL TAX ---
setVal("tax_on_assessment", tax_on_assessment); var mat_credit = getValue("mat_credit");
var interest_234c = getValue("interest_234c");
// Refund (or payable) var total_tax = total_tax_payable + mat_credit + interest_234c;
let refund = total_tax - tax_on_assessment; setValue("total_tax", total_tax);
setVal("refund", refund);
}
// Attach listeners // --- ASSESSMENT ---
fields.forEach(id => { var adv_tax = getValue("advance_tax");
let el = document.getElementsByName(id)[0]; var tds = getValue("tds");
if (el) el.addEventListener("input", calculate); 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);
};
}); });

View File

@@ -17,10 +17,7 @@ document.addEventListener("DOMContentLoaded", function () {
var disallowance_14a = getValue("disallowance_14a"); var disallowance_14a = getValue("disallowance_14a");
var disallowance_37 = getValue("disallowance_37"); var disallowance_37 = getValue("disallowance_37");
// // Auto-calculations (your logic) // -- total gross income --
// setValue("gross_total_income", disallowance_37 + gross_total_income);
// setValue("disallowance_37", disallowance_14a + disallowance_37);
var gross_total = gross_total_income + disallowance_37 + disallowance_14a var gross_total = gross_total_income + disallowance_37 + disallowance_14a
console.log("gross_total income:: " + gross_total) console.log("gross_total income:: " + gross_total)
@@ -28,14 +25,14 @@ document.addEventListener("DOMContentLoaded", function () {
var d80_business = getValue("deduction_80ia_business"); var d80_business = getValue("deduction_80ia_business");
var d80_misc = getValue("deduction_80ia_misc"); var d80_misc = getValue("deduction_80ia_misc");
var d80_other = getValue("deduction_80ia_other"); 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; var deduction = d80_business + d80_misc + d80_other + d80_sec37 - 1.35;
setValue("deduction_sec37_disallowance", deduction_sec37);
var deduction_80g = getValue("deduction_80g"); var deduction_80g = getValue("deduction_80g");
// --- NET TAXABLE INCOME --- // --- 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); setValue("net_taxable_income", net_taxable_income);
// --- TAX 30% --- // --- TAX 30% ---
@@ -71,11 +68,11 @@ document.addEventListener("DOMContentLoaded", function () {
var adv_tax = getValue("advance_tax"); var adv_tax = getValue("advance_tax");
var tds = getValue("tds"); var tds = getValue("tds");
var tcs = getValue("tcs"); var tcs = getValue("tcs");
var tax_on_regular_assessment = getValue("tax_on_assessment");
var tax_on_assessment = adv_tax + tds + tcs; var all_tax = adv_tax + tds + tcs + tax_on_regular_assessment;
setValue("tax_on_assessment", tax_on_assessment);
var refund = total_tax - tax_on_assessment; var refund = total_tax - all_tax;
setValue("refund", refund); setValue("refund", refund);
}; };
}); });

View File

@@ -11,16 +11,17 @@
<h2 style="text-align:center;">New Assessing Officer Form</h2> <h2 style="text-align:center;">New Assessing Officer Form</h2>
<form id="ao" method="POST"> <form id="ao" method="POST">
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Year:</label> <label>Year:</label>
<select id="year" name="year" required></select> <select id="year" name="year" required></select>
</div>
<div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div> <div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>
</div>
<div class="form-group"> <div>
<label>Gross Total Income:</label> <label>Gross Total Income:</label>
<input type="number" name="gross_total_income" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="gross_total_income" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
</div>
<div class="form-group full-width inline-2"> <div class="form-group full-width inline-2">
<div> <div>
@@ -33,36 +34,40 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Deduction 80IA Business Income:</label> <label>Deduction 80IA Business Income:</label>
<input type="number" name="deduction_80ia_business" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="deduction_80ia_business" step="any" value="0.00" oninput="calculate()"
required>
</div> </div>
<div>
<div class="form-group">
<label>Deduction 80IA Misc:</label> <label>Deduction 80IA Misc:</label>
<input type="number" name="deduction_80ia_misc" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="deduction_80ia_misc" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
</div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Deduction 80IA Other Operating Revenue:</label> <label>Deduction 80IA Other Operating Revenue:</label>
<input type="number" name="deduction_80ia_other" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="deduction_80ia_other" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
<div>
<div class="form-group">
<label>Deduction Sec 37 Disallowance:</label> <label>Deduction Sec 37 Disallowance:</label>
<input type="number" name="deduction_sec37_disallowance" step="any" value="0.00" oninput="calculate()" <input type="number" name="deduction_sec37_disallowance" step="any" value="0.00" oninput="calculate()"
required> required>
</div> </div>
</div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Less: Deduction 80G: </label> <label>Less: Deduction 80G: </label>
<input type="number" name="deduction_80g" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="deduction_80g" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
<div>
<div class="form-group">
<label>Net Taxable Income:</label> <label>Net Taxable Income:</label>
<input type="number" name="net_taxable_income" class="auto" step="any" value="0.00" readonly> <input type="number" name="net_taxable_income" class="auto" step="any" value="0.00" readonly>
</div> </div>
</div>
<div class="form-group full-width inline-2"> <div class="form-group full-width inline-2">
<div> <div>
@@ -77,7 +82,7 @@
<div class="form-group"> <div class="form-group">
<label>Tax Payable (Higher of A or B):</label> <label>Tax Payable (Higher of A or B):</label>
<input type="number" name="tax_payable" step="any" class="auto" value="0.00" readonly> <input type="number" name="tax_payable" class="auto" step="any" value="0.00" readonly>
</div> </div>
<div class="form-group full-width inline-2"> <div class="form-group full-width inline-2">
@@ -91,35 +96,38 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Education Cess @ 3%:</label> <label>Education Cess @ 3%:</label>
<input type="number" name="edu_cess_3" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="edu_cess_3" class="auto" step="any" value="0.00" readonly>
</div> </div>
<div>
<div class="form-group">
<label>Total tax Payable:</label> <label>Total tax Payable:</label>
<input type="number" name="total_tax_payable" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly>
</div>
</div> </div>
<div class="form-group"> <div class="form-group full-width inline-2">
<label>Mat Credit:</label> <div>
<label>Mat Credit Utilized:</label>
<input type="number" name="mat_credit" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="mat_credit" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
<div>
<div class="form-group">
<label>Add :Interest 234c:</label> <label>Add :Interest 234c:</label>
<input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
<div class="form-group">
<label>Total Tax:</label>
<input type="number" name="total_tax" class="auto" step="any" value="0.00" readonly>
</div> </div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Total Tax:</label>
<input type="number" name="total_tax" step="any" class="auto" value="0.00" readonly>
</div>
<div>
<label>Advance Tax:</label> <label>Advance Tax:</label>
<input type="number" name="advance_tax" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="advance_tax" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
</div>
<div class="form-group full-width inline-2"> <div class="form-group full-width inline-2">
<div> <div>
@@ -130,22 +138,32 @@
<label>TCS :</label> <label>TCS :</label>
<input type="number" name="tcs" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="tcs" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>SAT :</label>
<input type="number" name="sat" step="any" value="0.00" oninput="calculate()" required>
</div>
<div>
<label>Tax on Regular Assessment:</label> <label>Tax on Regular Assessment:</label>
<input type="number" name="tax_on_assessment" class="auto" step="any" value="0.00" readonly> <input type="number" name="tax_on_assessment" step="any" value="0.00" oninput="calculate()" required>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>Refund:</label> <label>Refund:</label>
<input type="number" name="refund" class="auto" step="any" value="0.00" readonly> <input type="number" name="refund" class="auto" step="any" value="0.00" readonly>
</div> </div>
<div class="form-group"> <div class="form-group">
<label>Remarks:</label> <label>Remarks:</label>
<input type="text" name="Remarks"> <input type="text" name="Remarks">
</div> </div>
<button type="submit">Submit</button> <button type="submit">Submit</button>
</form> </form>
</div> </div>

View File

@@ -11,16 +11,18 @@
<h2 style="text-align:center;">New CIT Form </h2> <h2 style="text-align:center;">New CIT Form </h2>
<form id="cit" method="POST"> <form id="cit" method="POST">
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Year:</label> <label>Year:</label>
<select id="year" name="year" required></select> <select id="year" name="year" required></select>
</div>
<div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div> <div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>
</div>
<div class="form-group"> <div>
<label>Gross Total Income:</label> <label>Gross Total Income:</label>
<input type="number" name="gross_total_income" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="gross_total_income" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
</div>
<div class="form-group full-width inline-2"> <div class="form-group full-width inline-2">
<div> <div>
<label>Add :Disallowance u/s 14A:</label> <label>Add :Disallowance u/s 14A:</label>
@@ -32,36 +34,40 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Deduction 80IA Business Income:</label> <label>Deduction 80IA Business Income:</label>
<input type="number" name="deduction_80ia_business" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="deduction_80ia_business" step="any" value="0.00" oninput="calculate()"
required>
</div> </div>
<div>
<div class="form-group">
<label>Deduction 80IA Misc:</label> <label>Deduction 80IA Misc:</label>
<input type="number" name="deduction_80ia_misc" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="deduction_80ia_misc" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
</div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Deduction 80IA Other Operating Revenue:</label> <label>Deduction 80IA Other Operating Revenue:</label>
<input type="number" name="deduction_80ia_other" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="deduction_80ia_other" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
<div>
<div class="form-group">
<label>Deduction Sec 37 Disallowance:</label> <label>Deduction Sec 37 Disallowance:</label>
<input type="number" name="deduction_sec37_disallowance" step="any" value="0.00" oninput="calculate()" <input type="number" name="deduction_sec37_disallowance" step="any" value="0.00" oninput="calculate()"
required> required>
</div> </div>
</div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Less: Deduction 80G: </label> <label>Less: Deduction 80G: </label>
<input type="number" name="deduction_80g" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="deduction_80g" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
<div>
<div class="form-group">
<label>Net Taxable Income:</label> <label>Net Taxable Income:</label>
<input type="number" name="net_taxable_income" class="auto" step="any" value="0.00" readonly> <input type="number" name="net_taxable_income" class="auto" step="any" value="0.00" readonly>
</div> </div>
</div>
<div class="form-group full-width inline-2"> <div class="form-group full-width inline-2">
<div> <div>
@@ -90,36 +96,38 @@
</div> </div>
</div> </div>
<div class="form-group full-width inline-2">
<div class="form-group"> <div>
<label>Education Cess @ 3%:</label> <label>Education Cess @ 3%:</label>
<input type="number" name="edu_cess_3" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="edu_cess_3" class="auto" step="any" value="0.00" readonly>
</div> </div>
<div>
<div class="form-group">
<label>Total tax Payable:</label> <label>Total tax Payable:</label>
<input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly> <input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly>
</div> </div>
<div class="form-group">
<label>Mat Credit:</label>
<input type="number" name="mat_credit" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Mat Credit Utilized:</label>
<input type="number" name="mat_credit" step="any" value="0.00" oninput="calculate()" required>
</div>
<div>
<label>Add :Interest 234c:</label> <label>Add :Interest 234c:</label>
<input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
<div class="form-group">
<label>Total Tax:</label>
<input type="number" name="total_tax" step="any" value="0.00" readonly>
</div> </div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Total Tax:</label>
<input type="number" name="total_tax" step="any" class="auto" value="0.00" readonly>
</div>
<div>
<label>Advance Tax:</label> <label>Advance Tax:</label>
<input type="number" name="advance_tax" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="advance_tax" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
</div>
<div class="form-group full-width inline-2"> <div class="form-group full-width inline-2">
<div> <div>
@@ -130,13 +138,20 @@
<label>TCS :</label> <label>TCS :</label>
<input type="number" name="tcs" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="tcs" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>SAT :</label>
<input type="number" name="sat" step="any" value="0.00" oninput="calculate()" required>
</div>
<div>
<label>Tax on Regular Assessment:</label> <label>Tax on Regular Assessment:</label>
<input type="number" name="tax_on_assessment" class="auto" step="any" value="0.00" readonly> <input type="number" name="tax_on_assessment" step="any" value="0.00" oninput="calculate()">
</div> </div>
</div>
<div class="form-group"> <div class="form-group">
<label>Refund:</label> <label>Refund:</label>
<input type="number" name="refund" class="auto" step="any" value="0.00" readonly> <input type="number" name="refund" class="auto" step="any" value="0.00" readonly>
@@ -147,7 +162,7 @@
<input type="text" name="Remarks"> <input type="text" name="Remarks">
</div> </div>
<button type="submit">{{ 'Update' if record else 'Submit' }}</button> <button type="submit">Submit</button>
</form> </form>
</div> </div>
{% endblock %} {% endblock %}

View File

@@ -4,7 +4,7 @@
{% block extra_css %} {% block extra_css %}
<!-- Child page CSS --> <!-- Child page CSS -->
<link rel="stylesheet" href="{{ url_for('static', filename='css/add_itat.css') }}"> <link rel="stylesheet" href="{{ url_for('static', filename='css/add_itr.css') }}">
{% endblock %} {% endblock %}
{% block content %} {% block content %}
@@ -14,21 +14,156 @@
<form id="itat" method="POST" onsubmit="return showSuccessMessage()"> <form id="itat" method="POST" onsubmit="return showSuccessMessage()">
<div class="form-group full-width inline-2">
<div>
<label>Year:</label> <label>Year:</label>
<select id="year" name="year" required></select> <select id="year" name="year" required></select>
<div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div> <div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>
</div>
<div>
<label>Gross Total Income:</label>
<input type="number" name="gross_total_income" step="any" value="0.00" oninput="calculate()" required>
</div>
</div>
<label>MAT Tax Credit:</label> <div class="form-group full-width inline-2">
<input type="number" name="mat_tax_credit" step="0.01" required /> <div>
<label>Add :Disallowance u/s 14A:</label>
<input type="number" name="disallowance_14a" step="any" value="0.00" oninput="calculate()" required>
</div>
<div>
<label>Add :Disallowance u/s 37:</label>
<input type="number" name="disallowance_37" step="any" value="0.00" oninput="calculate()" required>
</div>
</div>
<div class="form-group full-width inline-2">
<div>
<label>Deduction 80IA Business Income:</label>
<input type="number" name="deduction_80ia_business" step="any" value="0.00" oninput="calculate()"
required>
</div>
<div>
<label>Deduction 80IA Misc:</label>
<input type="number" name="deduction_80ia_misc" step="any" value="0.00" oninput="calculate()" required>
</div>
</div>
<div class="form-group full-width inline-2">
<div>
<label>Deduction 80IA Other Operating Revenue:</label>
<input type="number" name="deduction_80ia_other" step="any" value="0.00" oninput="calculate()" required>
</div>
<div>
<label>Deduction Sec 37 Disallowance:</label>
<input type="number" name="deduction_sec37_disallowance" step="any" value="0.00" oninput="calculate()"
required>
</div>
</div>
<div class="form-group full-width inline-2">
<div>
<label>Less: Deduction 80G: </label>
<input type="number" name="deduction_80g" step="any" value="0.00" oninput="calculate()" required>
</div>
<div>
<label>Net Taxable Income:</label>
<input type="number" name="net_taxable_income" class="auto" step="any" value="0.00" readonly>
</div>
</div>
<div class="form-group full-width inline-2">
<div>
<label>Tax @ 30% (A):</label>
<input type="number" name="tax_30_percent" step="any" value="0.00" oninput="calculate()" required>
</div>
<div>
<label>Tax @ 18.5% on Book Profit (B):</label>
<input type="number" name="tax_book_profit_18_5" step="any" value="0.00" oninput="calculate()" required>
</div>
</div>
<div class="form-group">
<label>Tax Payable (Higher of A or B):</label>
<input type="number" name="tax_payable" class="auto" step="any" value="0.00" readonly>
</div>
<div class="form-group full-width inline-2">
<div>
<label>Enter Percentage (%) Surcharge:</label>
<input type="number" name="persentage" step="any" value="0.00" oninput="calculate()">
</div>
<div>
<label>Surcharge:</label> <label>Surcharge:</label>
<input type="number" name="surcharge" step="0.01" required /> <input type="number" name="surcharge_12" class="auto" value="0.00" readonly>
</div>
</div>
<label>Cess:</label> <div class="form-group full-width inline-2">
<input type="number" name="cess" step="0.01" required /> <div>
<label>Education Cess @ 3%:</label>
<input type="number" name="edu_cess_3" class="auto" step="any" value="0.00" readonly>
</div>
<div>
<label>Total tax Payable:</label>
<input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly>
</div>
</div>
<label>Total Credit:</label> <div class="form-group full-width inline-2">
<input type="number" name="total_credit" step="0.01" required /> <div>
<label>Mat Credit Utilized:</label>
<input type="number" name="mat_credit" step="any" value="0.00" oninput="calculate()" required>
</div>
<div>
<label>Add :Interest 234c:</label>
<input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required>
</div>
</div>
<div class="form-group full-width inline-2">
<div>
<label>Total Tax:</label>
<input type="number" name="total_tax" step="any" class="auto" value="0.00" readonly>
</div>
<div>
<label>Advance Tax:</label>
<input type="number" name="advance_tax" step="any" value="0.00" oninput="calculate()" required>
</div>
</div>
<div class="form-group full-width inline-2">
<div>
<label>TDS :</label>
<input type="number" name="tds" step="any" value="0.00" oninput="calculate()" required>
</div>
<div>
<label>TCS :</label>
<input type="number" name="tcs" step="any" value="0.00" oninput="calculate()" required>
</div>
</div>
<div class="form-group full-width inline-2">
<div>
<label>SAT :</label>
<input type="number" name="sat" step="any" value="0.00" oninput="calculate()" required>
</div>
<div>
<label>Tax on Regular Assessment:</label>
<input type="number" name="tax_on_assessment" step="any" value="0.00" oninput="calculate()">
</div>
</div>
<div class="form-group">
<label>Refund:</label>
<input type="number" name="refund" class="auto" step="any" value="0.00" readonly>
</div>
<div class="form-group">
<label>Remarks:</label>
<input type="text" name="Remarks">
</div>
<button type="submit">Submit</button> <button type="submit">Submit</button>
</form> </form>
@@ -37,7 +172,7 @@
{% block extra_js %} {% block extra_js %}
<script src="{{ url_for('static', filename='js/toggle.js') }}"></script> <script src="{{ url_for('static', filename='js/toggle.js') }}"></script>
<script src="{{ url_for('static', filename='js/cit_calc.js') }}"></script> <script src="{{ url_for('static', filename='js/itr_calc.js') }}"></script>
<script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script> <script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script>
{% endblock %} {% endblock %}

View File

@@ -12,16 +12,18 @@
<h2 style="text-align:center;">New Income Tax Return Form</h2> <h2 style="text-align:center;">New Income Tax Return Form</h2>
<form id="itr" method="POST"> <form id="itr" method="POST">
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Year:</label> <label>Year:</label>
<select id="year" name="year" required></select> <select id="year" name="year" required></select>
</div>
<div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div> <div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>
</div>
<div class="form-group"> <div>
<label>Gross Total Income:</label> <label>Gross Total Income:</label>
<input type="number" name="gross_total_income" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="gross_total_income" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
</div>
<div class="form-group full-width inline-2"> <div class="form-group full-width inline-2">
<div> <div>
<label>Add :Disallowance u/s 14A:</label> <label>Add :Disallowance u/s 14A:</label>
@@ -33,36 +35,40 @@
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Deduction 80IA Business Income:</label> <label>Deduction 80IA Business Income:</label>
<input type="number" name="deduction_80ia_business" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="deduction_80ia_business" step="any" value="0.00" oninput="calculate()"
required>
</div> </div>
<div>
<div class="form-group">
<label>Deduction 80IA Misc:</label> <label>Deduction 80IA Misc:</label>
<input type="number" name="deduction_80ia_misc" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="deduction_80ia_misc" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
</div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Deduction 80IA Other Operating Revenue:</label> <label>Deduction 80IA Other Operating Revenue:</label>
<input type="number" name="deduction_80ia_other" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="deduction_80ia_other" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
<div>
<div class="form-group">
<label>Deduction Sec 37 Disallowance:</label> <label>Deduction Sec 37 Disallowance:</label>
<input type="number" name="deduction_sec37_disallowance" step="any" value="0.00" oninput="calculate()" <input type="number" name="deduction_sec37_disallowance" step="any" value="0.00" oninput="calculate()"
required> required>
</div> </div>
</div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Less: Deduction 80G: </label> <label>Less: Deduction 80G: </label>
<input type="number" name="deduction_80g" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="deduction_80g" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
<div>
<div class="form-group">
<label>Net Taxable Income:</label> <label>Net Taxable Income:</label>
<input type="number" name="net_taxable_income" class="auto" step="any" value="0.00" readonly> <input type="number" name="net_taxable_income" class="auto" step="any" value="0.00" readonly>
</div> </div>
</div>
<div class="form-group full-width inline-2"> <div class="form-group full-width inline-2">
<div> <div>
@@ -91,36 +97,38 @@
</div> </div>
</div> </div>
<div class="form-group full-width inline-2">
<div class="form-group"> <div>
<label>Education Cess @ 3%:</label> <label>Education Cess @ 3%:</label>
<input type="number" name="edu_cess_3" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="edu_cess_3" class="auto" step="any" value="0.00" readonly>
</div> </div>
<div>
<div class="form-group">
<label>Total tax Payable:</label> <label>Total tax Payable:</label>
<input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly> <input type="number" name="total_tax_payable" class="auto" step="any" value="0.00" readonly>
</div> </div>
<div class="form-group">
<label>Mat Credit:</label>
<input type="number" name="mat_credit" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Mat Credit Utilized:</label>
<input type="number" name="mat_credit" step="any" value="0.00" oninput="calculate()" required>
</div>
<div>
<label>Add :Interest 234c:</label> <label>Add :Interest 234c:</label>
<input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="interest_234c" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
<div class="form-group">
<label>Total Tax:</label>
<input type="number" name="total_tax" step="any" value="0.00" readonly>
</div> </div>
<div class="form-group"> <div class="form-group full-width inline-2">
<div>
<label>Total Tax:</label>
<input type="number" name="total_tax" step="any" class="auto" value="0.00" readonly>
</div>
<div>
<label>Advance Tax:</label> <label>Advance Tax:</label>
<input type="number" name="advance_tax" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="advance_tax" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
</div>
<div class="form-group full-width inline-2"> <div class="form-group full-width inline-2">
<div> <div>
@@ -131,12 +139,20 @@
<label>TCS :</label> <label>TCS :</label>
<input type="number" name="tcs" step="any" value="0.00" oninput="calculate()" required> <input type="number" name="tcs" step="any" value="0.00" oninput="calculate()" required>
</div> </div>
</div>
<div class="form-group">
<label>Tax on Regular Assessment:</label>
<input type="number" name="tax_on_assessment" class="auto" step="any" value="0.00" readonly>
</div> </div>
<div class="form-group full-width inline-2">
<div>
<label>SAT :</label>
<input type="number" name="sat" step="any" value="0.00" oninput="calculate()" required>
</div>
<div>
<label>Tax on Regular Assessment:</label>
<input type="number" name="tax_on_assessment" step="any" value="0.00" oninput="calculate()">
</div>
</div>
<div class="form-group"> <div class="form-group">
<label>Refund:</label> <label>Refund:</label>
<input type="number" name="refund" class="auto" step="any" value="0.00" readonly> <input type="number" name="refund" class="auto" step="any" value="0.00" readonly>

View File

@@ -1,152 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>AO Form Entry</title>
<link rel="stylesheet" href="{{ url_for('static', filename='index.css') }}">
<style>
/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f5f7fa;
color: #333;
padding: 30px 0;
}
.container {
width: 90%;
max-width: 700px;
margin: auto;
background-color: #fff;
padding: 40px;
border-radius: 12px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
h2 {
text-align: center;
margin-bottom: 30px;
font-size: 28px;
color: #2c3e50;
}
form {
display: flex;
flex-direction: column;
}
label {
margin-top: 15px;
margin-bottom: 6px;
font-weight: 600;
color: #333;
}
input[type="number"] {
padding: 10px 12px;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 16px;
transition: border-color 0.3s ease;
}
input[type="number"]:focus {
border-color: #007BFF;
outline: none;
}
button[type="submit"] {
margin-top: 30px;
padding: 12px;
background-color: #007BFF;
border: none;
border-radius: 6px;
color: white;
font-size: 18px;
cursor: pointer;
transition: background-color 0.3s ease;
}
button[type="submit"]:hover {
background-color: #0056b3;
}
/* Back button styling */
.back-btn {
display: inline-block;
margin-bottom: 20px;
padding: 10px 18px;
background: #6c757d;
color: white;
font-size: 15px;
font-weight: 600;
border-radius: 6px;
text-decoration: none;
transition: background 0.3s ease;
}
.back-btn:hover {
background: #5a6268;
}
@media (max-width: 600px) {
.container {
padding: 20px;
}
h2 {
font-size: 22px;
}
input[type="number"] {
font-size: 15px;
}
button[type="submit"] {
font-size: 16px;
}
}
</style>
</head>
<body>
<div class="container">
<!-- Back to Dashboard Button -->
<a href="{{ url_for('index') }}" class="back-btn">← Back to Dashboard</a>
<h2>AO Form Entry</h2>
<form method="POST" onsubmit="return showSuccessMessage()">
<label>Year:</label>
<input type="number" name="year" required>
{% 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"
] %}
<label for="{{ field }}">{{ field.replace("_", " ").title() }}:</label>
<input type="number" name="{{ field }}" step="0.01" required>
{% endfor %}
<button type="submit">Submit</button>
</form>
</div>
<!-- JavaScript Alert -->
<script>
function showSuccessMessage() {
alert("Form submitted successfully!");
return true; // allow form to submit after showing alert
}
</script>
</body>
</html>

View File

@@ -1,147 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>CIT Form Entry</title>
<link rel="stylesheet" href="{{ url_for('static', filename='index.css') }}">
<style>
/* ...existing styles... (no changes needed) */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f5f7fa;
color: #333;
padding: 30px 0;
}
.container {
width: 90%;
max-width: 700px;
margin: auto;
background-color: #fff;
padding: 40px;
border-radius: 12px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
h2 {
text-align: center;
margin-bottom: 30px;
font-size: 28px;
color: #2c3e50;
}
form {
display: flex;
flex-direction: column;
}
label {
margin-top: 15px;
margin-bottom: 6px;
font-weight: 600;
color: #333;
}
input[type="number"] {
padding: 10px 12px;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 16px;
}
input[type="number"]:focus {
border-color: #007BFF;
outline: none;
}
button[type="submit"] {
margin-top: 30px;
padding: 12px;
background-color: #007BFF;
border: none;
border-radius: 6px;
color: white;
font-size: 18px;
cursor: pointer;
}
button[type="submit"]:hover {
background-color: #0056b3;
}
/* Back button styling */
.back-btn {
display: inline-block;
margin-bottom: 20px;
padding: 10px 18px;
background: #6c757d;
color: white;
font-size: 15px;
font-weight: 600;
border-radius: 6px;
text-decoration: none;
transition: background 0.3s ease;
}
.back-btn:hover {
background: #5a6268;
}
@media (max-width: 600px) {
.container {
padding: 20px;
}
h2 {
font-size: 22px;
}
input[type="number"] {
font-size: 15px;
}
button[type="submit"] {
font-size: 16px;
}
}
</style>
</head>
<body>
<div class="container">
<!-- Back to Dashboard Button -->
<a href="{{ url_for('index') }}" class="back-btn">← Back to Dashboard</a>
<h2>CIT Form Entry</h2>
<form method="POST" onsubmit="return showSuccessMessage()">
<label>Year:</label>
<input type="number" name="year" required>
{% 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"
] %}
<label for="{{ field }}">{{ field.replace("_", " ").title() }}:</label>
<input type="number" name="{{ field }}" step="0.01" required>
{% endfor %}
<button type="submit">Submit</button>
</form>
</div>
<script>
function showSuccessMessage() {
alert("Form submitted successfully!");
return true; // continue with form submission
}
</script>
</body>
</html>

View File

@@ -43,10 +43,10 @@
{% for record in records %} {% for record in records %}
<tr> <tr>
<td>AY {{ record.year }}-{{ record.year+1 }}</td> <td>AY {{ record.year }}-{{ record.year+1 }}</td>
<td>{{ "{:,.2f}".format(record.mat_tax_credit) }}</td> <td>{{ "{:,.2f}".format(record.gross_total_income) }}</td>
<td>{{ "{:,.2f}".format(record.surcharge) }}</td> <td>{{ "{:,.2f}".format(record.net_taxable_income) }}</td>
<td>{{ "{:,.2f}".format(record.cess) }}</td> <td>{{ "{:,.2f}".format(record.total_tax_payable) }}</td>
<td>{{ "{:,.2f}".format(record.total_credit) }}</td> <td>{{ "{:,.2f}".format(record.refund) }}</td>>
<td class="action-cell"> <td class="action-cell">
<a href="{{ url_for('update_itat', id=record.id) }}" class="btn btn-update">Edit</a> <a href="{{ url_for('update_itat', id=record.id) }}" class="btn btn-update">Edit</a>

View File

@@ -1,150 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>ITAT Form Entry</title>
<link rel="stylesheet" href="{{ url_for('static', filename='index.css') }}">
<style>
/* Same styling for layout */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f5f7fa;
color: #333;
padding: 30px 0;
}
.container {
width: 90%;
max-width: 700px;
margin: auto;
background-color: #fff;
padding: 40px;
border-radius: 12px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
h2 {
text-align: center;
margin-bottom: 30px;
font-size: 28px;
color: #2c3e50;
}
form {
display: flex;
flex-direction: column;
}
label {
margin-top: 15px;
margin-bottom: 6px;
font-weight: 600;
color: #333;
}
input[type="number"] {
padding: 10px 12px;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 16px;
}
input[type="number"]:focus {
border-color: #007BFF;
outline: none;
}
button[type="submit"] {
margin-top: 30px;
padding: 12px;
background-color: #007BFF;
border: none;
border-radius: 6px;
color: white;
font-size: 18px;
cursor: pointer;
}
button[type="submit"]:hover {
background-color: #0056b3;
}
/* Back button styling */
.back-btn {
display: inline-block;
margin-bottom: 20px;
padding: 10px 18px;
background: #6c757d;
color: white;
font-size: 15px;
font-weight: 600;
border-radius: 6px;
text-decoration: none;
transition: background 0.3s ease;
}
.back-btn:hover {
background: #5a6268;
}
@media (max-width: 600px) {
.container {
padding: 20px;
}
h2 {
font-size: 22px;
}
input[type="number"] {
font-size: 15px;
}
button[type="submit"] {
font-size: 16px;
}
}
</style>
</head>
<body>
<div class="container">
<!-- Back to Dashboard Button -->
<a href="{{ url_for('index') }}" class="back-btn">← Back to Dashboard</a>
<h2>ITAT Form Entry</h2>
<form method="POST" onsubmit="return showSuccessMessage()">
<label>Year:</label>
<input type="number" name="year" step="0.01" required>
<label>MAT Tax Credit:</label>
<input type="number" name="mat_tax_credit" step="0.01" required>
<label>Surcharge:</label>
<input type="number" name="surcharge" step="0.01" required>
<label>Cess:</label>
<input type="number" name="cess" step="0.01" required>
<label>Total Credit:</label>
<input type="number" name="total_credit" step="0.01" required>
<button type="submit">Submit</button>
</form>
</div>
<script>
function showSuccessMessage() {
alert("Form submitted successfully!");
return true;
}
</script>
</body>
</html>

View File

@@ -1,270 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>ITR Form Entry</title>
<link rel="stylesheet" href="{{ url_for('static', filename='index.css') }}">
<style>
/* Existing CSS here... */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f5f7fa;
color: #333;
padding: 30px 0;
}
.container {
width: 90%;
max-width: 700px;
margin: auto;
background-color: #fff;
padding: 40px;
border-radius: 12px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
h2 {
text-align: center;
margin-bottom: 30px;
font-size: 28px;
color: #2c3e50;
}
form {
display: flex;
flex-direction: column;
}
label {
margin-top: 15px;
margin-bottom: 6px;
font-weight: 600;
}
input[type="number"] {
padding: 10px 12px;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 16px;
transition: border-color 0.3s ease;
}
input[type="number"]:focus {
border-color: #007BFF;
outline: none;
}
button[type="submit"] {
margin-top: 30px;
padding: 12px;
background-color: #007BFF;
border: none;
border-radius: 6px;
color: white;
font-size: 18px;
cursor: pointer;
transition: background-color 0.3s ease;
}
button[type="submit"]:hover {
background-color: #0056b3;
}
/* Back button styling */
.back-btn {
display: inline-block;
margin-bottom: 20px;
padding: 10px 18px;
background: #6c757d;
color: white;
font-size: 15px;
font-weight: 600;
border-radius: 6px;
text-decoration: none;
transition: background 0.3s ease;
}
.back-btn:hover {
background: #5a6268;
}
@media (max-width: 600px) {
.container {
padding: 20px;
}
h2 {
font-size: 22px;
}
input[type="number"] {
font-size: 15px;
}
button[type="submit"] {
font-size: 16px;
}
}
</style>
</head>
<body>
<div class="container">
<!-- Back to Dashboard Button -->
<a href="{{ url_for('index') }}" class="back-btn">← Back to Dashboard</a>
<h2>Income Tax Return Form</h2>
<form method="POST" onsubmit="showSuccessMessage()">
<label>Year:</label>
<input type="number" name="year" required>
{% 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"
] %}
<label>{{ field.replace("_", " ").title() }}:</label>
<input type="number" name="{{ field }}" step="0.01" required>
{% endfor %}
<button type="submit">Submit</button>
</form>
</div>
<!-- JavaScript to show popup -->
<script>
function showSuccessMessage() {
alert("Form submitted successfully!");
}
</script>
</body>
</html>

View File

@@ -17,21 +17,13 @@
<label for="year">Year:</label> <label for="year">Year:</label>
<input type="text" id="year" name="year" value="{{ record.year }}" readonly class="readonly-field"> <input type="text" id="year" name="year" value="{{ record.year }}" readonly class="readonly-field">
{% for field in record.keys() if field not in ['id', 'year'] %} {% for field in record.keys() if field not in ['id', 'year', 'remarks'] %}
<label for="{{ field }}">{{ field.replace("_", " ").title() }}:</label> <label for="{{ field }}">{{ field.replace("_", " ").title() }}:</label>
<input type="number" id="{{ field }}" name="{{ field }}" step="any" value="{{ record[field] }}" required> <input type="number" id="{{ field }}" name="{{ field }}" step="any" value="{{ record[field] }}" required>
{% endfor %} {% endfor %}
<!-- {% for field in record.keys() if field != 'id' %}--> <label for="Remarks">Remarks:</label>
<!-- <label for="{{ field }}">{{ field.replace("_", " ").title() }}:</label>--> <input type="text" id="Remarks" name="Remarks" value="{{ record.remarks}}">
<!-- <input -->
<!-- type="number" -->
<!-- id="{{ field }}" -->
<!-- name="{{ field }}" -->
<!-- step="any" -->
<!-- value="{{ record[field] }}" -->
<!-- required>-->
<!-- {% endfor %}-->
<button type="submit">Update Record</button> <button type="submit">Update Record</button>
@@ -43,6 +35,6 @@
{% block extra_js %} {% block extra_js %}
<script src="{{ url_for('static', filename='js/toggle.js') }}"></script> <script src="{{ url_for('static', filename='js/toggle.js') }}"></script>
<script src="{{ url_for('static', filename='js/cit_calc.js') }}"></script> <!-- <script src="{{ url_for('static', filename='js/cit_calc.js') }}"></script> -->
<script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script> <script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script>
{% endblock %} {% endblock %}

View File

@@ -17,22 +17,12 @@
<label for="year">Year:</label> <label for="year">Year:</label>
<input type="text" id="year" name="year" value="{{ record.year }}" readonly class="readonly-field"> <input type="text" id="year" name="year" value="{{ record.year }}" readonly class="readonly-field">
{% for field in record.keys() if field not in ['id', 'year'] %} {% for field in record.keys() if field not in ['id', 'year','Remarks'] %}
<label for="{{ field }}">{{ field.replace("_", " ").title() }}:</label> <label for="{{ field }}">{{ field.replace("_", " ").title() }}:</label>
<input type="number" id="{{ field }}" name="{{ field }}" step="any" value="{{ record[field] }}" required> <input type="number" id="{{ field }}" name="{{ field }}" step="any" value="{{ record[field] }}" required>
{% endfor %} {% endfor %}
<label for="Remarks">Remarks:</label>
<!-- {% for field in record.keys() if field != 'id' %}--> <input type="text" id="Remarks" name="Remarks" value="{{ record.Remarks }}">
<!-- <label for="{{ field }}">{{ field.replace('_', ' ').title() }}:</label>-->
<!-- <input -->
<!-- type="number" -->
<!-- step="0.01" -->
<!-- id="{{ field }}" -->
<!-- name="{{ field }}" -->
<!-- value="{{ record[field] }}" -->
<!-- required -->
<!-- />-->
<!-- {% endfor %}-->
<button type="submit">Update Record</button> <button type="submit">Update Record</button>
@@ -44,6 +34,6 @@
{% block extra_js %} {% block extra_js %}
<script src="{{ url_for('static', filename='js/toggle.js') }}"></script> <script src="{{ url_for('static', filename='js/toggle.js') }}"></script>
<script src="{{ url_for('static', filename='js/cit_calc.js') }}"></script> <!-- <script src="{{ url_for('static', filename='js/cit_calc.js') }}"></script> -->
<script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script> <script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script>
{% endblock %} {% endblock %}

View File

@@ -12,20 +12,16 @@
<form method="POST" action="{{ url_for('update_itat', id=record.id) }}"> <form method="POST" action="{{ url_for('update_itat', id=record.id) }}">
<label>Year:</label> <label for="year">Year:</label>
<input type="number" name="year" step="1" value="{{ record.year }}" readonly> <input type="text" id="year" name="year" value="{{ record.year }}" readonly class="readonly-field">
<label>MAT Tax Credit:</label> {% for field in record.keys() if field not in ['id', 'year', 'Remarks'] %}
<input type="number" name="mat_tax_credit" step="0.01" value="{{ record.mat_tax_credit }}" required> <label for="{{ field }}">{{ field.replace("_", " ").title() }}:</label>
<input type="number" id="{{ field }}" name="{{ field }}" step="any" value="{{ record[field] }}" required>
{% endfor %}
<label>Surcharge:</label> <label for="Remarks">Remarks:</label>
<input type="number" name="surcharge" step="0.01" value="{{ record.surcharge }}" required> <input type="text" id="Remarks" name="Remarks" value="{{ record.Remarks }}">
<label>Cess:</label>
<input type="number" name="cess" step="0.01" value="{{ record.cess }}" required>
<label>Total Credit:</label>
<input type="number" name="total_credit" step="0.01" value="{{ record.total_credit }}" required>
<button type="submit">Update Record</button> <button type="submit">Update Record</button>
</form> </form>
@@ -36,6 +32,6 @@
{% block extra_js %} {% block extra_js %}
<script src="{{ url_for('static', filename='js/toggle.js') }}"></script> <script src="{{ url_for('static', filename='js/toggle.js') }}"></script>
<script src="{{ url_for('static', filename='js/cit_calc.js') }}"></script> <!-- <script src="{{ url_for('static', filename='js/cit_calc.js') }}"></script> -->
<script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script> <script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script>
{% endblock %} {% endblock %}

View File

@@ -17,21 +17,13 @@
<label for="year">Year:</label> <label for="year">Year:</label>
<input type="text" id="year" name="year" value="{{ record.year }}" readonly class="readonly-field"> <input type="text" id="year" name="year" value="{{ record.year }}" readonly class="readonly-field">
{% for field in record.keys() if field not in ['id', 'year'] %} {% for field in record.keys() if field not in ['id', 'year', 'Remarks'] %}
<label for="{{ field }}">{{ field.replace("_", " ").title() }}:</label> <label for="{{ field }}">{{ field.replace("_", " ").title() }}:</label>
<input type="number" id="{{ field }}" name="{{ field }}" step="any" value="{{ record[field] }}" required> <input type="number" id="{{ field }}" name="{{ field }}" step="any" value="{{ record[field] }}" required>
{% endfor %} {% endfor %}
<!-- {% for field in record.keys() if field != 'id' %}--> <label for="Remarks">Remarks:</label>
<!-- <label for="{{ field }}">{{ field.replace("_", " ").title() }}:</label>--> <input type="text" id="Remarks" name="Remarks" value="{{ record.Remarks }}">
<!-- <input -->
<!-- type="number" -->
<!-- id="{{ field }}" -->
<!-- name="{{ field }}" -->
<!-- step="any" -->
<!-- value="{{ record[field] }}" -->
<!-- required>-->
<!-- {% endfor %}-->
<button type="submit">Update Record</button> <button type="submit">Update Record</button>
@@ -43,6 +35,6 @@
{% block extra_js %} {% block extra_js %}
<script src="{{ url_for('static', filename='js/toggle.js') }}"></script> <script src="{{ url_for('static', filename='js/toggle.js') }}"></script>
<script src="{{ url_for('static', filename='js/cit_calc.js') }}"></script> <!-- <script src="{{ url_for('static', filename='js/cit_calc.js') }}"></script> -->
<script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script> <script src="{{ url_for('static', filename='js/year_dropdown.js') }}"></script>
{% endblock %} {% endblock %}