update
This commit is contained in:
@@ -259,8 +259,9 @@ def save_data():
|
||||
# add subcontarctor id in invoice table
|
||||
results = cursor.callproc('SaveInvoice', args)
|
||||
invoice_id = results[-1]
|
||||
|
||||
|
||||
print("**************************************************************")
|
||||
print(invoice_id)
|
||||
print("**************************************************************")
|
||||
cursor.callproc(
|
||||
"SavePayment",
|
||||
(
|
||||
|
||||
@@ -37,7 +37,11 @@ def add_invoice():
|
||||
|
||||
village_id = village_result['Village_Id']
|
||||
invoice_id = insert_invoice(data, village_id)
|
||||
assign_subcontractor(data, village_id)
|
||||
# assign_subcontractor(data, village_id)
|
||||
print("********************************************************************")
|
||||
print("Manully added invoice id :",invoice_id)
|
||||
print("********************************************************************")
|
||||
|
||||
insert_hold_types(data, invoice_id)
|
||||
|
||||
log_action("Add invoice", f"added invoice '{data.get('pmc_no')}'")
|
||||
|
||||
@@ -8306,3 +8306,56 @@ Timestamp: 2026-03-31 10:51:05 | User: Unknown | Action: Search Contractor | Det
|
||||
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:
|
||||
Timestamp: 2026-03-31 11:20:16 | User: Unknown | Action: Add Subcontractor | Details:
|
||||
Timestamp: 2026-03-31 11:20:29 | User: Unknown | Action: Get hold type | Details:
|
||||
Timestamp: 2026-03-31 11:20:59 | User: Unknown | Action: Check Village | Details:
|
||||
Timestamp: 2026-03-31 11:21:01 | User: Unknown | Action: Add Village | Details:
|
||||
Timestamp: 2026-03-31 11:21:07 | User: Unknown | Action: Get hold type | Details:
|
||||
Timestamp: 2026-03-31 11:30:36 | User: Unknown | Action: Get hold type | Details:
|
||||
Timestamp: 2026-03-31 11:33:50 | User: Unknown | Action: Add invoice | Details:
|
||||
Timestamp: 2026-03-31 11:33:53 | User: Unknown | Action: Get hold type | Details:
|
||||
Timestamp: 2026-03-31 11:41:05 | User: Unknown | Action: Add Payment | Details:
|
||||
Timestamp: 2026-03-31 11:41:10 | User: Unknown | Action: Search Contractor | Details:
|
||||
Timestamp: 2026-03-31 11:41:10 | User: Unknown | Action: Search Contractor | Details:
|
||||
Timestamp: 2026-03-31 11:41:12 | User: Unknown | Action: Search Contractor | Details:
|
||||
Timestamp: 2026-03-31 11:47:33 | User: Unknown | Action: Delete Payment | Details:
|
||||
Timestamp: 2026-03-31 11:47:37 | User: Unknown | Action: Get hold type | Details:
|
||||
Timestamp: 2026-03-31 11:47:42 | User: Unknown | Action: Delete invoice | Details:
|
||||
Timestamp: 2026-03-31 11:48:23 | User: Unknown | Action: Add invoice | Details:
|
||||
Timestamp: 2026-03-31 11:48:25 | User: Unknown | Action: Get hold type | Details:
|
||||
Timestamp: 2026-03-31 11:50:45 | User: Unknown | Action: Add Payment | Details:
|
||||
Timestamp: 2026-03-31 11:50:49 | User: Unknown | Action: Search Contractor | Details:
|
||||
Timestamp: 2026-03-31 11:50:53 | User: Unknown | Action: Search Contractor | Details:
|
||||
Timestamp: 2026-03-31 12:14:30 | User: Unknown | Action: Upload Excel File | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:14:34 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:23:16 | User: Unknown | Action: Upload Excel File | Details:
|
||||
Timestamp: 2026-03-31 12:24:23 | User: Unknown | Action: Upload Excel File | Details:
|
||||
Timestamp: 2026-03-31 12:24:43 | User: Unknown | Action: Upload Excel File | Details:
|
||||
Timestamp: 2026-03-31 12:28:50 | User: Unknown | Action: Data saved | Details:
|
||||
Timestamp: 2026-03-31 12:28:59 | User: Unknown | Action: Search Contractor | Details:
|
||||
Timestamp: 2026-03-31 12:28:59 | User: Unknown | Action: Search Contractor | Details:
|
||||
Timestamp: 2026-03-31 12:29:02 | User: Unknown | Action: Search Contractor | Details:
|
||||
|
||||
@@ -71,7 +71,22 @@ def get_all_villages():
|
||||
def insert_invoice(data, village_id):
|
||||
def operation(cursor):
|
||||
# Insert invoice
|
||||
cursor.callproc('InsertInvoice', [
|
||||
# cursor.callproc('InsertInvoice', [
|
||||
# data.get('pmc_no'),
|
||||
# village_id,
|
||||
# data.get('work_type'),
|
||||
# data.get('invoice_details'),
|
||||
# data.get('invoice_date'),
|
||||
# data.get('invoice_no'),
|
||||
# *get_numeric_values(data),
|
||||
# data.get('subcontractor_id')
|
||||
|
||||
# ])
|
||||
# invoice_row = fetch_one(cursor)
|
||||
# if not invoice_row:
|
||||
# raise Exception("Invoice ID not returned")
|
||||
# invoice_id = invoice_row.get('invoice_id')
|
||||
cursor.callproc('SaveInvoice', [
|
||||
data.get('pmc_no'),
|
||||
village_id,
|
||||
data.get('work_type'),
|
||||
@@ -79,13 +94,14 @@ def insert_invoice(data, village_id):
|
||||
data.get('invoice_date'),
|
||||
data.get('invoice_no'),
|
||||
*get_numeric_values(data),
|
||||
data.get('subcontractor_id')
|
||||
|
||||
data.get('subcontractor_id'),
|
||||
0
|
||||
])
|
||||
invoice_row = fetch_one(cursor)
|
||||
if not invoice_row:
|
||||
raise Exception("Invoice ID not returned")
|
||||
invoice_id = invoice_row.get('invoice_id')
|
||||
invoice_id = None
|
||||
for result in cursor.stored_results():
|
||||
row = result.fetchone()
|
||||
if row:
|
||||
invoice_id = row['invoice_id']
|
||||
|
||||
# # Insert inpayment
|
||||
# cursor.callproc('InsertInpayment', [
|
||||
@@ -182,15 +198,15 @@ def delete_invoice_data(invoice_id, user_id):
|
||||
|
||||
|
||||
# ------------------- Subcontractor Functions -------------------
|
||||
def assign_subcontractor(data, village_id):
|
||||
def operation(cursor):
|
||||
cursor.callproc('AssignSubcontractor', [
|
||||
data.get('pmc_no'),
|
||||
data.get('subcontractor_id'),
|
||||
village_id
|
||||
])
|
||||
clear_results(cursor)
|
||||
execute_db_operation(operation)
|
||||
# def assign_subcontractor(data, village_id):
|
||||
# def operation(cursor):
|
||||
# cursor.callproc('AssignSubcontractor', [
|
||||
# data.get('pmc_no'),
|
||||
# data.get('subcontractor_id'),
|
||||
# village_id
|
||||
# ])
|
||||
# clear_results(cursor)
|
||||
# execute_db_operation(operation)
|
||||
|
||||
|
||||
# ------------------- Hold Types Functions -------------------
|
||||
|
||||
@@ -11,8 +11,8 @@ class ItemCRUDType(Enum):
|
||||
GSTRelease = 7
|
||||
|
||||
class RegEx:
|
||||
patternAlphabetOnly = "^[A-Za-z ]+$"
|
||||
allPattern = "^(?!\s*$).+"
|
||||
patternAlphabetOnly = r"^[A-Za-z ]+$"
|
||||
allPattern = r"^(?!\s*$).+"
|
||||
|
||||
|
||||
class ResponseHandler:
|
||||
|
||||
Reference in New Issue
Block a user