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
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
101 additions
and
23 deletions
+101
-23
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
+2
-1
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
object edtCompanyName: TWebDBEdit
Left = 24
Top = 92
Width =
121
Width =
260
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtcompanyname'
HeightPercent = 100.000000000000000000
MaxLength = 90
WidthStyle = ssAuto
WidthPercent = 100.000000000000000000
DataField = 'NAME'
DataSource = WebDataSource1
...
...
@@ -327,19 +328,6 @@ object FOrderEntry: TFOrderEntry
DataField = 'staff_fields_invoice_to'
DataSource = WebDataSource1
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
Left = 26
Top = 458
...
...
@@ -965,6 +953,20 @@ object FOrderEntry: TFOrderEntry
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
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
Connection = DMConnection.ApiConnection
Left = 244
...
...
@@ -1247,10 +1249,25 @@ object FOrderEntry: TFOrderEntry
object XDataWebDataSet1staff_fields_mount_due: TStringField
FieldName = 'staff_fields_mount_due'
end
object XDataWebDataSet1ADDRESS_LIST: TStringField
FieldName = 'ADDRESS_LIST'
end
end
object WebDataSource1: TWebDataSource
DataSet = XDataWebDataSet1
Left = 216
Top = 104
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
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
edtQuantity
:
TWebDBEdit
;
edtPrice
:
TWebDBEdit
;
edtInvoiceTo
:
TWebDBEdit
;
edtShipTo
:
TWebDBEdit
;
edtPONumber
:
TWebDBEdit
;
edtJobName
:
TWebDBEdit
;
edtQuickBooksItem
:
TWebDBEdit
;
...
...
@@ -182,6 +181,11 @@ type
cbStickyBak
:
TWebCheckBox
;
cbLoose
:
TWebCheckBox
;
cbExcaliburDie
:
TWebCheckBox
;
XDataWebDataSet1ADDRESS_LIST
:
TStringField
;
wdsShipTo
:
TWebDataSource
;
xdwdsShipTo
:
TXDataWebDataSet
;
xdwdsShipToADDRESS
:
TStringField
;
WebDBComboBox1
:
TWebDBComboBox
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
HideNotification
();
procedure
ShowNotification
(
Notification
:
string
);
...
...
@@ -518,15 +522,30 @@ procedure TFOrderEntry.getCustomer(customerID: string);
var
xdcResponse
:
TXDataClientResponse
;
customer
:
TJSObject
;
address
:
string
;
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
;
procedure
TFOrderEntry
.
WebFormShow
(
Sender
:
TObject
);
begin
getOrder
(
orderID
);
if
mode
<>
'ADD'
then
getOrder
(
orderID
)
else
getCustomer
(
customerID
);
console
.
log
(
customerID
);
//getCustomer(customerID);
HideNotification
();
end
;
...
...
kgOrdersClient/View.Orders.pas
View file @
601d01e1
...
...
@@ -190,7 +190,8 @@ begin
newform
.
ShowModal
(
procedure
(
AValue
:
TModalResult
)
begin
orderEntry
(
''
,
newForm
.
edtID
.
Text
,
'ADD'
);
if
newForm
.
edtID
.
Text
<>
''
then
orderEntry
(
''
,
newForm
.
edtID
.
Text
,
'ADD'
);
end
);
end
;
...
...
kgOrdersClient/template/css/app.css
View file @
601d01e1
...
...
@@ -7,7 +7,12 @@
background-color
:
#fff
;
}
input
[
type
=
"text"
]
{
min-width
:
50px
;
max-width
:
100%
;
width
:
auto
;
padding-left
:
5px
;
}
.card-header
{
width
:
100%
;
...
...
kgOrdersServer/Source/Lookup.Service.pas
View file @
601d01e1
...
...
@@ -84,12 +84,18 @@ type
data
:
TList
<
TOrderItem
>;
end
;
TAddressItem
=
class
Public
ADDRESS
:
string
;
end
;
TCustomerItem
=
class
Public
NAME
:
string
;
ID
:
integer
;
SHORT_NAME
:
string
;
ADDRESS
:
string
;
staff_fields_invoice_to
:
string
;
ADDRESS_LIST
:
TList
<
TAddressItem
>;
end
;
TCustomerList
=
class
...
...
@@ -202,7 +208,7 @@ type
[
HttpGet
]
function
GetOrders
(
searchOptions
:
string
):
TOrderList
;
[
HttpGet
]
function
GetOrder
(
orderInfo
:
string
):
TFullOrder
;
[
HttpGet
]
function
GetCustomers
():
TCustomerList
;
//[HttpGet] function GetCustomer(): TFullCustomer
;
[
HttpGet
]
function
GetCustomer
(
ID
:
string
):
TCustomerItem
;
function
AddUser
(
userInfo
:
string
):
string
;
function
AddItem
(
itemInfo
:
string
):
string
;
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
601d01e1
...
...
@@ -26,6 +26,7 @@ type
function
GetOrders
(
searchOptions
:
string
):
TOrderList
;
function
GetOrder
(
orderInfo
:
string
):
TFullOrder
;
function
GetCustomers
():
TCustomerList
;
function
GetCustomer
(
ID
:
string
):
TCustomerItem
;
function
EditUser
(
const
editOptions
:
string
):
string
;
function
Search
(
phoneNum
:
string
):
TOrderList
;
function
AddUser
(
userInfo
:
string
):
string
;
...
...
@@ -80,7 +81,7 @@ begin
customer
.
NAME
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'NAME'
).
AsString
;
customer
.
ID
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'CUSTOMER_ID'
).
AsInteger
;
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_ZIP'
).
AsString
;
result
.
data
.
Add
(
customer
);
...
...
@@ -90,6 +91,35 @@ begin
ordersDB
.
UniQuery1
.
Close
;
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
;
// Searchs the database for a specific from phone number then returns a list of
// calls from said number
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
601d01e1
[Options]
LogFileNum
=
2
25
LogFileNum
=
2
30
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