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
15329f55
Commit
15329f55
authored
Jul 14, 2025
by
emsys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed issue with customer SQL
parent
a143692e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
24 deletions
+49
-24
View.OrderEntryCorrugated.dfm
kgOrdersClient/View.OrderEntryCorrugated.dfm
+3
-2
View.OrderEntryCorrugated.pas
kgOrdersClient/View.OrderEntryCorrugated.pas
+21
-7
View.OrderEntryWeb.dfm
kgOrdersClient/View.OrderEntryWeb.dfm
+6
-8
View.OrderEntryWeb.pas
kgOrdersClient/View.OrderEntryWeb.pas
+1
-0
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+17
-6
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+1
-1
No files found.
kgOrdersClient/View.OrderEntryCorrugated.dfm
View file @
15329f55
...
...
@@ -1090,7 +1090,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object
WebDBComboBox1
: TWebDBComboBox
object
wdbcbShipTo
: TWebDBComboBox
Left = 26
Top = 430
Width = 145
...
...
@@ -1100,6 +1100,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HeightPercent = 100.000000000000000000
Role = 'null'
WidthPercent = 100.000000000000000000
OnChange = wdbcbShipToChange
ItemIndex = -1
DataField = 'staff_fields_ship_to'
DataSource = WebDataSource1
...
...
@@ -1135,7 +1136,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
WidthPercent = 100.000000000000000000
OnClick = btnCancelClick
end
object
WebDBComboBox2
: TWebDBComboBox
object
wdbcbQuickbooksItem
: TWebDBComboBox
Left = 26
Top = 515
Width = 145
...
...
kgOrdersClient/View.OrderEntryCorrugated.pas
View file @
15329f55
...
...
@@ -179,11 +179,11 @@ type
wdsShipTo
:
TWebDataSource
;
xdwdsShipTo
:
TXDataWebDataSet
;
xdwdsShipToADDRESS
:
TStringField
;
WebDBComboBox1
:
TWebDBComboBox
;
wdbcbShipTo
:
TWebDBComboBox
;
cbEmail
:
TWebCheckBox
;
XDataWebDataSet1supplied_by_customer_order_date
:
TStringField
;
btnCancel
:
TWebButton
;
WebDBComboBox2
:
TWebDBComboBox
;
wdbcbQuickbooksItem
:
TWebDBComboBox
;
wdsQBItem
:
TWebDataSource
;
xdwdsQBItem
:
TXDataWebDataSet
;
xdwdsQBItemname
:
TStringField
;
...
...
@@ -224,6 +224,7 @@ type
procedure
WebButton2Click
(
Sender
:
TObject
);
procedure
ShowAddAddressForm
();
[
async
]
procedure
SendAddressToServer
(
AddressJSON
:
TJSONObject
);
procedure
wdbcbShipToChange
(
Sender
:
TObject
);
private
FAgencyCode
:
string
;
FCurrentReportType
:
string
;
...
...
@@ -261,7 +262,6 @@ begin
orderID
:=
orderInfo
;
mode
:=
modeParam
;
notification
:=
info
;
console
.
log
(
'Mode in createform: '
+
modeParam
);
InitializeForm
;
end
;
...
...
@@ -398,6 +398,9 @@ begin
XDataWebDataSet1mounting_full_mount
.
AsString
:=
''
;
XDataWebDataSet1
.
Post
;
//xdwdsShipTo.Post;
//xdwdsQBItem.Post;
XDataWebDataSet1
.
First
;
while
not
XDataWebDataSet1
.
Eof
do
begin
...
...
@@ -408,8 +411,6 @@ begin
if
Field
.
AsString
=
''
then
begin
orderJSON
.
AddPair
(
Field
.
FieldName
,
''
);
console
.
log
(
Field
.
FieldName
);
console
.
log
(
Field
.
AsString
);
end
else
orderJSON
.
AddPair
(
Field
.
FieldName
,
Field
.
AsString
);
// Add all other fields
...
...
@@ -430,6 +431,7 @@ begin
if
mode
=
'EDIT'
then
orderJSON
.
AddPair
(
'ORDER_ID'
,
orderID
);
console
.
log
(
orderJSON
);
AddCorrugatedOrder
(
orderJSON
);
end
;
...
...
@@ -480,7 +482,7 @@ begin
input
:=
TJSHTMLInputElement
(
document
.
getElementById
(
'wcbshipto'
));
if
WebDBComboBox1
.
Text
=
''
then
if
wdbcbShipTo
.
Text
=
''
then
begin
input
.
classList
.
add
(
'is-invalid'
);
result
:=
false
;
...
...
@@ -580,7 +582,6 @@ var
Response
:
TXDataClientResponse
;
jsObj
:
TJSObject
;
begin
console
.
log
(
orderJSON
);
Response
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.AddCorrugatedOrder'
,
[
orderJSON
.
ToString
]));
jsObj
:=
JS
.
TJSObject
(
Response
.
Result
);
...
...
@@ -1043,7 +1044,10 @@ end;
procedure
TFOrderEntryCorrugated
.
EditMode
();
begin
xdwdsShipTo
.
Edit
;
xdwdsQBItem
.
Edit
;
XDataWebDataSet1
.
Edit
;
FViewMain
.
change
:=
true
;
btnCopy
.
Enabled
:=
false
;
btnPDF
.
Enabled
:=
false
;
...
...
@@ -1073,6 +1077,8 @@ begin
cbWideFormat
.
Enabled
:=
True
;
cbPrintCard
.
Enabled
:=
True
;
cbFullSizePanel
.
Enabled
:=
True
;
wdbcbQuickbooksItem
.
Enabled
:=
true
;
wdbcbShipTo
.
Enabled
:=
true
;
lblFormState
.
Caption
:=
'Edit Mode'
;
lblFormState
.
ElementHandle
.
classList
.
remove
(
'text-danger'
);
...
...
@@ -1111,6 +1117,8 @@ begin
cbWideFormat
.
Enabled
:=
False
;
cbPrintCard
.
Enabled
:=
False
;
cbFullSizePanel
.
Enabled
:=
False
;
wdbcbQuickbooksItem
.
Enabled
:=
false
;
wdbcbShipTo
.
Enabled
:=
false
;
lblFormState
.
Caption
:=
'View Mode'
;
lblFormState
.
ElementHandle
.
classList
.
remove
(
'text-success'
);
...
...
@@ -1118,6 +1126,12 @@ begin
end
;
procedure
TFOrderEntryCorrugated
.
wdbcbShipToChange
(
Sender
:
TObject
);
begin
console
.
log
(
XDataWebDataSet1
.
FieldByName
(
'staff_fields_ship_to'
).
AsString
);
console
.
log
(
xdwdsShipTo
.
FieldByName
(
'ADDRESS'
).
AsString
);
end
;
initialization
RegisterClass
(
TFOrderEntryCorrugated
);
...
...
kgOrdersClient/View.OrderEntryWeb.dfm
View file @
15329f55
...
...
@@ -1675,14 +1675,13 @@ object FOrderEntryWeb: TFOrderEntryWeb
object WebDataSource1: TWebDataSource
AutoEdit = False
DataSet = XDataWebDataSet1
Left =
406
Top =
38
Left =
398
Top =
56
end
object wdsShipTo: TWebDataSource
AutoEdit = False
DataSet = xdwdsShipTo
Left = 3
20
Top =
38
Left = 3
18
Top =
54
end
object xdwdsShipTo: TXDataWebDataSet
Left = 322
...
...
@@ -1692,10 +1691,9 @@ object FOrderEntryWeb: TFOrderEntryWeb
end
end
object wdsQBItem: TWebDataSource
AutoEdit = False
DataSet = xdwdsQBItem
Left = 24
4
Top =
34
Left = 24
0
Top =
52
end
object xdwdsQBItem: TXDataWebDataSet
Left = 246
...
...
kgOrdersClient/View.OrderEntryWeb.pas
View file @
15329f55
...
...
@@ -944,6 +944,7 @@ end;
procedure
TFOrderEntryWeb
.
EditMode
;
begin
XDataWebDataSet1
.
Edit
;
FViewMain
.
change
:=
true
;
btnCopy
.
Enabled
:=
false
;
btnPDF
.
Enabled
:=
false
;
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
15329f55
...
...
@@ -140,7 +140,7 @@ function TLookupService.GetCustomers(customerInfo: string): TCustomerList;
// Retrieves a list of customers and sends it to the client in object form.
// The object contains the ID, Name, Short Name, and the shipping address.
var
SQL
:
string
;
SQL
,
limitSQL
:
string
;
customer
:
TCustomerItem
;
params
:
TStringList
;
PageNum
,
PageSize
:
integer
;
...
...
@@ -150,13 +150,24 @@ begin
params
.
StrictDelimiter
:=
true
;
params
.
Delimiter
:=
'&'
;
params
.
DelimitedText
:=
customerInfo
;
PageSize
:=
0
;
PageNum
:=
0
;
if
(
params
.
Values
[
'pagenumber'
]
<>
''
)
then
PageNum
:=
StrToInt
(
params
.
Values
[
'pagenumber'
]);
if
params
.
Values
[
'pagesize'
]
<>
''
then
PageSize
:=
StrToInt
(
params
.
Values
[
'pagesize'
]);
if
(
(
PageSize
<>
0
)
and
(
PageNum
<>
0
)
)
then
begin
offset
:=
IntToStr
((
PageNum
-
1
)
*
PageSize
);
limit
:=
IntToStr
(
PageSize
);
limitSQL
:=
' limit '
+
limit
+
' offset '
+
offset
;
end
;
PageNum
:=
StrToInt
(
params
.
Values
[
'pagenumber'
]);
PageSize
:=
StrToInt
(
params
.
Values
[
'pagesize'
]);
offset
:=
IntToStr
((
PageNum
-
1
)
*
PageSize
);
limit
:=
IntToStr
(
PageSize
);
try
SQL
:=
'select * from customers
limit '
+
limit
+
' offset '
+
offset
;
;
SQL
:=
'select * from customers
'
+
limitSQL
;
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
result
:=
TCustomerList
.
Create
;
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
15329f55
...
...
@@ -2,7 +2,7 @@
MemoLogLevel
=
3
FileLogLevel
=
5
webClientVersion
=
0.9.7
LogFileNum
=
84
4
LogFileNum
=
84
9
[Database]
Server
=
192.168.159.144
...
...
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