Commit e9209347 by Cam Hayes

disconnected uniconnections and cleaned up frees

parent 9824e397
...@@ -629,7 +629,7 @@ begin ...@@ -629,7 +629,7 @@ begin
logger.Log(3, 'TLookupSerivce.AddShippingAddress'); logger.Log(3, 'TLookupSerivce.AddShippingAddress');
result := TJSONObject.Create; result := TJSONObject.Create;
JSONData := TJSONObject.ParseJSONValue(AddressInfo) as TJSONObject; JSONData := TJSONObject.ParseJSONValue(AddressInfo) as TJSONObject;
try
if JSONData = nil then if JSONData = nil then
raise Exception.Create('Invalid JSON format'); // If parsing fails, raise an exception raise Exception.Create('Invalid JSON format'); // If parsing fails, raise an exception
mode := JSONData.GetValue<string>('mode'); mode := JSONData.GetValue<string>('mode');
...@@ -705,9 +705,6 @@ begin ...@@ -705,9 +705,6 @@ begin
Result.AddPair('error', E.Message); Result.AddPair('error', E.Message);
end end
end; end;
finally
//JSONData.Free;
end;
end; end;
function TLookupService.AddCustomer(customerInfo: string): TJSONObject; function TLookupService.AddCustomer(customerInfo: string): TJSONObject;
...@@ -728,7 +725,7 @@ begin ...@@ -728,7 +725,7 @@ begin
DateFormat.ShortDateFormat := 'yyyy-mm-dd'; DateFormat.ShortDateFormat := 'yyyy-mm-dd';
DateFormat.DateSeparator := '-'; DateFormat.DateSeparator := '-';
JSONData := TJSONObject.ParseJSONValue(customerInfo) as TJSONObject; JSONData := TJSONObject.ParseJSONValue(customerInfo) as TJSONObject;
try
if JSONData = nil then if JSONData = nil then
raise Exception.Create('Invalid JSON format'); // If parsing fails, raise an exception raise Exception.Create('Invalid JSON format'); // If parsing fails, raise an exception
mode := JSONData.GetValue<string>('mode'); mode := JSONData.GetValue<string>('mode');
...@@ -823,9 +820,6 @@ begin ...@@ -823,9 +820,6 @@ begin
end end
else else
Result := TJSONObject.Create.AddPair('status', 'Failure: Company Account Name Must Be Unique'); Result := TJSONObject.Create.AddPair('status', 'Failure: Company Account Name Must Be Unique');
finally
//JSONData.Free;
end;
end; end;
function TLookupService.GenerateOrderCorrugatedPDF(orderID: string): string; function TLookupService.GenerateOrderCorrugatedPDF(orderID: string): string;
...@@ -1835,7 +1829,7 @@ begin ...@@ -1835,7 +1829,7 @@ begin
DateFormat.ShortDateFormat := 'yyyy-mm-dd'; DateFormat.ShortDateFormat := 'yyyy-mm-dd';
DateFormat.DateSeparator := '-'; DateFormat.DateSeparator := '-';
JSONData := TJSONObject.ParseJSONValue(orderInfo) as TJSONObject; JSONData := TJSONObject.ParseJSONValue(orderInfo) as TJSONObject;
try
if JSONData = nil then if JSONData = nil then
raise Exception.Create('Invalid JSON format'); // If parsing fails, raise an exception raise Exception.Create('Invalid JSON format'); // If parsing fails, raise an exception
mode := JSONData.GetValue<string>('mode'); mode := JSONData.GetValue<string>('mode');
...@@ -1912,9 +1906,6 @@ begin ...@@ -1912,9 +1906,6 @@ begin
raise EXDataHttpException.Create(500, 'Unable to add or edit web order: A KG Orders database issue has occurred!'); raise EXDataHttpException.Create(500, 'Unable to add or edit web order: A KG Orders database issue has occurred!');
end end
end; end;
finally
//JSONData.Free;
end;
end; end;
...@@ -2178,7 +2169,7 @@ begin ...@@ -2178,7 +2169,7 @@ begin
logger.Log(3, 'TLookupService.AddItem'); logger.Log(3, 'TLookupService.AddItem');
result := TJSONObject.Create; result := TJSONObject.Create;
JSONData := TJSONObject.ParseJSONValue(itemInfo) as TJSONObject; JSONData := TJSONObject.ParseJSONValue(itemInfo) as TJSONObject;
try
if JSONData = nil then if JSONData = nil then
raise Exception.Create('Invalid JSON format'); // If parsing fails, raise an exception raise Exception.Create('Invalid JSON format'); // If parsing fails, raise an exception
mode := JSONData.GetValue<string>('mode'); mode := JSONData.GetValue<string>('mode');
...@@ -2235,9 +2226,6 @@ begin ...@@ -2235,9 +2226,6 @@ begin
on E: Exception do on E: Exception do
logger.Log(2, 'An error occurred when adding an item: ' + E.Message); logger.Log(2, 'An error occurred when adding an item: ' + E.Message);
end; end;
finally
//JSONData.Free;
end;
end; end;
......
...@@ -7,7 +7,6 @@ object rptOrderCutting: TrptOrderCutting ...@@ -7,7 +7,6 @@ object rptOrderCutting: TrptOrderCutting
Database = 'kg_order_entry' Database = 'kg_order_entry'
Username = 'root' Username = 'root'
Server = '192.168.159.10' Server = '192.168.159.10'
Connected = True
LoginPrompt = False LoginPrompt = False
Left = 289 Left = 289
Top = 119 Top = 119
...@@ -53,134 +52,6 @@ object rptOrderCutting: TrptOrderCutting ...@@ -53,134 +52,6 @@ object rptOrderCutting: TrptOrderCutting
DataSetOptions = [] DataSetOptions = []
Left = 444 Left = 444
Top = 206 Top = 206
FieldDefs = <
item
FieldName = 'ORDER_ID'
end
item
FieldName = 'COMPANY_ID'
end
item
FieldName = 'USER_ID'
end
item
FieldName = 'ORDER_DATE'
FieldType = fftDateTime
end
item
FieldName = 'staff_fields_order_date'
FieldType = fftDateTime
end
item
FieldName = 'staff_fields_proof_date'
FieldType = fftDateTime
end
item
FieldName = 'staff_fields_ship_date'
FieldType = fftDateTime
end
item
FieldName = 'staff_fields_ship_via'
FieldType = fftString
Size = 45
end
item
FieldName = 'staff_fields_quantity'
FieldType = fftString
end
item
FieldName = 'staff_fields_price'
FieldType = fftString
end
item
FieldName = 'staff_fields_invoice_to'
FieldType = fftString
Size = 128
end
item
FieldName = 'staff_fields_ship_to'
FieldType = fftString
Size = 128
end
item
FieldName = 'staff_fields_po_number'
FieldType = fftString
Size = 16
end
item
FieldName = 'staff_fields_job_name'
FieldType = fftString
Size = 45
end
item
FieldName = 'staff_fields_quickbooks_item'
FieldType = fftString
Size = 45
end
item
FieldName = 'general_special_instructions'
FieldType = fftString
Size = 2048
end
item
FieldName = 'ORDER_STATUS'
FieldType = fftString
Size = 50
end
item
FieldName = 'ORDER_ID_1'
end
item
FieldName = 'COMPANY_ID_1'
end
item
FieldName = 'ORDER_TYPE'
FieldType = fftString
Size = 45
end
item
FieldName = 'ORDER_DATE_1'
FieldType = fftDateTime
end
item
FieldName = 'PRICE'
end
item
FieldName = 'JOB_NAME'
FieldType = fftString
Size = 128
end
item
FieldName = 'USER_ID_1'
end
item
FieldName = 'LOCATION'
FieldType = fftString
Size = 16
end
item
FieldName = 'IN_QB'
FieldType = fftString
end
item
FieldName = 'QB_ORDER_NUM'
FieldType = fftString
Size = 30
end
item
FieldName = 'QB_ESTIMATE_ID'
FieldType = fftString
Size = 30
end
item
FieldName = 'QB_ORDER_USER'
FieldType = fftString
Size = 60
end
item
FieldName = 'QB_CREATE_DATE'
FieldType = fftDateTime
end>
end end
object frxOrderCutting: TfrxReport object frxOrderCutting: TfrxReport
Version = '2025.2.4' Version = '2025.2.4'
...@@ -1782,7 +1653,6 @@ object rptOrderCutting: TrptOrderCutting ...@@ -1782,7 +1653,6 @@ object rptOrderCutting: TrptOrderCutting
'select * from cutting_die_orders c join orders o on c.ORDER_ID =' + 'select * from cutting_die_orders c join orders o on c.ORDER_ID =' +
' o.ORDER_ID where c.ORDER_ID = 20649') ' o.ORDER_ID where c.ORDER_ID = 20649')
Active = True
Left = 457 Left = 457
Top = 106 Top = 106
object uqOrderCuttingORDER_ID: TIntegerField object uqOrderCuttingORDER_ID: TIntegerField
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
MemoLogLevel=4 MemoLogLevel=4
FileLogLevel=4 FileLogLevel=4
webClientVersion=1.0.0 webClientVersion=1.0.0
LogFileNum=157 LogFileNum=158
[Database] [Database]
--Server=192.168.116.138 --Server=192.168.116.138
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment