From ded8d1f3b2228dc115882cf602c4fb3e03c9ffb1 Mon Sep 17 00:00:00 2001 From: pjpatil12 Date: Fri, 6 Feb 2026 17:23:37 +0530 Subject: [PATCH] code edit itat from and mat ceadit and utility save --- .../__pycache__/ITRHandler.cpython-313.pyc | Bin 8456 -> 8456 bytes main.py | 18 ++++++++++++++-- templates/add_itat.html | 20 +++++++++++++----- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/AppCode/__pycache__/ITRHandler.cpython-313.pyc b/AppCode/__pycache__/ITRHandler.cpython-313.pyc index f427476353ed7bb6b0a0912b9447fddcae19250c..ff3661dad5a53171e867ec1317e1524d522361cd 100644 GIT binary patch delta 19 ZcmeBh>Tu%v%*)Hg00fWEY~=c<0024G20j1) delta 19 ZcmeBh>Tu%v%*)Hg00diiZ{+%?001~`1^)m5 diff --git a/main.py b/main.py index 2a15f75..28750b1 100644 --- a/main.py +++ b/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/', 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/', methods=['GET', 'POST']) diff --git a/templates/add_itat.html b/templates/add_itat.html index 346fa27..ab23faa 100644 --- a/templates/add_itat.html +++ b/templates/add_itat.html @@ -10,8 +10,8 @@ {% block content %}

New Income Tax Appellate Tribunal Form

-
- + +
@@ -22,6 +22,10 @@
+
+ + +
@@ -172,9 +176,15 @@
-
- - +
+
+ + +
+
+ + +