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
a143692e
Commit
a143692e
authored
Jul 14, 2025
by
emsys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finished Items page, and added pagination to customer page.
parent
4fa14ae7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
150 additions
and
145 deletions
+150
-145
AddCustomer.dfm
kgOrdersClient/AddCustomer.dfm
+4
-4
AddCustomer.pas
kgOrdersClient/AddCustomer.pas
+3
-3
View.AddItem.pas
kgOrdersClient/View.AddItem.pas
+30
-10
View.Customers.dfm
kgOrdersClient/View.Customers.dfm
+4
-5
View.Customers.pas
kgOrdersClient/View.Customers.pas
+16
-24
View.EditUser.pas
kgOrdersClient/View.EditUser.pas
+1
-1
View.Items.dfm
kgOrdersClient/View.Items.dfm
+28
-10
View.Items.html
kgOrdersClient/View.Items.html
+28
-61
View.Items.pas
kgOrdersClient/View.Items.pas
+0
-0
View.OrderEntryCorrugated.dfm
kgOrdersClient/View.OrderEntryCorrugated.dfm
+3
-0
View.OrderEntryCorrugated.pas
kgOrdersClient/View.OrderEntryCorrugated.pas
+5
-4
View.OrderEntryCuttingDie.dfm
kgOrdersClient/View.OrderEntryCuttingDie.dfm
+0
-1
View.OrderEntryCuttingDie.pas
kgOrdersClient/View.OrderEntryCuttingDie.pas
+3
-3
View.OrderEntryWeb.dfm
kgOrdersClient/View.OrderEntryWeb.dfm
+3
-0
View.OrderEntryWeb.pas
kgOrdersClient/View.OrderEntryWeb.pas
+4
-3
View.Orders.dfm
kgOrdersClient/View.Orders.dfm
+2
-2
View.Orders.pas
kgOrdersClient/View.Orders.pas
+4
-5
View.SelectCustomer.pas
kgOrdersClient/View.SelectCustomer.pas
+1
-1
View.UserProfile.pas
kgOrdersClient/View.UserProfile.pas
+2
-2
View.Users.pas
kgOrdersClient/View.Users.pas
+1
-1
Lookup.Service.pas
kgOrdersServer/Source/Lookup.Service.pas
+2
-1
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+0
-0
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+6
-4
No files found.
kgOrdersClient/AddCustomer.dfm
View file @
a143692e
...
...
@@ -4,9 +4,9 @@ object FViewAddCustomer: TFViewAddCustomer
CSSLibrary = cssBootstrap
ElementFont = efCSS
object lblFormState: TWebLabel
Left = 1
8
Top =
16
Width =
3
Left = 1
9
Top =
578
Width =
79
Height = 15
ElementID = 'lbl_form_state'
HeightPercent = 100.000000000000000000
...
...
@@ -39,7 +39,7 @@ object FViewAddCustomer: TFViewAddCustomer
Text = ''
end
object edtShortName: TWebDBEdit
Left =
19
Left =
24
Top = 12
Width = 121
Height = 22
...
...
kgOrdersClient/AddCustomer.pas
View file @
a143692e
...
...
@@ -79,7 +79,7 @@ type
XDataWebDataSet1REP_USER_ID
:
TStringField
;
xdwdsUsersfull_name
:
TStringField
;
lblFormState
:
TWebLabel
;
procedure
btnSaveClick
(
Sender
:
TObject
);
[
async
]
procedure
btnSaveClick
(
Sender
:
TObject
);
procedure
btnCancelClick
(
Sender
:
TObject
);
procedure
btnCloseClick
(
Sender
:
TObject
);
procedure
btnEditClick
(
Sender
:
TObject
);
...
...
@@ -424,8 +424,8 @@ procedure TFViewAddCustomer.btnSaveClick(Sender: TObject);
begin
if
VerifyCustomer
()
then
begin
sendCustomerToServer
(
);
GetCustomer
(
);
await
(
sendCustomerToServer
()
);
await
(
GetCustomer
()
);
ViewMode
();
end
;
end
;
...
...
kgOrdersClient/View.AddItem.pas
View file @
a143692e
...
...
@@ -43,6 +43,8 @@ type
public
{ Public declarations }
notification
:
string
;
confirm
:
Boolean
;
QB_ID
,
name
,
description
,
status
:
string
;
end
;
var
...
...
@@ -80,7 +82,18 @@ begin
else
if
xdwdsCustomers
.
FieldByName
(
'qb_items_id'
).
AsString
<>
''
then
edtNotification
.
Text
:=
'Item Already In Database'
else
SendItemToServer
();
begin
QB_ID
:=
xdwdsCustomers
.
FieldByName
(
'qb_items_qb_id'
).
AsString
;
name
:=
xdwdsCustomers
.
FieldByName
(
'qb_item_name'
).
AsString
;
description
:=
xdwdsCustomers
.
FieldByName
(
'item_desc'
).
AsString
;
if
xdwdsCustomers
.
FieldByName
(
'status'
).
AsBoolean
then
status
:=
'ACTIVE'
else
status
:=
'INACTIVE'
;
confirm
:=
true
;
Close
;
end
;
//SendItemToServer();
end
;
procedure
TfViewAddItem
.
getItems
;
...
...
@@ -90,18 +103,25 @@ var
i
:
integer
;
begin
// Fetch data from XData service
xdcResponse
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.getQBItems'
,
[]));
customerList
:=
TJSObject
(
xdcResponse
.
Result
);
Utils
.
ShowSpinner
(
'spinner'
);
try
xdcResponse
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.getQBItems'
,
[]));
customerList
:=
TJSObject
(
xdcResponse
.
Result
);
// Load data into TXDataWebDataset
// Load data into TXDataWebDataset
xdwdsCustomers
.
Close
;
xdwdsCustomers
.
SetJsonData
(
customerList
);
xdwdsCustomers
.
Open
;
xdwdsCustomers
.
Close
;
xdwdsCustomers
.
SetJsonData
(
customerList
);
xdwdsCustomers
.
Open
;
// Manually populate the grid
PopulateGridManually
;
//Utils.HideSpinner('spinner');
// Manually populate the grid
PopulateGridManually
;
//Utils.HideSpinner('spinner');
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
Utils
.
HideSpinner
(
'spinner'
);
end
;
procedure
TFViewAddItem
.
PopulateGridManually
;
...
...
kgOrdersClient/View.Customers.dfm
View file @
a143692e
...
...
@@ -42,15 +42,14 @@ object FViewCustomers: TFViewCustomers
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
Text = '50
0
'
Text = '50'
WidthPercent = 100.000000000000000000
OnChange = wcbPageSizeChange
ItemIndex = -1
Items.Strings = (
'100'
'250'
'500'
'1000')
'10'
'25'
'50')
end
object pnlMessage: TWebPanel
Left = 12
...
...
kgOrdersClient/View.Customers.pas
View file @
a143692e
...
...
@@ -83,16 +83,7 @@ begin
newform
.
ShowModal
(
procedure
(
AValue
:
TModalResult
)
begin
{if newform.confirm then
begin
if newform.cbCorrugatedPlate.Checked then
orderType := 'corrugated'
else if newform.cbWebPlate.Checked then
orderType := 'web'
else
orderType := 'cutting';
orderEntry('', newForm.DBID, 'ADD', orderType);
end; }
end
);
end
;
...
...
@@ -108,8 +99,8 @@ begin
DMConnection
.
ApiConnection
.
Connected
:=
True
;
PageNumber
:=
1
;
TotalPages
:=
1
;
// Initial total pages
wcbPageSize
.
Text
:=
'50
0
'
;
PageSize
:=
50
0
;
wcbPageSize
.
Text
:=
'50'
;
PageSize
:=
50
;
HideNotification
();
getCustomers
(
GenerateSearchOptions
());
end
;
...
...
@@ -135,21 +126,23 @@ begin
xdwdsCustomers
.
Open
;
customerListLength
:=
integer
(
customerList
[
'count'
]);
TotalPages
:=
(
(
customerListLength
+
PageSize
-
1
)
div
PageSize
);
TotalPages
:=
(
customerListLength
+
PageSize
-
1
)
div
PageSize
;
generatePagination
(
TotalPages
);
if
customerListLength
=
0
then
lblEntries
.
Caption
:=
'No entries found'
else
if
(
PageNumber
*
PageSize
)
<
customerListLength
then
lblEntries
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
' - '
+
IntToStr
(
customerListLength
)
+
' of '
+
IntToStr
(
customerListLength
)
else
lblEntries
.
Caption
:=
'Showing entries '
+
IntToStr
((
PageNumber
-
1
)
*
PageSize
+
1
)
+
' - '
+
IntToStr
(
customerListLength
)
+
' of '
+
IntToStr
(
customerListLength
);
begin
lblEntries
.
Caption
:=
'No entries found'
;
ShowToast
(
'No entries found'
,
'danger'
);
end
else
if
(
PageNumber
*
PageSize
)
<
customerListLength
then
lblEntries
.
Caption
:=
Format
(
'Showing entries %d - %d of %d'
,
[(
PageNumber
-
1
)
*
PageSize
+
1
,
PageNumber
*
PageSize
,
customerListLength
])
else
lblEntries
.
Caption
:=
Format
(
'Showing entries %d - %d of %d'
,
[(
PageNumber
-
1
)
*
PageSize
+
1
,
customerListLength
,
customerListLength
]);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve customers: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
Utils
.
HideSpinner
(
'spinner'
);
end
;
...
...
@@ -180,7 +173,6 @@ begin
getCustomers
(
GenerateSearchOptions
());
end
;
procedure
TFViewCustomers
.
wdbtcCustomersDblClickCell
(
Sender
:
TObject
;
ACol
,
ARow
:
Integer
);
begin
...
...
kgOrdersClient/View.EditUser.pas
View file @
a143692e
...
...
@@ -107,7 +107,7 @@ begin
Info
:=
string
(
responseString
[
'value'
]);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not add user: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
kgOrdersClient/View.Items.dfm
View file @
a143692e
...
...
@@ -21,6 +21,17 @@ object FViewItems: TFViewItems
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object lblFormState: TWebLabel
Left = 380
Top = 422
Width = 3
Height = 13
ElementID = 'lbl_form_state'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object wcbPageSize: TWebComboBox
Left = 0
Top = 0
...
...
@@ -150,10 +161,11 @@ object FViewItems: TFViewItems
Header.ListItemElementClassName = 'page-item'
Header.ListLinkElementClassName = 'page-link'
WordWrap = True
OnClickCell = wdbtcItemsClickCell
Columns = <
item
DataField = 'ID'
Title = '
KG Orders
ID'
Title = '
Item
ID'
end
item
DataField = 'name'
...
...
@@ -166,6 +178,10 @@ object FViewItems: TFViewItems
item
DataField = 'status'
Title = 'Status'
end
item
DataField = 'QB_ID'
Title = 'QB ID'
end>
DataSource = wdsItems
end
...
...
@@ -175,7 +191,6 @@ object FViewItems: TFViewItems
Width = 121
Height = 22
ChildOrder = 8
ElementClassName = 'form-control'
ElementID = 'edtname'
ElementFont = efCSS
HeightStyle = ssAuto
...
...
@@ -190,7 +205,6 @@ object FViewItems: TFViewItems
Width = 121
Height = 22
ChildOrder = 8
ElementClassName = 'form-control'
ElementID = 'edtdescription'
ElementFont = efCSS
HeightStyle = ssAuto
...
...
@@ -199,13 +213,13 @@ object FViewItems: TFViewItems
DataField = 'description'
DataSource = wdsItems
end
object
cbStatus: TWeb
CheckBox
object
CBStatus: TWebDB
CheckBox
Left = 352
Top = 3
6
Top = 3
4
Width = 113
Height = 22
Caption = 'Active?'
ChildOrder = 1
0
ChildOrder = 1
1
ElementClassName = 'custom-control custom-checkbox'
ElementButtonClassName = 'custom-control-input'
ElementLabelClassName = 'custom-control-label'
...
...
@@ -214,6 +228,10 @@ object FViewItems: TFViewItems
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'status'
DataSource = wdsItems
ValueChecked = 'ACTIVE'
ValueUnChecked = 'INACTIVE'
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
...
...
@@ -226,10 +244,6 @@ object FViewItems: TFViewItems
object xdwdsItemsstatus: TStringField
FieldName = 'status'
end
object xdwdsItemsqb_items_qb_id: TStringField
FieldName = 'qb_items_qb_id'
Size = 0
end
object xdwdsItemsID: TStringField
FieldName = 'ID'
end
...
...
@@ -239,8 +253,12 @@ object FViewItems: TFViewItems
object xdwdsItemsdescription: TStringField
FieldName = 'description'
end
object xdwdsItemsQB_ID: TStringField
FieldName = 'QB_ID'
end
end
object wdsItems: TWebDataSource
AutoEdit = False
DataSet = xdwdsItems
Left = 268
Top = 300
...
...
kgOrdersClient/View.Items.html
View file @
a143692e
<nav
class=
"navbar navbar-expand navbar-light bg-light sticky-top"
style=
"z-index: 100;"
>
<div
class=
"container-fluid ps-0"
>
<ul
class=
"navbar-nav me-auto ps-2"
>
<li
class=
"nav-item pe-2"
>
<button
id=
"btnadd"
class=
"btn btn-primary btn-sm"
>
Add
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btnedit"
class=
"btn btn-primary btn-sm"
>
Edit
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btndelete"
class=
"btn btn-danger btn-sm"
>
Delete
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btnconfirm"
class=
"btn btn-success btn-sm"
>
Save
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btncancel"
class=
"btn btn-danger btn-sm"
>
Cancel
</button>
</li>
</ul>
<nav
class=
"navbar navbar-expand navbar-light bg-light sticky-top border-light"
style=
"z-index: 100;"
>
<div
class=
"container-fluid d-flex align-items-center ps-0 pe-0"
>
<!-- Left-aligned form state label -->
<div
class=
"me-auto ps-3"
>
<label
id=
"lbl_form_state"
class=
"form-label mb-0 fw-bold text-uppercase text-nowrap text-danger"
style=
"font-size: 16px;"
>
View Mode
</label>
</div>
<!-- Right-aligned buttons -->
<ul
class=
"navbar-nav ms-auto pe-2 mb-0"
>
<li
class=
"nav-item pe-2"
>
<button
id=
"btnadd"
class=
"btn btn-primary btn-sm"
>
Add
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btnedit"
class=
"btn btn-primary btn-sm"
>
Edit
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btndelete"
class=
"btn btn-danger btn-sm"
>
Delete
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btnconfirm"
class=
"btn btn-success btn-sm"
>
Save
</button>
</li>
<li
class=
"nav-item pe-2"
>
<button
id=
"btncancel"
class=
"btn btn-danger btn-sm"
>
Cancel
</button>
</li>
</ul>
</div>
</nav>
<div
class=
"row"
>
<div
class=
"col-12"
>
<div
class=
"container mt-4"
>
...
...
@@ -80,46 +89,4 @@
</div>
</div>
</div>
<!-- Modal -->
<div
class=
"modal fade"
id=
"audioModal"
tabindex=
"-1"
aria-labelledby=
"audioModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"audioModalLabel"
>
Audio Player
</h5>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
onclick=
"stopAudio()"
></button>
</div>
<div
class=
"modal-body"
>
<audio
controls
id=
"audioPlayer"
>
<source
src=
""
type=
"audio/mp3"
id=
"audioSource"
>
Your browser does not support the audio element.
</audio>
</div>
</div>
</div>
</div>
<script>
document
.
getElementById
(
'tblPhoneGrid'
).
addEventListener
(
'click'
,
function
(
event
)
{
// Check if the clicked element is a table cell (td)
if
(
event
.
target
.
tagName
===
'TD'
)
{
const
row
=
event
.
target
.
parentNode
;
const
cells
=
row
.
getElementsByTagName
(
'td'
);
// Extract data from the row
const
id
=
cells
[
0
].
textContent
;
const
name
=
cells
[
1
].
textContent
;
const
description
=
cells
[
2
].
textContent
;
const
status
=
cells
[
3
].
textContent
.
trim
().
toLowerCase
();
// Populate form fields
document
.
getElementById
(
'edtname'
).
value
=
name
;
document
.
getElementById
(
'edtdescription'
).
value
=
description
;
// Set the checkbox based on the status
const
isActive
=
status
===
'active'
;
document
.
getElementById
(
'cbstatus'
).
checked
=
isActive
;
console
.
log
(
`Row clicked! ID:
${
id
}
, Name:
${
name
}
, Description:
${
description
}
, Status:
${
status
}
`
);
}
});
</script>
kgOrdersClient/View.Items.pas
View file @
a143692e
This diff is collapsed.
Click to expand it.
kgOrdersClient/View.OrderEntryCorrugated.dfm
View file @
a143692e
...
...
@@ -1586,6 +1586,9 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
object XDataWebDataSet1supplied_by_customer_order_date: TStringField
FieldName = 'supplied_by_customer_order_date'
end
object XDataWebDataSet1inQuickBooks: TStringField
FieldName = 'inQuickBooks'
end
end
object WebDataSource1: TWebDataSource
AutoEdit = False
...
...
kgOrdersClient/View.OrderEntryCorrugated.pas
View file @
a143692e
...
...
@@ -199,6 +199,7 @@ type
btnAdd
:
TWebButton
;
WebButton2
:
TWebButton
;
lblFormState
:
TWebLabel
;
XDataWebDataSet1inQuickBooks
:
TStringField
;
procedure
WebFormCreate
(
Sender
:
TObject
);
[
async
]
procedure
getOrder
(
Order_ID
:
string
);
[
async
]
procedure
getCustomer
(
customerID
:
string
);
...
...
@@ -568,7 +569,7 @@ begin
window
.
open
(
pdfURL
,
'_blank'
);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not generate corrugated PDF: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -600,7 +601,7 @@ begin
[
OrderID
,
'corrugated'
,
JS
.
toString
(
AuthService
.
TokenPayload
.
Properties
[
'user_id'
])]));
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not delete order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -986,7 +987,7 @@ begin
xdwdsQBITEM
.
Open
;
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -1025,7 +1026,7 @@ begin
dtpApprovedDate
.
Date
:=
0
;
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve customer: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
kgOrdersClient/View.OrderEntryCuttingDie.dfm
View file @
a143692e
...
...
@@ -64,7 +64,6 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
ElementID = 'edtinquickbooks'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'inQuickBooks'
DataSource = WebDataSource1
end
object dtpOrderDate: TWebDateTimePicker
...
...
kgOrdersClient/View.OrderEntryCuttingDie.pas
View file @
a143692e
...
...
@@ -420,7 +420,7 @@ begin
window
.
open
(
pdfURL
,
'_blank'
);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not generate cutting die PDF: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -441,7 +441,7 @@ begin
mode
:=
'EDIT'
;
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not save cutting die order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -572,7 +572,7 @@ begin
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
Utils
.
HideSpinner
(
'spinner'
);
end
;
...
...
kgOrdersClient/View.OrderEntryWeb.dfm
View file @
a143692e
...
...
@@ -1668,6 +1668,9 @@ object FOrderEntryWeb: TFOrderEntryWeb
object XDataWebDataSet1supplied_by_customer_b_w_or_co: TStringField
FieldName = 'supplied_by_customer_b_w_or_co'
end
object XDataWebDataSet1InQuickbooks: TStringField
FieldName = 'InQuickbooks'
end
end
object WebDataSource1: TWebDataSource
AutoEdit = False
...
...
kgOrdersClient/View.OrderEntryWeb.pas
View file @
a143692e
...
...
@@ -203,6 +203,7 @@ type
btnAdd
:
TWebButton
;
WebButton2
:
TWebButton
;
lblFormState
:
TWebLabel
;
XDataWebDataSet1InQuickbooks
:
TStringField
;
procedure
WebFormCreate
(
Sender
:
TObject
);
[
async
]
procedure
getOrder
(
Order_ID
:
string
);
[
async
]
procedure
getCustomer
(
customerID
:
string
);
...
...
@@ -594,7 +595,7 @@ begin
window
.
open
(
pdfURL
,
'_blank'
);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not generate web order PDF: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -614,7 +615,7 @@ begin
mode
:=
'EDIT'
;
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not save web order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
@@ -883,7 +884,7 @@ begin
xdwdsQBITEM
.
Open
;
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve order: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
Utils
.
HideSpinner
(
'spinner'
);
end
;
...
...
kgOrdersClient/View.Orders.dfm
View file @
a143692e
...
...
@@ -416,7 +416,7 @@ object FViewOrders: TFViewOrders
object tmrReturn: TWebTimer
Enabled = False
OnTimer = tmrReturnTimer
Left = 29
4
Top =
362
Left = 29
2
Top =
414
end
end
kgOrdersClient/View.Orders.pas
View file @
a143692e
// Displays orders in the grid. Allows the user
// Displays orders in the grid. Allows the user
// to sort the entries, filter their search, and search for a specific person.
// Authors:
// Cameron Hayes
...
...
@@ -235,8 +235,7 @@ begin
except
on
E
:
EXDataClientRequestException
do
begin
Utils
.
ShowErrorModal
(
'Could not generate report PDF: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
if
Assigned
(
APdfTab
)
then
APdfTab
.
close
;
// close the blank tab on failure
end
;
...
...
@@ -248,7 +247,7 @@ end;
procedure
TFViewOrders
.
WebButton1Click
(
Sender
:
TObject
);
begin
if
status
OrderID
<>
''
then
if
OrderID
<>
''
then
ShowSetStatusForm
()
else
ShowToast
(
'Failure: Please select an order'
);
...
...
@@ -769,7 +768,7 @@ begin
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve orders: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
finally
Utils
.
HideSpinner
(
'spinner'
);
...
...
kgOrdersClient/View.SelectCustomer.pas
View file @
a143692e
...
...
@@ -126,7 +126,7 @@ begin
PopulateGridManually
;
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve QuickBooks customers: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
kgOrdersClient/View.UserProfile.pas
View file @
a143692e
...
...
@@ -91,7 +91,7 @@ begin
FViewMain
.
ViewOrders
(
''
);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Error editing user: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
on
E
:
Exception
do
Utils
.
ShowErrorModal
(
'Unexpected error: '
+
E
.
Message
);
end
;
...
...
@@ -145,7 +145,7 @@ begin
chkAdminUser
.
Checked
:=
boolean
(
user
[
'admin'
]);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve users: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
end
;
...
...
kgOrdersClient/View.Users.pas
View file @
a143692e
...
...
@@ -362,7 +362,7 @@ begin
GeneratePagination
(
TotalPages
);
except
on
E
:
EXDataClientRequestException
do
Utils
.
ShowErrorModal
(
'Could not retrieve users: '
+
E
.
ErrorResult
.
ErrorMessage
);
Utils
.
ShowErrorModal
(
E
.
ErrorResult
.
ErrorMessage
);
end
;
Utils
.
HideSpinner
(
'spinner'
);
end
;
...
...
kgOrdersServer/Source/Lookup.Service.pas
View file @
a143692e
...
...
@@ -47,6 +47,7 @@ type
name
:
string
;
description
:
string
;
status
:
string
;
QB_ID
:
string
;
end
;
TItemList
=
class
...
...
@@ -481,7 +482,7 @@ type
[
HttpGet
]
function
GetOrder
(
orderInfo
:
string
):
TFullOrder
;
[
HttpGet
]
function
GetWebOrder
(
orderInfo
:
string
):
TWebOrder
;
[
HttpGet
]
function
GetCuttingDieOrder
(
orderInfo
:
string
):
TCuttingDie
;
[
HttpGet
]
function
GetCustomers
():
TCustomerList
;
[
HttpGet
]
function
GetCustomers
(
customerInfo
:
string
):
TCustomerList
;
[
HttpGet
]
function
GetCustomer
(
ID
:
string
):
TCustomerItem
;
[
HttpGet
]
function
GenerateOrderListPDF
(
searchOptions
:
string
):
string
;
[
HttpGet
]
function
GenerateOrderCorrugatedPDF
(
orderID
:
string
):
string
;
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
a143692e
This diff is collapsed.
Click to expand it.
kgOrdersServer/kgOrdersServer.ini
View file @
a143692e
...
...
@@ -2,7 +2,7 @@
MemoLogLevel
=
3
FileLogLevel
=
5
webClientVersion
=
0.9.7
LogFileNum
=
8
26
LogFileNum
=
8
44
[Database]
Server
=
192.168.159.144
...
...
@@ -17,6 +17,8 @@ Password=emsys01
CompanyID
=
9341454272655710
ClientID
=
ABgO14uvjh8XqLud7spQ8lkb98AUpcdA7HbyMJfCAtl65sQ5yy
ClientSecret
=
bQ06TRemHeAGFzVHRaTUvUoBU9jpU9itK6MOMgqN
RefreshToken
=
RT1-10-H0-1760618473k44t73jittvqlr4wynn6
AccessToken
=
eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..IwosInYT2Am8LdNGXuY-zQ._QdW6AZ0up2uAna580wQy7qAZPo3nkfHo0eeSpKllcJ_s69nh33Ld41MnTkxeAv1v1bxhvkDxEvkevfNGnggNHU3XSqIqb6tTKcAqR4zPf14JYgOkn82tw_q2VXWLgboMMpP6CfcBHeZPIbJcEOkmX5g4CY0NOum1-_beYmDHE2sxAxnKxcg3rhjBo33BTFjXSg1xknvkTO_GVbyAWdyZmQOpFRfdXAeUDnPAEZhYNVfACFkEDubdK7PyfcAs_7un_E0NZf270tMc2W0HTyk24wCSLbfeeH2Su-G2wi21JszcNsXSNt9ayGtHEXNcWG6A54k1M8U7o_mvpCXLPEXDtJkx8HnBvTz_ZXrFaztQf0_c8DLld5zW8FC1wn-SzHyoCbYbR2M6tBjVLiK80_FlAal_YjBI8fk9BX7nBab6LbCBIcunt7hRsLWCPiRI8_fwM_Nj8rlvxtIoClcyV7_VpIpxCVUgmxKmgf7zuWD3fYc3i8Bg-DpgGgWPVATXSlfNKhOWIDZfyy0YOlkreXPlNdQwCJ1Su3_3yzu_DioV76C5orqoeWk25NiopiAqJ7cBMj15EiuFx-w3jaqCv6ovzEc5r3by510TNu6msjUh2RQ-nxVqLjyLt6VIp3O00e_.2itJJ0rFwI-foW2v1hDSrw
LastRefresh
=
7/7/2025 1:49:30 PM
RefreshToken
=
RT1-119-H0-176089178955akizxqky85tnrj9nnl
AccessToken
=
eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..nC8S1UW9Us5C-eV2R-Pz3Q.VQrMSJBJ_25MmQ0tiuGnhYhzDRhQhIOkV92ScgMb4ikGyYq4Br3QFT4AYA73WMEzD3uFLxKiCYdJ7I-B2L2q4u1YCg2n5vWLfmljecOvN64DVQNTksUFC71_9pUFtHL0VlqmV-p2RN2QDhnFjnGFa8CXRGW9K8njUWBrZdeJs4M2NRfbIJWdC2JnY2Fq3X5W26xc9cLXpY5BmijXEu8I7AK25NH7r2ZLdGrrh0aGmOj3JgnW68fYLaGONfBSgRcLyW69jDjM21DP1ujflaf9O2BGDb5LctGv-KgyZ-j9OVCMp7otPevN-o3DGL-Bdawmy_ZDN9L2USSSIXal4S3a6Q25_sOkoI7mp4R_onrsProjids8hzsUTSg7bfWOTu7elG_Hjie2cuZvH3eBsYMd8a-sAOo6hZrECUhHFjpULsRiGRIMLCU3nAOHlGP_IFxgIczYGDx27i54CZhvYgLZR7XBnhlpWMLIntogrU50FSw.4pHLJDZLlpzFGjk-oRqTtQ
LastRefresh
=
7/11/2025 11:51:34 AM
--RefreshToken
=
RT1-10-H0-1760618473k44t73jittvqlr4wynn6
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