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
5be931b6
Commit
5be931b6
authored
Nov 21, 2025
by
Cam Hayes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleaned up warnings on server side
parent
e9209347
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
42 additions
and
171 deletions
+42
-171
Auth.ServiceImpl.pas
kgOrdersServer/Source/Auth.ServiceImpl.pas
+2
-12
Data.dfm
kgOrdersServer/Source/Data.dfm
+2
-4
Data.pas
kgOrdersServer/Source/Data.pas
+0
-3
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+27
-77
qbAPI.pas
kgOrdersServer/Source/qbAPI.pas
+0
-0
rOrderCorrugated.pas
kgOrdersServer/Source/rOrderCorrugated.pas
+2
-21
rOrderCutting.pas
kgOrdersServer/Source/rOrderCutting.pas
+1
-19
rOrderList.dfm
kgOrdersServer/Source/rOrderList.dfm
+3
-1
rOrderList.pas
kgOrdersServer/Source/rOrderList.pas
+0
-5
rOrderWeb.pas
kgOrdersServer/Source/rOrderWeb.pas
+2
-22
kgOrdersServer.dpr
kgOrdersServer/kgOrdersServer.dpr
+1
-3
kgOrdersServer.dproj
kgOrdersServer/kgOrdersServer.dproj
+2
-4
No files found.
kgOrdersServer/Source/Auth.ServiceImpl.pas
View file @
5be931b6
...
...
@@ -17,7 +17,6 @@ type
TAuthService
=
class
(
TInterfacedObject
,
IAuthService
)
strict
private
authDB
:
TAuthDatabase
;
function
GetQuery
:
TUniQuery
;
private
userName
:
string
;
userFullName
:
string
;
...
...
@@ -28,12 +27,12 @@ type
userEmail
:
string
;
userStatus
:
string
;
qbEnabled
:
boolean
;
procedure
AfterConstruction
;
override
;
procedure
BeforeDestruction
;
override
;
function
CheckUser
(
const
user
,
password
:
string
):
Integer
;
public
function
Login
(
const
user
,
password
:
string
):
string
;
function
VerifyVersion
(
ClientVersion
:
string
):
TJSONObject
;
procedure
AfterConstruction
;
override
;
procedure
BeforeDestruction
;
override
;
end
;
implementation
...
...
@@ -72,11 +71,6 @@ begin
inherited
;
end
;
function
TAuthService
.
GetQuery
:
TUniQuery
;
begin
Result
:=
authDB
.
uq
;
end
;
function
TAuthService
.
VerifyVersion
(
ClientVersion
:
string
):
TJSONObject
;
var
iniFile
:
TIniFile
;
...
...
@@ -115,8 +109,6 @@ var
JWT
:
TJWT
;
begin
Logger
.
Log
(
3
,
Format
(
'AuthService.Login - User: "%s"'
,
[
User
]));
userState
:=
CheckUser
(
user
,
password
);
try
userState
:=
CheckUser
(
user
,
password
);
except
...
...
@@ -174,12 +166,10 @@ end;
function
TAuthService
.
CheckUser
(
const
user
,
password
:
string
):
Integer
;
var
userStr
:
string
;
SQL
:
string
;
name
:
string
;
checkString
:
string
;
begin
Result
:=
0
;
Logger
.
Log
(
1
,
Format
(
'AuthService.CheckUser - User: "%s"'
,
[
user
])
);
SQL
:=
'select * from users where USER_NAME = '
+
QuotedStr
(
user
);
DoQuery
(
authDB
.
uq
,
SQL
);
...
...
kgOrdersServer/Source/Data.dfm
View file @
5be931b6
...
...
@@ -43,8 +43,6 @@ object FData: TFData
Lines.Strings = (
'Memo1')
TabOrder = 1
ExplicitLeft = -2
ExplicitTop = 435
end
object DBAdvGrid1: TDBAdvGrid
Left = 6
...
...
@@ -174,7 +172,7 @@ object FData: TFData
SortSettings.HeaderColorTo = clWhite
SortSettings.HeaderMirrorColor = clWhite
SortSettings.HeaderMirrorColorTo = clWhite
Version = '2.8.3.
3
'
Version = '2.8.3.
8
'
AutoCreateColumns = True
AutoRemoveColumns = True
Columns = <
...
...
@@ -755,7 +753,7 @@ object FData: TFData
SortSettings.HeaderColorTo = clWhite
SortSettings.HeaderMirrorColor = clWhite
SortSettings.HeaderMirrorColorTo = clWhite
Version = '2.8.3.
3
'
Version = '2.8.3.
8
'
AutoCreateColumns = True
AutoRemoveColumns = True
Columns = <
...
...
kgOrdersServer/Source/Data.pas
View file @
5be931b6
...
...
@@ -130,8 +130,6 @@ type
procedure
Button1Click
(
Sender
:
TObject
);
private
kgDB
:
TApiDatabase
;
accountSID
:
string
;
authHeader
:
string
;
public
procedure
RunOrdersReport
(
searchOptions
:
string
);
end
;
...
...
@@ -190,7 +188,6 @@ procedure TFData.btnFindClick(Sender: TObject);
// whereSQL: where section of the SQL that is built in the function
var
SQL
:
string
;
whereSQL
:
string
;
begin
Memo1
.
Lines
.
Add
(
uqUsers
.
Connection
.
Server
);
SQL
:=
'select * from users'
;
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
5be931b6
This diff is collapsed.
Click to expand it.
kgOrdersServer/Source/qbAPI.pas
View file @
5be931b6
This diff is collapsed.
Click to expand it.
kgOrdersServer/Source/rOrderCorrugated.pas
View file @
5be931b6
...
...
@@ -5,7 +5,7 @@ interface
uses
System
.
SysUtils
,
System
.
Classes
,
Data
.
DB
,
MemDS
,
DBAccess
,
Uni
,
Common
.
Logging
,
frxClass
,
frxExportBaseDialog
,
frxExportPDF
,
frCoreClasses
,
frxDBSet
,
JS
,
JSON
,
frxTableObject
,
frxUtils
;
frxTableObject
,
frxUtils
,
System
.
Generics
.
Collections
;
type
TrptOrderCorrugated
=
class
(
TDataModule
)
...
...
@@ -156,8 +156,7 @@ var
colorArray
:
TJSONArray
;
colorsObject
,
colorObject
:
TJSONObject
;
colorsString
:
string
;
i
,
rowIndex
:
Integer
;
temp
:
TObject
;
i
:
Integer
;
begin
logger
.
Log
(
5
,
'Adding Color Rows'
);
...
...
@@ -181,31 +180,13 @@ end;
function
TrptOrderCorrugated
.
PrepareReport
(
SQL
:
string
):
string
;
var
orderList
:
TJSObject
;
i
:
integer
;
data
:
TJSArray
;
order
:
TJSObject
;
callListLength
:
integer
;
tempString
,
strColorList
:
string
;
colorObject
:
TJSONObject
;
colorList
:
TJSArray
;
colorLength
:
integer
;
color
:
TJSObject
;
colorJSON
:
TJSONObject
;
colorListJSON
:
TJSONArray
;
items
:
TJSObject
;
begin
Logger
.
Log
(
5
,
'Generated SQL for Prepare Report: '
+
SQL
);
doQuery
(
uqOrderCorrugated
,
SQL
);
if
(
string
(
uqOrderCorrugated
.
FieldByName
(
'colors_colors'
).
AsString
)
)
<>
''
then
begin
PopulateColorTable
();
end
;
result
:=
GeneratePDF
;
Logger
.
Log
(
5
,
'Report preparation complete.'
);
...
...
kgOrdersServer/Source/rOrderCutting.pas
View file @
5be931b6
...
...
@@ -82,29 +82,11 @@ end;
function
TrptOrderCutting
.
PrepareReport
(
SQL
:
string
):
string
;
var
orderList
:
TJSObject
;
i
:
integer
;
data
:
TJSArray
;
order
:
TJSObject
;
callListLength
:
integer
;
tempString
,
strColorList
:
string
;
colorObject
:
TJSONObject
;
colorList
:
TJSArray
;
colorLength
:
integer
;
color
:
TJSObject
;
colorJSON
:
TJSONObject
;
colorListJSON
:
TJSONArray
;
items
:
TJSObject
;
begin
Logger
.
Log
(
3
,
'Generated SQL for Prepare Report: '
+
SQL
);
//SQL := 'select * from corrugated_plate_orders where ORDER_ID = 18381';
doQuery
(
uqOrderCutting
,
SQL
);
result
:=
GeneratePDF
;
Logger
.
Log
(
5
,
'Report preparation complete.'
);
end
;
...
...
kgOrdersServer/Source/rOrderList.dfm
View file @
5be931b6
...
...
@@ -3,7 +3,7 @@ object rptOrderList: TrptOrderList
Height = 480
Width = 640
object frxOrderList: TfrxReport
Version = '2025.
1
.4'
Version = '2025.
2
.4'
DotMatrixReport = False
IniFile = '\Software\Fast Reports'
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick, pbCopy, pbSelection]
...
...
@@ -26,6 +26,7 @@ object rptOrderList: TrptOrderList
end>
Variables = <>
Style = <>
Watermarks = <>
object Data: TfrxDataPage
Height = 1000.000000000000000000
Width = 1000.000000000000000000
...
...
@@ -1065,6 +1066,7 @@ object rptOrderList: TrptOrderList
PdfA = False
PDFStandard = psNone
PDFVersion = pv17
PDFColorSpace = csDeviceRGB
Left = 288
Top = 166
end
...
...
kgOrdersServer/Source/rOrderList.pas
View file @
5be931b6
...
...
@@ -83,9 +83,7 @@ end;
function
TrptOrderList
.
PrepareReport
(
SQL
,
CompanyName
:
string
):
string
;
var
memo
:
TFrxMemoView
;
temp
:
TDateTime
;
DateFormat
:
TFormatSettings
;
tempStr
:
string
;
begin
Logger
.
Log
(
5
,
'Generated SQL for Prepare Report: '
+
SQL
);
...
...
@@ -103,9 +101,6 @@ begin
DateFormat
.
TimeSeparator
:=
':'
;
DateFormat
.
ShortTimeFormat
:=
'HH:nn'
;
tempStr
:=
FormatDateTime
(
'm/d/yyyy HH:nn'
,
uqOrdersORDER_DATE
.
AsDateTime
);
temp
:=
StrToDateTime
(
FormatDateTime
(
'm/d/yyyy HH:nn'
,
uqOrdersORDER_DATE
.
AsDateTime
),
DateFormat
);
uqOrdersORDER_DATE
.
AsDateTime
:=
RecodeSecond
(
uqOrdersORDER_DATE
.
AsDateTime
,
0
);
uqOrders
.
Post
;
...
...
kgOrdersServer/Source/rOrderWeb.pas
View file @
5be931b6
...
...
@@ -5,7 +5,7 @@ interface
uses
System
.
SysUtils
,
System
.
Classes
,
Data
.
DB
,
MemDS
,
DBAccess
,
Uni
,
Common
.
Logging
,
frxClass
,
frxExportBaseDialog
,
frxExportPDF
,
frCoreClasses
,
frxDBSet
,
JS
,
JSON
,
frxTableObject
,
frxUtils
;
frxTableObject
,
frxUtils
,
System
.
Generics
.
Collections
;
type
TrptOrderWeb
=
class
(
TDataModule
)
...
...
@@ -155,8 +155,7 @@ var
colorArray
:
TJSONArray
;
colorsObject
,
colorObject
:
TJSONObject
;
colorsString
:
string
;
i
,
rowIndex
:
Integer
;
temp
:
TObject
;
i
:
Integer
;
begin
logger
.
Log
(
5
,
'Adding Color Rows'
);
...
...
@@ -180,32 +179,14 @@ end;
function
TrptOrderWeb
.
PrepareReport
(
SQL
:
string
):
string
;
var
orderList
:
TJSObject
;
i
:
integer
;
data
:
TJSArray
;
order
:
TJSObject
;
callListLength
:
integer
;
tempString
,
strColorList
:
string
;
colorObject
:
TJSONObject
;
colorList
:
TJSArray
;
colorLength
:
integer
;
color
:
TJSObject
;
colorJSON
:
TJSONObject
;
colorListJSON
:
TJSONArray
;
items
:
TJSObject
;
begin
Logger
.
Log
(
3
,
'Generated SQL for Prepare Report: '
+
SQL
);
//SQL := 'select * from corrugated_plate_orders where ORDER_ID = 18381';
doQuery
(
uqOrderWeb
,
SQL
);
if
(
string
(
uqOrderWeb
.
FieldByName
(
'quantity_and_colors_qty_colors'
).
AsString
)
)
<>
''
then
begin
PopulateColorTable
();
end
;
result
:=
GeneratePDF
;
Logger
.
Log
(
3
,
'Report preparation complete.'
);
...
...
@@ -233,7 +214,6 @@ begin
try
frxOrderWeb
.
PrepareReport
;
frxOrderWeb
.
Export
(
frxPDFExport1
);
//frxOrderWeb.ShowPreparedReport;
finally
frxOrderWeb
.
Clear
;
// Clears the report to avoid memory bloat
end
;
...
...
kgOrdersServer/kgOrdersServer.dpr
View file @
5be931b6
...
...
@@ -26,9 +26,7 @@ uses
rOrderCorrugated in 'Source\rOrderCorrugated.pas' {rptOrderCorrugated: TDataModule},
rOrderWeb in 'Source\rOrderWeb.pas' {rptOrderWeb: TDataModule},
rOrderCutting in 'Source\rOrderCutting.pas' {rptOrderCutting: TDataModule},
qbAPI in 'Source\qbAPI.pas' {fQB},
QBService in 'Source\QBService.pas',
QBServiceImplementation in 'Source\QBServiceImplementation.pas';
qbAPI in 'Source\qbAPI.pas' {fQB};
type
TMemoLogAppender = class( TInterfacedObject, ILogAppender )
...
...
kgOrdersServer/kgOrdersServer.dproj
View file @
5be931b6
...
...
@@ -205,8 +205,6 @@
<Form>fQB</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="Source\QBService.pas"/>
<DCCReference Include="Source\QBServiceImplementation.pas"/>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
...
...
@@ -235,13 +233,13 @@
</Excluded_Packages>
</Delphi.Personality>
<Deployment Version="5">
<DeployFile LocalName="kgOrdersServer.exe" Configuration="Debug" Class="ProjectOutput"/>
<DeployFile LocalName="kgOrdersServer.exe" Configuration="Debug" Class="ProjectOutput">
<DeployFile LocalName="bin\kgOrdersServer.exe" Configuration="Debug" Class="ProjectOutput">
<Platform Name="Win32">
<RemoteName>kgOrdersServer.exe</RemoteName>
<Overwrite>true</Overwrite>
</Platform>
</DeployFile>
<DeployFile LocalName="kgOrdersServer.exe" Configuration="Debug" Class="ProjectOutput"/>
<DeployClass Name="AdditionalDebugSymbols">
<Platform Name="iOSSimulator">
<Operation>1</Operation>
...
...
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