pankaj-dev #2

Merged
pjpatil12 merged 4 commits from pankaj-dev into main 2026-02-07 05:45:35 +00:00
6 changed files with 53 additions and 7 deletions
Showing only changes of commit 1819c49433 - Show all commits

View File

@@ -43,7 +43,7 @@ class CITHandler:
'tax_payable', 'surcharge', 'edu_cess',
'total_tax_payable', 'mat_credit_created', 'mat_credit_utilized',
'interest_234c', 'total_tax', 'advance_tax', 'tds', 'tcs',
'sat', 'tax_on_assessment', 'refund', 'Remarks'
'sat', 'tax_on_assessment', 'refund', 'Remarks','created_at'
]
values = [data.get(col, 0) for col in columns]

17
main.py
View File

@@ -193,7 +193,7 @@ def add_ao():
year=request.form["year"],
mat_created=float(request.form.get("mat_credit_created", 0)),
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
remarks="Created via ITR"
remarks="Created via ao"
)
flash("AO record added successfully!", "success")
@@ -252,12 +252,25 @@ def display_cit():
def add_cit():
if request.method == 'POST':
cit = CITHandler()
mat = MatCreditHandler()
cit.add_cit(request.form)
cit.close()
if 'documents' in request.files:
doc = DocumentHandler()
doc.Upload(request)
# AUTO SAVE MAT FROM ITR
mat.save_from_itr(
year=request.form["year"],
mat_created=float(request.form.get("mat_credit_created", 0)),
mat_utilized=float(request.form.get("mat_credit_utilized", 0)),
remarks="Created via cit"
)
flash("CIT record added successfully!", "success")
return redirect(url_for('display_cit'))
return render_template('add_cit.html')
return render_template('add_cit.html', current_date=date.today().isoformat())
# 3 delete CIT records by id
@app.route('/cit/delete/<int:id>', methods=['POST'])

View File

@@ -68,6 +68,28 @@ document.addEventListener("DOMContentLoaded", function () {
var total_tax_payable = tax_payable + surcharge + edu_cess;
setValue("total_tax_payable", total_tax_payable);
// --- mat credit_utilized ---
var a = tax185
var b = total_tax_payable
var result = 0
if (a > b) {
result = a - b
setValue("mat_credit_created", result);
}
else {
setValue("mat_credit_created", result);
}
if (b > a) {
result = b - a
setValue("mat_credit_utilized", result);
}
else {
setValue("mat_credit_utilized", result);
}
// --- FINAL TAX ---
var mat_credit = getValue("mat_credit_utilized");
var interest_234c = getValue("interest_234c");

View File

@@ -9,7 +9,8 @@
{% block content %}
<div class="container">
<h2 style="text-align:center;">New CIT Form </h2>
<form id="cit" method="POST">
<form id="cit" method="POST" enctype="multipart/form-data">
<input type="hidden" name="stage" value="cit">
<div class="form-group full-width inline-2">
<div>
<label>Assessment Year:</label>
@@ -20,6 +21,10 @@
</select>
<div id="yearError" style="color:red; display:none; margin-bottom:10px;"></div>
</div>
<div>
<label>Record Created Date:</label>
<input type="date" name="created_at" value="{{ current_date }}" required>
</div>
</div>
<div class="form-group full-width inline-2">
@@ -166,9 +171,15 @@
<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 class="form-group full-width inline-2">
<div>
<label>Select Documents:</label>
<input type="file" name="documents" multiple>
</div>
<div>
<label>Remarks:</label>
<input type="text" name="Remarks">
</div>
</div>
<button type="submit">Submit</button>