Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
KGOrders
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cam Hayes
KGOrders
Commits
e11cfb9f
Commit
e11cfb9f
authored
Jan 30, 2025
by
Mac Stephens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed small issue created by merge. Working now.
parent
a72bb77e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+10
-8
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+1
-1
No files found.
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
e11cfb9f
...
@@ -1216,8 +1216,6 @@ begin
...
@@ -1216,8 +1216,6 @@ begin
ordersDB
.
UniQuery1
.
Post
;
ordersDB
.
UniQuery1
.
Post
;
ordersDB
.
UniQuery1
.
Close
;
//Retrieve Order ID
//Retrieve Order ID
if
mode
=
'ADD'
then
if
mode
=
'ADD'
then
begin
begin
...
@@ -1226,7 +1224,7 @@ begin
...
@@ -1226,7 +1224,7 @@ begin
ORDER_ID
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'OrderID'
).
AsInteger
;
ORDER_ID
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'OrderID'
).
AsInteger
;
end
;
end
;
// Second query
if
mode
=
'ADD'
then
if
mode
=
'ADD'
then
SQL
:=
'select * from corrugated_plate_orders where ORDER_ID = 0 and ORDER_ID <> 0'
SQL
:=
'select * from corrugated_plate_orders where ORDER_ID = 0 and ORDER_ID <> 0'
else
else
...
@@ -1234,7 +1232,9 @@ begin
...
@@ -1234,7 +1232,9 @@ begin
ORDER_ID
:=
JSONData
.
GetValue
<
integer
>(
'ORDER_ID'
);
ORDER_ID
:=
JSONData
.
GetValue
<
integer
>(
'ORDER_ID'
);
SQL
:=
'select * from corrugated_plate_orders where ORDER_ID = '
+
IntToStr
(
ORDER_ID
);
SQL
:=
'select * from corrugated_plate_orders where ORDER_ID = '
+
IntToStr
(
ORDER_ID
);
end
;
end
;
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
try
try
if
mode
=
'ADD'
then
if
mode
=
'ADD'
then
ordersDB
.
UniQuery1
.
Insert
ordersDB
.
UniQuery1
.
Insert
...
@@ -1243,10 +1243,9 @@ begin
...
@@ -1243,10 +1243,9 @@ begin
for
Pair
in
JSONData
do
for
Pair
in
JSONData
do
begin
begin
Field
:=
ordersDB
.
UniQuery1
.
FindField
(
Pair
.
JsonString
.
Value
);
// Checks if the field exists in the dataset
Field
:=
ordersDB
.
UniQuery1
.
FindField
(
Pair
.
JsonString
.
Value
);
if
Assigned
(
Field
)
then
if
Assigned
(
Field
)
then
begin
begin
// handles any dates or datetimes
if
(
Field
is
TDateTimeField
)
and
(
Pair
.
JsonValue
.
Value
<>
''
)
then
if
(
Field
is
TDateTimeField
)
and
(
Pair
.
JsonValue
.
Value
<>
''
)
then
TDateTimeField
(
Field
).
AsDateTime
:=
StrToDate
(
Pair
.
JsonValue
.
Value
)
TDateTimeField
(
Field
).
AsDateTime
:=
StrToDate
(
Pair
.
JsonValue
.
Value
)
else
if
Pair
.
JsonValue
.
Value
<>
''
then
else
if
Pair
.
JsonValue
.
Value
<>
''
then
...
@@ -1255,11 +1254,8 @@ begin
...
@@ -1255,11 +1254,8 @@ begin
end
;
end
;
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_ID'
).
AsInteger
:=
ORDER_ID
;
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_ID'
).
AsInteger
:=
ORDER_ID
;
// Post the record to the database
ordersDB
.
UniQuery1
.
Post
;
ordersDB
.
UniQuery1
.
Post
;
if
JSONData
.
GetValue
<
string
>(
'staff_fields_proof_date'
)
<>
''
then
if
JSONData
.
GetValue
<
string
>(
'staff_fields_proof_date'
)
<>
''
then
AddStatusSchedule
(
'PROOF'
,
JSONData
,
ORDER_ID
);
AddStatusSchedule
(
'PROOF'
,
JSONData
,
ORDER_ID
);
if
JSONData
.
GetValue
<
string
>(
'staff_fields_ship_date'
)
<>
''
then
if
JSONData
.
GetValue
<
string
>(
'staff_fields_ship_date'
)
<>
''
then
...
@@ -1273,6 +1269,11 @@ begin
...
@@ -1273,6 +1269,11 @@ begin
// Updated so an object isn't being created in the exception for memory control
// Updated so an object isn't being created in the exception for memory control
Result
.
AddPair
(
'status'
,
'success'
);
Result
.
AddPair
(
'status'
,
'success'
);
finally
ordersDB
.
UniQuery1
.
Close
;
end
;
except
except
on
E
:
Exception
do
on
E
:
Exception
do
begin
begin
...
@@ -1282,6 +1283,7 @@ begin
...
@@ -1282,6 +1283,7 @@ begin
end
;
end
;
function
TLookupService
.
AddStatusSchedule
(
StatusType
:
string
;
order
:
TJSONObject
;
ORDER_ID
:
integer
):
string
;
function
TLookupService
.
AddStatusSchedule
(
StatusType
:
string
;
order
:
TJSONObject
;
ORDER_ID
:
integer
):
string
;
// Adds/edits orders_status_schedule table.
// Adds/edits orders_status_schedule table.
// StatusType: name of the status getting added to the schedule.
// StatusType: name of the status getting added to the schedule.
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
e11cfb9f
[Settings]
[Settings]
MemoLogLevel
=
4
MemoLogLevel
=
4
FileLogLevel
=
5
FileLogLevel
=
5
LogFileNum
=
14
6
LogFileNum
=
14
7
webClientVersion
=
1.0.0
webClientVersion
=
1.0.0
[Database]
[Database]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment