update
This commit is contained in:
@@ -259,8 +259,9 @@ def save_data():
|
|||||||
# add subcontarctor id in invoice table
|
# add subcontarctor id in invoice table
|
||||||
results = cursor.callproc('SaveInvoice', args)
|
results = cursor.callproc('SaveInvoice', args)
|
||||||
invoice_id = results[-1]
|
invoice_id = results[-1]
|
||||||
|
print("**************************************************************")
|
||||||
|
print(invoice_id)
|
||||||
|
print("**************************************************************")
|
||||||
cursor.callproc(
|
cursor.callproc(
|
||||||
"SavePayment",
|
"SavePayment",
|
||||||
(
|
(
|
||||||
|
|||||||
@@ -37,7 +37,11 @@ def add_invoice():
|
|||||||
|
|
||||||
village_id = village_result['Village_Id']
|
village_id = village_result['Village_Id']
|
||||||
invoice_id = insert_invoice(data, 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)
|
insert_hold_types(data, invoice_id)
|
||||||
|
|
||||||
log_action("Add invoice", f"added invoice '{data.get('pmc_no')}'")
|
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: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 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 insert_invoice(data, village_id):
|
||||||
def operation(cursor):
|
def operation(cursor):
|
||||||
# Insert invoice
|
# 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'),
|
data.get('pmc_no'),
|
||||||
village_id,
|
village_id,
|
||||||
data.get('work_type'),
|
data.get('work_type'),
|
||||||
@@ -79,13 +94,14 @@ def insert_invoice(data, village_id):
|
|||||||
data.get('invoice_date'),
|
data.get('invoice_date'),
|
||||||
data.get('invoice_no'),
|
data.get('invoice_no'),
|
||||||
*get_numeric_values(data),
|
*get_numeric_values(data),
|
||||||
data.get('subcontractor_id')
|
data.get('subcontractor_id'),
|
||||||
|
0
|
||||||
])
|
])
|
||||||
invoice_row = fetch_one(cursor)
|
invoice_id = None
|
||||||
if not invoice_row:
|
for result in cursor.stored_results():
|
||||||
raise Exception("Invoice ID not returned")
|
row = result.fetchone()
|
||||||
invoice_id = invoice_row.get('invoice_id')
|
if row:
|
||||||
|
invoice_id = row['invoice_id']
|
||||||
|
|
||||||
# # Insert inpayment
|
# # Insert inpayment
|
||||||
# cursor.callproc('InsertInpayment', [
|
# cursor.callproc('InsertInpayment', [
|
||||||
@@ -182,15 +198,15 @@ def delete_invoice_data(invoice_id, user_id):
|
|||||||
|
|
||||||
|
|
||||||
# ------------------- Subcontractor Functions -------------------
|
# ------------------- Subcontractor Functions -------------------
|
||||||
def assign_subcontractor(data, village_id):
|
# def assign_subcontractor(data, village_id):
|
||||||
def operation(cursor):
|
# def operation(cursor):
|
||||||
cursor.callproc('AssignSubcontractor', [
|
# cursor.callproc('AssignSubcontractor', [
|
||||||
data.get('pmc_no'),
|
# data.get('pmc_no'),
|
||||||
data.get('subcontractor_id'),
|
# data.get('subcontractor_id'),
|
||||||
village_id
|
# village_id
|
||||||
])
|
# ])
|
||||||
clear_results(cursor)
|
# clear_results(cursor)
|
||||||
execute_db_operation(operation)
|
# execute_db_operation(operation)
|
||||||
|
|
||||||
|
|
||||||
# ------------------- Hold Types Functions -------------------
|
# ------------------- Hold Types Functions -------------------
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ class ItemCRUDType(Enum):
|
|||||||
GSTRelease = 7
|
GSTRelease = 7
|
||||||
|
|
||||||
class RegEx:
|
class RegEx:
|
||||||
patternAlphabetOnly = "^[A-Za-z ]+$"
|
patternAlphabetOnly = r"^[A-Za-z ]+$"
|
||||||
allPattern = "^(?!\s*$).+"
|
allPattern = r"^(?!\s*$).+"
|
||||||
|
|
||||||
|
|
||||||
class ResponseHandler:
|
class ResponseHandler:
|
||||||
|
|||||||
Reference in New Issue
Block a user