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())
|
||||
|
||||
## 4. DELETE an ITR record
|
||||
## 4. DELETE an ITR records
|
||||
@app.route('/itr/delete/<int:id>', methods=['POST'])
|
||||
@auth.login_required
|
||||
def delete_itr(id):
|
||||
@@ -322,13 +322,27 @@ def display_itat():
|
||||
def add_itat():
|
||||
if request.method == 'POST':
|
||||
itat = ITATHandler()
|
||||
mat = MatCreditHandler()
|
||||
data = {k: request.form.get(k, 0) for k in request.form}
|
||||
itat.add_itat(data)
|
||||
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")
|
||||
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
|
||||
@app.route('/itat/update/<int:id>', methods=['GET', 'POST'])
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<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>
|
||||
<label>Assessment Year:</label>
|
||||
@@ -22,6 +22,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">
|
||||
@@ -172,9 +176,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>
|
||||
|
||||
Reference in New Issue
Block a user