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
f61278c7
Commit
f61278c7
authored
Dec 17, 2024
by
Elias Sarraf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up merge brach 'master' into cam2
parent
5af369e8
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
86 additions
and
317 deletions
+86
-317
View.AddOrder.dfm
kgOrdersClient/View.AddOrder.dfm
+1
-170
View.AddOrder.pas
kgOrdersClient/View.AddOrder.pas
+5
-11
View.Main.pas
kgOrdersClient/View.Main.pas
+0
-3
View.OrderEntryCorrugated.pas
kgOrdersClient/View.OrderEntryCorrugated.pas
+1
-3
View.Orders.dfm
kgOrdersClient/View.Orders.dfm
+44
-41
View.Orders.html
kgOrdersClient/View.Orders.html
+8
-11
View.Orders.pas
kgOrdersClient/View.Orders.pas
+15
-48
webKGOrders.dproj
kgOrdersClient/webKGOrders.dproj
+1
-0
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+10
-29
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+1
-1
No files found.
kgOrdersClient/View.AddOrder.dfm
View file @
f61278c7
object FAddOrder: TFAddOrder
Width = 871
Height = 4
88
Height = 4
77
OnShow = WebFormShow
object WebLabel1: TWebLabel
Left = 278
...
...
@@ -239,175 +239,6 @@ object FAddOrder: TFAddOrder
WidthPercent = 100.000000000000000000
OnClick = btnConfirmClick
end
object WebPanel1: TWebPanel
Left = 0
Top = 108
Width = 871
Height = 380
Align = alBottom
ChildOrder = 9
TabOrder = 6
DesignSize = (
871
380)
object TMSFNCGrid1: TTMSFNCGrid
Left = 8
Top = 10
Width = 860
Height = 361
ParentDoubleBuffered = False
Anchors = [akLeft, akTop, akRight, akBottom]
DoubleBuffered = True
TabOrder = 0
DefaultRowHeight = 40.000000000000000000
FixedColumns = 0
ColumnCount = 4
Options.Bands.Enabled = True
Options.ColumnSize.Stretch = True
Options.Editing.CalcFormat = '%g'
Options.Grouping.CalcFormat = '%g'
Options.Grouping.GroupCountFormat = '(%d)'
Options.IO.XMLEncoding = 'ISO-8859-1'
Options.Mouse.ClickMargin = 0
Options.Mouse.ColumnSizeMargin = 6
Options.Mouse.RowSizeMargin = 6
Columns = <
item
BorderWidth = 1
FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 4539717
FixedFont.Height = -11
FixedFont.Name = 'Segoe UI'
FixedFont.Style = [fsBold]
Font.Charset = DEFAULT_CHARSET
Font.Color = 8026746
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 70.000000000000000000
end
item
BorderWidth = 1
FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 4539717
FixedFont.Height = -11
FixedFont.Name = 'Segoe UI'
FixedFont.Style = [fsBold]
Font.Charset = DEFAULT_CHARSET
Font.Color = 8026746
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 250.000000000000000000
end
item
BorderWidth = 1
FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 4539717
FixedFont.Height = -11
FixedFont.Name = 'Segoe UI'
FixedFont.Style = [fsBold]
Font.Charset = DEFAULT_CHARSET
Font.Color = 8026746
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 100.000000000000000000
end
item
BorderWidth = 1
FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 4539717
FixedFont.Height = -11
FixedFont.Name = 'Segoe UI'
FixedFont.Style = [fsBold]
Font.Charset = DEFAULT_CHARSET
Font.Color = 8026746
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 421.000000000000000000
end
item
BorderWidth = 1
FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 4539717
FixedFont.Height = -11
FixedFont.Name = 'Segoe UI'
FixedFont.Style = [fsBold]
Font.Charset = DEFAULT_CHARSET
Font.Color = 8026746
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 90.000000000000000000
end>
DefaultFont.Charset = DEFAULT_CHARSET
DefaultFont.Color = clWindowText
DefaultFont.Height = -11
DefaultFont.Name = 'Segoe UI'
DefaultFont.Style = []
TopRow = 1
Appearance.FixedLayout.Fill.Color = 16380654
Appearance.FixedLayout.Font.Charset = DEFAULT_CHARSET
Appearance.FixedLayout.Font.Color = 4539717
Appearance.FixedLayout.Font.Height = -13
Appearance.FixedLayout.Font.Name = 'Segoe UI'
Appearance.FixedLayout.Font.Style = [fsBold]
Appearance.NormalLayout.Fill.Color = 16578806
Appearance.NormalLayout.Font.Charset = DEFAULT_CHARSET
Appearance.NormalLayout.Font.Color = 8026746
Appearance.NormalLayout.Font.Height = -11
Appearance.NormalLayout.Font.Name = 'Segoe UI'
Appearance.NormalLayout.Font.Style = []
Appearance.GroupLayout.Fill.Color = 12817262
Appearance.GroupLayout.Font.Charset = DEFAULT_CHARSET
Appearance.GroupLayout.Font.Color = clBlack
Appearance.GroupLayout.Font.Height = -11
Appearance.GroupLayout.Font.Name = 'Segoe UI'
Appearance.GroupLayout.Font.Style = []
Appearance.SummaryLayout.Fill.Color = 14009785
Appearance.SummaryLayout.Font.Charset = DEFAULT_CHARSET
Appearance.SummaryLayout.Font.Color = clBlack
Appearance.SummaryLayout.Font.Height = -11
Appearance.SummaryLayout.Font.Name = 'Segoe UI'
Appearance.SummaryLayout.Font.Style = []
Appearance.SelectedLayout.Fill.Color = 16441019
Appearance.SelectedLayout.Font.Charset = DEFAULT_CHARSET
Appearance.SelectedLayout.Font.Color = 4539717
Appearance.SelectedLayout.Font.Height = -11
Appearance.SelectedLayout.Font.Name = 'Segoe UI'
Appearance.SelectedLayout.Font.Style = []
Appearance.FocusedLayout.Fill.Color = 16039284
Appearance.FocusedLayout.Font.Charset = DEFAULT_CHARSET
Appearance.FocusedLayout.Font.Color = 4539717
Appearance.FocusedLayout.Font.Height = -11
Appearance.FocusedLayout.Font.Name = 'Segoe UI'
Appearance.FocusedLayout.Font.Style = []
Appearance.FixedSelectedLayout.Fill.Color = clLightsteelblue
Appearance.FixedSelectedLayout.Font.Charset = DEFAULT_CHARSET
Appearance.FixedSelectedLayout.Font.Color = clBlack
Appearance.FixedSelectedLayout.Font.Height = -11
Appearance.FixedSelectedLayout.Font.Name = 'Segoe UI'
Appearance.FixedSelectedLayout.Font.Style = []
Appearance.BandLayout.Fill.Color = 16711679
Appearance.BandLayout.Font.Charset = DEFAULT_CHARSET
Appearance.BandLayout.Font.Color = 8026746
Appearance.BandLayout.Font.Height = -11
Appearance.BandLayout.Font.Name = 'Segoe UI'
Appearance.BandLayout.Font.Style = []
Appearance.ProgressLayout.Format = '%.0f%%'
LeftCol = 0
ScrollMode = scmItemScrolling
DesignTimeSampleData = True
OnCellClick = TMSFNCGrid1CellClick
end
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left = 730
...
...
kgOrdersClient/View.AddOrder.pas
View file @
f61278c7
...
...
@@ -9,13 +9,13 @@ uses
VCL
.
TMSFNCGridOptions
,
Vcl
.
Controls
,
VCL
.
TMSFNCCustomControl
,
VCL
.
TMSFNCCustomScrollControl
,
VCL
.
TMSFNCGridData
,
VCL
.
TMSFNCCustomGrid
,
VCL
.
TMSFNCGrid
,
Vcl
.
StdCtrls
,
WEBLib
.
StdCtrls
,
XData
.
Web
.
Client
,
Data
.
DB
,
XData
.
Web
.
JsonDataset
,
XData
.
Web
.
Dataset
,
WEBLib
.
DB
,
ConnectionModule
,
WEBLib
.
ExtCtrls
;
XData
.
Web
.
JsonDataset
,
XData
.
Web
.
Dataset
,
WEBLib
.
DB
,
ConnectionModule
;
type
TFAddOrder
=
class
(
TWebForm
)
edtSearch
:
TWebEdit
;
edtID
:
TWebEdit
;
TMSFNCGrid1
:
TTMSFNCGrid
;
cbCorrugatedPlate
:
TWebCheckBox
;
cbWebPlate
:
TWebCheckBox
;
btnCancel
:
TWebButton
;
...
...
@@ -29,15 +29,13 @@ type
xdwdsCustomersSHORT_NAME
:
TStringField
;
wdsCustomers
:
TWebDataSource
;
xdwdsCustomersADDRESS
:
TStringField
;
WebPanel1
:
TWebPanel
;
TMSFNCGrid1
:
TTMSFNCGrid
;
procedure
WebFormShow
(
Sender
:
TObject
);
procedure
TMSFNCGrid1SelectedCell
(
Sender
:
TObject
;
ACol
,
ARow
:
Integer
);
procedure
edtSearchChange
(
Sender
:
TObject
);
procedure
cbCorrugatedPlateClick
(
Sender
:
TObject
);
procedure
cbWebPlateClick
(
Sender
:
TObject
);
procedure
btnConfirmClick
(
Sender
:
TObject
);
procedure
btnCancelClick
(
Sender
:
TObject
);
procedure
TMSFNCGrid1CellClick
(
Sender
:
TObject
;
ACol
,
ARow
:
Integer
);
private
[
async
]
procedure
getCustomers
;
procedure
PopulateGridManually
;
...
...
@@ -45,8 +43,6 @@ type
{ Private declarations }
public
{ Public declarations }
var
confirm
:
boolean
;
end
;
var
...
...
@@ -65,13 +61,10 @@ end;
procedure
TFAddOrder
.
btnConfirmClick
(
Sender
:
TObject
);
begin
Close
;
confirm
:=
true
;
console
.
log
(
edtID
.
Text
);
end
;
procedure
TFAddOrder
.
WebFormShow
(
Sender
:
TObject
);
begin
confirm
:=
false
;
getCustomers
();
end
;
...
...
@@ -153,7 +146,8 @@ end;
procedure
TFAddOrder
.
TMSFNCGrid1CellClick
(
Sender
:
TObject
;
ACol
,
ARow
:
Integer
);
procedure
TFAddOrder
.
TMSFNCGrid1SelectedCell
(
Sender
:
TObject
;
ACol
,
ARow
:
Integer
);
begin
edtID
.
Text
:=
TMSFNCGrid1
.
Cells
[
0
,
ARow
];
end
;
...
...
kgOrdersClient/View.Main.pas
View file @
f61278c7
...
...
@@ -205,11 +205,9 @@ end;
procedure
TFViewMain
.
ShowForm
(
AFormClass
:
TWebFormClass
);
begin
console
.
log
(
'ShowForm'
+
AFormClass
.
ClassName
);
if
Assigned
(
FChildForm
)
then
FChildForm
.
Free
;
Application
.
CreateForm
(
AFormClass
,
WebPanel1
.
ElementID
,
FChildForm
);
console
.
log
(
WebPanel1
.
ElementID
);
end
;
procedure
TFViewMain
.
EditUser
(
Mode
,
Username
,
Password
,
Name
,
Status
,
Email
,
...
...
@@ -234,7 +232,6 @@ begin
lblAppTitle
.
Caption
:=
'Koehler-Gibson Order Entry'
;
if
Assigned
(
FChildForm
)
then
FChildForm
.
Free
;
console
.
log
(
'hit'
);
FChildForm
:=
TFOrderEntry
.
CreateForm
(
WebPanel1
.
ElementID
,
orderInfo
,
customerInfo
,
mode
);
end
;
...
...
kgOrdersClient/View.OrderEntryCorrugated.pas
View file @
f61278c7
...
...
@@ -370,13 +370,11 @@ var
localMode
:
string
;
begin
localMode
:=
mode
;
console
.
log
(
''
)
;
Application
.
CreateForm
(
TFOrderEntry
,
AElementID
,
Result
,
procedure
(
AForm
:
TObject
)
begin
with
TFOrderEntry
(
AForm
)
do
begin
console
.
log
(
''
);
HideNotification
;
TFOrderEntry
(
AForm
).
customerID
:=
customerInfo
;
TFOrderEntry
(
AForm
).
orderID
:=
orderInfo
;
...
...
@@ -384,7 +382,7 @@ begin
end
;
end
);
console
.
log
(
''
)
end
;
procedure
TFOrderEntry
.
addColorRow
(
num
:
string
;
Color
:
string
;
LPI
:
string
;
Size
:
string
);
...
...
kgOrdersClient/View.Orders.dfm
View file @
f61278c7
...
...
@@ -148,6 +148,50 @@ object FViewOrders: TFViewOrders
TabStop = False
Text = ''
end
object pnlMessage: TWebPanel
Left = 82
Top = 352
Width = 125
Height = 33
ElementClassName = 'card'
ElementID = 'pnl_message'
ChildOrder = 5
ElementBodyClassName = 'card-body'
ElementFont = efCSS
ElementPosition = epRelative
Role = 'alert'
TabOrder = 7
object lblMessage: TWebLabel
Left = 32
Top = 11
Width = 42
Height = 13
Caption = 'Message'
ElementID = 'pnl_message'
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnCloseNotification: TWebButton
Left = 96
Top = 3
Width = 22
Height = 25
ChildOrder = 1
ElementClassName = 'btn btn-light'
ElementID = 'view.login.message.button'
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
Role = 'button'
WidthStyle = ssAuto
WidthPercent = 100.000000000000000000
OnClick = btnCloseNotificationClick
end
end
object WebButton1: TWebButton
Left = 188
Top = 79
...
...
@@ -286,44 +330,6 @@ object FViewOrders: TFViewOrders
end>
DataSource = wdsOrders
end
object pnlMessage: TWebPanel
Left = 52
Top = 248
Width = 121
Height = 33
ElementClassName = 'card'
ElementID = 'view.login.message'
ChildOrder = 17
ElementBodyClassName = 'card-body'
ElementFont = efCSS
TabOrder = 9
object lblMessage: TWebLabel
Left = 16
Top = 11
Width = 42
Height = 13
Caption = 'Message'
ElementID = 'view.login.message.label'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnCloseNotification: TWebButton
Left = 96
Top = 3
Width = 22
Height = 25
ChildOrder = 1
ElementClassName = 'btn btn-light'
ElementID = 'view.login.message.button'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnCloseNotificationClick
end
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left = 28
...
...
@@ -387,9 +393,6 @@ object FViewOrders: TFViewOrders
object xdwdsOrdersorderType: TStringField
FieldName = 'orderType'
end
object XDataWebDataSet1SQL: TStringField
FieldName = 'SQL'
end
end
object wdsOrders: TWebDataSource
DataSet = xdwdsOrders
...
...
kgOrdersClient/View.Orders.html
View file @
f61278c7
<div
class=
"container h-100 d-flex flex-column mt-0"
style=
"max-width: 95%;"
>
<!-- Alert Section -->
<div
class=
"row justify-content-center"
>
<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>
</div>
<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>
<!-- Filters Section -->
...
...
@@ -107,4 +103,5 @@
</div>
</div>
</div>
</div>
kgOrdersClient/View.Orders.pas
View file @
f61278c7
...
...
@@ -105,7 +105,7 @@ var
implementation
uses
XData
.
Model
.
Classes
,
View
.
Main
,
View
.
AddOrder
;
XData
.
Model
.
Classes
,
View
.
Main
;
{$R *.dfm}
...
...
@@ -203,12 +203,8 @@ begin
newform
.
ShowModal
(
procedure
(
AValue
:
TModalResult
)
begin
console
.
log
(
newForm
.
edtID
.
Text
);
if
newform
.
confirm
then
begin
if
newform
.
edtID
.
Text
<>
''
then
orderEntry
(
''
,
newForm
.
edtID
.
Text
,
'ADD'
);
end
;
if
newform
.
edtID
.
Text
<>
''
then
orderEntry
(
''
,
newForm
.
edtID
.
Text
,
'ADD'
);
end
);
end
;
...
...
@@ -459,27 +455,21 @@ procedure TFViewOrders.btnApplyClick(Sender: TObject);
var
searchOptions
:
string
;
begin
if
wcbSortBy
.
Text
<>
''
then
begin
PageNumber
:=
1
;
PageSize
:=
50
;
OrderBy
:=
wcbSortBy
.
Text
;
searchOptions
:=
'&pagenumber='
+
IntToStr
(
PageNumber
)
+
'&pagesize='
+
IntToStr
(
PageSize
)
+
'&orderby='
+
OrderBy
+
'&startDate='
+
FormatDateTime
(
'yyyy/mm/dd'
,
dtpStartDate
.
Date
)
+
'&endDate='
+
FormatDateTime
(
'yyyy/mm/dd'
,
dtpEndDate
.
Date
)
+
'&filterType='
+
wcbSortBy
.
Text
;
GetOrders
(
searchOptions
);
end
else
ShowNotification
(
'Failure: Please Select a Status Type'
);
PageNumber
:=
1
;
PageSize
:=
50
;
OrderBy
:=
wcbSortBy
.
Text
;
searchOptions
:=
'&pagenumber='
+
IntToStr
(
PageNumber
)
+
'&pagesize='
+
IntToStr
(
PageSize
)
+
'&orderby='
+
OrderBy
+
'&startDate='
+
FormatDateTime
(
'yyyy/mm/dd'
,
dtpStartDate
.
Date
)
+
'&endDate='
+
FormatDateTime
(
'yyyy/mm/dd'
,
dtpEndDate
.
Date
)
+
'&filterType='
+
wcbSortBy
.
Text
;
GetOrders
(
searchOptions
);
end
;
procedure
TFViewOrders
.
btnCloseNotificationClick
(
Sender
:
TObject
);
begin
console
.
log
(
'hit'
);
HideNotification
();
end
;
...
...
@@ -505,10 +495,6 @@ begin
begin
btnFilters
.
Caption
:=
'Show Filters'
;
filterSection
:=
TJSHTMLElement
(
document
.
getElementById
(
'filter_info'
));
{edtSearch.Text := '';
dtpStartDate.Date := 0;
dtpEndDate.Date := 0; }
getOrders
(
generateSearchOptions
());
if
Assigned
(
filterSection
)
then
filterSection
.
style
.
setProperty
(
'display'
,
'none'
);
end
;
...
...
@@ -587,36 +573,17 @@ end;
procedure
TFViewOrders
.
HideNotification
;
begin
console
.
log
(
'hit'
);
pnlMessage
.
ElementHandle
.
hidden
:=
True
;
info
:=
''
;
end
;
procedure
TFViewOrders
.
ShowNotification
(
Notification
:
string
);
var
splitNotification
:
TArray
<
string
>;
begin
if
Notification
<>
''
then
begin
splitNotification
:=
Notification
.
Split
([
':'
]);
if
(
splitNotification
[
0
]
=
'Success'
)
then
begin
asm
var
messageDiv
=
document
.
getElementById
(
'view.login.message'
);
messageDiv
.
classList
.
remove
(
'alert-danger'
);
messageDiv
.
classList
.
add
(
'alert-success'
);
end
;
end
else
begin
asm
var
messageDiv
=
document
.
getElementById
(
'view.login.message'
);
messageDiv
.
classList
.
remove
(
'alert-success'
);
messageDiv
.
classList
.
add
(
'alert-danger'
);
end
;
end
;
lblMessage
.
Caption
:=
splitNotification
[
1
];
console
.
log
(
'hit'
);
lblMessage
.
Caption
:=
Notification
;
pnlMessage
.
ElementHandle
.
hidden
:=
False
;
end
;
end
;
...
...
kgOrdersClient/webKGOrders.dproj
View file @
f61278c7
...
...
@@ -94,6 +94,7 @@
<AppDPIAwarenessMode>PerMonitor</AppDPIAwarenessMode>
<TMSUseJSDebugger>2</TMSUseJSDebugger>
<TMSWebSingleInstance>1</TMSWebSingleInstance>
<TMSWebBrowser>5</TMSWebBrowser>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
f61278c7
...
...
@@ -373,13 +373,11 @@ begin
begin
SQL
:=
'SELECT o.ORDER_ID, o.LOCATION AS Loc, c.NAME AS COMPANY_NAME, o.JOB_NAME, o.ORDER_DATE, o.ORDER_TYPE, '
end
;
SQL
:=
SQL
+
generateSubquery
(
filterType
,
statusType
,
'PROOF'
);
SQL
:=
SQL
+
generateSubquery
(
filterType
,
statusType
,
'ART'
);
SQL
:=
SQL
+
generateSubquery
(
filterType
,
statusType
,
'PLATE'
);
SQL
:=
SQL
+
generateSubquery
(
filterType
,
statusType
,
'MOUNT'
);
SQL
:=
SQL
+
generateSubquery
(
filterType
,
statusType
,
'SHIP'
);
if
filterType
<>
''
then
begin
whereSQL
:=
'FROM orders o join '
+
statusTableLong
+
' '
+
statusTableShort
+
...
...
@@ -388,12 +386,8 @@ begin
'qb_sales_orders qb on qb.ORDER_ID = o.ORDER_ID '
+
'WHERE '
+
statusTableShort
+
'.ORDER_ID = o.ORDER_ID AND + '
+
statusTableShort
+
'.ORDER_STATUS = '
+
quotedStr
(
statusType
)
+
' AND '
+
quotedStr
(
startDate
)
+
' <= '
+
statusTableShort
+
'.STATUS_DATE '
;
if
endDate
<>
'1899/12/30'
then
begin
whereSQL
:=
whereSQL
+
'AND '
+
quotedStr
(
endDate
)
+
' >= '
+
statusTableShort
+
'.STATUS_DATE'
;
end
;
' AND '
+
quotedStr
(
startDate
)
+
' <= '
+
statusTableShort
+
'.STATUS_DATE AND '
+
quotedStr
(
endDate
)
+
' >= '
+
statusTableShort
+
'.STATUS_DATE'
;
SQL
:=
SQL
+
'o.PRICE, qb.QB_REF_NUM '
+
whereSQL
+
' ORDER BY '
+
filterType
+
' DESC LIMIT '
+
limit
+
' OFFSET '
+
offset
;
end
...
...
@@ -435,27 +429,14 @@ begin
if
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_TYPE'
).
AsString
=
'web_plate'
then
begin
Order
:=
TOrderItem
.
Create
;
TXDataOperationContext
.
Current
.
Handler
.
ManagedObjects
.
Add
(
Order
);
Result
.
data
.
Add
(
Order
);
order
.
ID
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_ID'
).
AsString
;
order
.
companyName
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'COMPANY_NAME'
).
AsString
;
order
.
jobName
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'JOB_NAME'
).
AsString
;
order
.
orderDate
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_DATE'
).
AsString
;
order
.
proofDue
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'PROOF_DUE'
).
AsString
;
order
.
proofDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'PROOF_DONE'
).
AsString
;
order
.
artDue
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ART_DUE'
).
AsString
;
order
.
artDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ART_DONE'
).
AsString
;
order
.
plateDue
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'PLATE_DUE'
).
AsString
;
order
.
plateDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'PLATE_DONE'
).
AsString
;
order
.
mountDue
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'MOUNT_DUE'
).
AsString
;
order
.
mountDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'MOUNT_DONE'
).
AsString
;
order
.
shipDue
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'SHIP_DUE'
).
AsString
;
order
.
shipDone
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'SHIP_DONE'
).
AsString
;
order
.
price
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'PRICE'
).
AsString
;
order
.
qbRefNum
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'QB_REF_NUM'
).
AsString
;
order
.
orderType
:=
ordersDB
.
UniQuery1
.
FieldByName
(
'ORDER_TYPE'
).
AsString
;
colorType
:=
'quantity_and_colors_qty_colors'
;
SQL
:=
'Select quantity_and_colors_qty_colors from web_plate_orders where order_id = '
+
order
.
ID
;
end
else
begin
colorType
:=
'colors_colors'
;
SQL
:=
'Select colors_colors from corrugated_plate_orders where order_id = '
+
order
.
ID
;
end
;
doQuery
(
ordersDB
.
UniQuery2
,
SQL
);
colors
:=
ordersDB
.
UniQuery2
.
FieldByName
(
ColorType
).
AsString
;
...
...
kgOrdersServer/kgOrdersServer.ini
View file @
f61278c7
[Settings]
MemoLogLevel
=
4
FileLogLevel
=
5
LogFileNum
=
3
0
LogFileNum
=
3
1
webClientVersion
=
1.0.0
[Database]
...
...
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