delete store Procedure
This commit is contained in:
@@ -66,14 +66,14 @@ def show_table(filename):
|
|||||||
errors.append(f"State '{file_info['State']}' is not valid. Please add it.")
|
errors.append(f"State '{file_info['State']}' is not valid. Please add it.")
|
||||||
|
|
||||||
if state_data:
|
if state_data:
|
||||||
cursor.callproc('GetDistrictByNameAndStates', [file_info['District'], state_data['State_ID']])
|
cursor.callproc('GetDistrictByNameAndState', [file_info['District'], state_data['State_ID']]) # Change GetDistrictByNameAndStates to GetDistrictByNameAndState
|
||||||
for result in cursor.stored_results():
|
for result in cursor.stored_results():
|
||||||
district_data = result.fetchone()
|
district_data = result.fetchone()
|
||||||
if not district_data:
|
if not district_data:
|
||||||
errors.append(f"District '{file_info['District']}' is not valid under state '{file_info['State']}'.")
|
errors.append(f"District '{file_info['District']}' is not valid under state '{file_info['State']}'.")
|
||||||
|
|
||||||
if district_data:
|
if district_data:
|
||||||
cursor.callproc('GetBlockByNameAndDistricts', [file_info['Block'], district_data['District_ID']])
|
cursor.callproc('GetBlockByNameAndDistrict', [file_info['Block'], district_data['District_id']]) #Change District_ID to District_id and GetBlockByNameAndDistricts to GetBlockByNameAndDistrict
|
||||||
for result in cursor.stored_results():
|
for result in cursor.stored_results():
|
||||||
block_data = result.fetchone()
|
block_data = result.fetchone()
|
||||||
if not block_data:
|
if not block_data:
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# controllers/invoice_controller.py
|
# controllers/invoice_controller.py
|
||||||
|
|
||||||
from flask import Blueprint, request, jsonify, render_template
|
from flask import Blueprint, request, jsonify, render_template
|
||||||
|
|||||||
@@ -72,15 +72,13 @@ def edit_payment(payment_id):
|
|||||||
Paymentmodel.call_update_payment_proc(payment_id, pmc_no, invoice_no, amount, tds_amount, total_amount, utr)
|
Paymentmodel.call_update_payment_proc(payment_id, pmc_no, invoice_no, amount, tds_amount, total_amount, utr)
|
||||||
|
|
||||||
# Update inpayment
|
# Update inpayment
|
||||||
connection = Paymentmodel.get_connection()
|
# connection = Paymentmodel.get_connection()
|
||||||
cursor = connection.cursor()
|
# cursor = connection.cursor()
|
||||||
cursor.callproc(
|
# cursor.callproc('UpdateInpaymentByPMCInvoiceUTR',[amount, tds_amount, total_amount, pmc_no, invoice_no, utr])
|
||||||
'UpdateInpaymentByPMCInvoiceUTR',
|
|
||||||
[amount, tds_amount, total_amount, pmc_no, invoice_no, utr]
|
# connection.commit()
|
||||||
)
|
# cursor.close()
|
||||||
connection.commit()
|
# connection.close()
|
||||||
cursor.close()
|
|
||||||
connection.close()
|
|
||||||
|
|
||||||
return redirect(url_for('payment_bp.add_payment'))
|
return redirect(url_for('payment_bp.add_payment'))
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
from flask import Blueprint, render_template, send_from_directory
|
from flask import Blueprint, render_template, send_from_directory
|
||||||
from flask_login import login_required
|
from flask_login import login_required
|
||||||
|
|
||||||
from model.PmcReport import PmcReport
|
from model.PmcReport import PmcReport
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pmc_report_bp = Blueprint("pmc_report", __name__)
|
pmc_report_bp = Blueprint("pmc_report", __name__)
|
||||||
|
|
||||||
# ---------------- Contractor Report by pmc no ----------------
|
# ---------------- Contractor Report by pmc no ----------------
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ def contractor_report(contractor_id):
|
|||||||
|
|
||||||
# return ReportHelper().download_report(contractor_id=contractor_id)
|
# return ReportHelper().download_report(contractor_id=contractor_id)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@report_bp.route('/download_report/<int:contractor_id>')
|
@report_bp.route('/download_report/<int:contractor_id>')
|
||||||
def download_report(contractor_id):
|
def download_report(contractor_id):
|
||||||
output_file, error = ReportHelper.create_contractor_report(contractor_id)
|
output_file, error = ReportHelper.create_contractor_report(contractor_id)
|
||||||
|
|||||||
@@ -8061,3 +8061,207 @@ Timestamp: 2026-03-28 15:49:00 | User: Unknown | Action: Data saved | Details:
|
|||||||
Timestamp: 2026-03-28 15:49:00 | User: Unknown | Action: Data saved | Details:
|
Timestamp: 2026-03-28 15:49:00 | User: Unknown | Action: Data saved | Details:
|
||||||
Timestamp: 2026-03-28 15:49:06 | User: Unknown | Action: Search Contractor | Details:
|
Timestamp: 2026-03-28 15:49:06 | User: Unknown | Action: Search Contractor | Details:
|
||||||
Timestamp: 2026-03-28 15:49:08 | User: Unknown | Action: Search Contractor | Details:
|
Timestamp: 2026-03-28 15:49:08 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 11:06:32 | User: Unknown | Action: Login | Details:
|
||||||
|
Timestamp: 2026-03-30 11:06:39 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 11:06:40 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 11:06:42 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 11:08:00 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 11:08:00 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 11:08:00 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 11:08:02 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 11:08:02 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 11:08:04 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 11:10:15 | User: Unknown | Action: Download PMC Report | Details:
|
||||||
|
Timestamp: 2026-03-30 11:10:30 | User: Unknown | Action: Download PMC Report | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:03 | User: Unknown | Action: Check State | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:08 | User: Unknown | Action: Check State | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:09 | User: Unknown | Action: Check State | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:09 | User: Unknown | Action: Check State | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:11 | User: Unknown | Action: Add State | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:26 | User: Unknown | Action: Edit State | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:32 | User: Unknown | Action: Delete State | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:45 | User: Unknown | Action: Check Item | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:45 | User: Unknown | Action: Check Item | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:45 | User: Unknown | Action: Check Item | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:46 | User: Unknown | Action: Check Item | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:47 | User: Unknown | Action: Check Item | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:48 | User: Unknown | Action: Check Item | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:49 | User: Unknown | Action: Check Item | Details:
|
||||||
|
Timestamp: 2026-03-30 13:21:49 | User: Unknown | Action: Add Item | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:03 | User: Unknown | Action: Edit Item | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:12 | User: Unknown | Action: Delete Item | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:26 | User: Unknown | Action: Check Block | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:26 | User: Unknown | Action: Check Block | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:32 | User: Unknown | Action: Check Block | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:33 | User: Unknown | Action: Check Block | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:33 | User: Unknown | Action: Check Block | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:33 | User: Unknown | Action: Check Block | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:33 | User: Unknown | Action: Check Block | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:33 | User: Unknown | Action: Check Block | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:35 | User: Unknown | Action: Check Block | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:35 | User: Unknown | Action: Add Block | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:49 | User: Unknown | Action: Edit Block | Details:
|
||||||
|
Timestamp: 2026-03-30 13:22:54 | User: Unknown | Action: Delete Block | Details:
|
||||||
|
Timestamp: 2026-03-30 13:23:10 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:23:10 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:23:12 | User: Unknown | Action: Add Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:23:39 | User: Unknown | Action: Edit Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:23:49 | User: Unknown | Action: Delete Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:24:09 | User: Unknown | Action: Add Subcontractor | Details:
|
||||||
|
Timestamp: 2026-03-30 13:24:23 | User: Unknown | Action: Get hold type | Details:
|
||||||
|
Timestamp: 2026-03-30 13:25:09 | User: Unknown | Action: Add invoice | Details:
|
||||||
|
Timestamp: 2026-03-30 13:25:11 | User: Unknown | Action: Get hold type | Details:
|
||||||
|
Timestamp: 2026-03-30 13:25:29 | User: Unknown | Action: Edit invoice | Details:
|
||||||
|
Timestamp: 2026-03-30 13:25:32 | User: Unknown | Action: Get hold type | Details:
|
||||||
|
Timestamp: 2026-03-30 13:26:08 | User: Unknown | Action: Add Payment | Details:
|
||||||
|
Timestamp: 2026-03-30 13:27:00 | User: Unknown | Action: Add GSTRelease | Details:
|
||||||
|
Timestamp: 2026-03-30 13:27:00 | User: Unknown | Action: Add GST Release | Details:
|
||||||
|
Timestamp: 2026-03-30 13:27:27 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 13:27:28 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 13:27:29 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 13:34:29 | User: Unknown | Action: Upload Excel File | Details:
|
||||||
|
Timestamp: 2026-03-30 13:34:41 | User: Unknown | Action: Upload Excel File | Details:
|
||||||
|
Timestamp: 2026-03-30 13:34:58 | User: Unknown | Action: Upload Excel File | Details:
|
||||||
|
Timestamp: 2026-03-30 13:37:16 | User: Unknown | Action: Upload Excel File | Details:
|
||||||
|
Timestamp: 2026-03-30 13:38:25 | User: Unknown | Action: Upload Excel File | Details:
|
||||||
|
Timestamp: 2026-03-30 13:39:45 | User: Unknown | Action: Upload Excel File | Details:
|
||||||
|
Timestamp: 2026-03-30 13:46:29 | User: Unknown | Action: Upload Excel File | Details:
|
||||||
|
Timestamp: 2026-03-30 13:46:31 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 13:46:50 | User: Unknown | Action: Upload Excel File | Details:
|
||||||
|
Timestamp: 2026-03-30 13:46:53 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 13:47:08 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 13:47:08 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 13:47:10 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 13:47:42 | User: Unknown | Action: Download PMC Report | Details:
|
||||||
|
Timestamp: 2026-03-30 13:48:00 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 13:48:01 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 13:48:01 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 13:48:11 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 13:48:32 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 13:48:34 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 13:48:39 | User: Unknown | Action: Download PMC Report | Details:
|
||||||
|
Timestamp: 2026-03-30 13:49:17 | User: Unknown | Action: Download PMC Report | Details:
|
||||||
|
Timestamp: 2026-03-30 13:49:41 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:49:41 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:49:41 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:49:43 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:49:45 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:49:45 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:49:46 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:49:46 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:49:46 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:49:48 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:49:48 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:49:51 | User: Unknown | Action: Add Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:50:08 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:50:08 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:50:11 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:50:11 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 13:53:57 | User: Unknown | Action: Check Village | Details:
|
||||||
|
Timestamp: 2026-03-30 14:00:00 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 14:00:01 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 14:00:05 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 14:26:11 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 14:26:12 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 14:26:38 | User: Unknown | Action: Upload Excel File | Details:
|
||||||
|
Timestamp: 2026-03-30 14:53:18 | User: Unknown | Action: Upload Excel File | Details:
|
||||||
|
Timestamp: 2026-03-30 15:10:21 | User: Unknown | Action: Upload Excel File | Details:
|
||||||
|
Timestamp: 2026-03-30 15:14:03 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 15:14:05 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 15:14:11 | User: Unknown | Action: Download PMC Report | Details:
|
||||||
|
Timestamp: 2026-03-30 15:19:11 | User: Unknown | Action: Download PMC Report | Details:
|
||||||
|
Timestamp: 2026-03-30 15:26:09 | User: Unknown | Action: Download PMC Report | Details:
|
||||||
|
Timestamp: 2026-03-30 15:51:15 | User: Unknown | Action: Login | Details:
|
||||||
|
Timestamp: 2026-03-30 15:51:32 | User: Unknown | Action: Check Block | Details:
|
||||||
|
Timestamp: 2026-03-30 15:51:32 | User: Unknown | Action: Check Block | Details:
|
||||||
|
Timestamp: 2026-03-30 15:51:32 | User: Unknown | Action: Add Block | Details:
|
||||||
|
Timestamp: 2026-03-30 15:51:44 | User: Unknown | Action: Edit Block | Details:
|
||||||
|
Timestamp: 2026-03-30 15:51:50 | User: Unknown | Action: Delete Block | Details:
|
||||||
|
Timestamp: 2026-03-30 15:56:11 | User: Unknown | Action: Upload Excel File | Details:
|
||||||
|
Timestamp: 2026-03-30 15:56:14 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 15:56:14 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 15:56:14 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 15:56:14 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 15:56:14 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 15:56:14 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 15:56:14 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 15:56:22 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 15:56:22 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 15:56:24 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 16:03:52 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 16:03:52 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 16:03:52 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 16:03:53 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 16:03:53 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 16:03:53 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 16:03:54 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 16:03:54 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 16:03:56 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:06 | User: Unknown | Action: Upload Excel File | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:10 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:10 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:10 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:10 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:11 | User: Unknown | Action: Data saved | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:18 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:19 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:21 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
Timestamp: 2026-03-30 16:05:24 | User: Unknown | Action: Search Contractor | Details:
|
||||||
|
|||||||
@@ -32,22 +32,14 @@ class Block:
|
|||||||
district_id = request.form.get('district_Id')
|
district_id = request.form.get('district_Id')
|
||||||
block_name = request.form.get('block_Name', '').strip()
|
block_name = request.form.get('block_Name', '').strip()
|
||||||
|
|
||||||
block.AddItem(request=request, parentid=district_id, childname=block_name, storedprocfetch="GetBlockByNameAndDistricts", storedprocadd="SaveBlock" )
|
block.AddItem(request=request, parentid=district_id, childname=block_name, storedprocfetch="GetBlockByNameAndDistrict", storedprocadd="SaveBlock" ) # Change GetBlockByNameAndDistricts to GetBlockByNameAndDistrict
|
||||||
self.isSuccess = block.isSuccess
|
self.isSuccess = block.isSuccess
|
||||||
self.resultMessage = block.resultMessage
|
self.resultMessage = block.resultMessage
|
||||||
return
|
return
|
||||||
|
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# Get All Blocks
|
# Get All Blocks
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# def GetAllBlocks(self):
|
|
||||||
|
|
||||||
# block = ItemCRUD(itemType=ItemCRUDType.Block)
|
|
||||||
# blocksdata = block.GetAllData(request=request, storedproc="GetAllBlock")
|
|
||||||
# self.isSuccess = block.isSuccess
|
|
||||||
# self.resultMessage = block.resultMessage
|
|
||||||
# return blocksdata
|
|
||||||
|
|
||||||
def GetAllBlocks(self, request):
|
def GetAllBlocks(self, request):
|
||||||
|
|
||||||
block = ItemCRUD(itemType=ItemCRUDType.Block)
|
block = ItemCRUD(itemType=ItemCRUDType.Block)
|
||||||
@@ -60,15 +52,6 @@ class Block:
|
|||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# Check Block Exists
|
# Check Block Exists
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
|
|
||||||
# def CheckBlock(self, request):
|
|
||||||
# block = ItemCRUD(itemType=ItemCRUDType.Block)
|
|
||||||
# block_name = request.json.get('block_Name', '').strip()
|
|
||||||
# district_id = request.json.get('district_Id')
|
|
||||||
# result = block.CheckItem(request=request, parentid=district_id, childname=block_name, storedprocfetch="GetBlockByNameAndDistrict")
|
|
||||||
# self.isSuccess = block.isSuccess
|
|
||||||
# self.resultMessage = block.resultMessage
|
|
||||||
# return result
|
|
||||||
def CheckBlock(self, request):
|
def CheckBlock(self, request):
|
||||||
block = ItemCRUD(itemType=ItemCRUDType.Block)
|
block = ItemCRUD(itemType=ItemCRUDType.Block)
|
||||||
data = request.get_json(silent=True) or request.form
|
data = request.get_json(silent=True) or request.form
|
||||||
@@ -88,21 +71,6 @@ class Block:
|
|||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# Get Block By ID
|
# Get Block By ID
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# def GetBlockByID(self, id):
|
|
||||||
|
|
||||||
# block = ItemCRUD(itemType=ItemCRUDType.Village)
|
|
||||||
# blockdata = block.GetAllData(id=id,storedproc="GetBlockDataByID")
|
|
||||||
# self.isSuccess = block.isSuccess
|
|
||||||
# self.resultMessage = block.resultMessage
|
|
||||||
# print("akash"+blockdata)
|
|
||||||
# return blockdata
|
|
||||||
|
|
||||||
# def GetBlockByID(self,request,id):
|
|
||||||
# block = ItemCRUD(itemType=ItemCRUDType.Block)
|
|
||||||
# blockdata = block.GetDataByID(request=request,id=id,storedproc="GetBlockDataByID")
|
|
||||||
# self.isSuccess = block.isSuccess
|
|
||||||
# self.resultMessage = block.resultMessage
|
|
||||||
# return blockdata
|
|
||||||
def GetBlockByID(self, id):
|
def GetBlockByID(self, id):
|
||||||
|
|
||||||
block = ItemCRUD(itemType=ItemCRUDType.Block)
|
block = ItemCRUD(itemType=ItemCRUDType.Block)
|
||||||
@@ -119,17 +87,6 @@ class Block:
|
|||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# Update Block
|
# Update Block
|
||||||
# ----------------------------------------------------------
|
# ----------------------------------------------------------
|
||||||
# def EditBlock(self, request, block_id):
|
|
||||||
|
|
||||||
# block = ItemCRUD(itemType=ItemCRUDType.Block)
|
|
||||||
|
|
||||||
# district_id = request.form.get('district_Id')
|
|
||||||
# block_name = request.form.get('block_Name', '').strip()
|
|
||||||
|
|
||||||
# block.EditItem(request=request, childid=block_id, parentid=district_id, childname=block_name, storedprocadd="UpdateBlockById" )
|
|
||||||
# self.isSuccess = block.isSuccess
|
|
||||||
# self.resultMessage = block.resultMessage
|
|
||||||
# return
|
|
||||||
def EditBlock(self, request, block_id):
|
def EditBlock(self, request, block_id):
|
||||||
|
|
||||||
block = ItemCRUD(itemType=ItemCRUDType.Block)
|
block = ItemCRUD(itemType=ItemCRUDType.Block)
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
from mysql.connector import Error
|
from mysql.connector import Error
|
||||||
import config
|
import config
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
@@ -17,7 +14,7 @@ class ContractorInfo:
|
|||||||
try:
|
try:
|
||||||
connection = config.get_db_connection()
|
connection = config.get_db_connection()
|
||||||
with connection.cursor(dictionary=True, buffered=True) as cursor:
|
with connection.cursor(dictionary=True, buffered=True) as cursor:
|
||||||
cursor.callproc('GetContractorInfoById', [self.ID])
|
cursor.callproc('GetContractorInfo', [self.ID]) #Change GetContractorInfoById to GetContractorInfo
|
||||||
# Get the first result set
|
# Get the first result set
|
||||||
for result in cursor.stored_results():
|
for result in cursor.stored_results():
|
||||||
self.contInfo = result.fetchone()
|
self.contInfo = result.fetchone()
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ class PmcReport:
|
|||||||
cursor = connection.cursor(dictionary=True, buffered=True)
|
cursor = connection.cursor(dictionary=True, buffered=True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
||||||
pmc_info = ReportHelper.execute_sp(cursor, 'GetContractorInfoByPmcNo', [pmc_no], True)
|
pmc_info = ReportHelper.execute_sp(cursor, 'GetContractorInfoByPmcNo', [pmc_no], True)
|
||||||
|
|
||||||
if not pmc_info:
|
if not pmc_info:
|
||||||
@@ -30,17 +29,24 @@ class PmcReport:
|
|||||||
|
|
||||||
invoices = []
|
invoices = []
|
||||||
hold_amount_total = 0
|
hold_amount_total = 0
|
||||||
if hold_type_ids:
|
# if hold_type_ids:
|
||||||
hold_type_ids_str = ",".join(map(str, hold_type_ids))
|
# hold_type_ids_str = ",".join(map(str, hold_type_ids))
|
||||||
cursor.callproc(
|
# cursor.callproc(
|
||||||
|
# 'GetInvoices_WithHold',
|
||||||
|
# [pmc_no, pmc_info["Contractor_Id"], hold_type_ids_str]
|
||||||
|
# )
|
||||||
|
# else:
|
||||||
|
# cursor.callproc(
|
||||||
|
# 'GetInvoices_NoHold',
|
||||||
|
# [pmc_no, pmc_info["Contractor_Id"]]
|
||||||
|
# )
|
||||||
|
|
||||||
|
hold_type_ids_str = ",".join(map(str, hold_type_ids))
|
||||||
|
cursor.callproc(
|
||||||
'GetInvoices_WithHold',
|
'GetInvoices_WithHold',
|
||||||
[pmc_no, pmc_info["Contractor_Id"], hold_type_ids_str]
|
[pmc_no, pmc_info["Contractor_Id"], hold_type_ids_str]
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
cursor.callproc(
|
|
||||||
'GetInvoices_NoHold',
|
|
||||||
[pmc_no, pmc_info["Contractor_Id"]]
|
|
||||||
)
|
|
||||||
for result in cursor.stored_results():
|
for result in cursor.stored_results():
|
||||||
invoices = result.fetchall()
|
invoices = result.fetchall()
|
||||||
|
|
||||||
@@ -49,9 +55,7 @@ class PmcReport:
|
|||||||
|
|
||||||
total_invo_final = sum(row.get('Final_Amount', 0) or 0 for row in invoices)
|
total_invo_final = sum(row.get('Final_Amount', 0) or 0 for row in invoices)
|
||||||
|
|
||||||
|
|
||||||
gst_rel = ReportHelper.execute_sp(cursor, 'GetGSTReleaseByPMC', [pmc_no])
|
gst_rel = ReportHelper.execute_sp(cursor, 'GetGSTReleaseByPMC', [pmc_no])
|
||||||
|
|
||||||
total_gst_basic = sum(row.get('basic_amount', 0) or 0 for row in gst_rel)
|
total_gst_basic = sum(row.get('basic_amount', 0) or 0 for row in gst_rel)
|
||||||
total_gst_final = sum(row.get('final_amount', 0) or 0 for row in gst_rel)
|
total_gst_final = sum(row.get('final_amount', 0) or 0 for row in gst_rel)
|
||||||
|
|
||||||
@@ -60,9 +64,6 @@ class PmcReport:
|
|||||||
credit_note = ReportHelper.execute_sp(cursor, 'GetCreditNoteByPMC', [pmc_no])
|
credit_note = ReportHelper.execute_sp(cursor, 'GetCreditNoteByPMC', [pmc_no])
|
||||||
|
|
||||||
payments = ReportHelper.execute_sp(cursor, 'GetPaymentsByPMC', [pmc_no])
|
payments = ReportHelper.execute_sp(cursor, 'GetPaymentsByPMC', [pmc_no])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
total_pay_amount = sum(row.get('Payment_Amount', 0) or 0 for row in payments)
|
total_pay_amount = sum(row.get('Payment_Amount', 0) or 0 for row in payments)
|
||||||
total_pay_total = sum(row.get('Total_amount', 0) or 0 for row in payments)
|
total_pay_total = sum(row.get('Total_amount', 0) or 0 for row in payments)
|
||||||
|
|
||||||
@@ -133,7 +134,6 @@ class PmcReport:
|
|||||||
cursor, 'GetHoldTypesByContractor',
|
cursor, 'GetHoldTypesByContractor',
|
||||||
[contractor_info["Contractor_Id"]]
|
[contractor_info["Contractor_Id"]]
|
||||||
)
|
)
|
||||||
print("hold_types::::",hold_types)
|
|
||||||
|
|
||||||
hold_type_map = {
|
hold_type_map = {
|
||||||
ht['hold_type_id']: ht['hold_type'] for ht in hold_types
|
ht['hold_type_id']: ht['hold_type'] for ht in hold_types
|
||||||
@@ -143,12 +143,9 @@ class PmcReport:
|
|||||||
cursor, 'GetInvoicesAndGstReleaseByPmcNo', [pmc_no]
|
cursor, 'GetInvoicesAndGstReleaseByPmcNo', [pmc_no]
|
||||||
)
|
)
|
||||||
|
|
||||||
print("invoices:::",invoices)
|
|
||||||
|
|
||||||
credit_notes = ReportHelper.execute_sp(
|
credit_notes = ReportHelper.execute_sp(
|
||||||
cursor, 'NewGetCreditNotesByPMCNo', [pmc_no]
|
cursor, 'NewGetCreditNotesByPMCNo', [pmc_no]
|
||||||
)
|
)
|
||||||
print("credit_notes:::",credit_notes)
|
|
||||||
|
|
||||||
hold_amounts = ReportHelper.execute_sp(
|
hold_amounts = ReportHelper.execute_sp(
|
||||||
cursor, 'GetHoldAmountsByContractor',
|
cursor, 'GetHoldAmountsByContractor',
|
||||||
@@ -170,7 +167,6 @@ class PmcReport:
|
|||||||
if pmc:
|
if pmc:
|
||||||
credit_note_map.setdefault(pmc, []).append(cn)
|
credit_note_map.setdefault(pmc, []).append(cn)
|
||||||
|
|
||||||
|
|
||||||
gst_map = {}
|
gst_map = {}
|
||||||
for gst in gst_releases:
|
for gst in gst_releases:
|
||||||
pmc = gst.get("PMC_No")
|
pmc = gst.get("PMC_No")
|
||||||
@@ -248,8 +244,6 @@ class PmcReport:
|
|||||||
# GST release placeholders (will add real GST below)
|
# GST release placeholders (will add real GST below)
|
||||||
row += ["", ""]
|
row += ["", ""]
|
||||||
|
|
||||||
print("11111::",row)
|
|
||||||
|
|
||||||
sheet.append(row)
|
sheet.append(row)
|
||||||
|
|
||||||
for pmc, cn_list in credit_note_map.items():
|
for pmc, cn_list in credit_note_map.items():
|
||||||
@@ -267,7 +261,6 @@ class PmcReport:
|
|||||||
cn.get("Total_Amount", ""),
|
cn.get("Total_Amount", ""),
|
||||||
cn.get("UTR", "")
|
cn.get("UTR", "")
|
||||||
]
|
]
|
||||||
print("22222::", cn_row)
|
|
||||||
sheet.append(cn_row)
|
sheet.append(cn_row)
|
||||||
|
|
||||||
# ================= GST RELEASE ROWS =================
|
# ================= GST RELEASE ROWS =================
|
||||||
@@ -287,7 +280,6 @@ class PmcReport:
|
|||||||
gst.get("Total_Amount", ""),
|
gst.get("Total_Amount", ""),
|
||||||
gst.get("UTR", "")
|
gst.get("UTR", "")
|
||||||
]
|
]
|
||||||
print("33333::",gst_row)
|
|
||||||
sheet.append(gst_row)
|
sheet.append(gst_row)
|
||||||
|
|
||||||
# ================= AUTO WIDTH =================
|
# ================= AUTO WIDTH =================
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ class Village:
|
|||||||
request=request,
|
request=request,
|
||||||
parentid=block_id,
|
parentid=block_id,
|
||||||
childname=village_name,
|
childname=village_name,
|
||||||
storedprocfetch="GetVillageByNameAndBlocks"
|
storedprocfetch="GetVillageByNameAndBlock" # Change GetVillageByNameAndBlocks to GetVillageByNameAndBlock
|
||||||
)
|
)
|
||||||
self._set_status(self.village)
|
self._set_status(self.village)
|
||||||
return result
|
return result
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
static/download/Contractor_Report_6.xlsx
Normal file
BIN
static/download/Contractor_Report_6.xlsx
Normal file
Binary file not shown.
BIN
static/download/Contractor_Report_7.xlsx
Normal file
BIN
static/download/Contractor_Report_7.xlsx
Normal file
Binary file not shown.
@@ -59,7 +59,8 @@
|
|||||||
<!-- Hidden fields for other necessary information -->
|
<!-- Hidden fields for other necessary information -->
|
||||||
<input type="text" name="subcontractor_data" value="{{ subcontractor_data['Contractor_Id'] }}">
|
<input type="text" name="subcontractor_data" value="{{ subcontractor_data['Contractor_Id'] }}">
|
||||||
<input type="text" name="state_data" value="{{ state_data['State_ID'] }}">
|
<input type="text" name="state_data" value="{{ state_data['State_ID'] }}">
|
||||||
<input type="text" name="district_data" value="{{ district_data['District_ID'] }}">
|
<!-- <input type="text" name="district_data" value="{{ district_data['District_ID'] }}"> -->
|
||||||
|
<input type="text" name="district_data" value="{{ district_data['District_id'] }}">
|
||||||
<input type="text" name="block_data" value="{{ block_data['Block_Id'] }}">
|
<input type="text" name="block_data" value="{{ block_data['Block_Id'] }}">
|
||||||
|
|
||||||
<input type="text" name="file_info" value="{{ file_info }}">
|
<input type="text" name="file_info" value="{{ file_info }}">
|
||||||
|
|||||||
Reference in New Issue
Block a user