Commit 151f60b4 by Cam Hayes

Redesigned how GetQBCustomers worked

parent 4700fcf0
......@@ -89,7 +89,6 @@ begin
end;
end;
procedure ShowErrorModal(msg: string);
begin
asm
......@@ -117,7 +116,6 @@ begin
end;
end;
procedure ShowNotificationModal(msg: string);
begin
asm
......
......@@ -221,7 +221,7 @@ object FViewAddCustomer: TFViewAddCustomer
Title = 'ID'
end
item
DataField = 'ADDRESS'
DataField = 'ship_block'
Title = 'Address'
end>
DataSource = wdsShipTo
......@@ -399,22 +399,6 @@ object FViewAddCustomer: TFViewAddCustomer
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object wdblcbRep: TWebDBLookupComboBox
Left = 19
Top = 216
Width = 145
Height = 22
ElementID = 'wdblcbrep'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnChange = wdblcbRepChange
OnEnter = wdblcbRepChange
DataField = 'REP_USER_ID'
DataSource = WebDataSource1
KeyField = 'userID'
ListField = 'representative'
ListSource = wdsUsers
end
object btnLink: TWebButton
Left = 19
Top = 566
......@@ -441,6 +425,22 @@ object FViewAddCustomer: TFViewAddCustomer
WidthPercent = 100.000000000000000000
OnClick = btnUpdateClick
end
object edtRepUser: TWebDBEdit
Left = 19
Top = 216
Width = 121
Height = 22
ChildOrder = 12
ElementClassName = 'form-control'
ElementID = 'edtrepuser'
ElementFont = efCSS
Enabled = False
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'QB_TYPE'
DataSource = WebDataSource1
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left = 454
......@@ -495,8 +495,8 @@ object FViewAddCustomer: TFViewAddCustomer
object XDataWebDataSet1CUSTOMER_ID: TIntegerField
FieldName = 'CUSTOMER_ID'
end
object XDataWebDataSet1REP_USER_ID: TStringField
FieldName = 'REP_USER_ID'
object XDataWebDataSet1QB_TYPE: TStringField
FieldName = 'QB_TYPE'
end
end
object wdsShipTo: TWebDataSource
......@@ -508,9 +508,6 @@ object FViewAddCustomer: TFViewAddCustomer
object xdwdsShipTo: TXDataWebDataSet
Left = 698
Top = 44
object xdwdsShipToADDRESS: TStringField
FieldName = 'ADDRESS'
end
object xdwdsShipToship_id: TStringField
FieldName = 'ship_id'
end
......@@ -529,6 +526,9 @@ object FViewAddCustomer: TFViewAddCustomer
object xdwdsShipTocontact: TStringField
FieldName = 'contact'
end
object xdwdsShipToship_block: TStringField
FieldName = 'ship_block'
end
end
object tmrReturn: TWebTimer
Enabled = False
......@@ -545,16 +545,8 @@ object FViewAddCustomer: TFViewAddCustomer
object xdwdsUsers: TXDataWebDataSet
Left = 776
Top = 54
object xdwdsUsersuserID: TStringField
FieldName = 'userID'
end
object xdwdsUsersfull_name: TStringField
FieldName = 'full_name'
Size = 0
end
object xdwdsUsersrepresentative: TStringField
FieldName = 'representative'
Size = 0
object xdwdsUsersQBID: TStringField
FieldName = 'QBID'
end
end
end
......@@ -57,12 +57,15 @@
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Customer ID:</label>
<input id="edtcompanyaccountname"type="text" class="form-control" style="width: 150px" required/>
<div class="invalid-feedback" id="shortnamefeedback" style="font-size: 15px;">
Please Provide a Company Account Name.
Please Provide a Company ID.
</div>
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Representative:</label>
<select id="wdblcbrep" class='form-select'></select>
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Territory:</label>
<input id="edtrepuser"type="text" class="form-control" style="width: 150px"/>
<div class="invalid-feedback" id="territorywarning" style="font-size: 15px;">
Territory not found in kgOrders
</div>
</div>
</div>
<h4 class="custom-h4 mt-3">Billing Information</h4>
......
......@@ -50,7 +50,6 @@ type
edtShippingContact: TWebEdit;
edtShippingZip: TWebEdit;
edtShippingCity: TWebEdit;
xdwdsShipToADDRESS: TStringField;
xdwdsShipToship_id: TStringField;
xdwdsShipToshipping_address: TStringField;
xdwdsShipTocity: TStringField;
......@@ -69,15 +68,14 @@ type
edtFirstLine: TWebEdit;
wdsUsers: TWebDataSource;
xdwdsUsers: TXDataWebDataSet;
wdblcbRep: TWebDBLookupComboBox;
xdwdsUsersuserID: TStringField;
XDataWebDataSet1REP_USER_ID: TStringField;
xdwdsUsersfull_name: TStringField;
lblFormState: TWebLabel;
[async]
xdwdsUsersrepresentative: TStringField;
btnLink: TWebButton;
btnUpdate: TWebButton; procedure btnSaveClick(Sender: TObject);
btnUpdate: TWebButton;
edtRepUser: TWebDBEdit;
xdwdsUsersQBID: TStringField;
xdwdsShipToship_block: TStringField;
XDataWebDataSet1QB_TYPE: TStringField; procedure btnSaveClick(Sender: TObject);
procedure btnCancelClick(Sender: TObject);
procedure btnCloseClick(Sender: TObject);
procedure btnEditClick(Sender: TObject);
......@@ -114,12 +112,12 @@ type
[async] procedure InitializeForm;
var
customerID: string;
qbCustJSON: string;
QB_ID, qbCustJSON: string;
mode: string;
shipmode: string;
public
{ Public declarations }
class function CreateForm(AElementID, custID, custJSON: string): TWebForm;
class function CreateForm(AElementID, custID, custQB_ID: string): TWebForm;
end;
var
......@@ -132,7 +130,7 @@ implementation
uses View.Main, View.Customers, View.Customer.Select, Utils;
class function TFViewAddCustomer.CreateForm(AElementID, custID, custJSON: string): TWebForm;
class function TFViewAddCustomer.CreateForm(AElementID, custID, custQB_ID: string): TWebForm;
begin
Application.CreateForm(TFViewAddCustomer, AElementID, Result,
procedure(AForm: TObject)
......@@ -140,7 +138,7 @@ begin
with TFViewAddCustomer(AForm) do
begin
customerID := custID;
qbCustJSON := custJSON;
QB_ID := custQB_ID;
InitializeForm;
end;
......@@ -153,12 +151,22 @@ end;
var
JSONObj, obj: TJSONObject;
arr: TJSONArray;
xdcResponse: TXDataClientResponse;
RepUsers, QBCustomer: TJSObject;
JSONStr: string;
input: TJSHTMLInputElement;
begin
if customerID = '' then
begin
mode := 'ADD';
JSONObj := TJSONObject.ParseJSONValue(qbCustJSON) as TJSONObject;
try
try
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetQBCustomer', [QB_ID]));
qbCustJSON := string(TJSJSON.stringify(xdcResponse.Result));
console.log(qbCustJSON);
JSONObj := TJSONObject.ParseJSONValue(qbCustJSON) as TJSONObject;
//JSONObj := TJSONObject.ParseJSONValue(qbCustJSON) as TJSONObject;
XDataWebDataSet1.Open;
XDataWebDataSet1.Append;
......@@ -169,21 +177,44 @@ begin
XDataWebDataSet1.FieldByName('BILL_STATE').AsString := JSONObj.GetValue('BILL_STATE').Value;
XDataWebDataSet1.FieldByName('BILL_ZIP').AsString := JSONObj.GetValue('BILL_ZIP').Value;
XDataWebDataSet1.FieldByName('BILL_CONTACT').AsString := JSONObj.GetValue('BILL_CONTACT').Value;
XDataWebDataSet1QB_TYPE.AsString := JSONObj.GetValue('RepUser').Value;
//XDataWebDataSet1.FieldByName('BILL_ADDRESS_BLOCK').AsString := JSONObj.GetValue('BILL_ADDRESS_BLOCK').Value;
XDataWebDataSet1.Post;
xdwdsShipTo.Open;
xdwdsShipTo.Append;
xdwdsShipTo.FieldByName('shipping_address').AsString := JSONObj.GetValue('address').Value;
xdwdsShipTo.FieldByName('shipping_address').AsString := JSONObj.GetValue('shipping_address').Value;
xdwdsShipTo.FieldByName('city').AsString := JSONObj.GetValue('city').Value;
xdwdsShipTo.FieldByName('state').AsString := JSONObj.GetValue('state').Value;
xdwdsShipTo.FieldByName('zip').AsString := JSONObj.GetValue('zip').Value;
xdwdsShipTo.FieldByName('ADDRESS').AsString := JSONObj.GetValue('ship_block').Value;
xdwdsShipTo.FieldByName('ship_block').AsString := JSONObj.GetValue('ship_block').Value;
xdwdsShipTo.FieldByName('contact').AsString := JSONObj.GetValue('contact').Value ;
xdwdsShipTo.Post;
xdwdsShipTo.First;
EditMode();
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetRepUsers', []));
RepUsers := TJSObject(xdcResponse.Result);
xdwdsUsers.Close;
xdwdsUsers.SetJSONData(RepUsers['value']);
xdwdsUsers.Open;
CustomerID := '';
input := TJSHTMLInputElement(document.getElementById('edtrepuser'));
if not xdwdsUsers.Locate('QBID', XDataWebDataSet1QB_TYPE.AsString, []) then
begin
input.classList.add('changed-field');
input.classList.add('is-invalid');
end
else
input.classList.remove('changed-field');
EditMode();
except
on E: EXDataClientRequestException do
Utils.ShowErrorModal(E.ErrorResult.ErrorMessage);
end;
finally
JSONObj.Free;
end;
......@@ -405,7 +436,7 @@ begin
edtShippingState.Text := xdwdsShipTo.FieldByName('state').AsString;
edtShippingZip.Text := xdwdsShipTo.FieldByName('zip').AsString;
edtShippingContact.Text := xdwdsShipTo.FieldByName('contact').AsString;
memoShipBlock.Text := xdwdsShipTo.FieldByName('ADDRESS').AsString;
memoShipBlock.Text := xdwdsShipTo.FieldByName('ship_block').AsString;
if memoShipBlock.Lines.Count > 0 then
edtFirstLine.Text := memoShipBlock.Lines[0]
......@@ -507,6 +538,7 @@ var
Response: TXDataClientResponse;
notification: TJSObject;
input: TJSHTMLElement;
jsonObj: TJSONObject;
msg: string;
BILL_ADDRESS_BLOCK: string;
begin
......@@ -547,17 +579,19 @@ begin
Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.AddCustomer',
[customerJSON.ToJSON]));
notification := TJSObject(Response.Result);
end
else
begin
JSONObj := TJSONObject.ParseJSONValue(qbCustJSON) as TJSONObject;
JSONObj.AddPair('SHORT_NAME', XDataWebDataSet1SHORT_NAME.AsString);
Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.ImportQBCustomer',
[qbCustJSON]));
mode := 'EDIT';
[JSONObj.ToString]));
XDataWebDataSet1.Edit;
notification := TJSObject(Response.Result);
XDataWebDataSet1Customer_ID.AsInteger := integer(notification['CustomerID']);
XDataWebDataSet1.Post;
end;
notification := TJSObject(Response.Result);
msg := string(notification['status']);
if CustomerID = '' then
CustomerID := string(notification['CustomerID']);
......@@ -579,6 +613,7 @@ begin
TJSHTMLInputElement(document.getElementById('edtbillingcity')).classList.remove('changed-field');
TJSHTMLInputElement(document.getElementById('edtbillingstate')).classList.remove('changed-field');
TJSHTMLInputElement(document.getElementById('edtbillingzip')).classList.remove('changed-field');
mode := 'EDIT';
end;
end;
......@@ -592,9 +627,14 @@ begin
end;
procedure TFViewAddCustomer.Save;
var
input: TJSHTMLInputElement;
begin
await(sendCustomerToServer());
await(GetCustomer());
input := TJSHTMLInputElement(document.getElementById('edtrepuser'));
input.classList.remove('changed-field');
input.classList.remove('is-invalid');
ViewMode();
end;
......@@ -691,13 +731,13 @@ begin
xdwdsShipTo.Open;
memoAddressBlock.Text := string(customer['staff_fields_invoice_to']);
console.log(customer['SHIPPING_ADDRESS_LIST']);
edtShippingAddress.Text := xdwdsShipTo.FieldByName('shipping_address').AsString;
edtShippingCity.Text := xdwdsShipTo.FieldByName('city').AsString;
edtShippingState.Text := xdwdsShipTo.FieldByName('state').AsString;
edtShippingZip.Text := xdwdsShipTo.FieldByName('zip').AsString;
edtShippingContact.Text := xdwdsShipTo.FieldByName('contact').AsString;
memoShipBlock.Text := xdwdsShipTo.FieldByName('ADDRESS').AsString;
memoShipBlock.Text := xdwdsShipTo.FieldByName('ship_block').AsString;
if memoShipBlock.Lines.Count > 0 then
edtFirstLine.Text := memoShipBlock.Lines[0]
else
......@@ -914,8 +954,6 @@ begin
edtShippingContact.Enabled := true;
edtFirstLine.Enabled := true;
wdblcbRep.Enabled := false;
lblFormState.Caption := 'Edit Address';
lblFormState.ElementHandle.classList.remove('text-danger');
lblFormState.ElementHandle.classList.add('text-success');
......@@ -949,7 +987,6 @@ begin
btnShipSave.Enabled := false;
btnShipCancel.Enabled := false;
wdblcbRep.Enabled := true;
lblFormState.Caption := 'View Mode';
lblFormState.ElementHandle.classList.remove('text-success');
......
......@@ -9,8 +9,8 @@ object FSelectCustomer: TFSelectCustomer
Width = 95
Height = 15
Caption = 'Search Customers'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
end
object WebLabel2: TWebLabel
Left = 279
......@@ -18,8 +18,8 @@ object FSelectCustomer: TFSelectCustomer
Width = 134
Height = 15
Caption = 'Selected Customer Name'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
end
object WebLabel3: TWebLabel
Left = 131
......@@ -27,8 +27,8 @@ object FSelectCustomer: TFSelectCustomer
Width = 113
Height = 15
Caption = 'Selected Customer ID'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
end
object edtSearch: TWebEdit
Left = 4
......@@ -36,8 +36,8 @@ object FSelectCustomer: TFSelectCustomer
Width = 121
Height = 22
ChildOrder = 2
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnChange = edtSearchChange
end
object edtName: TWebEdit
......@@ -47,8 +47,8 @@ object FSelectCustomer: TFSelectCustomer
Height = 22
ChildOrder = 1
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
end
object TMSFNCGrid1: TTMSFNCGrid
Left = 0
......@@ -59,7 +59,7 @@ object FSelectCustomer: TFSelectCustomer
ParentDoubleBuffered = False
DoubleBuffered = True
TabOrder = 2
DefaultRowHeight = 40.000000000000000000
DefaultRowHeight = 40.00000000000000000
FixedColumns = 0
ColumnCount = 4
Options.Bands.Enabled = True
......@@ -85,7 +85,7 @@ object FSelectCustomer: TFSelectCustomer
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 90.000000000000000000
Width = 90.00000000000000000
end
item
BorderWidth = 1
......@@ -100,7 +100,7 @@ object FSelectCustomer: TFSelectCustomer
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 150.000000000000000000
Width = 150.00000000000000000
end
item
BorderWidth = 1
......@@ -115,7 +115,7 @@ object FSelectCustomer: TFSelectCustomer
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 200.000000000000000000
Width = 400.00000000000000000
end
item
BorderWidth = 1
......@@ -130,7 +130,7 @@ object FSelectCustomer: TFSelectCustomer
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 306.000000000000000000
Width = 106.00000000000000000
end
item
BorderWidth = 1
......@@ -145,7 +145,7 @@ object FSelectCustomer: TFSelectCustomer
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 90.000000000000000000
Width = 1.00000000000000000
end>
DefaultFont.Charset = DEFAULT_CHARSET
DefaultFont.Color = clWindowText
......@@ -206,6 +206,7 @@ object FSelectCustomer: TFSelectCustomer
ScrollMode = scmItemScrolling
DesignTimeSampleData = True
OnCellClick = TMSFNCGrid1CellClick
ExplicitLeft = 4
end
object btnCancel: TWebButton
Left = 556
......@@ -214,8 +215,8 @@ object FSelectCustomer: TFSelectCustomer
Height = 25
Caption = 'Cancel'
ChildOrder = 5
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnClick = btnCancelClick
end
object btnConfirm: TWebButton
......@@ -225,8 +226,8 @@ object FSelectCustomer: TFSelectCustomer
Height = 25
Caption = 'Select'
ChildOrder = 5
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnClick = btnConfirmClick
end
object edtID: TWebEdit
......@@ -236,8 +237,8 @@ object FSelectCustomer: TFSelectCustomer
Height = 22
ChildOrder = 1
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
......@@ -257,44 +258,8 @@ object FSelectCustomer: TFSelectCustomer
object xdwdsCustomersId: TStringField
FieldName = 'Id'
end
object xdwdsCustomersPrimaryPhone: TStringField
FieldName = 'PrimaryPhone'
end
object xdwdsCustomersShipAddr: TStringField
FieldName = 'ShipAddr'
end
object xdwdsCustomersShipAddrLine1: TStringField
FieldName = 'ShipAddrLine1'
end
object xdwdsCustomersShipAddrCity: TStringField
FieldName = 'ShipAddrCity'
end
object xdwdsCustomersShipAddrState: TStringField
FieldName = 'ShipAddrState'
end
object xdwdsCustomersShipAddrZip: TStringField
FieldName = 'ShipAddrZip'
end
object xdwdsCustomersBillAddrLine1: TStringField
FieldName = 'BillAddrLine1'
end
object xdwdsCustomersBillAddrCity: TStringField
FieldName = 'BillAddrCity'
end
object xdwdsCustomersBillAddrState: TStringField
FieldName = 'BillAddrState'
end
object xdwdsCustomersBillAddrZip: TStringField
FieldName = 'BillAddrZip'
end
object xdwdsCustomersInKGOrders: TBooleanField
FieldName = 'In KGOrders'
end
object xdwdsCustomersBillAddrContact: TStringField
FieldName = 'BillAddrContact'
end
object xdwdsCustomersShipAddrContact: TStringField
FieldName = 'ShipAddrContact'
FieldName = 'InKGOrders'
end
end
object wdsCustomers: TWebDataSource
......
......@@ -27,21 +27,9 @@ type
xdwdsCustomersBillAddr: TStringField;
xdwdsCustomersCompanyName: TStringField;
xdwdsCustomersId: TStringField;
xdwdsCustomersPrimaryPhone: TStringField;
xdwdsCustomersShipAddr: TStringField;
xdwdsCustomersShipAddrLine1: TStringField;
xdwdsCustomersShipAddrCity: TStringField;
xdwdsCustomersShipAddrState: TStringField;
xdwdsCustomersShipAddrZip: TStringField;
xdwdsCustomersBillAddrLine1: TStringField;
xdwdsCustomersBillAddrCity: TStringField;
xdwdsCustomersBillAddrState: TStringField;
xdwdsCustomersBillAddrZip: TStringField;
WebLabel3: TWebLabel;
edtID: TWebEdit;
xdwdsCustomersInKGOrders: TBooleanField;
xdwdsCustomersBillAddrContact: TStringField;
xdwdsCustomersShipAddrContact: TStringField;
procedure WebFormCreate(Sender: TObject);
procedure WebFormShow(Sender: TObject);
procedure btnConfirmClick(Sender: TObject);
......@@ -51,7 +39,6 @@ type
private
{ Private declarations }
[Async] procedure GetCustomers();
[Async] procedure SendCustomerToServer();
procedure PopulateGridManually();
procedure ApplyFilter();
var
......@@ -99,41 +86,13 @@ begin
ShowToast('Please Select a Customer', 'danger')
else
begin
if ( string(self.Caption).ToLower.Contains('add') and xdwdsCustomers.FieldByName('In KGOrders').AsBoolean) then
if ( string(self.Caption).ToLower.Contains('add') and xdwdsCustomers.FieldByName('InKGOrders').AsBoolean) then
ShowToast('failure:Customer Already in Database')
else
begin
if string(self.Caption).ToLower.Contains('link') then
begin
confirm := true;
QB_ID := xdwdsCustomers.FieldByName('Id').AsString;
end
else
begin
xdwdsCustomers.Locate('Id', edtID.Text, []);
CustomerJSON := TJSONObject.Create;
CustomerJSON.AddPair('NAME', xdwdsCustomers.FieldByName('CompanyName').AsString);
CustomerJSON.AddPair('QB_LIST_ID', xdwdsCustomers.FieldByName('Id').AsString);
CustomerJSON.AddPair('PHONE', xdwdsCustomers.FieldByName('PrimaryPhone').AsString);
CustomerJSON.AddPair('BILL_ADDRESS', xdwdsCustomers.FieldByName('BillAddrLine1').AsString);
CustomerJSON.AddPair('BILL_CITY', xdwdsCustomers.FieldByName('BillAddrCity').AsString);
CustomerJSON.AddPair('BILL_STATE', xdwdsCustomers.FieldByName('BillAddrState').AsString);
CustomerJSON.AddPair('BILL_ZIP', xdwdsCustomers.FieldByName('BillAddrZip').AsString);
CustomerJSON.AddPair('BILL_ADDRESS_BLOCK', xdwdsCustomers.FieldByName('BillAddr').AsString);
CustomerJSON.AddPair('BILL_CONTACT', xdwdsCustomers.FieldByName('BillAddrContact').AsString);
CustomerJSON.AddPair('address', xdwdsCustomers.FieldByName('ShipAddrLine1').AsString);
CustomerJSON.AddPair('city', xdwdsCustomers.FieldByName('ShipAddrCity').AsString);
CustomerJSON.AddPair('state', xdwdsCustomers.FieldByName('ShipAddrState').AsString);
CustomerJSON.AddPair('zip', xdwdsCustomers.FieldByName('ShipAddrZip').AsString);
CustomerJSON.AddPair('ship_block', xdwdsCustomers.FieldByName('ShipAddr').AsString);
CustomerJSON.AddPair('contact', xdwdsCustomers.FieldByName('ShipAddrContact').AsString);
CustomerJSON.AddPair('name', xdwdsCustomers.FieldByName('CompanyName').AsString);
CustomerJSON.AddPair('mode', 'ADD');
FViewMain.ViewAddCustomer('', CustomerJSON.ToString);
end;
FViewMain.ViewAddCustomer('', QB_ID);
Close();
end;
end;
......@@ -155,10 +114,11 @@ begin
// Fetch data from XData service
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.getQBCustomers', []));
customerList := TJSObject(xdcResponse.Result);
console.log(customerList);
// Load data into TXDataWebDataset
xdwdsCustomers.Close;
xdwdsCustomers.SetJsonData(customerList);
xdwdsCustomers.SetJsonData(customerList['data']);
xdwdsCustomers.Open;
// Manually populate the grid
......@@ -194,10 +154,10 @@ begin
while not xdwdsCustomers.EOF do
begin
TMSFNCGrid1.RowCount := RowIndex + 1;
TMSFNCGrid1.Cells[0, RowIndex] := xdwdsCustomers.FieldByName('Id').AsString;
TMSFNCGrid1.Cells[1, RowIndex] := xdwdsCustomers.FieldByName('CompanyName').AsString;
TMSFNCGrid1.Cells[2, RowIndex] := xdwdsCustomers.FieldByName('BillAddr').AsString;
TMSFNCGrid1.Cells[3, RowIndex] := xdwdsCustomers.FieldByName('In KGOrders').AsString;
TMSFNCGrid1.Cells[0, RowIndex] := xdwdsCustomersId.AsString;
TMSFNCGrid1.Cells[1, RowIndex] := xdwdsCustomersCompanyName.AsString;
TMSFNCGrid1.Cells[2, RowIndex] := xdwdsCustomersBillAddr.AsString;
TMSFNCGrid1.Cells[3, RowIndex] := xdwdsCustomersInKGOrders.AsString;
Inc(RowIndex);
xdwdsCustomers.Next;
end;
......@@ -216,45 +176,6 @@ begin
edtName.Text := TMSFNCGrid1.Cells[1, ARow];
end;
procedure TFSelectCustomer.SendCustomerToServer;
var
CustomerJSON: TJSONObject;
Response: TXDataClientResponse;
notification: TJSObject;
begin
CustomerJSON := TJSONObject.Create;
CustomerJSON.AddPair('NAME', xdwdsCustomers.FieldByName('CompanyName').AsString);
CustomerJSON.AddPair('QB_LIST_ID', xdwdsCustomers.FieldByName('Id').AsString);
CustomerJSON.AddPair('PHONE', xdwdsCustomers.FieldByName('PrimaryPhone').AsString);
CustomerJSON.AddPair('BILL_ADDRESS', xdwdsCustomers.FieldByName('BillAddrLine1').AsString);
CustomerJSON.AddPair('BILL_CITY', xdwdsCustomers.FieldByName('BillAddrCity').AsString);
CustomerJSON.AddPair('BILL_STATE', xdwdsCustomers.FieldByName('BillAddrState').AsString);
CustomerJSON.AddPair('BILL_ZIP', xdwdsCustomers.FieldByName('BillAddrZip').AsString);
CustomerJSON.AddPair('BILL_ADDRESS_BLOCK', xdwdsCustomers.FieldByName('BillAddr').AsString);
CustomerJSON.AddPair('address', xdwdsCustomers.FieldByName('ShipAddrLine1').AsString);
CustomerJSON.AddPair('city', xdwdsCustomers.FieldByName('ShipAddrCity').AsString);
CustomerJSON.AddPair('state', xdwdsCustomers.FieldByName('ShipAddrState').AsString);
CustomerJSON.AddPair('zip', xdwdsCustomers.FieldByName('ShipAddrZip').AsString);
CustomerJSON.AddPair('ship_block', xdwdsCustomers.FieldByName('ShipAddr').AsString);
CustomerJSON.AddPair('name', xdwdsCustomers.FieldByName('CompanyName').AsString);
CustomerJSON.AddPair('mode', 'ADD');
Utils.ShowSpinner('spinner');
Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.ImportQBCustomer',
[customerJSON.ToString]));
notification := TJSObject(Response.Result);
customerID := string(notification['CustomerID']);
msg := string(notification['status']);
Utils.HideSpinner('spinner');
FViewMain.ViewAddCustomer(customerID, msg);
Close();
end;
procedure TFSelectCustomer.ApplyFilter;
// filters the grid based on search textbox contents.
var
......
......@@ -13,8 +13,8 @@ object FViewCustomers: TFViewCustomers
ElementID = 'lblentries'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
end
object btnAddCustomer: TWebButton
Left = 12
......@@ -26,10 +26,10 @@ object FViewCustomers: TFViewCustomers
ElementID = 'btnaddcustomer'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
TabOrder = 6
TabStop = False
WidthPercent = 100.000000000000000000
WidthPercent = 100.00000000000000000
OnClick = btnAddCustomerClick
end
object wcbPageSize: TWebComboBox
......@@ -41,9 +41,9 @@ object FViewCustomers: TFViewCustomers
ElementID = 'wcbpagesize'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
Text = '50'
WidthPercent = 100.000000000000000000
WidthPercent = 100.00000000000000000
OnChange = wcbPageSizeChange
ItemIndex = -1
Items.Strings = (
......@@ -66,8 +66,8 @@ object FViewCustomers: TFViewCustomers
Height = 15
Caption = 'Message'
ElementID = 'view.login.message.label'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
end
object btnCloseNotification: TWebButton
Left = 96
......@@ -76,8 +76,8 @@ object FViewCustomers: TFViewCustomers
Height = 25
ChildOrder = 1
ElementID = 'view.login.message.button'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
end
end
object wdbtcCustomers: TWebDBTableControl
......@@ -129,10 +129,6 @@ object FViewCustomers: TFViewCustomers
item
DataField = 'NAME'
Title = 'Customer Name'
end
item
DataField = 'START_DATE'
Title = 'Start Date'
end>
DataSource = wdsCustomers
end
......@@ -143,8 +139,8 @@ object FViewCustomers: TFViewCustomers
Height = 22
ChildOrder = 5
ElementID = 'edtfilter'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnChange = edtFilterChange
end
object XDataWebClient1: TXDataWebClient
......
......@@ -18,9 +18,9 @@ object FViewMain: TFViewMain
Caption = 'lblUsername'
ElementID = 'view.main.username'
ElementPosition = epRelative
HeightPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
Transparent = False
WidthPercent = 100.000000000000000000
WidthPercent = 100.00000000000000000
end
object wllblUserProfile: TWebLinkLabel
Left = 529
......@@ -28,8 +28,8 @@ object FViewMain: TFViewMain
Width = 59
Height = 14
ElementID = 'dropdown.menu.userprofile'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnClick = wllblUserProfileClick
Caption = ' User Profile'
end
......@@ -39,8 +39,8 @@ object FViewMain: TFViewMain
Width = 36
Height = 14
ElementID = 'dropdown.menu.logout'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnClick = wllblLogoutClick
Caption = ' Logout'
end
......@@ -50,8 +50,8 @@ object FViewMain: TFViewMain
Width = 27
Height = 14
ElementID = 'dropdown.menu.home'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnClick = lblHomeClick
Caption = 'Home'
end
......@@ -63,9 +63,9 @@ object FViewMain: TFViewMain
Caption = 'Koehler-Gibson'
ElementID = 'view.main.apptitle'
ElementPosition = epRelative
HeightPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
Transparent = False
WidthPercent = 100.000000000000000000
WidthPercent = 100.00000000000000000
end
object lblItemsList: TWebLinkLabel
Left = 560
......@@ -74,8 +74,8 @@ object FViewMain: TFViewMain
Height = 14
ElementID = 'dropdown.menu.itemlist'
ElementFont = efCSS
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnClick = lblItemsListClick
Caption = 'Items'
end
......@@ -86,8 +86,8 @@ object FViewMain: TFViewMain
Height = 14
ElementID = 'dropdown.menu.users'
ElementFont = efCSS
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnClick = lblUsersClick
Caption = 'Users'
end
......@@ -101,8 +101,8 @@ object FViewMain: TFViewMain
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnClick = lblordersClick
end
object lblCustomers: TWebLabel
......@@ -115,8 +115,8 @@ object FViewMain: TFViewMain
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnClick = lblCustomersClick
end
object lblVersion: TWebLabel
......@@ -129,8 +129,8 @@ object FViewMain: TFViewMain
ElementFont = efCSS
ElementPosition = epRelative
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
end
object lblQBInfo: TWebLabel
Left = 552
......@@ -141,8 +141,8 @@ object FViewMain: TFViewMain
ElementID = 'dropdown.menu.linktoqb'
ElementFont = efCSS
HeightStyle = ssAuto
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnClick = lblQBInfoClick
end
object WebPanel1: TWebPanel
......@@ -173,7 +173,7 @@ object FViewMain: TFViewMain
ElementID = 'main.debugmemo'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
Lines.Strings = (
'WebMemo1')
Role = 'null'
......@@ -181,7 +181,7 @@ object FViewMain: TFViewMain
SelStart = 0
ShowFocus = False
Visible = False
WidthPercent = 100.000000000000000000
WidthPercent = 100.00000000000000000
end
object WebMessageDlg1: TWebMessageDlg
Left = 47
......@@ -208,7 +208,7 @@ object FViewMain: TFViewMain
'No to all'
'Help'
'Close')
Opacity = 0.200000000000000000
Opacity = 0.20000000000000000
end
object XDataWebClient: TXDataWebClient
Connection = DMConnection.ApiConnection
......
......@@ -60,7 +60,7 @@ type
procedure ViewOrders(info: string);
procedure ViewCustomerList(info: string);
procedure ShowUserForm(Info: string);
procedure ViewAddCustomer(customerInfo, info: string);
procedure ViewAddCustomer(custID, custQB_ID: string);
var
search: string;
change: boolean;
......@@ -361,12 +361,12 @@ begin
end;
procedure TFViewMain.ViewAddCustomer(customerInfo: string; info: string);
procedure TFViewMain.ViewAddCustomer(custID: string; custQB_ID: string);
begin
lblAppTitle.Caption := 'Koehler-Gibson Add Customer';
if Assigned(FChildForm) then
FChildForm.Free;
FChildForm := TFViewAddCustomer.CreateForm(WebPanel1.ElementID, customerInfo, info);
FChildForm := TFViewAddCustomer.CreateForm(WebPanel1.ElementID, custID, custQB_ID);
end;
......
......@@ -13,9 +13,9 @@ object FQBInfo: TFQBInfo
Font.Height = -24
Font.Name = 'Segoe UI'
Font.Style = []
HeightPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
WidthPercent = 100.00000000000000000
end
object lblCompanyName: TWebLabel
Left = 16
......@@ -28,9 +28,9 @@ object FQBInfo: TFQBInfo
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
HeightPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
WidthPercent = 100.00000000000000000
end
object lblCompanyID: TWebLabel
Left = 15
......@@ -43,9 +43,9 @@ object FQBInfo: TFQBInfo
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
HeightPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
WidthPercent = 100.00000000000000000
end
object lblLastRefresh: TWebLabel
Left = 16
......@@ -58,9 +58,9 @@ object FQBInfo: TFQBInfo
Font.Height = -16
Font.Name = 'Segoe UI'
Font.Style = []
HeightPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
ParentFont = False
WidthPercent = 100.000000000000000000
WidthPercent = 100.00000000000000000
end
object btnLinkToQB: TWebButton
Left = 235
......@@ -69,8 +69,8 @@ object FQBInfo: TFQBInfo
Height = 25
Caption = 'Link to QB'
ChildOrder = 3
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnClick = btnLinkToQBClick
end
object btnClose: TWebButton
......@@ -80,8 +80,8 @@ object FQBInfo: TFQBInfo
Height = 25
Caption = 'Close'
ChildOrder = 3
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
HeightPercent = 100.00000000000000000
WidthPercent = 100.00000000000000000
OnClick = btnCloseClick
end
object XDataWebClient1: TXDataWebClient
......
......@@ -24,6 +24,7 @@ type
{ Private declarations }
ClientID: string;
[async] procedure GetQBInfo();
[async] procedure GetQBLink();
public
{ Public declarations }
end;
......@@ -38,22 +39,8 @@ implementation
uses View.Main, Utils;
procedure TFQBInfo.btnLinkToQBClick(Sender: TObject);
var
qblink, redirectUri: string;
qbWindow: TJSWindow;
begin
qblink := 'https://appcenter.intuit.com/connect/oauth2';
qblink := qblink + '?client_id=' + ClientID;
qblink := qblink + '&response_type=code';
qblink := qblink + '&scope=com.intuit.quickbooks.accounting';
qblink := qblink + '&state=7';
redirectUri := DMConnection.AuthConnection.URL + 'AuthService/QBAuthorize';
qblink := qblink + '&redirect_uri=' + RedirectUri;
qbWindow := window.open('', '_blank');
if Assigned(qbWindow) then
qbWindow.location.href := qbLink;
Close();
GetQBLink();
end;
procedure TFQBInfo.WebFormCreate(Sender: TObject);
......@@ -103,5 +90,29 @@ begin
end;
end;
procedure TFQBInfo.GetQBLink();
var
xdcResponse: TXDataClientResponse;
QBLinkObj: TJSObject;
QBLink: String;
qbWindow: TJSWindow;
begin
try
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.getQBLink', []));
QBLinkObj := TJSObject(xdcResponse.Result);
QBLink := String(QBLinkObj['value']);
console.log(QBLinkObj);
console.log(QBLink);
qbWindow := window.open('', '_blank');
if Assigned(qbWindow) then
qbWindow.location.href := QBLink;
Close();
except
on E: EXDataClientRequestException do
Utils.ShowErrorModal(E.ErrorResult.ErrorMessage);
end;
end;
end.
[Paths]
HtmlPath=C:\Projects\kgOrders\kgOrders\kgOrdersClient\TMSWeb\Debug
HtmlFile=index.html
DefaultURL=http://127.0.0.1:8000/webKGOrders
SingleInstance=0
Debug=0
DebugManager=C:\RADTools\TMS\Products\tms.webcore\Bin\Win32\TMSDBGManager.exe
URL=http://127.0.0.1:8000/$(ProjectName)
URLParams=
Browser=1
BrowserBin=
BrowserParams=
Electron=0
ElectronBuild=0
JSDebugger=0
......@@ -411,25 +411,10 @@ object ApiDatabase: TApiDatabase
Connection = ucKG
SQL.Strings = (
'SELECT USER_ID, NAME, STATUS from users ORDER BY NAME')
OnCalcFields = uqUsersCalcFields
Left = 318
Top = 252
object uqUsersUSER_ID: TIntegerField
FieldName = 'USER_ID'
Required = True
end
object uqUsersNAME: TStringField
FieldName = 'NAME'
Size = 40
end
object uqUsersSTATUS: TStringField
FieldName = 'STATUS'
Size = 7
end
object uqUsersREPRESENTATIVE: TStringField
FieldKind = fkCalculated
FieldName = 'REPRESENTATIVE'
Calculated = True
object uqUsersQB_ID: TStringField
FieldName = 'QB_ID'
end
end
end
......@@ -113,12 +113,8 @@ type
uqOrdersStatusScheduleUSER_ID: TLongWordField;
uqOrdersStatusScheduleORDER_REVISION: TLongWordField;
uqUsers: TUniQuery;
uqUsersUSER_ID: TIntegerField;
uqUsersNAME: TStringField;
uqUsersSTATUS: TStringField;
uqUsersREPRESENTATIVE: TStringField;
uqUsersQB_ID: TStringField;
procedure DataModuleCreate(Sender: TObject);
procedure uqUsersCalcFields(DataSet: TDataSet);
private
{ Private declarations }
public
......@@ -166,10 +162,4 @@ begin
end;
procedure TApiDatabase.uqUsersCalcFields(DataSet: TDataSet);
begin
uqUsersREPRESENTATIVE.AsString := uqUsersNAME.AsString + '(' + uqUsersSTATUS.AsString + ')';
end;
end.
......@@ -20,9 +20,42 @@ const
API_MODEL = 'Api';
type
TQBCustomer = class
public
CUSTOMER_ID: string;
NAME: string;
BILL_ADDRESS: string;
BILL_CITY: string;
BILL_STATE: string;
BILL_ZIP: string;
BILL_CONTACT: string;
BILL_ADDRESS_BLOCK: string;
QB_LIST_ID: string;
RepUser: string;
ship_block: string;
shipping_address: string;
city: string;
state: string;
zip: string;
contact: string;
end;
TQBCustomerItem = class
public
Id: string;
CompanyName: string;
BillAddr: string;
InKGOrders: boolean;
end;
TQBCustomerList = class
public
count: integer;
data: TList<TQBCustomerItem>;
end;
TQBInfo = class
public
clientID: string;
CompanyName: string;
CompanyID: string;
connected: boolean;
......@@ -120,7 +153,7 @@ type
TAddressItem = class
Public
ADDRESS: string;
ship_block: string;
shipping_address: string;
city: string;
state: string;
......@@ -145,9 +178,8 @@ type
END_DATE: string;
QB_LIST_ID: string;
FFAX: string;
REP_USER_ID: string;
QB_TYPE: string;
SHIPPING_ADDRESS_LIST: TList<TAddressItem>;
REP_USERS: TList<TUserItem>;
end;
TCustomerList = class
......@@ -492,12 +524,14 @@ type
[HttpGet] function GenerateOrderCorrugatedPDF(orderID: string): string;
[HttpGet] function GenerateOrderWebPDF(orderID: string): string;
[HttpGet] function GenerateOrderCuttingPDF(orderID: string): string;
[HttpGet] function getQBCustomers(): TJSONArray;
[HttpGet] function getQBCustomers(): TQBCustomerList;
[HttpGet] function getQBItems(): TJSONArray;
[HttpGet] function GetRepUsers(): TList<TUserItem>;
[HttpGet] function UpdateCustomer(QB_ID: string): TCustomerItem;
[HttpGet] function UpdateItem(itemName: string): TItemItem;
[HttpGet] function GetQBInfo(): TQBInfo;
[HttpGet] function GetQBLink(): string;
[HttpGet] function GetQBCustomer(QB_ID: string): TQBCustomer;
function AddUser(userInfo: string): string;
......
......@@ -201,11 +201,19 @@ object fQB: TfQB
Width = 982
Height = 153
Align = alClient
Color = clWhite
DrawingStyle = gdsClassic
FixedColor = clWhite
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Style = []
Options = [goVertLine, goHorzLine, goRangeSelect, goFixedRowDefAlign]
ParentFont = False
TabOrder = 0
GridLineColor = 13948116
GridFixedLineColor = 11250603
GridLineColor = 15987699
GridFixedLineColor = 15987699
OnClickCell = asgData2ClickCell
ActiveCellFont.Charset = DEFAULT_CHARSET
ActiveCellFont.Color = 4474440
......@@ -271,7 +279,7 @@ object fQB: TfQB
FixedRowHeight = 22
FixedRowAlways = True
FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 3881787
FixedFont.Color = clBlack
FixedFont.Height = -11
FixedFont.Name = 'Segoe UI'
FixedFont.Style = [fsBold]
......@@ -302,7 +310,7 @@ object fQB: TfQB
PrintSettings.FooterFont.Name = 'Segoe UI'
PrintSettings.FooterFont.Style = []
PrintSettings.PageNumSep = '/'
SearchFooter.ColorTo = clNone
SearchFooter.ColorTo = clWhite
SearchFooter.FindNextCaption = 'Find &next'
SearchFooter.FindPrevCaption = 'Find &previous'
SearchFooter.Font.Charset = DEFAULT_CHARSET
......@@ -322,7 +330,7 @@ object fQB: TfQB
SortSettings.HeaderColorTo = clWhite
SortSettings.HeaderMirrorColor = clWhite
SortSettings.HeaderMirrorColorTo = clWhite
Version = '9.1.6.4'
Version = '9.2.2.0'
ColWidths = (
64
64
......@@ -648,7 +656,7 @@ object fQB: TfQB
Left = 1
Top = 26
Width = 980
Height = 170
Height = 171
Caption = 'Memo1'
DoubleBuffered = False
PageAppearance.BorderColor = clNone
......@@ -713,12 +721,13 @@ object fQB: TfQB
Left = 2
Top = 35
Width = 976
Height = 133
Height = 134
Align = alClient
Lines.Strings = (
'')
ScrollBars = ssVertical
TabOrder = 0
ExplicitHeight = 133
end
object Panel2: TPanel
Left = 2
......@@ -742,7 +751,7 @@ object fQB: TfQB
Left = 1
Top = 26
Width = 980
Height = 170
Height = 171
Caption = 'QB API Memo'
DoubleBuffered = False
PageAppearance.BorderColor = clNone
......@@ -807,13 +816,14 @@ object fQB: TfQB
Left = 2
Top = 35
Width = 976
Height = 133
Height = 134
Align = alClient
Lines.Strings = (
'Memo2')
ScrollBars = ssVertical
TabOrder = 0
WordWrap = False
ExplicitHeight = 133
end
object Panel3: TPanel
Left = 2
......@@ -837,7 +847,7 @@ object fQB: TfQB
Left = 1
Top = 26
Width = 980
Height = 170
Height = 171
Caption = 'AdvOfficePager13'
DoubleBuffered = False
PageAppearance.BorderColor = clNone
......@@ -945,11 +955,19 @@ object fQB: TfQB
Width = 982
Height = 205
Align = alClient
Color = clWhite
DrawingStyle = gdsClassic
FixedColor = clWhite
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Height = -12
Font.Name = 'Segoe UI'
Font.Style = []
Options = [goVertLine, goHorzLine, goRangeSelect, goFixedRowDefAlign]
ParentFont = False
TabOrder = 0
GridLineColor = 13948116
GridFixedLineColor = 11250603
GridLineColor = 15987699
GridFixedLineColor = 15987699
OnClickCell = asgDataClickCell
ActiveCellFont.Charset = DEFAULT_CHARSET
ActiveCellFont.Color = 4474440
......@@ -1015,7 +1033,7 @@ object fQB: TfQB
FixedRowHeight = 22
FixedRowAlways = True
FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 3881787
FixedFont.Color = clBlack
FixedFont.Height = -11
FixedFont.Name = 'Segoe UI'
FixedFont.Style = [fsBold]
......@@ -1046,7 +1064,7 @@ object fQB: TfQB
PrintSettings.FooterFont.Name = 'Segoe UI'
PrintSettings.FooterFont.Style = []
PrintSettings.PageNumSep = '/'
SearchFooter.ColorTo = clNone
SearchFooter.ColorTo = clWhite
SearchFooter.FindNextCaption = 'Find &next'
SearchFooter.FindPrevCaption = 'Find &previous'
SearchFooter.Font.Charset = DEFAULT_CHARSET
......@@ -1066,7 +1084,7 @@ object fQB: TfQB
SortSettings.HeaderColorTo = clWhite
SortSettings.HeaderMirrorColor = clWhite
SortSettings.HeaderMirrorColorTo = clWhite
Version = '9.1.6.4'
Version = '9.2.2.0'
ColWidths = (
64
64
......
[Settings]
MemoLogLevel=3
FileLogLevel=4
webClientVersion=0.9.13
LogFileNum=100
webClientVersion=0.9.14.1
LogFileNum=105
[Database]
Server=192.168.116.132
--Server=192.168.116.132
--Server=192.168.102.129
--Server=192.168.75.133
--Server=192.168.159.10
Server=192.168.159.10
--Database=kg_order_entry
--Username=root
--Password=emsys01
......@@ -17,8 +17,17 @@ Server=192.168.116.132
[Quickbooks]
Enabled=1
CompanyID=9341454336461805
ClientID=ABYqlDx1EsacZYXvHIJ7RDB7zmnQdwABU3fwQLIZPmBgU0VW1P
ClientSecret=PM7OnvQWsgOqjWfDpZAnyRttDN9446Am6d85pDxr
RefreshToken=RT1-246-H0-1774553264l4plin9y3f32d4cm7ncw
AccessToken=eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..HDUyB-xbInAP_lJcZiix5w.REb-0D5HZfvm8UE7cWifSiXZTJK0_3Bpp44ybTT6-9h7fT1zA0-oMzxUHO-bL4tTWuVnJODgRHfHAadOml13dMTKOQ4msyW3Y5g-BF91aoQZi-HKw35w_gClKJ6zSn99AIwnffo_IhkotW8FY1wC7gRkDzHsFMajOWQWmji_EsDblGQW97_eW8Z6rwUCbsoWpankR5JOcZtvD5j9dmzQdaPkKJXqlB_6kLC-WXEpySA7heWsNfA1iq3Bn56J4C6_HxvpFZ8i-gWUE42-Ls1uhGG6EQw9vjDFRojG6Fvv0oK_bbKSZ24NqerGoeFmlWTHoCl6pQXX12DZgmJp3vwCLyAzw8dTFzRH4QKoN7D5NAQ3rp2LtzpIBjiuBxJIvr20GSDO6lgNzXGusNffmkJC5cPxh7NmwzbubFw6yL8P7ZGKIdviIaHPS0u5pGc3Bw_qJ0bKaRXTxMmyIAUR3BtExZMzHLN6pVij8R9rpEtGvPo.tA4XoJdViQb1JKoL9eDevw
LastRefresh=12/15/2025
--BaseUrl=https://sandbox-quickbooks.api.intuit.com
--ClientID=ABYqlDx1EsacZYXvHIJ7RDB7zmnQdwABU3fwQLIZPmBgU0VW1P
--ClientSecret=PM7OnvQWsgOqjWfDpZAnyRttDN9446Am6d85pDxr
--RedirectUri=http://localhost:2004/kgOrders/auth/AuthService/QBAuthorize
BaseUrl=https://quickbooks.api.intuit.com/v3
ClientID=ABXLUuBrwvodIZMtaPcBg9acYBPafUxP80qk5aQ9HOAw1i2W3s
ClientSecret=a0DSQZdXH1FRTAFhpp2igeNFKxu7kPlzt0az7nbQ
RedirectUri=https://webapps.em-sys.net/kgOrdersTest/auth/AuthService/QBAuthorize
RefreshToken=RT1-143-H0-1783193667426ef30b5u81echlyi4h
AccessToken=eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..aoofv422rMR8s5qxVjkk0A.n0SzfMojJdSwS6plIGJO3gT2gM2_xEGEFr1ZDBqFWA40XoHTixNhZ0HvndlcyDiaofP8WBDH7GIG2zAjVK67winsZ02b9ylTE9PnMWCgl2rskMccDeP9yDabJjgM7113cCoMHj6m93g1sQu2tKH5zV_5wjj6Q1KwcJgs8fmutdWkpsYD-DIn46ySVDjPaDa9EN4lLMPD5ip20rF0p_Mol-Fh4zRRhMF0BImRxtgHGfFBHAtntd0wBQ35vYlyfnG-FnK25NFxVhNQchA3JpYaLIw_qLaZ7LjHIlOhX0S64ROUq80LLwjCpctHFX-YYFUAL4G0DSe22cz9RgJmxLy-PvUAnpCia3NPeft0Vtg2Ysg1-WH8mEJb3tQWZOLaEKecNO7_SsA4Xdfk5pl0y0ukk8KQHQmPwsaYP1OAd9C6LFDqyyIXY6ULZigPUiiHRHc0-pcvFLuz_kaovO9-kapokXO6WhL9Fc9GUgn1Sn6PhT4.6r8dJQ6gVezO3SLIssoNBw
LastRefresh=3/26/2026 11:28:04 AM
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment