From 049f7e1c0a67647bf475ce525a893f479c95178d Mon Sep 17 00:00:00 2001 From: anishd100 Date: Mon, 27 Apr 2026 14:46:51 +0530 Subject: [PATCH] Debit Note add in database --- controllers/excel_upload_controller.py | 4 +++- main.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/controllers/excel_upload_controller.py b/controllers/excel_upload_controller.py index a583075..9628488 100644 --- a/controllers/excel_upload_controller.py +++ b/controllers/excel_upload_controller.py @@ -298,7 +298,9 @@ def save_data(): else: print("Hold columns data is not a valid list of dictionaries.") #-----------------------------------Credit Note---------------------------------------------------------------- - elif any(keyword in Invoice_Details.lower() for keyword in ['credit', 'logging report']): + # elif any(keyword in Invoice_Details.lower() for keyword in ['credit', 'logging report']): + elif any(keyword in Invoice_Details.lower() for keyword in ['credit','debit', 'logging report']): + cursor.callproc( 'AddCreditNoteFromExcel', [ diff --git a/main.py b/main.py index 96a2977..84c45bf 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,6 @@ # main.py from flask import Flask, render_template -from flask_login import LoginManager +from flask_login import LoginManager, login_required from model.Auth import User # Import Blueprints / Controllers @@ -40,6 +40,7 @@ def load_user(user_id): # ---------------- Home Route ---------------- @app.route('/') +@login_required def index(): return render_template("index.html")