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
7c0f2fe8
Commit
7c0f2fe8
authored
Jan 07, 2025
by
Mac Stephens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed memory issues
parent
03dea1fa
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
34 deletions
+5
-34
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+0
-0
rOrders.pas
kgOrdersServer/Source/rOrders.pas
+2
-2
uLibrary.pas
kgOrdersServer/Source/uLibrary.pas
+0
-29
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+3
-3
No files found.
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
7c0f2fe8
This diff is collapsed.
Click to expand it.
kgOrdersServer/Source/rOrders.pas
View file @
7c0f2fe8
...
@@ -133,7 +133,7 @@ begin
...
@@ -133,7 +133,7 @@ begin
colorList
:=
TJSONArray
(
colorObject
.
GetValue
(
'items'
));
colorList
:=
TJSONArray
(
colorObject
.
GetValue
(
'items'
));
result
:=
IntToStr
(
colorList
.
Count
);
result
:=
IntToStr
(
colorList
.
Count
);
finally
finally
colorObject
.
Free
;
// Free TJSONObject to avoid leaks
colorObject
.
Free
;
end
;
end
;
end
;
end
;
end
;
end
;
...
@@ -161,7 +161,7 @@ begin
...
@@ -161,7 +161,7 @@ begin
frxOrders
.
Export
(
frxPDFExport1
);
frxOrders
.
Export
(
frxPDFExport1
);
//frxOrders.ShowPreparedReport;
//frxOrders.ShowPreparedReport;
finally
finally
frxOrders
.
Clear
;
// Clear
the report to avoid memory bloat
frxOrders
.
Clear
;
// Clears
the report to avoid memory bloat
end
;
end
;
Logger
.
Log
(
5
,
'PDF saved to: '
+
ReportFileName
);
Logger
.
Log
(
5
,
'PDF saved to: '
+
ReportFileName
);
...
...
kgOrdersServer/Source/uLibrary.pas
View file @
7c0f2fe8
...
@@ -7,7 +7,6 @@ uses
...
@@ -7,7 +7,6 @@ uses
procedure
LoadDatabaseSettings
(
uc
:
TUniConnection
;
iniFilename
:
string
);
procedure
LoadDatabaseSettings
(
uc
:
TUniConnection
;
iniFilename
:
string
);
procedure
DoQuery
(
uq
:
TUniQuery
;
sql
:
string
);
procedure
DoQuery
(
uq
:
TUniQuery
;
sql
:
string
);
function
CalculateAge
(
const
dob
,
dt
:
TDateTime
):
Integer
;
implementation
implementation
...
@@ -39,33 +38,5 @@ begin
...
@@ -39,33 +38,5 @@ begin
uq
.
Open
;
uq
.
Open
;
end
;
end
;
function
CalculateAge
(
const
dob
,
dt
:
TDateTime
):
Integer
;
var
age
:
Integer
;
y1
,
m1
,
d1
,
y2
,
m2
,
d2
:
Word
;
begin
Result
:=
0
;
if
dt
<
dob
then
Exit
;
DecodeDate
(
dob
,
y1
,
m1
,
d1
);
DecodeDate
(
dt
,
y2
,
m2
,
d2
);
age
:=
y2
-
y1
;
// Feb 29
//if ( (m1=2) and (d1=29) ) and ( not IsLeapYear(y2) ) then
// d1 := 28;
if
(
m1
=
2
)
and
(
d1
=
29
)
and
(
not
(
IsLeapYear
(
y2
)))
then
begin
m1
:=
3
;
d1
:=
1
;
end
;
if
(
m2
<
m1
)
or
((
m2
=
m1
)
and
(
d2
<
d1
))
then
Dec
(
age
);
Result
:=
age
end
;
end
.
end
.
kgOrdersServer/kgOrdersServer.ini
View file @
7c0f2fe8
[Settings]
[Settings]
MemoLogLevel
=
4
MemoLogLevel
=
4
FileLogLevel
=
5
FileLogLevel
=
5
LogFileNum
=
71
LogFileNum
=
90
webClientVersion
=
1.0.0
webClientVersion
=
1.0.0
[Database]
[Database]
Server
=
192.168.159.132
--
Server
=
192.168.159.132
--
Server
=
192.168.102.130
Server
=
192.168.102.130
--Server
=
192.168.75.133
--Server
=
192.168.75.133
--Database
=
--Database
=
--Username
=
--Username
=
...
...
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