diff --git a/AppCode/__pycache__/ITRHandler.cpython-313.pyc b/AppCode/__pycache__/ITRHandler.cpython-313.pyc index f427476..ff3661d 100644 Binary files a/AppCode/__pycache__/ITRHandler.cpython-313.pyc and b/AppCode/__pycache__/ITRHandler.cpython-313.pyc differ 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 @@
-
- - +
+
+ + +
+
+ + +