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
102303cd
Commit
102303cd
authored
Jun 04, 2025
by
Cam Hayes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Auto stash before checking out "origin/master"
Temp commint before merging
parent
95296f5f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
288 additions
and
54 deletions
+288
-54
Lookup.Service.pas
kgOrdersServer/Source/Lookup.Service.pas
+94
-0
Lookup.ServiceImpl.pas
kgOrdersServer/Source/Lookup.ServiceImpl.pas
+1
-0
qbAPI.dfm
kgOrdersServer/Source/qbAPI.dfm
+191
-52
qbAPI.pas
kgOrdersServer/Source/qbAPI.pas
+0
-0
kgOrdersServer.ini
kgOrdersServer/kgOrdersServer.ini
+2
-2
No files found.
kgOrdersServer/Source/Lookup.Service.pas
View file @
102303cd
...
@@ -376,6 +376,100 @@ type
...
@@ -376,6 +376,100 @@ type
general_special_instructions
:
string
;
general_special_instructions
:
string
;
end
;
end
;
// These objects are only used for quickbooks estimates.
TRef
=
record
value
:
string
;
name
:
string
;
// optional
end
;
TCustomerMemo
=
record
value
:
string
;
end
;
TAddress
=
record
Line1
:
string
;
Line2
:
string
;
// optional
Line3
:
string
;
// optional
Line4
:
string
;
//optional
Line5
:
string
;
//optional
City
:
string
;
CountrySubDivisionCode
:
string
;
PostalCode
:
string
;
Country
:
string
;
// optional
end
;
TTaxCodeRef
=
record
value
:
string
;
end
;
TClassRef
=
record
value
:
string
;
end
;
TSalesItemLineDetail
=
record
ItemRef
:
TRef
;
Qty
:
Double
;
UnitPrice
:
Double
;
TaxCodeRef
:
TTaxCodeRef
;
// optional
ClassRef
:
TClassRef
;
// optional
ServiceDate
:
string
;
// optional
end
;
TLine
=
record
Id
:
string
;
// optional (auto-generated if omitted)
LineNum
:
Integer
;
// optional
Description
:
string
;
// optional
Amount
:
Double
;
DetailType
:
string
;
SalesItemLineDetail
:
TSalesItemLineDetail
;
end
;
TCustomField
=
record
DefinitionId
:
string
;
Name
:
string
;
Type_
:
string
;
StringValue
:
string
;
end
;
TTxnTaxCodeRef
=
record
value
:
string
;
end
;
TTxnTaxDetail
=
record
TxnTaxCodeRef
:
TTxnTaxCodeRef
;
TotalTax
:
Double
;
end
;
TEmail
=
record
Address
:
string
;
end
;
TEstimate
=
record
DocNumber
:
string
;
// optional
TxnDate
:
string
;
PrivateNote
:
string
;
// optional
CustomerRef
:
TRef
;
CustomerMemo
:
TCustomerMemo
;
// optional
BillAddr
:
TAddress
;
// optional
ShipAddr
:
TAddress
;
// optional
ShipMethodRef
:
TRef
;
// optional
SalesTermRef
:
TRef
;
// optional
DueDate
:
string
;
// optional
ClassRef
:
TRef
;
// optional
DepartmentRef
:
TRef
;
// optional
CurrencyRef
:
TRef
;
// optional
ExchangeRate
:
Double
;
// optional
EmailStatus
:
string
;
// optional
BillEmail
:
TEmail
;
// optional
ShipDate
:
string
;
// optional
TrackingNum
:
string
;
// optional
CustomerMsgRef
:
TRef
;
// optional
CustomField
:
TArray
<
TCustomField
>;
// optional
Line
:
TArray
<
TLine
>;
TxnTaxDetail
:
TTxnTaxDetail
;
// optional
end
;
type
type
[
ServiceContract
,
Model
(
API_MODEL
)]
[
ServiceContract
,
Model
(
API_MODEL
)]
...
...
kgOrdersServer/Source/Lookup.ServiceImpl.pas
View file @
102303cd
...
@@ -2382,6 +2382,7 @@ begin
...
@@ -2382,6 +2382,7 @@ begin
ParsedCustomer
.
AddPair
(
'Id'
,
Customer
.
GetValue
<
string
>(
'Id'
));
ParsedCustomer
.
AddPair
(
'Id'
,
Customer
.
GetValue
<
string
>(
'Id'
));
ParsedCustomer
.
AddPair
(
'CompanyName'
,
Customer
.
GetValue
<
string
>(
'DisplayName'
));
ParsedCustomer
.
AddPair
(
'CompanyName'
,
Customer
.
GetValue
<
string
>(
'DisplayName'
));
// Handle Bill Address
// Handle Bill Address
if
Customer
.
GetValue
(
'BillAddr'
)
is
TJSONObject
then
if
Customer
.
GetValue
(
'BillAddr'
)
is
TJSONObject
then
begin
begin
...
...
kgOrdersServer/Source/qbAPI.dfm
View file @
102303cd
...
@@ -2,8 +2,8 @@ object fQB: TfQB
...
@@ -2,8 +2,8 @@ object fQB: TfQB
Left = 0
Left = 0
Top = 0
Top = 0
Caption = 'fQB'
Caption = 'fQB'
ClientHeight =
71
1
ClientHeight =
66
1
ClientWidth = 9
6
2
ClientWidth = 9
8
2
Color = clBtnFace
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Color = clWindowText
...
@@ -13,55 +13,24 @@ object fQB: TfQB
...
@@ -13,55 +13,24 @@ object fQB: TfQB
OnCreate = FormCreate
OnCreate = FormCreate
OnDestroy = FormDestroy
OnDestroy = FormDestroy
TextHeight = 15
TextHeight = 15
object Memo1: TMemo
Left = 0
Top = 76
Width = 962
Height = 260
Align = alBottom
Lines.Strings = (
'Memo1')
ScrollBars = ssVertical
TabOrder = 0
end
object Button1: TButton
Left = 42
Top = 18
Width = 87
Height = 25
Caption = 'Company Info'
TabOrder = 1
OnClick = Button1Click
end
object Memo2: TMemo
Left = 0
Top = 336
Width = 962
Height = 196
Align = alBottom
Lines.Strings = (
'')
ScrollBars = ssVertical
TabOrder = 2
end
object Button2: TButton
object Button2: TButton
Left =
135
Left =
4
Top =
2
2
Top =
3
2
Width =
87
Width =
111
Height = 25
Height = 25
Caption = 'Get Customers'
Caption = 'Get
QB
Customers'
TabOrder =
3
TabOrder =
0
OnClick = Button2Click
OnClick = Button2Click
end
end
object asgData: TAdvStringGrid
object asgData: TAdvStringGrid
Left = 0
Left = 0
Top =
53
2
Top =
48
2
Width = 9
6
2
Width = 9
8
2
Height = 179
Height = 179
Align = alBottom
Align = alBottom
DrawingStyle = gdsClassic
DrawingStyle = gdsClassic
FixedColor = clWhite
FixedColor = clWhite
TabOrder =
4
TabOrder =
1
GridLineColor = 13948116
GridLineColor = 13948116
GridFixedLineColor = 11250603
GridFixedLineColor = 11250603
ActiveCellFont.Charset = DEFAULT_CHARSET
ActiveCellFont.Charset = DEFAULT_CHARSET
...
@@ -179,6 +148,9 @@ object fQB: TfQB
...
@@ -179,6 +148,9 @@ object fQB: TfQB
SortSettings.HeaderMirrorColor = clWhite
SortSettings.HeaderMirrorColor = clWhite
SortSettings.HeaderMirrorColorTo = clWhite
SortSettings.HeaderMirrorColorTo = clWhite
Version = '9.1.4.1'
Version = '9.1.4.1'
ExplicitLeft = -40
ExplicitTop = 316
ExplicitWidth = 962
ColWidths = (
ColWidths = (
64
64
64
64
...
@@ -198,38 +170,205 @@ object fQB: TfQB
...
@@ -198,38 +170,205 @@ object fQB: TfQB
22)
22)
end
end
object Button3: TButton
object Button3: TButton
Left =
228
Left =
121
Top =
22
Top =
5
Width = 139
Width = 139
Height = 25
Height = 25
Caption = 'Get Customer By ID'
Caption = 'Get Customer By ID'
TabOrder =
5
TabOrder =
2
OnClick = Button3Click
OnClick = Button3Click
end
end
object Button4: TButton
object Button4: TButton
Left =
373
Left =
266
Top =
22
Top =
5
Width = 95
Width = 95
Height = 25
Height = 25
Caption = 'Add Estimate'
Caption = 'Add Estimate'
TabOrder =
6
TabOrder =
3
OnClick = Button4Click
OnClick = Button4Click
end
end
object Button5: TButton
object Button5: TButton
Left =
472
Left =
367
Top =
22
Top =
5
Width = 169
Width = 169
Height = 25
Height = 25
Caption = 'Show Customers with Orders'
Caption = 'Show Customers with Orders'
TabOrder =
7
TabOrder =
4
OnClick = Button5Click
OnClick = Button5Click
end
end
object Memo1: TMemo
Left = 0
Top = 60
Width = 982
Height = 228
Align = alBottom
Lines.Strings = (
'')
ScrollBars = ssVertical
TabOrder = 5
ExplicitWidth = 962
end
object asgData2: TAdvStringGrid
Left = 0
Top = 288
Width = 982
Height = 194
Align = alBottom
DrawingStyle = gdsClassic
FixedColor = clWhite
TabOrder = 6
GridLineColor = 13948116
GridFixedLineColor = 11250603
OnClickCell = asgData2ClickCell
ActiveCellFont.Charset = DEFAULT_CHARSET
ActiveCellFont.Color = 4474440
ActiveCellFont.Height = -12
ActiveCellFont.Name = 'Segoe UI'
ActiveCellFont.Style = [fsBold]
ActiveCellColor = 11565130
ActiveCellColorTo = 11565130
BorderColor = 11250603
ControlLook.FixedGradientFrom = clWhite
ControlLook.FixedGradientTo = clWhite
ControlLook.FixedGradientHoverTo = clWhite
ControlLook.FixedGradientHoverMirrorFrom = clWhite
ControlLook.FixedGradientHoverMirrorTo = clWhite
ControlLook.FixedGradientHoverBorder = 11645361
ControlLook.FixedGradientDownFrom = clWhite
ControlLook.FixedGradientDownTo = clWhite
ControlLook.FixedGradientDownMirrorFrom = clWhite
ControlLook.FixedGradientDownMirrorTo = clWhite
ControlLook.FixedGradientDownBorder = 11250603
ControlLook.DropDownHeader.Font.Charset = DEFAULT_CHARSET
ControlLook.DropDownHeader.Font.Color = clWindowText
ControlLook.DropDownHeader.Font.Height = -11
ControlLook.DropDownHeader.Font.Name = 'Segoe UI'
ControlLook.DropDownHeader.Font.Style = []
ControlLook.DropDownHeader.Visible = True
ControlLook.DropDownHeader.Buttons = <>
ControlLook.DropDownFooter.Font.Charset = DEFAULT_CHARSET
ControlLook.DropDownFooter.Font.Color = clWindowText
ControlLook.DropDownFooter.Font.Height = -11
ControlLook.DropDownFooter.Font.Name = 'Segoe UI'
ControlLook.DropDownFooter.Font.Style = []
ControlLook.DropDownFooter.Visible = True
ControlLook.DropDownFooter.Buttons = <>
ControlLook.ToggleSwitch.BackgroundBorderWidth = 1.000000000000000000
ControlLook.ToggleSwitch.ButtonBorderWidth = 1.000000000000000000
ControlLook.ToggleSwitch.CaptionFont.Charset = DEFAULT_CHARSET
ControlLook.ToggleSwitch.CaptionFont.Color = clWindowText
ControlLook.ToggleSwitch.CaptionFont.Height = -12
ControlLook.ToggleSwitch.CaptionFont.Name = 'Segoe UI'
ControlLook.ToggleSwitch.CaptionFont.Style = []
ControlLook.ToggleSwitch.Shadow = False
Filter = <>
FilterDropDown.Font.Charset = DEFAULT_CHARSET
FilterDropDown.Font.Color = clWindowText
FilterDropDown.Font.Height = -12
FilterDropDown.Font.Name = 'Segoe UI'
FilterDropDown.Font.Style = []
FilterDropDown.TextChecked = 'Checked'
FilterDropDown.TextUnChecked = 'Unchecked'
FilterDropDownClear = '(All)'
FilterEdit.TypeNames.Strings = (
'Starts with'
'Ends with'
'Contains'
'Not contains'
'Equal'
'Not equal'
'Larger than'
'Smaller than'
'Clear')
FixedRowHeight = 22
FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 3881787
FixedFont.Height = -11
FixedFont.Name = 'Segoe UI'
FixedFont.Style = [fsBold]
FloatFormat = '%.2f'
HoverButtons.Buttons = <>
HTMLSettings.ImageFolder = 'images'
HTMLSettings.ImageBaseName = 'img'
Look = glCustom
PrintSettings.DateFormat = 'dd/mm/yyyy'
PrintSettings.Font.Charset = DEFAULT_CHARSET
PrintSettings.Font.Color = clWindowText
PrintSettings.Font.Height = -12
PrintSettings.Font.Name = 'Segoe UI'
PrintSettings.Font.Style = []
PrintSettings.FixedFont.Charset = DEFAULT_CHARSET
PrintSettings.FixedFont.Color = clWindowText
PrintSettings.FixedFont.Height = -12
PrintSettings.FixedFont.Name = 'Segoe UI'
PrintSettings.FixedFont.Style = []
PrintSettings.HeaderFont.Charset = DEFAULT_CHARSET
PrintSettings.HeaderFont.Color = clWindowText
PrintSettings.HeaderFont.Height = -12
PrintSettings.HeaderFont.Name = 'Segoe UI'
PrintSettings.HeaderFont.Style = []
PrintSettings.FooterFont.Charset = DEFAULT_CHARSET
PrintSettings.FooterFont.Color = clWindowText
PrintSettings.FooterFont.Height = -12
PrintSettings.FooterFont.Name = 'Segoe UI'
PrintSettings.FooterFont.Style = []
PrintSettings.PageNumSep = '/'
SearchFooter.ColorTo = clNone
SearchFooter.FindNextCaption = 'Find &next'
SearchFooter.FindPrevCaption = 'Find &previous'
SearchFooter.Font.Charset = DEFAULT_CHARSET
SearchFooter.Font.Color = clWindowText
SearchFooter.Font.Height = -12
SearchFooter.Font.Name = 'Segoe UI'
SearchFooter.Font.Style = []
SearchFooter.HighLightCaption = 'Highlight'
SearchFooter.HintClose = 'Close'
SearchFooter.HintFindNext = 'Find next occurrence'
SearchFooter.HintFindPrev = 'Find previous occurrence'
SearchFooter.HintHighlight = 'Highlight occurrences'
SearchFooter.MatchCaseCaption = 'Match case'
SearchFooter.ResultFormat = '(%d of %d)'
SelectionColor = 13744549
SortSettings.HeaderColor = clWhite
SortSettings.HeaderColorTo = clWhite
SortSettings.HeaderMirrorColor = clWhite
SortSettings.HeaderMirrorColorTo = clWhite
Version = '9.1.4.1'
ExplicitWidth = 962
end
object Button6: TButton
Left = 538
Top = 5
Width = 108
Height = 25
Caption = 'Match Customers'
TabOrder = 7
OnClick = Button6Click
end
object Button7: TButton
Left = 652
Top = 5
Width = 186
Height = 25
Caption = 'Show Customers without Orders'
TabOrder = 8
OnClick = Button7Click
end
object Button1: TButton
Left = 4
Top = 5
Width = 111
Height = 25
Caption = 'Get KG Customers'
TabOrder = 9
OnClick = Button1Click
end
object uq: TUniQuery
object uq: TUniQuery
Connection = ApiDatabase.ucKG
Connection = ApiDatabase.ucKG
SQL.Strings = (
SQL.Strings = (
'select * from web_plate_orders')
'select * from web_plate_orders')
Left =
743
Left =
851
Top =
36
Top =
182
object uqORDER_ID: TIntegerField
object uqORDER_ID: TIntegerField
FieldName = 'ORDER_ID'
FieldName = 'ORDER_ID'
Required = True
Required = True
...
...
kgOrdersServer/Source/qbAPI.pas
View file @
102303cd
This diff is collapsed.
Click to expand it.
kgOrdersServer/kgOrdersServer.ini
View file @
102303cd
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
MemoLogLevel
=
3
MemoLogLevel
=
3
FileLogLevel
=
5
FileLogLevel
=
5
webClientVersion
=
0.9.2
webClientVersion
=
0.9.2
LogFileNum
=
6
2
1
LogFileNum
=
6
6
1
[Database]
[Database]
Server
=
192.168.159.131
Server
=
192.168.159.131
...
@@ -17,6 +17,6 @@ Password=emsys01
...
@@ -17,6 +17,6 @@ Password=emsys01
CompanyID
=
9341454272655710
CompanyID
=
9341454272655710
ClientID
=
ABgO14uvjh8XqLud7spQ8lkb98AUpcdA7HbyMJfCAtl65sQ5yy
ClientID
=
ABgO14uvjh8XqLud7spQ8lkb98AUpcdA7HbyMJfCAtl65sQ5yy
ClientSecret
=
bQ06TRemHeAGFzVHRaTUvUoBU9jpU9itK6MOMgqN
ClientSecret
=
bQ06TRemHeAGFzVHRaTUvUoBU9jpU9itK6MOMgqN
RefreshToken
=
RT1-1
13-H0-1757255538seyqgsf5e04vo9schkoa
RefreshToken
=
RT1-1
36-H0-1757775400coc1hvsehylf0uejgm7f
AccessToken
=
eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..Cqnj0xScf85NYKa6g4lanA.LN1AIU3ZlnDDbIMt-J4vl8V_gvcTfynSjGKYsmbhbfBJovq5IfZU4dHt6cqDAwUfnfOm42l-OpbwN9hWrZvUGlVx8x_3MA-vdtxIOByp7neq5vL2t4XcR5svPKIkX-CqlTsTb2ylBARiXehgk3tVHBysbHcnp0Ka0Ic_Waj64wQMYvE3Z-D19gCu-Xn9WFQwDICn8HSgJmHL2huLvRX-OrcxH6uERzLcQqRLsgT7fx9j68UWDW-KL_KRnzE43ieXlxXCwiCDnaF39Ei5iPHstnh19lGMgo1Z1mlF6tVZ9-8Z1prZutpiX8rzaPzS7Wdqo8pKtYaUqQZP6AGa6ZCqWR2BlF3y-R_FtheERNp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025 10:46:30 AM
LastRefresh
=
5/28/2025 10:46:30 AM
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