diff --git a/logs/activity.log b/logs/activity.log index 10861c7..609d13e 100644 --- a/logs/activity.log +++ b/logs/activity.log @@ -8280,3 +8280,29 @@ Timestamp: 2026-03-30 16:24:38 | User: Unknown | Action: Search Contractor | Det Timestamp: 2026-03-30 16:24:40 | User: Unknown | Action: Search Contractor | Details: Timestamp: 2026-03-30 16:24:44 | User: Unknown | Action: Search Contractor | Details: Timestamp: 2026-03-30 16:24:53 | User: Unknown | Action: Download PMC Report | Details: +Timestamp: 2026-03-31 10:33:48 | User: Unknown | Action: Login | Details: +Timestamp: 2026-03-31 10:33:54 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:33:54 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:33:56 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:36:31 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:36:34 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:36:37 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:49:49 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:49:49 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:49:50 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:49:51 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:49:53 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:50:26 | User: Unknown | Action: Download PMC Report | Details: +Timestamp: 2026-03-31 10:50:42 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:50:42 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:50:43 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:50:43 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:50:44 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:50:46 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:50:51 | User: Unknown | Action: Download PMC Report | Details: +Timestamp: 2026-03-31 10:51:04 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:51:04 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:51:05 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:51:10 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:51:10 | User: Unknown | Action: Search Contractor | Details: +Timestamp: 2026-03-31 10:51:12 | User: Unknown | Action: Search Contractor | Details: diff --git a/model/PmcReport.py b/model/PmcReport.py index a05ae4b..0c80abb 100644 --- a/model/PmcReport.py +++ b/model/PmcReport.py @@ -140,7 +140,7 @@ class PmcReport: } invoices = ReportHelper.execute_sp( - cursor, 'GetInvoicesAndGstReleaseByPmcNo', [pmc_no] + cursor, 'GetInvoicesByContractorOrPMCNo', [None,pmc_no] ) credit_notes = ReportHelper.execute_sp( diff --git a/model/Report.py b/model/Report.py index 7c1211e..ae078f7 100644 --- a/model/Report.py +++ b/model/Report.py @@ -322,9 +322,12 @@ class ReportHelper: @staticmethod def create_contractor_report(contractor_id): - DOWNLOAD_FOLDER = os.path.join("static", "download") - os.makedirs(DOWNLOAD_FOLDER, exist_ok=True) - output_file = os.path.join(DOWNLOAD_FOLDER, f"Contractor_Report_{contractor_id}.xlsx") + # DOWNLOAD_FOLDER = os.path.join("static", "download") + # os.makedirs(DOWNLOAD_FOLDER, exist_ok=True) + fileName=f"Contractor_Report_{contractor_id}.xlsx" + # output_file = os.path.join(DOWNLOAD_FOLDER, ) + + output_file = FolderAndFile.get_download_path(filename=fileName) # Fetch Data contInfo = ReportHelper.get_contractor_info(contractor_id) @@ -335,7 +338,7 @@ class ReportHelper: cursor = connection.cursor(dictionary=True, buffered=True) hold_types = ReportHelper.execute_sp(cursor, 'HoldTypesByContractorId', [contractor_id]) - invoices = ReportHelper.execute_sp(cursor, 'FetchInvoicesByContractor', [contractor_id]) + invoices = ReportHelper.execute_sp(cursor, 'GetInvoicesByContractorOrPMCNo', [contractor_id,None]) hold_amounts = ReportHelper.execute_sp(cursor, 'HoldAmountsByContractorId', [contractor_id]) hold_data = {} for h in hold_amounts: diff --git a/static/download/Contractor_Report_1.xlsx b/static/download/Contractor_Report_1.xlsx deleted file mode 100644 index e79374f..0000000 Binary files a/static/download/Contractor_Report_1.xlsx and /dev/null differ diff --git a/static/download/Contractor_Report_2.xlsx b/static/download/Contractor_Report_2.xlsx deleted file mode 100644 index 20af16d..0000000 Binary files a/static/download/Contractor_Report_2.xlsx and /dev/null differ diff --git a/static/download/Contractor_Report_3.xlsx b/static/download/Contractor_Report_3.xlsx deleted file mode 100644 index debf465..0000000 Binary files a/static/download/Contractor_Report_3.xlsx and /dev/null differ diff --git a/static/download/Contractor_Report_4.xlsx b/static/download/Contractor_Report_4.xlsx deleted file mode 100644 index a850d5f..0000000 Binary files a/static/download/Contractor_Report_4.xlsx and /dev/null differ diff --git a/static/download/Contractor_Report_6.xlsx b/static/download/Contractor_Report_6.xlsx deleted file mode 100644 index 8f6b025..0000000 Binary files a/static/download/Contractor_Report_6.xlsx and /dev/null differ diff --git a/static/download/Contractor_Report_7.xlsx b/static/download/Contractor_Report_7.xlsx deleted file mode 100644 index e9d3de3..0000000 Binary files a/static/download/Contractor_Report_7.xlsx and /dev/null differ