code edit itat from and mat ceadit and utility save
This commit is contained in:
Binary file not shown.
18
main.py
18
main.py
@@ -132,7 +132,7 @@ def add_itr():
|
|||||||
|
|
||||||
return render_template('add_itr.html',current_date=date.today().isoformat())
|
return render_template('add_itr.html',current_date=date.today().isoformat())
|
||||||
|
|
||||||
## 4. DELETE an ITR record
|
## 4. DELETE an ITR records
|
||||||
@app.route('/itr/delete/<int:id>', methods=['POST'])
|
@app.route('/itr/delete/<int:id>', methods=['POST'])
|
||||||
@auth.login_required
|
@auth.login_required
|
||||||
def delete_itr(id):
|
def delete_itr(id):
|
||||||
@@ -322,13 +322,27 @@ def display_itat():
|
|||||||
def add_itat():
|
def add_itat():
|
||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
itat = ITATHandler()
|
itat = ITATHandler()
|
||||||
|
mat = MatCreditHandler()
|
||||||
data = {k: request.form.get(k, 0) for k in request.form}
|
data = {k: request.form.get(k, 0) for k in request.form}
|
||||||
itat.add_itat(data)
|
itat.add_itat(data)
|
||||||
itat.close()
|
itat.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 ITR"
|
||||||
|
)
|
||||||
|
|
||||||
flash("ITAT record added successfully!", "success")
|
flash("ITAT record added successfully!", "success")
|
||||||
return redirect(url_for('display_itat'))
|
return redirect(url_for('display_itat'))
|
||||||
|
|
||||||
return render_template('add_itat.html')
|
return render_template('add_itat.html',current_date=date.today().isoformat())
|
||||||
|
|
||||||
# 3.Update ITAT records by id
|
# 3.Update ITAT records by id
|
||||||
@app.route('/itat/update/<int:id>', methods=['GET', 'POST'])
|
@app.route('/itat/update/<int:id>', methods=['GET', 'POST'])
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h2 style="text-align:center;">New Income Tax Appellate Tribunal Form</h2>
|
<h2 style="text-align:center;">New Income Tax Appellate Tribunal Form</h2>
|
||||||
<form id="itat" method="POST" onsubmit="return showSuccessMessage()">
|
<form id="itat" method="POST" enctype="multipart/form-data" onsubmit="return showSuccessMessage()">
|
||||||
|
<input type="hidden" name="stage" value="itr">
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
<div>
|
<div>
|
||||||
<label>Assessment Year:</label>
|
<label>Assessment Year:</label>
|
||||||
@@ -22,6 +22,10 @@
|
|||||||
</select>
|
</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>
|
||||||
|
<div>
|
||||||
|
<label>Record Created Date:</label>
|
||||||
|
<input type="date" name="created_at" value="{{ current_date }}" required>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group full-width inline-2">
|
<div class="form-group full-width inline-2">
|
||||||
@@ -172,10 +176,16 @@
|
|||||||
<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 full-width inline-2">
|
||||||
|
<div>
|
||||||
|
<label>Select Documents:</label>
|
||||||
|
<input type="file" name="documents" multiple>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
<label>Remarks:</label>
|
<label>Remarks:</label>
|
||||||
<input type="text" name="Remarks">
|
<input type="text" name="Remarks">
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<button type="submit">Submit</button>
|
<button type="submit">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user