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
601d01e1
Commit
601d01e1
authored
Dec 05, 2024
by
cam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed width of the boxes on the order entry form
parent
d479324a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
100 additions
and
22 deletions
+100
-22
View.OrderEntryCorrugated.dfm
kgOrdersClient/View.OrderEntryCorrugated.dfm
+31
-14
View.OrderEntryCorrugated.html
kgOrdersClient/View.OrderEntryCorrugated.html
+0
-0
View.OrderEntryCorrugated.pas
kgOrdersClient/View.OrderEntryCorrugated.pas
+22
-3
View.Orders.pas
kgOrdersClient/View.Orders.pas
+1
-0
app.css
kgOrdersClient/template/css/app.css
+6
-1
Lookup.Service.pas
kgOrdersServer/Source/Lookup.Service.pas
+8
-2
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+31
-1
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+1
-1
No files found.
kgOrdersClient/View.OrderEntryCorrugated.dfm
View file @
601d01e1
...
@@ -239,13 +239,14 @@ object FOrderEntry: TFOrderEntry
...
@@ -239,13 +239,14 @@ object FOrderEntry: TFOrderEntry
object edtCompanyName: TWebDBEdit
object edtCompanyName: TWebDBEdit
Left = 24
Left = 24
Top = 92
Top = 92
Width =
121
Width =
260
Height = 22
Height = 22
AutoSize = True
AutoSize = True
ChildOrder = 79
ChildOrder = 79
ElementID = 'edtcompanyname'
ElementID = 'edtcompanyname'
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
MaxLength = 90
MaxLength = 90
WidthStyle = ssAuto
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'NAME'
DataField = 'NAME'
DataSource = WebDataSource1
DataSource = WebDataSource1
...
@@ -327,19 +328,6 @@ object FOrderEntry: TFOrderEntry
...
@@ -327,19 +328,6 @@ object FOrderEntry: TFOrderEntry
DataField = 'staff_fields_invoice_to'
DataField = 'staff_fields_invoice_to'
DataSource = WebDataSource1
DataSource = WebDataSource1
end
end
object edtShipTo: TWebDBEdit
Left = 26
Top = 430
Width = 121
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtshipto'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'staff_fields_ship_to'
DataSource = WebDataSource1
end
object edtPONumber: TWebDBEdit
object edtPONumber: TWebDBEdit
Left = 26
Left = 26
Top = 458
Top = 458
...
@@ -965,6 +953,20 @@ object FOrderEntry: TFOrderEntry
...
@@ -965,6 +953,20 @@ object FOrderEntry: TFOrderEntry
HeightPercent = 100.000000000000000000
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
end
object WebDBComboBox1: TWebDBComboBox
Left = 26
Top = 430
Width = 145
Height = 22
ElementID = 'wcbshipto'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
ItemIndex = -1
DataField = 'staff_fields_ship_to'
DataSource = WebDataSource1
ListField = 'ADDRESS'
ListSource = wdsShipTo
end
object XDataWebClient1: TXDataWebClient
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Connection = DMConnection.ApiConnection
Left = 244
Left = 244
...
@@ -1247,10 +1249,25 @@ object FOrderEntry: TFOrderEntry
...
@@ -1247,10 +1249,25 @@ object FOrderEntry: TFOrderEntry
object XDataWebDataSet1staff_fields_mount_due: TStringField
object XDataWebDataSet1staff_fields_mount_due: TStringField
FieldName = 'staff_fields_mount_due'
FieldName = 'staff_fields_mount_due'
end
end
object XDataWebDataSet1ADDRESS_LIST: TStringField
FieldName = 'ADDRESS_LIST'
end
end
end
object WebDataSource1: TWebDataSource
object WebDataSource1: TWebDataSource
DataSet = XDataWebDataSet1
DataSet = XDataWebDataSet1
Left = 216
Left = 216
Top = 104
Top = 104
end
end
object wdsShipTo: TWebDataSource
DataSet = xdwdsShipTo
Left = 212
Top = 436
end
object xdwdsShipTo: TXDataWebDataSet
Left = 192
Top = 486
object xdwdsShipToADDRESS: TStringField
FieldName = 'ADDRESS'
end
end
end
end
kgOrdersClient/View.OrderEntryCorrugated.html
View file @
601d01e1
This diff is collapsed.
Click to expand it.
kgOrdersClient/View.OrderEntryCorrugated.pas
View file @
601d01e1
...
@@ -38,7 +38,6 @@ type
...
@@ -38,7 +38,6 @@ type
edtQuantity
:
TWebDBEdit
;
edtQuantity
:
TWebDBEdit
;
edtPrice
:
TWebDBEdit
;
edtPrice
:
TWebDBEdit
;
edtInvoiceTo
:
TWebDBEdit
;
edtInvoiceTo
:
TWebDBEdit
;
edtShipTo
:
TWebDBEdit
;
edtPONumber
:
TWebDBEdit
;
edtPONumber
:
TWebDBEdit
;
edtJobName
:
TWebDBEdit
;
edtJobName
:
TWebDBEdit
;
edtQuickBooksItem
:
TWebDBEdit
;
edtQuickBooksItem
:
TWebDBEdit
;
...
@@ -182,6 +181,11 @@ type
...
@@ -182,6 +181,11 @@ type
cbStickyBak
:
TWebCheckBox
;
cbStickyBak
:
TWebCheckBox
;
cbLoose
:
TWebCheckBox
;
cbLoose
:
TWebCheckBox
;
cbExcaliburDie
:
TWebCheckBox
;
cbExcaliburDie
:
TWebCheckBox
;
XDataWebDataSet1ADDRESS_LIST
:
TStringField
;
wdsShipTo
:
TWebDataSource
;
xdwdsShipTo
:
TXDataWebDataSet
;
xdwdsShipToADDRESS
:
TStringField
;
WebDBComboBox1
:
TWebDBComboBox
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
HideNotification
();
procedure
HideNotification
();
procedure
ShowNotification
(
Notification
:
string
);
procedure
ShowNotification
(
Notification
:
string
);
...
@@ -518,15 +522,30 @@ procedure TFOrderEntry.getCustomer(customerID: string);
...
@@ -518,15 +522,30 @@ procedure TFOrderEntry.getCustomer(customerID: string);
var
var
xdcResponse
:
TXDataClientResponse
;
xdcResponse
:
TXDataClientResponse
;
customer
:
TJSObject
;
customer
:
TJSObject
;
address
:
string
;
begin
begin
xdcResponse
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.GetCustomer'
,
[
customerID
]));
customer
:=
TJSObject
(
xdcResponse
.
Result
);
XDataWebDataSet1
.
Close
;
XDataWebDataSet1
.
SetJsonData
(
customer
);
XDataWebDataSet1
.
Open
;
xdwdsShipTo
.
Close
;
xdwdsShipTo
.
SetJSONData
(
customer
[
'ADDRESS_LIST'
]);
xdwdsShipTo
.
Open
;
console
.
log
(
xdwdsShipToADDRESS
.
AsString
);
console
.
log
(
customer
[
'ADDRESS_LIST'
]);
end
;
end
;
procedure
TFOrderEntry
.
WebFormShow
(
Sender
:
TObject
);
procedure
TFOrderEntry
.
WebFormShow
(
Sender
:
TObject
);
begin
begin
getOrder
(
orderID
);
if
mode
<>
'ADD'
then
getOrder
(
orderID
)
else
getCustomer
(
customerID
);
console
.
log
(
customerID
);
console
.
log
(
customerID
);
//getCustomer(customerID);
HideNotification
();
HideNotification
();
end
;
end
;
...
...
kgOrdersClient/View.Orders.pas
View file @
601d01e1
...
@@ -190,6 +190,7 @@ begin
...
@@ -190,6 +190,7 @@ begin
newform
.
ShowModal
(
newform
.
ShowModal
(
procedure
(
AValue
:
TModalResult
)
procedure
(
AValue
:
TModalResult
)
begin
begin
if
newForm
.
edtID
.
Text
<>
''
then
orderEntry
(
''
,
newForm
.
edtID
.
Text
,
'ADD'
);
orderEntry
(
''
,
newForm
.
edtID
.
Text
,
'ADD'
);
end
end
);
);
...
...
kgOrdersClient/template/css/app.css
View file @
601d01e1
...
@@ -7,7 +7,12 @@
...
@@ -7,7 +7,12 @@
background-color
:
#fff
;
background-color
:
#fff
;
}
}
input
[
type
=
"text"
]
{
min-width
:
50px
;
max-width
:
100%
;
width
:
auto
;
padding-left
:
5px
;
}
.card-header
{
.card-header
{
width
:
100%
;
width
:
100%
;
...
...
kgOrdersServer/Source/Lookup.Service.pas
View file @
601d01e1
...
@@ -84,12 +84,18 @@ type
...
@@ -84,12 +84,18 @@ type
data
:
TList
<
TOrderItem
>;
data
:
TList
<
TOrderItem
>;
end
;
end
;
TAddressItem
=
class
Public
ADDRESS
:
string
;
end
;
TCustomerItem
=
class
TCustomerItem
=
class
Public
Public
NAME
:
string
;
NAME
:
string
;
ID
:
integer
;
ID
:
integer
;
SHORT_NAME
:
string
;
SHORT_NAME
:
string
;
ADDRESS
:
string
;
staff_fields_invoice_to
:
string
;
ADDRESS_LIST
:
TList
<
TAddressItem
>;
end
;
end
;
TCustomerList
=
class
TCustomerList
=
class
...
@@ -202,7 +208,7 @@ type
...
@@ -202,7 +208,7 @@ type
[
HttpGet
]
function
GetOrders
(
searchOptions
:
string
):
TOrderList
;
[
HttpGet
]
function
GetOrders
(
searchOptions
:
string
):
TOrderList
;
[
HttpGet
]
function
GetOrder
(
orderInfo
:
string
):
TFullOrder
;
[
HttpGet
]
function
GetOrder
(
orderInfo
:
string
):
TFullOrder
;
[
HttpGet
]
function
GetCustomers
():
TCustomerList
;
[
HttpGet
]
function
GetCustomers
():
TCustomerList
;
//[HttpGet] function GetCustomer(): TFullCustomer
;
[
HttpGet
]
function
GetCustomer
(
ID
:
string
):
TCustomerItem
;
function
AddUser
(
userInfo
:
string
):
string
;
function
AddUser
(
userInfo
:
string
):
string
;
function
AddItem
(
itemInfo
:
string
):
string
;
function
AddItem
(
itemInfo
:
string
):
string
;
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
601d01e1
...
@@ -26,6 +26,7 @@ type
...
@@ -26,6 +26,7 @@ type
function
GetOrders
(
searchOptions
:
string
):
TOrderList
;
function
GetOrders
(
searchOptions
:
string
):
TOrderList
;
function
GetOrder
(
orderInfo
:
string
):
TFullOrder
;
function
GetOrder
(
orderInfo
:
string
):
TFullOrder
;
function
GetCustomers
():
TCustomerList
;
function
GetCustomers
():
TCustomerList
;
function
GetCustomer
(
ID
:
string
):
TCustomerItem
;
function
EditUser
(
const
editOptions
:
string
):
string
;
function
EditUser
(
const
editOptions
:
string
):
string
;
function
Search
(
phoneNum
:
string
):
TOrderList
;
function
Search
(
phoneNum
:
string
):
TOrderList
;
function
AddUser
(
userInfo
:
string
):
string
;
function
AddUser
(
userInfo
:
string
):
string
;
...
@@ -80,7 +81,7 @@ begin
...
@@ -80,7 +81,7 @@ begin
customer
.
NAME
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'NAME'
).
AsString
;
customer
.
NAME
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'NAME'
).
AsString
;
customer
.
ID
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'CUSTOMER_ID'
).
AsInteger
;
customer
.
ID
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'CUSTOMER_ID'
).
AsInteger
;
customer
.
SHORT_NAME
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'SHORT_NAME'
).
AsString
;
customer
.
SHORT_NAME
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'SHORT_NAME'
).
AsString
;
customer
.
ADDRESS
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'BILL_ADDRESS'
).
AsString
+
customer
.
staff_fields_invoice_to
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'BILL_ADDRESS'
).
AsString
+
', '
+
ordersDB
.
UniQuery1
.
FieldByName
(
'BILL_CITY'
).
AsString
+
', '
+
ordersDB
.
UniQuery1
.
FieldByName
(
'BILL_CITY'
).
AsString
+
' '
+
ordersDB
.
UniQuery1
.
FieldByName
(
'BILL_ZIP'
).
AsString
;
' '
+
ordersDB
.
UniQuery1
.
FieldByName
(
'BILL_ZIP'
).
AsString
;
result
.
data
.
Add
(
customer
);
result
.
data
.
Add
(
customer
);
...
@@ -90,6 +91,35 @@ begin
...
@@ -90,6 +91,35 @@ begin
ordersDB
.
UniQuery1
.
Close
;
ordersDB
.
UniQuery1
.
Close
;
end
;
end
;
function
TLookupService
.
GetCustomer
(
ID
:
string
):
TCustomerItem
;
var
SQL
:
string
;
ADDRESS
:
TAddressItem
;
begin
SQL
:=
'SELECT c.NAME, c.SHORT_NAME, c.BILL_ADDRESS_BLOCK, s.ship_block FROM customers c JOIN customers_ship s ON c.CUSTOMER_ID = s.customer_id WHERE c.CUSTOMER_ID = '
+
ID
;
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
result
:=
TCustomerItem
.
Create
;
result
.
ADDRESS_LIST
:=
TList
<
TAddressItem
>.
Create
;
TXDataOperationContext
.
Current
.
Handler
.
ManagedObjects
.
Add
(
Result
.
ADDRESS_LIST
);
result
.
NAME
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'NAME'
).
AsString
;
result
.
ID
:=
StrToInt
(
ID
);
result
.
SHORT_NAME
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'SHORT_NAME'
).
AsString
;
result
.
staff_fields_invoice_to
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'BILL_ADDRESS_BLOCK'
).
AsString
;
while
not
ordersDB
.
UniQuery1
.
Eof
do
begin
ADDRESS
:=
TAddressItem
.
Create
;
TXDataOperationContext
.
Current
.
Handler
.
ManagedObjects
.
Add
(
ADDRESS
);
ADDRESS
.
ADDRESS
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ship_block'
).
AsString
;
result
.
ADDRESS_LIST
.
Add
(
ADDRESS
);
ordersDB
.
UniQuery1
.
Next
;
end
;
ordersDB
.
UniQuery1
.
Close
;
end
;
function
TLookupService
.
Search
(
phoneNum
:
string
):
TOrderList
;
function
TLookupService
.
Search
(
phoneNum
:
string
):
TOrderList
;
// Searchs the database for a specific from phone number then returns a list of
// Searchs the database for a specific from phone number then returns a list of
// calls from said number
// calls from said number
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
601d01e1
[Options]
[Options]
LogFileNum
=
2
25
LogFileNum
=
2
30
UpdateTimerLength
=
0
UpdateTimerLength
=
0
...
...
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