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
d00a993f
Commit
d00a993f
authored
Apr 17, 2025
by
Cam Hayes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Most of Order Entry is finished on every page now beginning to work on tracking changes
parent
9bbaf56d
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1078 additions
and
574 deletions
+1078
-574
View.OrderEntryCorrugated.dfm
kgOrdersClient/View.OrderEntryCorrugated.dfm
+33
-3
View.OrderEntryCorrugated.html
kgOrdersClient/View.OrderEntryCorrugated.html
+26
-0
View.OrderEntryCorrugated.pas
kgOrdersClient/View.OrderEntryCorrugated.pas
+107
-16
View.OrderEntryCuttingDie.dfm
kgOrdersClient/View.OrderEntryCuttingDie.dfm
+75
-10
View.OrderEntryCuttingDie.html
kgOrdersClient/View.OrderEntryCuttingDie.html
+41
-3
View.OrderEntryCuttingDie.pas
kgOrdersClient/View.OrderEntryCuttingDie.pas
+132
-4
View.OrderEntryWeb.dfm
kgOrdersClient/View.OrderEntryWeb.dfm
+31
-1
View.OrderEntryWeb.html
kgOrdersClient/View.OrderEntryWeb.html
+405
-378
View.OrderEntryWeb.pas
kgOrdersClient/View.OrderEntryWeb.pas
+99
-3
View.Orders.dfm
kgOrdersClient/View.Orders.dfm
+1
-0
View.Orders.pas
kgOrdersClient/View.Orders.pas
+0
-1
View.Search.dfm
kgOrdersClient/View.Search.dfm
+7
-7
View.Search.pas
kgOrdersClient/View.Search.pas
+5
-3
Data.dfm
kgOrdersServer/Source/Data.dfm
+1
-113
Data.pas
kgOrdersServer/Source/Data.pas
+0
-1
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+113
-29
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+2
-2
No files found.
kgOrdersClient/View.OrderEntryCorrugated.dfm
View file @
d00a993f
...
...
@@ -1173,6 +1173,29 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
WidthPercent = 100.000000000000000000
OnClick = btnCloseClick
end
object edtOrderNum: TWebEdit
Left = 126
Top = 194
Width = 121
Height = 22
ChildOrder = 81
ElementID = 'edtordernum'
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btn_confirm_delete: TWebButton
Left = 1094
Top = 414
Width = 96
Height = 25
Caption = 'Delete'
ChildOrder = 82
ElementID = 'btn_confirm_delete'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btn_confirm_deleteClick
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left = 1014
...
...
@@ -1185,7 +1208,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
Top = 256
end
object XDataWebDataSet1: TXDataWebDataSet
AfterEdit = XDataWebDataSet1AfterEdit
Connection = DMConnection.ApiConnection
Left = 1060
Top = 182
...
...
@@ -1478,11 +1500,12 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
end
object WebDataSource1: TWebDataSource
DataSet = XDataWebDataSet1
Left = 117
0
Top = 1
9
2
Left = 117
6
Top = 1
8
2
end
object wdsShipTo: TWebDataSource
DataSet = xdwdsShipTo
OnDataChange = wdsShipToDataChange
Left = 1090
Top = 124
end
...
...
@@ -1495,6 +1518,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
end
object wdsQBItem: TWebDataSource
DataSet = xdwdsQBItem
OnDataChange = wdsQBItemDataChange
Left = 1172
Top = 128
end
...
...
@@ -1505,4 +1529,10 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
FieldName = 'name'
end
end
object tmrReturn: TWebTimer
Enabled = False
OnTimer = tmrReturnTimer
Left = 308
Top = 124
end
end
kgOrdersClient/View.OrderEntryCorrugated.html
View file @
d00a993f
...
...
@@ -31,6 +31,10 @@
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Order Num:
</label>
<input
id=
"edtordernum"
class=
"form-control input-sm"
style=
"width: 100px"
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Order Date:
</label>
<input
class=
"form-control input-sm"
id=
"dtporderdate"
type=
"date"
>
</div>
...
...
@@ -324,3 +328,25 @@
</div>
</div>
<div
class=
"modal fade"
id=
"confirmation_modal"
tabindex=
"-1"
aria-labelledby=
"confirmation_modal_label"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"confirmation_modal_label"
>
Confirm
</h5>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
</div>
<div
class=
"modal-body"
>
Are you sure you want to delete this order?
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary"
data-bs-dismiss=
"modal"
>
Cancel
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-bs-dismiss=
"modal"
id=
"btn_confirm_delete"
>
Delete
</button>
</div>
</div>
</div>
</div>
<style>
.modal-backdrop
{
opacity
:
0
!important
;
}
</style>
kgOrdersClient/View.OrderEntryCorrugated.pas
View file @
d00a993f
...
...
@@ -197,6 +197,9 @@ type
btnCopy
:
TWebButton
;
btnDelete
:
TWebButton
;
btnClose
:
TWebButton
;
edtOrderNum
:
TWebEdit
;
btn_confirm_delete
:
TWebButton
;
tmrReturn
:
TWebTimer
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
HideNotification
();
procedure
ShowNotification
(
Notification
:
string
);
...
...
@@ -214,10 +217,14 @@ type
procedure
btnPDFClick
(
Sender
:
TObject
);
procedure
btnCopyClick
(
Sender
:
TObject
);
procedure
sendOrderToServer
();
procedure
XDataWebDataSet1AfterEdit
(
DataSet
:
TDataSet
);
procedure
btnCloseClick
(
Sender
:
TObject
);
procedure
btnCloseNotificationClick
(
Sender
:
TObject
);
procedure
btnDeleteClick
(
Sender
:
TObject
);
procedure
wdsShipToDataChange
(
Sender
:
TObject
;
Field
:
TField
);
procedure
wdsQBItemDataChange
(
Sender
:
TObject
;
Field
:
TField
);
procedure
btn_confirm_deleteClick
(
Sender
:
TObject
);
procedure
tmrReturnTimer
(
Sender
:
TObject
);
function
VerifyOrder
():
boolean
;
private
FAgencyCode
:
string
;
FCurrentReportType
:
string
;
...
...
@@ -377,21 +384,61 @@ begin
if
mode
=
'ADD'
then
ShowNotification
(
'Success:Order Added Successfully!'
)
else
ShowNotification
(
'Success:Order Edited Successfully'
)
ShowNotification
(
'Success:Order Edited Successfully'
);
AddCorrugatedOrder
(
orderJSON
);
end
;
procedure
TFOrderEntryCorrugated
.
btnConfirmClick
(
Sender
:
TObject
);
// Converts all the information on the page into a JSON to then send to the server
begin
sendOrderToServer
();
if
VerifyOrder
()
then
begin
sendOrderToServer
();
btnPDF
.
Enabled
:=
true
;
btnDelete
.
Enabled
:=
true
;
end
;
window
.
scrollTo
(
0
,
0
);
end
;
function
TFOrderEntryCorrugated
.
VerifyOrder
:
Boolean
;
begin
result
:=
true
;
if
edtCompanyName
.
Text
=
''
then
begin
showNotification
(
'Failure:Orders Must Have a Company Name'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
if
edtCompanyAccountName
.
Text
=
''
then
begin
showNotification
(
'Failure:Orders Must Have a Company Account Name'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
if
edtInvoiceTo
.
Text
=
''
then
begin
showNotification
(
'Failure:Orders Must Have an Invoice Address'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
if
WebDBComboBox1
.
Text
=
''
then
begin
showNotification
(
'Failure:Orders Must Have a Billing Address'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
if
dtpOrderDate
.
Date
=
0
then
begin
showNotification
(
'Failure:Orders Must Have an Order Date'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
end
;
procedure
TFOrderEntryCorrugated
.
btnCopyClick
(
Sender
:
TObject
);
begin
mode
:=
'ADD'
;
//sendOrderToServer();
window
.
scrollTo
(
0
,
0
);
dtpOrderDate
.
Date
:=
0
;
dtpProofDate
.
Date
:=
0
;
...
...
@@ -400,15 +447,20 @@ begin
dtpMountDue
.
Date
:=
0
;
dtpShipDate
.
Date
:=
0
;
dtpApprovedDate
.
Date
:=
0
;
edtOrderNum
.
Text
:=
''
;
btnPDF
.
Enabled
:=
False
;
btnDelete
.
Enabled
:=
False
;
ShowNotification
(
'Success:Order Successfully Copied'
);
window
.
scrollTo
(
0
,
0
);
end
;
procedure
TFOrderEntryCorrugated
.
btnDeleteClick
(
Sender
:
TObject
);
begin
//mode := 'DEL';
//sendOrderToServer();
DelOrder
();
asm
var
confirmationModal
=
new
bootstrap
.
Modal
(
document
.
getElementById
(
'confirmation_modal'
),
{
keyboard: false }
);
confirmationModal
.
show
();
end
;
end
;
procedure
TFOrderEntryCorrugated
.
btnPDFClick
(
Sender
:
TObject
);
...
...
@@ -419,6 +471,18 @@ begin
showNotification
(
'Failure:Cannot Generate PDF when Adding an Order'
);
end
;
procedure
TFOrderEntryCorrugated
.
btn_confirm_deleteClick
(
Sender
:
TObject
);
begin
asm
var
confirmationModal
=
new
bootstrap
.
Modal
(
document
.
getElementById
(
'confirmation_modal'
),
{
keyboard: false }
);
confirmationModal
.
hide
();
startSpinner
();
end
;
delOrder
();
tmrReturn
.
Enabled
:=
true
;
end
;
[
async
]
procedure
TFOrderEntryCorrugated
.
GenerateReportPDF
;
// sends the search to the server which then sends back a pdf of the results
var
...
...
@@ -449,8 +513,6 @@ begin
jsObj
:=
JS
.
TJSObject
(
Response
.
Result
);
OrderID
:=
JS
.
toString
(
jsObj
.
Properties
[
'OrderID'
]);
mode
:=
'EDIT'
;
console
.
log
(
mode
);
console
.
log
(
OrderID
);
end
;
procedure
TFOrderEntryCorrugated
.
DelOrder
();
...
...
@@ -750,23 +812,31 @@ begin
xdwdsQBItem
.
SetJsonData
(
items
[
'data'
]);
xdwdsQBITEM
.
Open
;
dtpOrderDate
.
Date
:=
0
;
dtpProofDate
.
Date
:=
0
;
dtpArtDue
.
Date
:=
0
;
dtpPlateDue
.
Date
:=
0
;
dtpMountDue
.
Date
:=
0
;
dtpShipDate
.
Date
:=
0
;
dtpApprovedDate
.
Date
:=
0
;
end
;
procedure
TFOrderEntryCorrugated
.
WebFormShow
(
Sender
:
TObject
);
begin
if
mode
<>
'ADD'
then
getOrder
(
orderID
)
begin
getOrder
(
orderID
);
end
else
begin
getCustomer
(
customerID
);
btnPDF
.
Enabled
:=
False
;
btnDelete
.
Enabled
:=
False
;
end
;
edtOrderNum
.
Text
:=
OrderID
;
HideNotification
();
end
;
procedure
TFOrderEntryCorrugated
.
XDataWebDataSet1AfterEdit
(
DataSet
:
TDataSet
);
begin
//this only works for the first time it is changed
console
.
log
(
'change'
);
end
;
procedure
TFOrderEntryCorrugated
.
HideNotification
;
begin
pnlMessage
.
ElementHandle
.
hidden
:=
True
;
...
...
@@ -801,12 +871,33 @@ begin
end
;
procedure
TFOrderEntryCorrugated
.
tmrReturnTimer
(
Sender
:
TObject
);
begin
asm
endSpinner
();
end
;
tmrReturn
.
Enabled
:=
false
;
FViewMain
.
ViewOrders
(
'Success: Order Successfully Deleted'
);
end
;
procedure
TFOrderEntryCorrugated
.
tmrScrollTopTimer
(
Sender
:
TObject
);
begin
tmrScrollTop
.
Enabled
:=
False
;
window
.
scrollTo
(
0
,
0
);
end
;
procedure
TFOrderEntryCorrugated
.
wdsQBItemDataChange
(
Sender
:
TObject
;
Field
:
TField
);
begin
console
.
log
(
'change'
);
end
;
procedure
TFOrderEntryCorrugated
.
wdsShipToDataChange
(
Sender
:
TObject
;
Field
:
TField
);
begin
console
.
log
(
'change'
);
end
;
initialization
RegisterClass
(
TFOrderEntryCorrugated
);
...
...
kgOrdersClient/View.OrderEntryCuttingDie.dfm
View file @
d00a993f
...
...
@@ -202,11 +202,11 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
DataSource = WebDataSource1
end
object btnConfirm: TWebButton
Left =
652
Top = 5
60
Left =
566
Top = 5
38
Width = 96
Height = 25
Caption = '
Confirm
'
Caption = '
Save
'
ChildOrder = 79
ElementID = 'btnconfirm'
HeightPercent = 100.000000000000000000
...
...
@@ -214,8 +214,8 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
OnClick = btnConfirmClick
end
object btnCancel: TWebButton
Left =
764
Top = 5
60
Left =
680
Top = 5
38
Width = 96
Height = 25
Caption = 'Cancel'
...
...
@@ -230,7 +230,7 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
Top = 19
Width = 121
Height = 33
ElementID = '
pnl_
message'
ElementID = '
view.login.
message'
ChildOrder = 5
ElementPosition = epRelative
Role = 'alert'
...
...
@@ -289,8 +289,8 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
ListSource = wdsQBItem
end
object btnPDF: TWebButton
Left = 7
10
Top =
610
Left = 7
82
Top =
537
Width = 96
Height = 25
Caption = 'PDF'
...
...
@@ -300,6 +300,65 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
WidthPercent = 100.000000000000000000
OnClick = btnPDFClick
end
object edtOrderNum: TWebEdit
Left = 126
Top = 194
Width = 121
Height = 22
ChildOrder = 81
ElementID = 'edtordernum'
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnDelete: TWebButton
Left = 574
Top = 578
Width = 96
Height = 25
Caption = 'Delete'
ChildOrder = 79
ElementID = 'btndelete'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnDeleteClick
end
object btnClose: TWebButton
Left = 684
Top = 573
Width = 96
Height = 25
Caption = 'Close'
ChildOrder = 80
ElementID = 'btnclose'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnCloseClick
end
object btn_confirm_delete: TWebButton
Left = 860
Top = 414
Width = 96
Height = 25
Caption = 'Delete'
ChildOrder = 82
ElementID = 'btn_confirm_delete'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btn_confirm_deleteClick
end
object btnCopy: TWebButton
Left = 786
Top = 573
Width = 96
Height = 25
Caption = 'Copy'
ChildOrder = 78
ElementID = 'btncopy'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnCopyClick
end
object WebDataSource1: TWebDataSource
DataSet = XDataWebDataSet1
Left = 22
...
...
@@ -372,8 +431,8 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left = 1
60
Top =
18
Left = 1
92
Top =
92
end
object tmrScrollTop: TWebTimer
Interval = 100
...
...
@@ -405,4 +464,10 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
FieldName = 'name'
end
end
object tmrReturn: TWebTimer
Enabled = False
OnTimer = tmrReturnTimer
Left = 306
Top = 62
end
end
kgOrdersClient/View.OrderEntryCuttingDie.html
View file @
d00a993f
<div
class=
"col-12 col-md-8"
>
<div
class=
"row"
>
<div
class=
col-sm
>
<div
id=
"pnl_message"
class=
"alert alert-danger"
>
<div
class=
col-sm
>
<div
id=
"view.login.message"
class=
"alert alert-danger"
>
<button
id=
"view.login.message.button"
type=
"button"
class=
"btn-close"
aria-label=
"Close"
></button>
<span
id=
"view.login.message.label"
></span>
</div>
</div>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Company
</h4>
<hr
class=
"custom-hr"
>
...
...
@@ -27,6 +29,10 @@
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Order Num:
</label>
<input
id=
"edtordernum"
class=
"form-control input-sm"
style=
"width: 100px"
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Order Date:
</label>
<input
class=
"form-control input-sm"
id=
"dtporderdate"
type=
"date"
>
</div>
...
...
@@ -79,15 +85,47 @@
<textarea
id=
"edtspecialinstructions"
class=
"form-control"
style=
" width: 500px; height: 150px;"
></textarea>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<button
id=
"btnconfirm"
class=
"btn btn-primary btn-sm float-end my-2"
>
Confirm
</button>
<button
id=
"btnconfirm"
class=
"btn btn-primary btn-sm float-end my-2"
>
Save
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btncancel"
class=
"btn btn-primary btn-sm float-end my-2"
>
Cancel
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btncopy"
class=
"btn btn-primary btn-sm float-end my-2"
>
Copy
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btnpdf"
class=
"btn btn-primary btn-sm float-end my-2"
>
PDF
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btndelete"
class=
"btn btn-primary btn-sm float-end my-2"
>
Delete
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btnclose"
class=
"btn btn-primary btn-sm float-end my-2"
>
Close
</button>
</div>
</div>
</div>
<div
class=
"modal fade"
id=
"confirmation_modal"
tabindex=
"-1"
aria-labelledby=
"confirmation_modal_label"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"confirmation_modal_label"
>
Confirm
</h5>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
</div>
<div
class=
"modal-body"
>
Are you sure you want to delete this order?
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary"
data-bs-dismiss=
"modal"
>
Cancel
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-bs-dismiss=
"modal"
id=
"btn_confirm_delete"
>
Delete
</button>
</div>
</div>
</div>
</div>
</div>
<style>
.modal-backdrop
{
opacity
:
0
!important
;
}
</style>
kgOrdersClient/View.OrderEntryCuttingDie.pas
View file @
d00a993f
...
...
@@ -65,6 +65,12 @@ type
xdwdsQBItemname
:
TStringField
;
wcbQBItem
:
TWebDBComboBox
;
btnPDF
:
TWebButton
;
edtOrderNum
:
TWebEdit
;
btnDelete
:
TWebButton
;
btnClose
:
TWebButton
;
btn_confirm_delete
:
TWebButton
;
btnCopy
:
TWebButton
;
tmrReturn
:
TWebTimer
;
procedure
btnConfirmClick
(
Sender
:
TObject
);
procedure
btnCancelClick
(
Sender
:
TObject
);
procedure
WebFormCreate
(
Sender
:
TObject
);
...
...
@@ -77,6 +83,14 @@ type
[
async
]
procedure
AddCuttingDieOrder
(
orderJSON
:
TJSONObject
);
procedure
btnPDFClick
(
Sender
:
TObject
);
[
async
]
procedure
GenerateReportPDF
;
procedure
SendOrderToServer
();
function
VerifyOrder
():
boolean
;
procedure
btnDeleteClick
(
Sender
:
TObject
);
[
async
]
procedure
delOrder
();
procedure
btnCloseClick
(
Sender
:
TObject
);
procedure
btnCopyClick
(
Sender
:
TObject
);
procedure
btn_confirm_deleteClick
(
Sender
:
TObject
);
procedure
tmrReturnTimer
(
Sender
:
TObject
);
private
FAgencyCode
:
string
;
FCurrentReportType
:
string
;
...
...
@@ -98,10 +112,43 @@ implementation
uses
View
.
Home
,
View
.
Main
;
procedure
TFOrderEntryCuttingDie
.
btnConfirmClick
(
Sender
:
TObject
);
// Converts all the information on the page into a JSON to then send to the server
function
TFOrderEntryCuttingDie
.
VerifyOrder
:
Boolean
;
begin
result
:=
true
;
if
edtCompanyName
.
Text
=
''
then
begin
showNotification
(
'Failure:Orders Must Have a Company Name'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
if
edtCompanyAccountName
.
Text
=
''
then
begin
showNotification
(
'Failure:Orders Must Have a Company Account Name'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
if
edtInvoiceTo
.
Text
=
''
then
begin
showNotification
(
'Failure:Orders Must Have an Invoice Address'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
if
wdbcbShipTo
.
Text
=
''
then
begin
showNotification
(
'Failure:Orders Must Have a Billing Address'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
if
dtpOrderDate
.
Date
=
0
then
begin
showNotification
(
'Failure:Orders Must Have an Order Date'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
end
;
procedure
TFOrderEntryCuttingDie
.
SendOrderToServer
;
var
I
,
J
:
integer
;
orderJSON
:
TJSONObject
;
fieldNames
:
TStringList
;
itemList
:
TJSNodeList
;
...
...
@@ -147,8 +194,62 @@ begin
orderJSON
.
AddPair
(
'ORDER_ID'
,
orderID
);
console
.
log
(
orderJSON
.
GetValue
(
'ORDER_ID'
));
console
.
log
(
orderJSON
);
if
mode
=
'ADD'
then
ShowNotification
(
'Success:Order Added Successfully!'
)
else
ShowNotification
(
'Success:Order Edited Successfully'
);
AddCuttingDieOrder
(
orderJSON
);
FViewMain
.
ViewOrders
(
'Success:Order added successfully!'
);
end
;
procedure
TFOrderEntryCuttingDie
.
btnConfirmClick
(
Sender
:
TObject
);
// Converts all the information on the page into a JSON to then send to the server
var
I
,
J
:
integer
;
orderJSON
:
TJSONObject
;
fieldNames
:
TStringList
;
itemList
:
TJSNodeList
;
header
,
value
:
string
;
Field
:
TField
;
Response
:
TXDataClientResponse
;
begin
if
VerifyOrder
()
then
begin
sendOrderToServer
();
btnPDF
.
Enabled
:=
true
;
btnDelete
.
Enabled
:=
true
;
end
;
window
.
scrollTo
(
0
,
0
);
end
;
procedure
TFOrderEntryCuttingDie
.
btnCopyClick
(
Sender
:
TObject
);
begin
mode
:=
'ADD'
;
dtpOrderDate
.
Date
:=
0
;
dtpProofDate
.
Date
:=
0
;
edtOrderNum
.
Text
:=
''
;
btnPDF
.
Enabled
:=
False
;
btnDelete
.
Enabled
:=
False
;
ShowNotification
(
'Success:Order Successfully Copied'
);
window
.
scrollTo
(
0
,
0
);
end
;
procedure
TFOrderEntryCuttingDie
.
btnDeleteClick
(
Sender
:
TObject
);
begin
asm
var
confirmationModal
=
new
bootstrap
.
Modal
(
document
.
getElementById
(
'confirmation_modal'
),
{
keyboard: false }
);
confirmationModal
.
show
();
end
;
end
;
procedure
TFOrderEntryCuttingDie
.
DelOrder
();
var
Response
:
TXDataClientResponse
;
begin
Response
:=
await
(
XDataWebClient1
.
RawInvokeAsync
(
'ILookupService.DelOrder'
,
[
OrderID
,
'corrugated'
,
JS
.
toString
(
AuthService
.
TokenPayload
.
Properties
[
'user_id'
])]));
end
;
procedure
TFOrderEntryCuttingDie
.
btnPDFClick
(
Sender
:
TObject
);
...
...
@@ -156,6 +257,18 @@ begin
GenerateReportPDF
;
end
;
procedure
TFOrderEntryCuttingDie
.
btn_confirm_deleteClick
(
Sender
:
TObject
);
begin
asm
var
confirmationModal
=
new
bootstrap
.
Modal
(
document
.
getElementById
(
'confirmation_modal'
),
{
keyboard: false }
);
confirmationModal
.
hide
();
startSpinner
();
end
;
delOrder
();
tmrReturn
.
Enabled
:=
true
;
end
;
[
async
]
procedure
TFOrderEntryCuttingDie
.
GenerateReportPDF
;
// sends the search to the server which then sends back a pdf of the results
var
...
...
@@ -206,6 +319,11 @@ end;
procedure
TFOrderEntryCuttingDie
.
btnCancelClick
(
Sender
:
TObject
);
begin
//FViewMain.ViewOrders('');
end
;
procedure
TFOrderEntryCuttingDie
.
btnCloseClick
(
Sender
:
TObject
);
begin
FViewMain
.
ViewOrders
(
''
);
end
;
...
...
@@ -306,6 +424,7 @@ begin
getCuttingDieOrder
(
orderID
)
else
getCustomer
(
customerID
);
edtOrderNum
.
Text
:=
OrderID
;
HideNotification
();
end
;
...
...
@@ -324,6 +443,15 @@ begin
end
;
procedure
TFOrderEntryCuttingDie
.
tmrReturnTimer
(
Sender
:
TObject
);
begin
asm
endSpinner
();
end
;
tmrReturn
.
Enabled
:=
false
;
FViewMain
.
ViewOrders
(
'Success: Order Successfully Deleted'
);
end
;
procedure
TFOrderEntryCuttingDie
.
tmrScrollTopTimer
(
Sender
:
TObject
);
begin
tmrScrollTop
.
Enabled
:=
False
;
...
...
kgOrdersClient/View.OrderEntryWeb.dfm
View file @
d00a993f
...
...
@@ -117,7 +117,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
Top = 19
Width = 121
Height = 33
ElementID = '
pnl_
message'
ElementID = '
view.login.
message'
ChildOrder = 5
ElementPosition = epRelative
Role = 'alert'
...
...
@@ -147,6 +147,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
Role = 'button'
WidthStyle = ssAuto
WidthPercent = 100.000000000000000000
OnClick = btnCloseNotificationClick
end
end
object edtCompanyName: TWebDBEdit
...
...
@@ -1222,6 +1223,29 @@ object FOrderEntryWeb: TFOrderEntryWeb
WidthPercent = 100.000000000000000000
OnClick = btnCloseClick
end
object edtOrderNum: TWebEdit
Left = 126
Top = 194
Width = 121
Height = 22
ChildOrder = 81
ElementID = 'edtordernum'
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btn_confirm_delete: TWebButton
Left = 1094
Top = 414
Width = 96
Height = 25
Caption = 'Delete'
ChildOrder = 82
ElementID = 'btn_confirm_delete'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btn_confirm_deleteClick
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left = 160
...
...
@@ -1521,4 +1545,10 @@ object FOrderEntryWeb: TFOrderEntryWeb
FieldName = 'name'
end
end
object tmrReturn: TWebTimer
Enabled = False
OnTimer = tmrReturnTimer
Left = 306
Top = 62
end
end
kgOrdersClient/View.OrderEntryWeb.html
View file @
d00a993f
<div
class=
"col-12 col-md-8"
>
<div
class=
"row"
>
<div
class=
col-sm
>
<div
id=
"pnl_message"
class=
"alert alert-danger"
>
<button
id=
"view.login.message.button"
type=
"button"
class=
"btn-close"
aria-label=
"Close"
></button>
<span
id=
"view.login.message.label"
></span>
</div>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Company
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
class=
"form-label mt-2"
>
Company Name:
</label>
<input
id=
"edtcompanyname"
type=
"text"
class=
"form-control"
style=
"width: 300px;"
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2"
>
Account Company Name:
</label>
<input
id=
"edtaccountcompanyname"
type=
"text"
class=
"form-control"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2"
>
In Quickbooks?:
</label>
<input
id=
"edtinquickbooks"
type=
"text"
class=
"form-control"
style=
"width: 150px"
/>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Staff Fields
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Order Date:
</label>
<input
class=
"form-control input-sm"
id=
"dtporderdate"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Proof Date:
</label>
<input
class=
"form-control input-sm"
id=
"dtpproofdate"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ship Date:
</label>
<input
class=
"form-control input-sm"
id=
"dtpshipdate"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ship Via:
</label>
<input
id=
"edtshipvia"
type=
"text"
class=
"form-control"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Quantity:
</label>
<input
id=
"edtquantity"
class=
"form-control input-sm"
style=
"width: 100px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Price:
</label>
<input
id=
"edtprice"
class=
"form-control input-sm"
style=
"width: 100px"
type=
"number"
min=
"0"
/>
</div>
<div>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Invoice To:
</label>
<input
id=
"edtinvoiceto"
class=
"form-control input-sm"
/>
</div>
<div>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ship To:
</label>
<select
id=
"wcbshipto"
class=
'form-select'
></select>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
PO Number:
</label>
<input
id=
"edtponumber"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Job Name:
</label>
<input
id=
"edtjobname"
class=
"form-control input-sm"
style=
"width: 300px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
QuickBooks Item:
</label>
<select
id=
"wcbqbitem"
class=
'form-select'
></select>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Art Due:
</label>
<input
class=
"form-control input-sm"
id=
"dtpartdue"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Plate Due:
</label>
<input
class=
"form-control input-sm"
id=
"dtpplatedue"
type=
"date"
>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Supplied by Customer
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
B/W or Color Copy:
</label>
<input
id=
"edtbworcolorcopy"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Plates:
</label>
<input
id=
"edtplates"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Sample:
</label>
<input
id=
"edtsample"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Dimensional Layout:
</label>
<input
id=
"edtdimensionallayout"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Other:
</label>
<input
id=
"edtother"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Email:
</label>
<input
id=
"edtemail"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
FTP:
</label>
<input
id=
"edtftp"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Total Inches Used:
</label>
<input
id=
"edttotalinchesused"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Sheets Used:
</label>
<input
id=
"edtsheetsused"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Initials:
</label>
<input
id=
"edtinitials"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Proofing
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
PDF:
</label>
<input
type=
"checkbox"
id=
"cbpdf"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
PDF To:
</label>
<input
id=
"edtpdfto"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
PDF Date 1:
</label>
<input
class=
"form-control input-sm"
id=
"dtppdfdate1"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
PDF Date 2:
</label>
<input
class=
"form-control input-sm"
id=
"dtppdfdate2"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
PDF Date 3:
</label>
<input
class=
"form-control input-sm"
id=
"dtppdfdate3"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Full Size Ink Jet For Layout Content Only:
</label>
<input
type=
"checkbox"
id=
"cbfullsizeinkjet"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ink Jet To:
</label>
<input
id=
"edtinkjetto"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ink Jet To 2:
</label>
<input
id=
"edtinkjetto2"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ink Jet Date 1:
</label>
<input
class=
"form-control input-sm"
id=
"dtpinkjetdate1"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ink Jet Date 2:
</label>
<input
class=
"form-control input-sm"
id=
"dtpinkjetdate2"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ink Jet Date 3:
</label>
<input
class=
"form-control input-sm"
id=
"dtpinkjetdate3"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Color Contract:
</label>
<select
id=
"wcbcolorcontract"
class=
'form-select'
></select>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Color Contract To:
</label>
<input
id=
"edtcolorcontrastto"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Color Contrast Date 1:
</label>
<input
class=
"form-control input-sm"
id=
"dtpcolorcontrastdate1"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Color Contrast Date 2:
</label>
<input
class=
"form-control input-sm"
id=
"dtpcolorcontrastdate2"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Digital Color Key:
</label>
<input
id=
"edtdigitalcolorkey"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Digital Color To:
</label>
<input
id=
"edtdigitalcolorto"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Digital Color Date:
</label>
<input
class=
"form-control input-sm"
id=
"dtpdigitalcolordate"
type=
"date"
>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Quantity and Colors
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Press Name:
</label>
<input
id=
"edtpressname"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Anilax Info:
</label>
<input
id=
"edtanilaxinfo"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Colors:
</label>
<button
id=
"btnaddcolor"
class=
"btn btn-primary btn-sm float-end"
>
+
</button>
<div
id=
"additionalFields"
class=
"row mt-3"
></div>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Plate Marks
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Microdots:
</label>
<input
id=
"edtmicrodots"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Microdots Comments:
</label>
<input
id=
"edtmicrodotscomments"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Crosshairs:
</label>
<input
id=
"edtcrosshairs"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Crosshairs Comments:
</label>
<input
id=
"edtcrosshairscomments"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Color Bars:
</label>
<input
id=
"edtcolorbars"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Color Bars Comments:
</label>
<input
id=
"edtcolorbarscomments"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Other:
</label>
<input
id=
"edtplateother"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Microdots Comments:
</label>
<input
id=
"edtplateothercomments"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Layout
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Around:
</label>
<input
id=
"edtaround"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Accross:
</label>
<input
id=
"edtaccross"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Surface Print:
</label>
<input
id=
"edtsurfaceprint"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Reverse Print:
</label>
<input
id=
"edtreverseprint"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Cylinder Repeat:
</label>
<input
id=
"edtcylinderrepeat"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Cutoff Dimension:
</label>
<input
id=
"edtcutoffdimension"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Pitch:
</label>
<input
id=
"edtpitch"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Teeth:
</label>
<input
id=
"edtteeth"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Bleed:
</label>
<input
id=
"edtbleed"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Cutback:
</label>
<input
id=
"edtcutback"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Minimum Trap Dimension:
</label>
<input
id=
"edtminimumtrapdimension"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Maximum Trap Dimension:
</label>
<input
id=
"edtmaximumtrapdimension"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Print Orientation
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Print Orientation:
</label>
<select
id=
"wcbprint"
class=
'form-select'
></select>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
UPC
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Size:
</label>
<input
id=
"edtsize"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Bar Width Reduction:
</label>
<input
id=
"edtbarwidthreduction"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Distortion Percent:
</label>
<input
id=
"edtdistortionpercent"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Distortion Amount:
</label>
<input
id=
"edtdistortionamount"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<h4
class=
"custom-h4 mt-3"
>
Plates
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Thickness:
</label>
<select
id=
"wcbthickness"
class=
'form-select'
></select>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Plate Material:
</label>
<select
id=
"wcbmaterial"
class=
'form-select'
></select>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Job Number:
</label>
<input
id=
"edtjobnumber"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
General
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label"
>
Comments
</label>
<textarea
id=
"edtcomments"
class=
"form-control"
style=
" width: 500px; height: 150px;"
></textarea>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<button
id=
"btnconfirm"
class=
"btn btn-primary btn-sm float-end my-2"
>
Save
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btncancel"
class=
"btn btn-primary btn-sm float-end my-2"
>
Cancel
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btncopy"
class=
"btn btn-primary btn-sm float-end my-2"
>
Copy
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btnpdf"
class=
"btn btn-primary btn-sm float-end my-2"
>
PDF
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btndelete"
class=
"btn btn-primary btn-sm float-end my-2"
>
Delete
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btnclose"
class=
"btn btn-primary btn-sm float-end my-2"
>
Close
</button>
</div>
</div>
</div>
<div
class=
"col-12 col-md-8"
>
<div
class=
"row"
>
<div
class=
col-sm
>
<div
id=
"view.login.message"
class=
"alert alert-danger"
>
<button
id=
"view.login.message.button"
type=
"button"
class=
"btn-close"
aria-label=
"Close"
></button>
<span
id=
"view.login.message.label"
></span>
</div>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Company
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
class=
"form-label mt-2"
>
Company Name:
</label>
<input
id=
"edtcompanyname"
type=
"text"
class=
"form-control"
style=
"width: 300px;"
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2"
>
Account Company Name:
</label>
<input
id=
"edtaccountcompanyname"
type=
"text"
class=
"form-control"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
class=
"form-label mt-2"
>
In Quickbooks?:
</label>
<input
id=
"edtinquickbooks"
type=
"text"
class=
"form-control"
style=
"width: 150px"
/>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Staff Fields
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Order Num:
</label>
<input
id=
"edtordernum"
class=
"form-control input-sm"
style=
"width: 100px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Order Date:
</label>
<input
class=
"form-control input-sm"
id=
"dtporderdate"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Proof Date:
</label>
<input
class=
"form-control input-sm"
id=
"dtpproofdate"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ship Date:
</label>
<input
class=
"form-control input-sm"
id=
"dtpshipdate"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ship Via:
</label>
<input
id=
"edtshipvia"
type=
"text"
class=
"form-control"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Quantity:
</label>
<input
id=
"edtquantity"
class=
"form-control input-sm"
style=
"width: 100px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Price:
</label>
<input
id=
"edtprice"
class=
"form-control input-sm"
style=
"width: 100px"
type=
"number"
min=
"0"
/>
</div>
<div>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Invoice To:
</label>
<input
id=
"edtinvoiceto"
class=
"form-control input-sm"
/>
</div>
<div>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ship To:
</label>
<select
id=
"wcbshipto"
class=
'form-select'
></select>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
PO Number:
</label>
<input
id=
"edtponumber"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Job Name:
</label>
<input
id=
"edtjobname"
class=
"form-control input-sm"
style=
"width: 300px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
QuickBooks Item:
</label>
<select
id=
"wcbqbitem"
class=
'form-select'
></select>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Art Due:
</label>
<input
class=
"form-control input-sm"
id=
"dtpartdue"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Plate Due:
</label>
<input
class=
"form-control input-sm"
id=
"dtpplatedue"
type=
"date"
>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Supplied by Customer
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
B/W or Color Copy:
</label>
<input
id=
"edtbworcolorcopy"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Plates:
</label>
<input
id=
"edtplates"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Sample:
</label>
<input
id=
"edtsample"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Dimensional Layout:
</label>
<input
id=
"edtdimensionallayout"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Other:
</label>
<input
id=
"edtother"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Email:
</label>
<input
id=
"edtemail"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
FTP:
</label>
<input
id=
"edtftp"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Total Inches Used:
</label>
<input
id=
"edttotalinchesused"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Sheets Used:
</label>
<input
id=
"edtsheetsused"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Initials:
</label>
<input
id=
"edtinitials"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Proofing
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
PDF:
</label>
<input
type=
"checkbox"
id=
"cbpdf"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
PDF To:
</label>
<input
id=
"edtpdfto"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
PDF Date 1:
</label>
<input
class=
"form-control input-sm"
id=
"dtppdfdate1"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
PDF Date 2:
</label>
<input
class=
"form-control input-sm"
id=
"dtppdfdate2"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
PDF Date 3:
</label>
<input
class=
"form-control input-sm"
id=
"dtppdfdate3"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Full Size Ink Jet For Layout Content Only:
</label>
<input
type=
"checkbox"
id=
"cbfullsizeinkjet"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ink Jet To:
</label>
<input
id=
"edtinkjetto"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ink Jet To 2:
</label>
<input
id=
"edtinkjetto2"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ink Jet Date 1:
</label>
<input
class=
"form-control input-sm"
id=
"dtpinkjetdate1"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ink Jet Date 2:
</label>
<input
class=
"form-control input-sm"
id=
"dtpinkjetdate2"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Ink Jet Date 3:
</label>
<input
class=
"form-control input-sm"
id=
"dtpinkjetdate3"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Color Contract:
</label>
<select
id=
"wcbcolorcontract"
class=
'form-select'
></select>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Color Contract To:
</label>
<input
id=
"edtcolorcontrastto"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Color Contrast Date 1:
</label>
<input
class=
"form-control input-sm"
id=
"dtpcolorcontrastdate1"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Color Contrast Date 2:
</label>
<input
class=
"form-control input-sm"
id=
"dtpcolorcontrastdate2"
type=
"date"
>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Digital Color Key:
</label>
<input
id=
"edtdigitalcolorkey"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Digital Color To:
</label>
<input
id=
"edtdigitalcolorto"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Digital Color Date:
</label>
<input
class=
"form-control input-sm"
id=
"dtpdigitalcolordate"
type=
"date"
>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Quantity and Colors
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Press Name:
</label>
<input
id=
"edtpressname"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Anilax Info:
</label>
<input
id=
"edtanilaxinfo"
class=
"form-control input-sm"
width=
'50%'
/>
</div>
<div
class=
"col-auto"
>
<label
for=
"wdbe_first_name"
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Colors:
</label>
<button
id=
"btnaddcolor"
class=
"btn btn-primary btn-sm float-end"
>
+
</button>
<div
id=
"additionalFields"
class=
"row mt-3"
></div>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Plate Marks
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Microdots:
</label>
<input
id=
"edtmicrodots"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Microdots Comments:
</label>
<input
id=
"edtmicrodotscomments"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Crosshairs:
</label>
<input
id=
"edtcrosshairs"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Crosshairs Comments:
</label>
<input
id=
"edtcrosshairscomments"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Color Bars:
</label>
<input
id=
"edtcolorbars"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Color Bars Comments:
</label>
<input
id=
"edtcolorbarscomments"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Other:
</label>
<input
id=
"edtplateother"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Microdots Comments:
</label>
<input
id=
"edtplateothercomments"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Layout
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Around:
</label>
<input
id=
"edtaround"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Accross:
</label>
<input
id=
"edtaccross"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Surface Print:
</label>
<input
id=
"edtsurfaceprint"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Reverse Print:
</label>
<input
id=
"edtreverseprint"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Cylinder Repeat:
</label>
<input
id=
"edtcylinderrepeat"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Cutoff Dimension:
</label>
<input
id=
"edtcutoffdimension"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Pitch:
</label>
<input
id=
"edtpitch"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Teeth:
</label>
<input
id=
"edtteeth"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Bleed:
</label>
<input
id=
"edtbleed"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Cutback:
</label>
<input
id=
"edtcutback"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Minimum Trap Dimension:
</label>
<input
id=
"edtminimumtrapdimension"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Maximum Trap Dimension:
</label>
<input
id=
"edtmaximumtrapdimension"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
Print Orientation
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Print Orientation:
</label>
<select
id=
"wcbprint"
class=
'form-select'
></select>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
UPC
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Size:
</label>
<input
id=
"edtsize"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Bar Width Reduction:
</label>
<input
id=
"edtbarwidthreduction"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Distortion Percent:
</label>
<input
id=
"edtdistortionpercent"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Distortion Amount:
</label>
<input
id=
"edtdistortionamount"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
<h4
class=
"custom-h4 mt-3"
>
Plates
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Thickness:
</label>
<select
id=
"wcbthickness"
class=
'form-select'
></select>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Plate Material:
</label>
<select
id=
"wcbmaterial"
class=
'form-select'
></select>
</div>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label mt-2"
>
Job Number:
</label>
<input
id=
"edtjobnumber"
class=
"form-control input-sm"
style=
"width: 150px"
/>
</div>
</div>
<h4
class=
"custom-h4 mt-3"
>
General
</h4>
<hr
class=
"custom-hr"
>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<label
style=
"font-weight: 700; font-size: 15px;"
class=
"form-label"
>
Comments
</label>
<textarea
id=
"edtcomments"
class=
"form-control"
style=
" width: 500px; height: 150px;"
></textarea>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col-auto"
>
<button
id=
"btnconfirm"
class=
"btn btn-primary btn-sm float-end my-2"
>
Save
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btncancel"
class=
"btn btn-primary btn-sm float-end my-2"
>
Cancel
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btncopy"
class=
"btn btn-primary btn-sm float-end my-2"
>
Copy
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btnpdf"
class=
"btn btn-primary btn-sm float-end my-2"
>
PDF
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btndelete"
class=
"btn btn-primary btn-sm float-end my-2"
>
Delete
</button>
</div>
<div
class=
"col-auto"
>
<button
id=
"btnclose"
class=
"btn btn-primary btn-sm float-end my-2"
>
Close
</button>
</div>
</div>
</div>
<div
class=
"modal fade"
id=
"confirmation_modal"
tabindex=
"-1"
aria-labelledby=
"confirmation_modal_label"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<h5
class=
"modal-title"
id=
"confirmation_modal_label"
>
Confirm
</h5>
<button
type=
"button"
class=
"btn-close"
data-bs-dismiss=
"modal"
aria-label=
"Close"
></button>
</div>
<div
class=
"modal-body"
>
Are you sure you want to delete this order?
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-secondary"
data-bs-dismiss=
"modal"
>
Cancel
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-bs-dismiss=
"modal"
id=
"btn_confirm_delete"
>
Delete
</button>
</div>
</div>
</div>
</div>
</div>
<style>
.modal-backdrop
{
opacity
:
0
!important
;
}
</style>
kgOrdersClient/View.OrderEntryWeb.pas
View file @
d00a993f
...
...
@@ -201,6 +201,9 @@ type
btnCopy
:
TWebButton
;
btnDelete
:
TWebButton
;
btnClose
:
TWebButton
;
edtOrderNum
:
TWebEdit
;
btn_confirm_delete
:
TWebButton
;
tmrReturn
:
TWebTimer
;
procedure
WebFormCreate
(
Sender
:
TObject
);
procedure
HideNotification
();
procedure
ShowNotification
(
Notification
:
string
);
...
...
@@ -220,6 +223,10 @@ type
procedure
btnCloseClick
(
Sender
:
TObject
);
procedure
btnDeleteClick
(
Sender
:
TObject
);
[
async
]
procedure
DelOrder
;
procedure
btnCloseNotificationClick
(
Sender
:
TObject
);
procedure
tmrReturnTimer
(
Sender
:
TObject
);
procedure
btn_confirm_deleteClick
(
Sender
:
TObject
);
function
VerifyOrder
():
boolean
;
private
FAgencyCode
:
string
;
FCurrentReportType
:
string
;
...
...
@@ -244,10 +251,50 @@ uses
procedure
TFOrderEntryWeb
.
btnConfirmClick
(
Sender
:
TObject
);
begin
SendOrderToServer
();
if
VerifyOrder
()
then
begin
sendOrderToServer
();
btnPDF
.
Enabled
:=
true
;
btnDelete
.
Enabled
:=
true
;
end
;
window
.
scrollTo
(
0
,
0
);
end
;
function
TFOrderEntryWeb
.
VerifyOrder
:
Boolean
;
begin
result
:=
true
;
if
edtCompanyName
.
Text
=
''
then
begin
showNotification
(
'Failure:Orders Must Have a Company Name'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
if
edtCompanyAccountName
.
Text
=
''
then
begin
showNotification
(
'Failure:Orders Must Have a Company Account Name'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
if
edtInvoiceTo
.
Text
=
''
then
begin
showNotification
(
'Failure:Orders Must Have an Invoice Address'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
if
WebDBComboBox1
.
Text
=
''
then
begin
showNotification
(
'Failure:Orders Must Have a Billing Address'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
if
dtpOrderDate
.
Date
=
0
then
begin
showNotification
(
'Failure:Orders Must Have an Order Date'
);
window
.
scrollTo
(
0
,
0
);
result
:=
false
;
end
;
end
;
procedure
TFOrderEntryWeb
.
btnCopyClick
(
Sender
:
TObject
);
begin
mode
:=
'ADD'
;
...
...
@@ -265,13 +312,20 @@ begin
dtpColorContractDate1
.
Date
:=
0
;
dtpColorContractDate2
.
Date
:=
0
;
dtpDigitalColorDate
.
Date
:=
0
;
edtOrderNum
.
Text
:=
''
;
btnPDF
.
Enabled
:=
False
;
btnDelete
.
Enabled
:=
False
;
ShowNotification
(
'Success:Order Successfully Copied'
);
window
.
scrollTo
(
0
,
0
);
end
;
procedure
TFOrderEntryWeb
.
btnDeleteClick
(
Sender
:
TObject
);
begin
DelOrder
();
asm
var
confirmationModal
=
new
bootstrap
.
Modal
(
document
.
getElementById
(
'confirmation_modal'
),
{
keyboard: false }
);
confirmationModal
.
show
();
end
;
end
;
[
async
]
procedure
TFOrderEntryWeb
.
DelOrder
();
...
...
@@ -377,6 +431,18 @@ begin
GenerateReportPDF
;
end
;
procedure
TFOrderEntryWeb
.
btn_confirm_deleteClick
(
Sender
:
TObject
);
begin
asm
var
confirmationModal
=
new
bootstrap
.
Modal
(
document
.
getElementById
(
'confirmation_modal'
),
{
keyboard: false }
);
confirmationModal
.
hide
();
startSpinner
();
end
;
delOrder
();
tmrReturn
.
Enabled
:=
true
;
end
;
procedure
TFOrderEntryWeb
.
GenerateReportPDF
;
// sends the search to the server which then sends back a pdf of the results
var
...
...
@@ -494,6 +560,11 @@ begin
FViewMain
.
ViewOrders
(
''
);
end
;
procedure
TFOrderEntryWeb
.
btnCloseNotificationClick
(
Sender
:
TObject
);
begin
hideNotification
();
end
;
procedure
TFOrderEntryWeb
.
WebFormCreate
(
Sender
:
TObject
);
begin
if
not
DMConnection
.
ApiConnection
.
Connected
then
...
...
@@ -652,6 +723,21 @@ begin
xdwdsQBItem
.
SetJsonData
(
items
[
'data'
]);
xdwdsQBITEM
.
Open
;
dtpOrderDate
.
Date
:=
0
;
dtpProofDate
.
Date
:=
0
;
dtpArtDue
.
Date
:=
0
;
dtpPlateDue
.
Date
:=
0
;
dtpShipDate
.
Date
:=
0
;
dtpPDFDate1
.
Date
:=
0
;
dtpPDFDate2
.
Date
:=
0
;
dtpPDFDate3
.
Date
:=
0
;
dtpInkJetDate1
.
Date
:=
0
;
dtpInkJetDate2
.
Date
:=
0
;
dtpInkJetDate3
.
Date
:=
0
;
dtpColorContractDate1
.
Date
:=
0
;
dtpColorContractDate2
.
Date
:=
0
;
dtpDigitalColorDate
.
Date
:=
0
;
end
;
procedure
TFOrderEntryWeb
.
WebFormShow
(
Sender
:
TObject
);
...
...
@@ -660,12 +746,13 @@ begin
getOrder
(
orderID
)
else
getCustomer
(
customerID
);
edtOrderNum
.
Text
:=
OrderID
;
HideNotification
();
end
;
procedure
TFOrderEntryWeb
.
HideNotification
;
begin
pnlMessage
.
ElementHandle
.
hidden
:=
True
;
pnlMessage
.
ElementHandle
.
hidden
:=
True
;
end
;
procedure
TFOrderEntryWeb
.
ShowNotification
(
Notification
:
string
);
...
...
@@ -697,6 +784,15 @@ begin
end
;
procedure
TFOrderEntryWeb
.
tmrReturnTimer
(
Sender
:
TObject
);
begin
asm
endSpinner
();
end
;
tmrReturn
.
Enabled
:=
false
;
FViewMain
.
ViewOrders
(
'Success: Order Successfully Deleted'
);
end
;
procedure
TFOrderEntryWeb
.
tmrScrollTopTimer
(
Sender
:
TObject
);
begin
tmrScrollTop
.
Enabled
:=
False
;
...
...
kgOrdersClient/View.Orders.dfm
View file @
d00a993f
...
...
@@ -125,6 +125,7 @@ object FViewOrders: TFViewOrders
Columns = <
item
DataField = 'DBID'
Title = 'Order Num'
end
item
DataField = 'ID'
...
...
kgOrdersClient/View.Orders.pas
View file @
d00a993f
...
...
@@ -624,7 +624,6 @@ begin
xdwdsOrders
.
Close
;
xdwdsOrders
.
SetJsonData
(
orderList
[
'data'
]);
xdwdsOrders
.
Open
;
//wdbtcOrders.HideColumn(0);
asm
endSpinner
();
...
...
kgOrdersClient/View.Search.dfm
View file @
d00a993f
...
...
@@ -132,9 +132,9 @@ object FSearch: TFSearch
object WebLabel1: TWebLabel
Left = 20
Top = 8
Width =
48
Width =
63
Height = 14
Caption = 'Order
ID
:'
Caption = 'Order
Num
:'
Font.Charset = ANSI_CHARSET
Font.Color = clBlack
Font.Height = -11
...
...
@@ -708,18 +708,18 @@ object FSearch: TFSearch
Connection = DMConnection.ApiConnection
Left = 418
Top = 393
object xdwdsCustomers
ID: TInteger
Field
FieldName = '
ID
'
object xdwdsCustomers
SHORT_NAME: TString
Field
FieldName = '
SHORT_NAME
'
end
object xdwdsCustomersNAME: TStringField
FieldName = 'NAME'
end
object xdwdsCustomersSHORT_NAME: TStringField
FieldName = 'SHORT_NAME'
end
object xdwdsCustomersstaff_fields_invoice_to: TStringField
FieldName = 'staff_fields_invoice_to'
end
object xdwdsCustomersID: TIntegerField
FieldName = 'ID'
end
end
object wdsCustomers: TWebDataSource
DataSet = xdwdsCustomers
...
...
kgOrdersClient/View.Search.pas
View file @
d00a993f
...
...
@@ -44,9 +44,7 @@ type
lblCompanyID
:
TWebLabel
;
XDataWebClient1
:
TXDataWebClient
;
xdwdsCustomers
:
TXDataWebDataSet
;
xdwdsCustomersID
:
TIntegerField
;
xdwdsCustomersNAME
:
TStringField
;
xdwdsCustomersSHORT_NAME
:
TStringField
;
wdsCustomers
:
TWebDataSource
;
WebLabel3
:
TWebLabel
;
edtJobName
:
TWebEdit
;
...
...
@@ -56,6 +54,8 @@ type
xdwdsCustomersstaff_fields_invoice_to
:
TStringField
;
WebLabel5
:
TWebLabel
;
edtCompanyName
:
TWebEdit
;
xdwdsCustomersSHORT_NAME
:
TStringField
;
xdwdsCustomersID
:
TIntegerField
;
procedure
btnConfirmClick
(
Sender
:
TObject
);
procedure
WebFormShow
(
Sender
:
TObject
);
procedure
btnCancelClick
(
Sender
:
TObject
);
...
...
@@ -254,6 +254,8 @@ begin
xdwdsCustomers
.
SetJsonData
(
customerList
[
'data'
]);
xdwdsCustomers
.
Open
;
console
.
log
(
customerList
[
'data'
]);
// Manually populate the grid
PopulateGridManually
;
end
;
...
...
@@ -289,7 +291,7 @@ begin
while
not
xdwdsCustomers
.
EOF
do
begin
TMSFNCGrid1
.
RowCount
:=
RowIndex
+
1
;
console
.
log
(
xdwdsCustomers
.
FieldByName
(
'ID'
).
AsString
);
TMSFNCGrid1
.
Cells
[
0
,
RowIndex
]
:=
xdwdsCustomers
.
FieldByName
(
'ID'
).
AsString
;
TMSFNCGrid1
.
Cells
[
1
,
RowIndex
]
:=
xdwdsCustomers
.
FieldByName
(
'SHORT_NAME'
).
AsString
;
TMSFNCGrid1
.
Cells
[
2
,
RowIndex
]
:=
xdwdsCustomers
.
FieldByName
(
'NAME'
).
AsString
;
...
...
kgOrdersServer/Source/Data.dfm
View file @
d00a993f
...
...
@@ -633,7 +633,7 @@ object FData: TFData
ColCount = 22
DrawingStyle = gdsClassic
FixedColor = clWhite
RowCount =
101
RowCount =
2
FixedRows = 1
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goColSizing, goFixedRowDefAlign]
TabOrder = 3
...
...
@@ -1500,105 +1500,6 @@ object FData: TFData
64)
RowHeights = (
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22
22)
end
object edtUsername: TEdit
...
...
@@ -1686,7 +1587,6 @@ object FData: TFData
Top = 472
end
object uqUsers: TUniQuery
Connection = ucKG
SQL.Strings = (
'select * from users')
Left = 669
...
...
@@ -1700,7 +1600,6 @@ object FData: TFData
Top = 369
end
object uqWeb: TUniQuery
Connection = ucKG
SQL.Strings = (
'select * from web_plate_orders')
Left = 745
...
...
@@ -2029,15 +1928,4 @@ object FData: TFData
Size = 16
end
end
object ucKG: TUniConnection
ProviderName = 'MySQL'
Database = 'kg_order_entry'
Username = 'root'
Server = '192.168.159.132'
Connected = True
LoginPrompt = False
Left = 855
Top = 457
EncryptedPassword = '9AFF92FF8CFF86FF8CFFCFFFCEFF'
end
end
kgOrdersServer/Source/Data.pas
View file @
d00a993f
...
...
@@ -38,7 +38,6 @@ type
Timer1
:
TTimer
;
Button1
:
TButton
;
uqWeb
:
TUniQuery
;
ucKG
:
TUniConnection
;
uqWebORDER_ID
:
TIntegerField
;
uqWebCOMPANY_ID
:
TIntegerField
;
uqWebUSER_ID
:
TIntegerField
;
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
d00a993f
...
...
@@ -65,6 +65,7 @@ type
procedure
AddToOrdersTable
(
mode
,
ORDER_TYPE
:
string
;
JSONData
:
TJSONObject
);
procedure
AfterConstruction
;
override
;
procedure
BeforeDestruction
;
override
;
procedure
AddToRevisionsTable
(
OrderID
,
table
:
string
;
order
:
TJSONObject
);
end
;
implementation
...
...
@@ -421,7 +422,7 @@ begin
offset
:=
IntToStr
((
PageNum
-
1
)
*
PageSize
);
limit
:=
IntToStr
(
PageSize
);
SQL
:=
'SELECT o.ORDER_ID, c.SHORT_NAME, o.LOCATION AS Loc, c.NAME AS COMPANY_NAME, o.JOB_NAME, o.ORDER_
DATE, o.ORDER_
TYPE, '
;
SQL
:=
'SELECT o.ORDER_ID, c.SHORT_NAME, o.LOCATION AS Loc, c.NAME AS COMPANY_NAME, o.JOB_NAME, o.ORDER_TYPE, '
;
// Generate the subqueries that get the Status Dates(Due and Done)
SQL
:=
SQL
+
generateSubquery
(
'PROOF'
);
...
...
@@ -466,7 +467,8 @@ begin
SQL
:=
SQL
+
'o.PRICE, qb.QB_REF_NUM, '
+
'coalesce( cpo.staff_fields_po_number, wpo.staff_fields_po_number, cdo.staff_fields_po_number ) AS po_number, '
+
'coalesce( cpo.staff_fields_quickbooks_item, wpo.staff_fields_quickbooks_item, cdo.staff_fields_quickbooks_item ) AS quickbooks_item '
+
'coalesce( cpo.staff_fields_quickbooks_item, wpo.staff_fields_quickbooks_item, cdo.staff_fields_quickbooks_item ) AS quickbooks_item, '
+
'coalesce( cpo.staff_fields_order_date, wpo.staff_fields_order_date, cdo.staff_fields_order_date ) AS ORDER_DATE '
+
whereSQL
+
' '
+
orderBySQL
+
' LIMIT '
+
limit
+
' OFFSET '
+
offset
;
...
...
@@ -1227,6 +1229,7 @@ var
DateFormat
:
TFormatSettings
;
ORDER_ID
:
integer
;
mode
:
string
;
temp
:
string
;
begin
DateFormat
:=
TFormatSettings
.
Create
;
DateFormat
.
ShortDateFormat
:=
'yyyy-mm-dd'
;
...
...
@@ -1264,9 +1267,13 @@ begin
Field
:=
ordersDB
.
UniQuery1
.
FindField
(
Pair
.
JsonString
.
Value
);
// Checks if the field exists in the dataset
if
Assigned
(
Field
)
then
begin
// handles any dates or datetimes
if
(
Field
is
TDateTimeField
)
and
(
Pair
.
JsonValue
.
Value
<>
''
)
then
TDateTimeField
(
Field
).
AsDateTime
:=
StrToDate
(
Pair
.
JsonValue
.
Value
)
if
(
Field
is
TDateTimeField
)
then
begin
if
(
Pair
.
JsonValue
.
Value
=
''
)
or
(
Pair
.
JsonValue
.
Value
=
'null'
)
or
(
Pair
.
JsonValue
.
Value
=
'12/30/1899'
)
then
Field
.
Clear
// This sets the field to NULL (empty)
else
TDateTimeField
(
Field
).
AsDateTime
:=
StrToDate
(
Pair
.
JsonValue
.
Value
);
end
else
if
Pair
.
JsonValue
.
Value
<>
''
then
Field
.
AsString
:=
Pair
.
JsonValue
.
Value
;
end
;
...
...
@@ -1276,18 +1283,24 @@ begin
// Post the record to the database
ordersDB
.
UniQuery1
.
Post
;
if
JSONData
.
GetValue
<
string
>(
'staff_fields_proof_date'
)
<>
''
then
temp
:=
JSONData
.
GetValue
<
string
>(
'staff_fields_proof_date'
);
if
(
JSONData
.
GetValue
<
string
>(
'staff_fields_proof_date'
)
<>
''
)
and
(
JSONData
.
GetValue
<
string
>(
'staff_fields_proof_date'
)
<>
'12/30/1899'
)
then
AddStatusSchedule
(
'PROOF'
,
JSONData
,
ORDER_ID
);
if
JSONData
.
GetValue
<
string
>(
'staff_fields_ship_date'
)
<>
''
then
temp
:=
JSONData
.
GetValue
<
string
>(
'staff_fields_ship_date'
);
if
(
JSONData
.
GetValue
<
string
>(
'staff_fields_ship_date'
)
<>
''
)
and
(
JSONData
.
GetValue
<
string
>(
'staff_fields_ship_date'
)
<>
'12/30/1899'
)
then
AddStatusSchedule
(
'SHIP'
,
JSONData
,
ORDER_ID
);
if
JSONData
.
GetValue
<
string
>(
'staff_fields_art_due'
)
<>
''
then
temp
:=
JSONData
.
GetValue
<
string
>(
'staff_fields_art_due'
);
if
(
JSONData
.
GetValue
<
string
>(
'staff_fields_art_due'
)
<>
''
)
and
(
JSONData
.
GetValue
<
string
>(
'staff_fields_art_due'
)
<>
'12/30/1899'
)
then
AddStatusSchedule
(
'ART'
,
JSONData
,
ORDER_ID
);
if
JSONData
.
GetValue
<
string
>(
'staff_fields_plate_due'
)
<>
''
then
temp
:=
JSONData
.
GetValue
<
string
>(
'staff_fields_plate_due'
);
if
(
JSONData
.
GetValue
<
string
>(
'staff_fields_plate_due'
)
<>
''
)
and
(
JSONData
.
GetValue
<
string
>(
'staff_fields_plate_due'
)
<>
'12/30/1899'
)
then
AddStatusSchedule
(
'PLATE'
,
JSONData
,
ORDER_ID
);
if
JSONData
.
GetValue
<
string
>(
'staff_fields_mount_due'
)
<>
''
then
temp
:=
JSONData
.
GetValue
<
string
>(
'staff_fields_mount_due'
);
if
(
JSONData
.
GetValue
<
string
>(
'staff_fields_mount_due'
)
<>
''
)
and
(
JSONData
.
GetValue
<
string
>(
'staff_fields_mount_due'
)
<>
'12/30/1899'
)
then
AddStatusSchedule
(
'MOUNT'
,
JSONData
,
ORDER_ID
);
addToRevisionsTable
(
intToStr
(
ORDER_ID
),
'corrugated_plate_orders_revisions'
,
JSONData
);
Result
:=
TJSONObject
.
Create
.
AddPair
(
'status'
,
'success'
);
Result
.
AddPair
(
'OrderID'
,
ORDER_ID
);
TXDataOperationContext
.
Current
.
Handler
.
ManagedObjects
.
Add
(
Result
);
...
...
@@ -1333,14 +1346,14 @@ begin
change
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'STATUS_DATE'
).
AsString
<>
order
.
GetValue
<
string
>(
'staff_fields_'
+
StatusType
.
ToLower
+
'_date'
);
ordersDB
.
UniQuery1
.
FieldByName
(
'STATUS_DATE'
).
AsString
:=
order
.
GetValue
<
string
>(
'staff_fields_'
+
StatusType
.
ToLower
+
'_date'
);
if
mode
<>
'EDIT'
then
ordersDB
.
UniQuery1
.
FieldByName
(
'ORIGINAL_STATUS_DATE'
).
AsString
:=
order
.
GetValue
<
string
>(
'staff_fields_'
+
StatusType
.
ToLower
+
'_date'
)
;
ordersDB
.
UniQuery1
.
FieldByName
(
'ORIGINAL_STATUS_DATE'
).
AsString
:=
order
.
GetValue
<
string
>(
'staff_fields_'
+
StatusType
.
ToLower
+
'_date'
)
end
else
begin
change
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'STATUS_DATE'
).
AsDateTime
<>
StrToDateTime
(
order
.
GetValue
<
string
>(
'staff_fields_'
+
StatusType
.
ToLower
+
'_due'
));
ordersDB
.
UniQuery1
.
FieldByName
(
'STATUS_DATE'
).
AsDateTime
:=
StrToDateTime
(
order
.
GetValue
<
string
>(
'staff_fields_'
+
StatusType
.
ToLower
+
'_due'
));
if
mode
<>
'EDIT'
then
ordersDB
.
UniQuery1
.
FieldByName
(
'ORIGINAL_STATUS_DATE'
).
AsDateTime
:=
StrToDateTime
(
order
.
GetValue
<
string
>(
'staff_fields_'
+
StatusType
.
ToLower
+
'_due'
))
;
ordersDB
.
UniQuery1
.
FieldByName
(
'ORIGINAL_STATUS_DATE'
).
AsDateTime
:=
StrToDateTime
(
order
.
GetValue
<
string
>(
'staff_fields_'
+
StatusType
.
ToLower
+
'_due'
))
end
;
ordersDB
.
UniQuery1
.
FieldByName
(
'USER_ID'
).
AsString
:=
order
.
GetValue
<
string
>(
'USER_ID'
);
...
...
@@ -1616,8 +1629,13 @@ begin
if
Assigned
(
Field
)
then
begin
// handles any dates or datetimes
if
(
Field
is
TDateTimeField
)
and
(
Pair
.
JsonValue
.
Value
<>
''
)
then
TDateTimeField
(
Field
).
AsDateTime
:=
StrToDate
(
Pair
.
JsonValue
.
Value
)
if
(
Field
is
TDateTimeField
)
then
begin
if
(
Pair
.
JsonValue
.
Value
=
''
)
or
(
Pair
.
JsonValue
.
Value
=
'null'
)
or
(
Pair
.
JsonValue
.
Value
=
'12/30/1899'
)
then
Field
.
Clear
// This sets the field to NULL (empty)
else
TDateTimeField
(
Field
).
AsDateTime
:=
StrToDate
(
Pair
.
JsonValue
.
Value
);
end
else
if
Pair
.
JsonValue
.
Value
<>
''
then
Field
.
AsString
:=
Pair
.
JsonValue
.
Value
;
end
;
...
...
@@ -1628,15 +1646,17 @@ begin
// Post the record to the database
ordersDB
.
UniQuery1
.
Post
;
if
JSONData
.
GetValue
<
string
>(
'staff_fields_proof_date'
)
<>
''
then
if
(
JSONData
.
GetValue
<
string
>(
'staff_fields_proof_date'
)
<>
''
)
and
(
JSONData
.
GetValue
<
string
>(
'staff_fields_proof_date'
)
<>
'12/30/1899'
)
then
AddStatusSchedule
(
'PROOF'
,
JSONData
,
ORDER_ID
);
if
JSONData
.
GetValue
<
string
>(
'staff_fields_ship_date'
)
<>
''
then
if
(
JSONData
.
GetValue
<
string
>(
'staff_fields_ship_date'
)
<>
''
)
and
(
JSONData
.
GetValue
<
string
>(
'staff_fields_ship_date'
)
<>
'12/30/1899'
)
then
AddStatusSchedule
(
'SHIP'
,
JSONData
,
ORDER_ID
);
if
JSONData
.
GetValue
<
string
>(
'staff_fields_art_due'
)
<>
''
then
if
(
JSONData
.
GetValue
<
string
>(
'staff_fields_art_due'
)
<>
''
)
and
(
JSONData
.
GetValue
<
string
>(
'staff_fields_art_due'
)
<>
'12/30/1899'
)
then
AddStatusSchedule
(
'ART'
,
JSONData
,
ORDER_ID
);
if
JSONData
.
GetValue
<
string
>(
'staff_fields_plate_due'
)
<>
''
then
if
(
JSONData
.
GetValue
<
string
>(
'staff_fields_plate_due'
)
<>
''
)
and
(
JSONData
.
GetValue
<
string
>(
'staff_fields_plate_due'
)
<>
'12/30/1899'
)
then
AddStatusSchedule
(
'PLATE'
,
JSONData
,
ORDER_ID
);
AddToRevisionsTable
(
IntToStr
(
ORDER_ID
),
'web_plate_orders_revisions'
,
JSONData
);
Result
:=
TJSONObject
.
Create
.
AddPair
(
'status'
,
'success'
);
TXDataOperationContext
.
Current
.
Handler
.
ManagedObjects
.
Add
(
Result
);
except
...
...
@@ -1699,8 +1719,13 @@ begin
if
Assigned
(
Field
)
then
begin
// handles any dates or datetimes
if
(
Field
is
TDateTimeField
)
and
(
Pair
.
JsonValue
.
Value
<>
''
)
then
TDateTimeField
(
Field
).
AsDateTime
:=
StrToDate
(
Pair
.
JsonValue
.
Value
)
if
(
Field
is
TDateTimeField
)
then
begin
if
(
Pair
.
JsonValue
.
Value
=
''
)
or
(
Pair
.
JsonValue
.
Value
=
'null'
)
or
(
Pair
.
JsonValue
.
Value
=
'12/30/1899'
)
then
Field
.
Clear
// This sets the field to NULL (empty)
else
TDateTimeField
(
Field
).
AsDateTime
:=
StrToDate
(
Pair
.
JsonValue
.
Value
);
end
else
if
Pair
.
JsonValue
.
Value
<>
''
then
Field
.
AsString
:=
Pair
.
JsonValue
.
Value
;
end
;
...
...
@@ -1711,13 +1736,11 @@ begin
// Post the record to the database
ordersDB
.
UniQuery1
.
Post
;
if
JSONData
.
GetValue
<
string
>(
'staff_fields_proof_date'
)
<>
''
then
if
(
JSONData
.
GetValue
<
string
>(
'staff_fields_proof_date'
)
<>
''
)
and
(
JSONData
.
GetValue
<
string
>(
'staff_fields_proof_date'
)
<>
'12/30/1899'
)
then
AddStatusSchedule
(
'PROOF'
,
JSONData
,
ORDER_ID
);
if
JSONData
.
GetValue
<
string
>(
'staff_fields_ship_date'
)
<>
''
then
if
(
JSONData
.
GetValue
<
string
>(
'staff_fields_ship_date'
)
<>
''
)
and
(
JSONData
.
GetValue
<
string
>(
'staff_fields_ship_date'
)
<>
'12/30/1899'
)
then
AddStatusSchedule
(
'SHIP'
,
JSONData
,
ORDER_ID
);
Result
:=
TJSONObject
.
Create
.
AddPair
(
'status'
,
'success'
);
Result
.
AddPair
(
'OrderID'
,
ORDER_ID
);
TXDataOperationContext
.
Current
.
Handler
.
ManagedObjects
.
Add
(
Result
);
except
...
...
@@ -1741,10 +1764,9 @@ var
JSONArray
:
TJSONArray
;
Pair
:
TJSONPair
;
Field
:
TField
;
ORDER_ID
:
string
;
mode
:
string
;
stream
:
TStringStream
;
RevisionID
:
integer
;
RevisionID
,
rev_num
:
integer
;
JSONValue
:
TJSONValue
;
JSONObject
:
TJSONObject
;
DataObject
:
TJSONObject
;
...
...
@@ -1807,7 +1829,12 @@ begin
JSONData
:=
JSONArray
.
Items
[
0
]
as
TJSONObject
;
SQL
:=
'select * from '
+
table2
+
' where ORDER_ID = 0 and ORDER_ID <> 0'
;
SQL
:=
'select max(REVISION_NUMBER) as rev_num from '
+
table2
+
' where ORDER_ID = '
+
orderID
;
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
rev_num
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'rev_num'
).
AsInteger
+
1
;
SQL
:=
'select * from '
+
table2
+
' where ORDER_ID = '
+
orderID
;
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
try
...
...
@@ -1834,7 +1861,7 @@ begin
ordersDB
.
UniQuery1
.
Post
;
Result
:=
TJSONObject
.
Create
.
AddPair
(
'status'
,
'success'
);
Result
.
AddPair
(
'OrderID'
,
O
RDER_
ID
);
Result
.
AddPair
(
'OrderID'
,
O
rder
ID
);
TXDataOperationContext
.
Current
.
Handler
.
ManagedObjects
.
Add
(
Result
);
except
on
E
:
Exception
do
...
...
@@ -1853,6 +1880,63 @@ begin
OrdersDB
.
UniQuery1
.
ExecSQL
;
end
;
procedure
TLookupService
.
AddToRevisionsTable
(
OrderID
:
string
;
table
:
string
;
order
:
TJSONObject
);
var
SQL
,
UserID
:
string
;
Pair
:
TJSONPair
;
rev_num
,
RevisionID
:
integer
;
Field
:
TField
;
begin
// Get Revision Number
SQL
:=
'select max(REVISION_NUMBER) as rev_num from '
+
table
+
' where ORDER_ID = '
+
orderID
;
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
rev_num
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'rev_num'
).
AsInteger
+
1
;
// Update RevisionID
SQL
:=
'UPDATE idfield set KEYVALUE = KEYVALUE + 1 WHERE KEYNAME = '
+
quotedStr
(
'GEN_ORDER_REVISION_ID'
);
OrdersDB
.
UniQuery1
.
SQL
.
Text
:=
SQL
;
OrdersDB
.
UniQuery1
.
ExecSQL
;
// Retrieve updated RevisionID
SQL
:=
'select KEYVALUE from idfield where KEYNAME = '
+
quotedStr
(
'GEN_ORDER_REVISION_ID'
);
doQuery
(
OrdersDB
.
UniQuery1
,
SQL
);
RevisionID
:=
OrdersDB
.
UniQuery1
.
FieldByName
(
'KEYVALUE'
).
AsInteger
;
// Begin Area where we could replace this with marks code(need to convert from c++
SQL
:=
'select * from '
+
table
+
' where ORDER_ID = -1'
;
doQuery
(
ordersDB
.
UniQuery1
,
SQL
);
ordersDB
.
UniQuery1
.
Insert
;
for
Pair
in
order
do
begin
Field
:=
ordersDB
.
UniQuery1
.
FindField
(
Pair
.
JsonString
.
Value
);
// Checks if the field exists in the dataset
if
Assigned
(
Field
)
then
begin
// handles any dates or datetimes
if
(
Field
is
TDateTimeField
)
then
if
(
Pair
.
JsonValue
.
Value
=
''
)
or
(
Pair
.
JsonValue
.
Value
=
'null'
)
or
(
Pair
.
JsonValue
.
Value
=
'12/30/1899'
)
then
Field
.
Clear
// This sets the field to NULL (empty)
else
TDateTimeField
(
Field
).
AsDateTime
:=
StrToDate
(
Pair
.
JsonValue
.
Value
)
else
if
Pair
.
JsonValue
.
Value
<>
''
then
Field
.
AsString
:=
Pair
.
JsonValue
.
Value
;
end
;
end
;
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_ID'
).
AsString
:=
OrderID
;
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_DATE'
).
AsDateTime
:=
Now
;
// End Area
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_STATUS'
).
AsString
:=
'ACTIVE'
;
ordersDB
.
UniQuery1
.
FieldByName
(
'REVISION_NUMBER'
).
AsInteger
:=
1
;
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_REVISION_ID'
).
AsInteger
:=
RevisionID
;
ordersDB
.
UniQuery1
.
FieldByName
(
'REVISION_USER_ID'
).
AsString
:=
order
.
GetValue
<
string
>(
'USER_ID'
);
// Post the record to the database
ordersDB
.
UniQuery1
.
Post
;
end
;
initialization
RegisterServiceType
(
TLookupService
);
end
.
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
d00a993f
...
...
@@ -2,10 +2,10 @@
MemoLogLevel
=
3
FileLogLevel
=
5
webClientVersion
=
0.9.2
LogFileNum
=
396
LogFileNum
=
428
[Database]
Server
=
192.168.159.13
2
Server
=
192.168.159.13
1
--Server
=
192.168.102.130
--Server
=
192.168.75.133
Database
=
kg_order_entry
...
...
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