Commit 48c932ec by Cam Hayes

Merge remote-tracking branch 'origin/master' into cam

parents 7068c939 34c1f5e2
...@@ -19,7 +19,7 @@ type ...@@ -19,7 +19,7 @@ type
FUnauthorizedAccessProc: TUnauthorizedAccessProc; FUnauthorizedAccessProc: TUnauthorizedAccessProc;
public public
const clientVersion = '0.9.11'; const clientVersion = '0.9.12';
procedure InitApp(SuccessProc: TSuccessProc; procedure InitApp(SuccessProc: TSuccessProc;
UnauthorizedAccessProc: TUnauthorizedAccessProc); UnauthorizedAccessProc: TUnauthorizedAccessProc);
procedure SetClientConfig(Callback: TVersionCheckCallback); procedure SetClientConfig(Callback: TVersionCheckCallback);
......
...@@ -107,8 +107,6 @@ begin ...@@ -107,8 +107,6 @@ begin
end; end;
procedure TFViewMain.lblCustomersClick(Sender: TObject); procedure TFViewMain.lblCustomersClick(Sender: TObject);
begin begin
if ( not ( change ) ) then if ( not ( change ) ) then
...@@ -121,18 +119,20 @@ begin ...@@ -121,18 +119,20 @@ begin
ShowToast('Please Save or Cancel your changes', 'danger'); ShowToast('Please Save or Cancel your changes', 'danger');
end; end;
procedure TFViewMain.lblHomeClick(Sender: TObject); procedure TFViewMain.lblHomeClick(Sender: TObject);
begin begin
if ( not ( change ) ) then if ( not ( change ) ) then
begin begin
ShowForm(TFViewHome); ShowForm(TFViewHome);
lblAppTitle.Caption := 'Koehler-Gibson Home'; lblAppTitle.Caption := 'Koehler-Gibson webApp';
setActive('Home'); setActive('Home');
end end
else else
ShowToast('Please Save or Cancel your changes', 'danger'); ShowToast('Please Save or Cancel your changes', 'danger');
end; end;
procedure TFViewMain.lblordersClick(Sender: TObject); procedure TFViewMain.lblordersClick(Sender: TObject);
begin begin
if ( not ( change ) ) then if ( not ( change ) ) then
...@@ -145,6 +145,7 @@ begin ...@@ -145,6 +145,7 @@ begin
ShowToast('Please Save or Cancel your changes', 'danger'); ShowToast('Please Save or Cancel your changes', 'danger');
end; end;
procedure TFViewMain.lblUsersClick(Sender: TObject); procedure TFViewMain.lblUsersClick(Sender: TObject);
begin begin
if ( not ( change ) ) then if ( not ( change ) ) then
...@@ -157,6 +158,7 @@ begin ...@@ -157,6 +158,7 @@ begin
ShowToast('Please Save or Cancel your changes', 'danger'); ShowToast('Please Save or Cancel your changes', 'danger');
end; end;
procedure TFViewMain.lblItemsListClick(Sender: TObject); procedure TFViewMain.lblItemsListClick(Sender: TObject);
begin begin
if ( not ( change ) ) then if ( not ( change ) ) then
...@@ -171,6 +173,7 @@ begin ...@@ -171,6 +173,7 @@ begin
ShowToast('Please Save or Cancel your changes', 'danger'); ShowToast('Please Save or Cancel your changes', 'danger');
end; end;
procedure TFViewMain.setActive(page: string); procedure TFViewMain.setActive(page: string);
var var
links: TJSNodeList; links: TJSNodeList;
...@@ -189,6 +192,7 @@ begin ...@@ -189,6 +192,7 @@ begin
end; end;
end; end;
procedure TFViewMain.mnuLogoutClick(Sender: TObject); procedure TFViewMain.mnuLogoutClick(Sender: TObject);
begin begin
ConfirmLogout; ConfirmLogout;
...@@ -223,7 +227,7 @@ begin ...@@ -223,7 +227,7 @@ begin
setActive('User Profile'); setActive('User Profile');
end; end;
//needs to be changed
function TFViewMain.GetUserInfo: string; function TFViewMain.GetUserInfo: string;
var var
userStr: string; userStr: string;
...@@ -261,11 +265,13 @@ begin ...@@ -261,11 +265,13 @@ begin
Application.CreateForm(AFormClass, WebPanel1.ElementID, FChildForm); Application.CreateForm(AFormClass, WebPanel1.ElementID, FChildForm);
end; end;
procedure TFViewMain.ViewCustomerList(info: string); procedure TFViewMain.ViewCustomerList(info: string);
begin begin
end; end;
procedure TFViewMain.EditUser(Mode, Username, Password, Name, Status, Email, procedure TFViewMain.EditUser(Mode, Username, Password, Name, Status, Email,
Access, Rights, QB: string); Access, Rights, QB: string);
begin begin
...@@ -291,6 +297,7 @@ begin ...@@ -291,6 +297,7 @@ begin
FChildForm := TFOrderEntryCorrugated.CreateForm(WebPanel1.ElementID, orderInfo, customerInfo, mode, info); FChildForm := TFOrderEntryCorrugated.CreateForm(WebPanel1.ElementID, orderInfo, customerInfo, mode, info);
end; end;
procedure TFViewMain.ViewOrderEntryWeb(orderInfo, customerInfo, mode, info: string); procedure TFViewMain.ViewOrderEntryWeb(orderInfo, customerInfo, mode, info: string);
begin begin
lblAppTitle.Caption := 'Koehler-Gibson Order Entry'; lblAppTitle.Caption := 'Koehler-Gibson Order Entry';
...@@ -299,6 +306,7 @@ begin ...@@ -299,6 +306,7 @@ begin
FChildForm := TFOrderEntryWeb.CreateForm(WebPanel1.ElementID, orderInfo, customerInfo, mode, info); FChildForm := TFOrderEntryWeb.CreateForm(WebPanel1.ElementID, orderInfo, customerInfo, mode, info);
end; end;
procedure TFViewMain.ViewOrderEntryCuttingDie(orderInfo, customerInfo, mode, info: string); procedure TFViewMain.ViewOrderEntryCuttingDie(orderInfo, customerInfo, mode, info: string);
begin begin
lblAppTitle.Caption := 'Koehler-Gibson Order Entry'; lblAppTitle.Caption := 'Koehler-Gibson Order Entry';
...@@ -307,6 +315,7 @@ begin ...@@ -307,6 +315,7 @@ begin
FChildForm := TFOrderEntryCuttingDie.CreateForm(WebPanel1.ElementID, orderInfo, customerInfo, mode, info); FChildForm := TFOrderEntryCuttingDie.CreateForm(WebPanel1.ElementID, orderInfo, customerInfo, mode, info);
end; end;
procedure TFViewMain.ViewAddCustomer(customerInfo: string; info: string); procedure TFViewMain.ViewAddCustomer(customerInfo: string; info: string);
begin begin
lblAppTitle.Caption := 'Koehler-Gibson Add Customer'; lblAppTitle.Caption := 'Koehler-Gibson Add Customer';
...@@ -315,6 +324,7 @@ begin ...@@ -315,6 +324,7 @@ begin
FChildForm := TFViewAddCustomer.CreateForm(WebPanel1.ElementID, customerInfo, info); FChildForm := TFViewAddCustomer.CreateForm(WebPanel1.ElementID, customerInfo, info);
end; end;
procedure TFViewMain.ShowUserForm(Info: string); procedure TFViewMain.ShowUserForm(Info: string);
begin begin
if Assigned(FChildForm) then if Assigned(FChildForm) then
...@@ -322,4 +332,5 @@ begin ...@@ -322,4 +332,5 @@ begin
FChildForm := TFViewUsers.CreateForm(WebPanel1.ElementID, Info); FChildForm := TFViewUsers.CreateForm(WebPanel1.ElementID, Info);
end; end;
end. end.
...@@ -7,6 +7,7 @@ object FSetStatus: TFSetStatus ...@@ -7,6 +7,7 @@ object FSetStatus: TFSetStatus
Top = 61 Top = 61
Width = 38 Width = 38
Height = 14 Height = 14
Anchors = [akTop, akRight]
Caption = 'Status:' Caption = 'Status:'
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
Font.Color = clBlack Font.Color = clBlack
...@@ -67,6 +68,7 @@ object FSetStatus: TFSetStatus ...@@ -67,6 +68,7 @@ object FSetStatus: TFSetStatus
Top = 196 Top = 196
Width = 51 Width = 51
Height = 14 Height = 14
Anchors = [akTop, akRight]
Caption = 'Ship Due:' Caption = 'Ship Due:'
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
Font.Color = clBlack Font.Color = clBlack
...@@ -82,6 +84,7 @@ object FSetStatus: TFSetStatus ...@@ -82,6 +84,7 @@ object FSetStatus: TFSetStatus
Top = 168 Top = 168
Width = 62 Width = 62
Height = 14 Height = 14
Anchors = [akTop, akRight]
Caption = 'Mount Due:' Caption = 'Mount Due:'
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
Font.Color = clBlack Font.Color = clBlack
...@@ -97,6 +100,7 @@ object FSetStatus: TFSetStatus ...@@ -97,6 +100,7 @@ object FSetStatus: TFSetStatus
Top = 140 Top = 140
Width = 54 Width = 54
Height = 14 Height = 14
Anchors = [akTop, akRight]
Caption = 'Plate Due:' Caption = 'Plate Due:'
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
Font.Color = clBlack Font.Color = clBlack
...@@ -112,6 +116,7 @@ object FSetStatus: TFSetStatus ...@@ -112,6 +116,7 @@ object FSetStatus: TFSetStatus
Top = 112 Top = 112
Width = 44 Width = 44
Height = 14 Height = 14
Anchors = [akTop, akRight]
Caption = 'Art Due:' Caption = 'Art Due:'
Font.Charset = ANSI_CHARSET Font.Charset = ANSI_CHARSET
Font.Color = clBlack Font.Color = clBlack
...@@ -127,6 +132,7 @@ object FSetStatus: TFSetStatus ...@@ -127,6 +132,7 @@ object FSetStatus: TFSetStatus
Top = 80 Top = 80
Width = 145 Width = 145
Height = 22 Height = 22
Anchors = [akTop, akRight]
ElementClassName = 'custom-select' ElementClassName = 'custom-select'
ElementID = 'wlc_status' ElementID = 'wlc_status'
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
...@@ -154,6 +160,7 @@ object FSetStatus: TFSetStatus ...@@ -154,6 +160,7 @@ object FSetStatus: TFSetStatus
Top = 235 Top = 235
Width = 96 Width = 96
Height = 25 Height = 25
Anchors = [akTop, akRight]
Caption = 'Save' Caption = 'Save'
ChildOrder = 7 ChildOrder = 7
ElementClassName = 'btn btn-secondary' ElementClassName = 'btn btn-secondary'
...@@ -170,6 +177,7 @@ object FSetStatus: TFSetStatus ...@@ -170,6 +177,7 @@ object FSetStatus: TFSetStatus
Top = 235 Top = 235
Width = 96 Width = 96
Height = 25 Height = 25
Anchors = [akTop, akRight]
Caption = 'Cancel' Caption = 'Cancel'
ChildOrder = 7 ChildOrder = 7
ElementClassName = 'btn btn-secondary' ElementClassName = 'btn btn-secondary'
...@@ -210,6 +218,7 @@ object FSetStatus: TFSetStatus ...@@ -210,6 +218,7 @@ object FSetStatus: TFSetStatus
Height = 22 Height = 22
HelpType = htKeyword HelpType = htKeyword
TabStop = False TabStop = False
Anchors = [akLeft, akTop, akRight]
ChildOrder = 8 ChildOrder = 8
ElementClassName = 'form-control' ElementClassName = 'form-control'
ElementFont = efCSS ElementFont = efCSS
...@@ -230,6 +239,7 @@ object FSetStatus: TFSetStatus ...@@ -230,6 +239,7 @@ object FSetStatus: TFSetStatus
Top = 192 Top = 192
Width = 145 Width = 145
Height = 22 Height = 22
Anchors = [akTop, akRight]
BorderStyle = bsSingle BorderStyle = bsSingle
ChildOrder = 1 ChildOrder = 1
Color = clWhite Color = clWhite
...@@ -242,6 +252,7 @@ object FSetStatus: TFSetStatus ...@@ -242,6 +252,7 @@ object FSetStatus: TFSetStatus
Top = 164 Top = 164
Width = 145 Width = 145
Height = 22 Height = 22
Anchors = [akTop, akRight]
BorderStyle = bsSingle BorderStyle = bsSingle
ChildOrder = 1 ChildOrder = 1
Color = clWhite Color = clWhite
...@@ -254,6 +265,7 @@ object FSetStatus: TFSetStatus ...@@ -254,6 +265,7 @@ object FSetStatus: TFSetStatus
Top = 136 Top = 136
Width = 145 Width = 145
Height = 22 Height = 22
Anchors = [akTop, akRight]
BorderStyle = bsSingle BorderStyle = bsSingle
ChildOrder = 1 ChildOrder = 1
Color = clWhite Color = clWhite
...@@ -266,6 +278,7 @@ object FSetStatus: TFSetStatus ...@@ -266,6 +278,7 @@ object FSetStatus: TFSetStatus
Top = 108 Top = 108
Width = 145 Width = 145
Height = 22 Height = 22
Anchors = [akTop, akRight]
BorderStyle = bsSingle BorderStyle = bsSingle
ChildOrder = 1 ChildOrder = 1
Color = clWhite Color = clWhite
......
...@@ -56,6 +56,7 @@ begin ...@@ -56,6 +56,7 @@ begin
Close; Close;
end; end;
function TFSetStatus.Verify: Boolean; function TFSetStatus.Verify: Boolean;
var var
input: TJSHTMLElement; input: TJSHTMLElement;
...@@ -103,11 +104,13 @@ begin ...@@ -103,11 +104,13 @@ begin
end; end;
end; end;
procedure TFSetStatus.dtpDateChange(Sender: TObject); procedure TFSetStatus.dtpDateChange(Sender: TObject);
begin begin
SetDueDates(); SetDueDates();
end; end;
procedure TFSetStatus.WebFormShow(Sender: TObject); procedure TFSetStatus.WebFormShow(Sender: TObject);
var var
ItemsToRemove: TStringList; ItemsToRemove: TStringList;
...@@ -166,6 +169,7 @@ begin ...@@ -166,6 +169,7 @@ begin
SetDueDates(); SetDueDates();
end; end;
procedure TFSetStatus.SetDueDates(); procedure TFSetStatus.SetDueDates();
begin begin
if OrderType = 'corrugated plate' then if OrderType = 'corrugated plate' then
...@@ -242,6 +246,7 @@ begin ...@@ -242,6 +246,7 @@ begin
end; end;
end; end;
function TFSetStatus.GetNextDate(CurrDate: TDateTime): TDateTime; function TFSetStatus.GetNextDate(CurrDate: TDateTime): TDateTime;
var var
DOW: integer; DOW: integer;
...@@ -257,4 +262,5 @@ begin ...@@ -257,4 +262,5 @@ begin
console.log(CurrDate); console.log(CurrDate);
end; end;
end. end.
\ No newline at end of file
...@@ -139,18 +139,19 @@ uses ...@@ -139,18 +139,19 @@ uses
procedure TApiDatabase.DataModuleCreate(Sender: TObject); procedure TApiDatabase.DataModuleCreate(Sender: TObject);
begin begin
Logger.Log( 1, 'TApiDatabase.DataModuleCreate' ); Logger.Log( 5, 'TApiDatabase.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' ); LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try try
ucKG.Connect; ucKG.Connect;
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(2, '--TApiDatabase.DataModuleCreate -Error connecting to database: ' + E.Message); Logger.Log( 1, '--TApiDatabase.DataModuleCreate -Error connecting to database: ' + E.Message );
end; end;
end; end;
end; end;
class procedure TApiDatabase.ExecSQL(const SQL: string); class procedure TApiDatabase.ExecSQL(const SQL: string);
var var
DB: TApiDatabase; DB: TApiDatabase;
...@@ -164,9 +165,11 @@ begin ...@@ -164,9 +165,11 @@ begin
end; end;
end; end;
procedure TApiDatabase.uqUsersCalcFields(DataSet: TDataSet); procedure TApiDatabase.uqUsersCalcFields(DataSet: TDataSet);
begin begin
uqUsersREPRESENTATIVE.AsString := uqUsersNAME.AsString + '(' + uqUsersSTATUS.AsString + ')'; uqUsersREPRESENTATIVE.AsString := uqUsersNAME.AsString + '(' + uqUsersSTATUS.AsString + ')';
end; end;
end. end.
...@@ -49,21 +49,23 @@ uses ...@@ -49,21 +49,23 @@ uses
procedure TAuthDatabase.DataModuleCreate(Sender: TObject); procedure TAuthDatabase.DataModuleCreate(Sender: TObject);
begin begin
Logger.Log( 1, 'TAuthDatabase.DataModuleCreate' ); Logger.Log( 5, 'TAuthDatabase.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' ); LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try try
ucKG.Connect; ucKG.Connect;
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(2, '--TAuthDatabase.DataModuleCreate -Error connecting to database: ' + E.Message); Logger.Log( 1, '--TAuthDatabase.DataModuleCreate -Error connecting to database: ' + E.Message );
end; end;
end; end;
end; end;
procedure TAuthDatabase.DataModuleDestroy(Sender: TObject); procedure TAuthDatabase.DataModuleDestroy(Sender: TObject);
begin begin
ucKG.Connected := false; ucKG.Connected := false;
Logger.Log( 5, 'TAuthDatabase.DataModuleDestroy' );
end; end;
......
...@@ -65,10 +65,10 @@ begin ...@@ -65,10 +65,10 @@ begin
Logger.Log(1, '-- webAppFolder: ' + serverConfig.webAppFolder + IfThen(serverConfig.webAppFolder = 'static', ' [default]', ' [from config]')); Logger.Log(1, '-- webAppFolder: ' + serverConfig.webAppFolder + IfThen(serverConfig.webAppFolder = 'static', ' [default]', ' [from config]'));
Logger.Log(1, '-- serverConfig.reportsFolder: ' + serverConfig.reportsFolder); Logger.Log(1, '-- serverConfig.reportsFolder: ' + serverConfig.reportsFolder);
if not DirectoryExists(serverConfig.reportsFolder + 'reports\') then if not DirectoryExists(serverConfig.reportsFolder) then
begin begin
ForceDirectories(serverConfig.reportsFolder + 'reports\'); ForceDirectories(serverConfig.reportsFolder);
Logger.Log(1, '-- Reports directory created: ' + serverConfig.reportsFolder + 'reports\'); Logger.Log(1, '-- Reports directory created: ' + serverConfig.reportsFolder);
end; end;
Logger.Log(1, '--LoadServerConfig - end'); Logger.Log(1, '--LoadServerConfig - end');
...@@ -85,11 +85,11 @@ begin ...@@ -85,11 +85,11 @@ begin
adminPassword := 'whatisthisusedfor'; adminPassword := 'whatisthisusedfor';
jwtTokenSecret := 'super_secret0123super_secret4567'; jwtTokenSecret := 'super_secret0123super_secret4567';
webAppFolder := 'static'; webAppFolder := 'static';
reportsFolder := 'static\'; reportsFolder := 'static\reports\';
ServerConfigStr := Bcl.Json.TJson.Serialize(ServerConfig); ServerConfigStr := Bcl.Json.TJson.Serialize(ServerConfig);
Logger.Log(1, '--ServerConfigSerialize: ' + ServerConfigStr); Logger.Log(1, '--ServerConfigSerialize: ' + ServerConfigStr);
Logger.Log(1, '--TServerConfig.Create - end'); Logger.Log(1, '--TServerConfig.Create - end');
end; end;
end. end.
...@@ -116,11 +116,11 @@ begin ...@@ -116,11 +116,11 @@ begin
procedure(Resp: THttpServerResponse) procedure(Resp: THttpServerResponse)
begin begin
if (Resp.StatusCode >= 400) and (Resp.StatusCode <= 499) then if (Resp.StatusCode >= 400) and (Resp.StatusCode <= 499) then
FLogger.Log(5, Format('%d %s on %s', [Resp.StatusCode, Resp.StatusReason, RequestLogMessage])); FLogger.Log(3, Format('%d %s on %s', [Resp.StatusCode, Resp.StatusReason, RequestLogMessage]));
end end
); );
RequestLogMessage := GetNewHttpRequestLog(Context.Request).GetMessage; RequestLogMessage := GetNewHttpRequestLog(Context.Request).GetMessage;
FLogger.Log(5, RequestLogMessage); FLogger.Log(3, RequestLogMessage);
Next(Context); Next(Context);
end; end;
......
// Implementation of the Lookup Service interface used to send information // Authors:
// to the client. Very overcrowded. Probably should move SQL functions to new
// file.
// Authors:
// Cameron Hayes // Cameron Hayes
// Mac Stephens // Mac Stephens
// Elias Sarraf // Elias Sarraf
...@@ -253,19 +250,18 @@ begin ...@@ -253,19 +250,18 @@ begin
estimateJSON.AddPair('ShipDate', ordersDB.UniQuery1.FieldByName('staff_fields_ship_date').AsString) estimateJSON.AddPair('ShipDate', ordersDB.UniQuery1.FieldByName('staff_fields_ship_date').AsString)
end; end;
logger.Log(5, 'estimateJSON finished construction'); //logger.Log(5, 'estimateJSON finished construction');
restClient.BaseURL := 'https://sandbox-quickbooks.api.intuit.com'; restClient.BaseURL := 'https://sandbox-quickbooks.api.intuit.com';
restRequest.Client := restClient; restRequest.Client := restClient;
restRequest.Response := restResponse; restRequest.Response := restResponse;
if iniFile.ReadString('Quickbooks', 'LastRefresh', '') = '' then if iniFile.ReadString('Quickbooks', 'LastRefresh', '') = '' then
LastRefresh := 0 LastRefresh := 0
else else
LastRefresh := StrToDateTime(iniFile.ReadString('Quickbooks', 'LastRefresh', '')); LastRefresh := StrToDateTime(iniFile.ReadString('Quickbooks', 'LastRefresh', ''));
if MinutesBetween(Now, LastRefresh) > 58 then if MinutesBetween(Now, LastRefresh) > 58 then
RefreshAccessToken(); RefreshAccessToken();
...@@ -347,6 +343,7 @@ begin ...@@ -347,6 +343,7 @@ begin
end; end;
end; end;
procedure TLookupService.AfterConstruction; procedure TLookupService.AfterConstruction;
begin begin
inherited; inherited;
...@@ -361,12 +358,14 @@ begin ...@@ -361,12 +358,14 @@ begin
end; end;
end; end;
procedure TLookupService.BeforeDestruction; procedure TLookupService.BeforeDestruction;
begin begin
ordersDB.Free; ordersDB.Free;
inherited; inherited;
end; end;
function TLookupService.DelShippingAddress(AddressID, CustomerID: string): TJSONObject; function TLookupService.DelShippingAddress(AddressID, CustomerID: string): TJSONObject;
var var
SQL: string; SQL: string;
...@@ -545,6 +544,7 @@ begin ...@@ -545,6 +544,7 @@ begin
end; end;
end; end;
function TLookupService.GetRepUsers: TList<TUserItem>; function TLookupService.GetRepUsers: TList<TUserItem>;
// Gets a list of users that qualify to be reps for companies // Gets a list of users that qualify to be reps for companies
var var
...@@ -643,8 +643,6 @@ begin ...@@ -643,8 +643,6 @@ begin
mode := JSONData.GetValue<string>('mode'); mode := JSONData.GetValue<string>('mode');
CustomerID := JSONData.GetValue<string>('customer_id'); CustomerID := JSONData.GetValue<string>('customer_id');
if mode = 'ADD' then if mode = 'ADD' then
SQL := 'select * from customers_ship where customer_id = 0 and customer_id <> 0' SQL := 'select * from customers_ship where customer_id = 0 and customer_id <> 0'
else else
...@@ -718,6 +716,7 @@ begin ...@@ -718,6 +716,7 @@ begin
end; end;
end; end;
function TLookupService.AddCustomer(customerInfo: string): TJSONObject; function TLookupService.AddCustomer(customerInfo: string): TJSONObject;
var var
JSONData: TJSONObject; JSONData: TJSONObject;
...@@ -772,7 +771,6 @@ begin ...@@ -772,7 +771,6 @@ begin
unique := true unique := true
else else
unique := false; unique := false;
end; end;
if unique then if unique then
...@@ -837,6 +835,7 @@ begin ...@@ -837,6 +835,7 @@ begin
end; end;
end; end;
function TLookupService.GenerateOrderCorrugatedPDF(orderID: string): string; function TLookupService.GenerateOrderCorrugatedPDF(orderID: string): string;
var var
SQL: string; SQL: string;
...@@ -866,6 +865,7 @@ begin ...@@ -866,6 +865,7 @@ begin
end; end;
end; end;
function TLookupService.GenerateOrderWebPDF(orderID: string): string; function TLookupService.GenerateOrderWebPDF(orderID: string): string;
var var
SQL: string; SQL: string;
...@@ -896,6 +896,7 @@ begin ...@@ -896,6 +896,7 @@ begin
end; end;
end; end;
function TLookupService.GenerateOrderCuttingPDF(orderID: string): string; function TLookupService.GenerateOrderCuttingPDF(orderID: string): string;
var var
SQL: string; SQL: string;
...@@ -925,6 +926,7 @@ begin ...@@ -925,6 +926,7 @@ begin
end; end;
end; end;
function TLookupService.generateSubQuery(currStatus: string): string; function TLookupService.generateSubQuery(currStatus: string): string;
// Generates the subquery in order to retrieve all the status due/done dates // Generates the subquery in order to retrieve all the status due/done dates
// This must be a subquery because there are at most 5 different entries which // This must be a subquery because there are at most 5 different entries which
...@@ -940,6 +942,7 @@ begin ...@@ -940,6 +942,7 @@ begin
quotedStr(currStatus) + ' order by os.STATUS_TIMESTAMP desc LIMIT 1) AS ' + currStatus + '_DONE, '; quotedStr(currStatus) + ' order by os.STATUS_TIMESTAMP desc LIMIT 1) AS ' + currStatus + '_DONE, ';
end; end;
function TLookupService.generateStatusSelectSQL(statusTableShort: string; statusTableLong: string; startDate: string; endDate: string; statusType: string): string; function TLookupService.generateStatusSelectSQL(statusTableShort: string; statusTableLong: string; startDate: string; endDate: string; statusType: string): string;
// Generates the SQL query to figure out whether or not an entry exists within // Generates the SQL query to figure out whether or not an entry exists within
// a given time frame. // a given time frame.
...@@ -965,6 +968,7 @@ begin ...@@ -965,6 +968,7 @@ begin
result := result + ' AND STATUS_DATE IS NOT NULL)'; result := result + ' AND STATUS_DATE IS NOT NULL)';
end; end;
function TLookupService.createStatusSearchInfo(params: TStringList; statusNum: string): TStatusSearchInfo; function TLookupService.createStatusSearchInfo(params: TStringList; statusNum: string): TStatusSearchInfo;
// Takes all the status info received from the client and puts it into an object // Takes all the status info received from the client and puts it into an object
// for convenience and to make it easier to expand. Returns said object. // for convenience and to make it easier to expand. Returns said object.
...@@ -1023,6 +1027,7 @@ begin ...@@ -1023,6 +1027,7 @@ begin
end; end;
end; end;
function TLookupService.generateStatusWhereSQL(status: TStatusSearchInfo): string; function TLookupService.generateStatusWhereSQL(status: TStatusSearchInfo): string;
// Generates the where SQL for each status to apply the filters used from the // Generates the where SQL for each status to apply the filters used from the
// clients search. // clients search.
...@@ -1062,6 +1067,7 @@ begin ...@@ -1062,6 +1067,7 @@ begin
end; end;
end; end;
function TLookupService.generateOrdersSQL(searchOptions: string): TSQLQuery; function TLookupService.generateOrdersSQL(searchOptions: string): TSQLQuery;
// Generates the orderSQL to retrieve entries specified by the search recieved // Generates the orderSQL to retrieve entries specified by the search recieved
// from the client. // from the client.
...@@ -1172,6 +1178,7 @@ begin ...@@ -1172,6 +1178,7 @@ begin
end; end;
end; end;
function TLookupService.getColorCount(colors: string): string; function TLookupService.getColorCount(colors: string): string;
// Colors are stored in a JSON in the database so this function parses the // Colors are stored in a JSON in the database so this function parses the
// stringified JSON and returns the count of colors. // stringified JSON and returns the count of colors.
...@@ -2266,7 +2273,7 @@ begin ...@@ -2266,7 +2273,7 @@ begin
Result.AddPair('msg', 'Success: Item successfully edited'); Result.AddPair('msg', 'Success: Item successfully edited');
end end
else else
result.AddPair('msg', 'Failure: Item does not exist'); Result.AddPair('msg', 'Failure: Item does not exist');
logger.Log(4, result.GetValue('msg').Value); logger.Log(4, result.GetValue('msg').Value);
end; end;
......
...@@ -66,6 +66,7 @@ begin ...@@ -66,6 +66,7 @@ begin
end); end);
end; end;
procedure TFMain.btnDataClick(Sender: TObject); procedure TFMain.btnDataClick(Sender: TObject);
begin begin
FData := TFData.Create( self ); FData := TFData.Create( self );
...@@ -73,11 +74,13 @@ begin ...@@ -73,11 +74,13 @@ begin
FData.Free; FData.Free;
end; end;
procedure TFMain.btnExitClick(Sender: TObject); procedure TFMain.btnExitClick(Sender: TObject);
begin begin
Close; Close;
end; end;
procedure TFMain.btnQBClick(Sender: TObject); procedure TFMain.btnQBClick(Sender: TObject);
begin begin
FQB := TfQB.Create( self ); FQB := TfQB.Create( self );
...@@ -85,6 +88,7 @@ begin ...@@ -85,6 +88,7 @@ begin
FQB.Free; FQB.Free;
end; end;
procedure TFMain.btnAuthSwaggerUIClick(Sender: TObject); procedure TFMain.btnAuthSwaggerUIClick(Sender: TObject);
begin begin
ShellExecute(Handle, 'open', PChar(TSparkleUtils.CombineUrlFast(AuthServerModule.XDataServer.BaseUrl, 'swaggerui')), nil, nil, SW_SHOWNORMAL); ShellExecute(Handle, 'open', PChar(TSparkleUtils.CombineUrlFast(AuthServerModule.XDataServer.BaseUrl, 'swaggerui')), nil, nil, SW_SHOWNORMAL);
...@@ -95,6 +99,7 @@ begin ...@@ -95,6 +99,7 @@ begin
ShellExecute(Handle, 'open', PChar(TSparkleUtils.CombineUrlFast(ApiServerModule.XDataServer.BaseUrl, 'swaggerui')), nil, nil, SW_SHOWNORMAL); ShellExecute(Handle, 'open', PChar(TSparkleUtils.CombineUrlFast(ApiServerModule.XDataServer.BaseUrl, 'swaggerui')), nil, nil, SW_SHOWNORMAL);
end; end;
procedure TFMain.initTimerTimer(Sender: TObject); procedure TFMain.initTimerTimer(Sender: TObject);
begin begin
initTimer.Enabled := False; initTimer.Enabled := False;
...@@ -104,6 +109,7 @@ begin ...@@ -104,6 +109,7 @@ begin
StartServers; StartServers;
end; end;
procedure TFMain.StartServers; procedure TFMain.StartServers;
// Reads from the ini file to figure out what IP the database is located at and // Reads from the ini file to figure out what IP the database is located at and
// whether or not Twilio automatic updates should be enabled // whether or not Twilio automatic updates should be enabled
...@@ -144,7 +150,7 @@ begin ...@@ -144,7 +150,7 @@ begin
else else
Logger.Log( 1, '--Settings->LogFileNum: ' + IntToStr(StrToInt(iniStr) - 1) ); Logger.Log( 1, '--Settings->LogFileNum: ' + IntToStr(StrToInt(iniStr) - 1) );
iniStr := iniFile.ReadString( 'Settings', 'WebClientVersion', '' ); iniStr := iniFile.ReadString( 'Settings', 'webClientVersion', '' );
if iniStr.IsEmpty then if iniStr.IsEmpty then
Logger.Log( 1, '--Settings->WebClientVersion: Entry not found - ERROR: ini entry required!!!') Logger.Log( 1, '--Settings->WebClientVersion: Entry not found - ERROR: ini entry required!!!')
else else
...@@ -235,6 +241,7 @@ begin ...@@ -235,6 +241,7 @@ begin
UpdateGUI; UpdateGUI;
end; end;
procedure TFMain.FormClose(Sender: TObject; var Action: TCloseAction); procedure TFMain.FormClose(Sender: TObject; var Action: TCloseAction);
begin begin
ServerConfig.Free; ServerConfig.Free;
...@@ -243,6 +250,7 @@ begin ...@@ -243,6 +250,7 @@ begin
AppServerModule.Free; AppServerModule.Free;
end; end;
procedure TFMain.UpdateGUI; procedure TFMain.UpdateGUI;
begin begin
if AuthServerModule.SparkleHttpSysDispatcher.Active then if AuthServerModule.SparkleHttpSysDispatcher.Active then
...@@ -256,4 +264,5 @@ begin ...@@ -256,4 +264,5 @@ begin
memoInfo.Lines.Add( 'ApiServer stopped' ); memoInfo.Lines.Add( 'ApiServer stopped' );
end; end;
end. end.
...@@ -133,18 +133,18 @@ implementation ...@@ -133,18 +133,18 @@ implementation
{$R *.dfm} {$R *.dfm}
uses uses
uLibrary, Common.Config, XData.Sys.Exceptions; uLibrary, Common.Config;
procedure TrptOrderCorrugated.DataModuleCreate(Sender: TObject); procedure TrptOrderCorrugated.DataModuleCreate(Sender: TObject);
begin begin
Logger.Log( 1, 'TAuthDatabase.DataModuleCreate' ); Logger.Log( 5, 'TrptOrderCorrugated.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' ); LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try try
ucKG.Connect; ucKG.Connect;
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(2, '--TrptOrderList.DataModuleCreate -Error connecting to database: ' + E.Message); Logger.Log( 1, '--TrptOrderCorrugated.DataModuleCreate -Error connecting to database: ' + E.Message );
end; end;
end; end;
end; end;
...@@ -158,7 +158,7 @@ var ...@@ -158,7 +158,7 @@ var
colorsString: string; colorsString: string;
i: Integer; i: Integer;
begin begin
logger.Log(5, 'Adding Color Rows'); logger.Log( 5, 'TrptOrderCorrugated.PopulateColorTable' );
colorsString := uqOrderCorrugated.FieldByName('colors_colors').AsString; colorsString := uqOrderCorrugated.FieldByName('colors_colors').AsString;
colorsObject := TJSONObject.ParseJSONValue(colorsString) as TJSONObject; colorsObject := TJSONObject.ParseJSONValue(colorsString) as TJSONObject;
...@@ -181,30 +181,27 @@ end; ...@@ -181,30 +181,27 @@ end;
function TrptOrderCorrugated.PrepareReport(SQL: string): string; function TrptOrderCorrugated.PrepareReport(SQL: string): string;
begin begin
Logger.Log(5, 'Generated SQL for Prepare Report: ' + SQL); Logger.Log( 5, 'TrptOrderCorrugated.PrepareReport - SQL: ' + SQL );
doQuery(uqOrderCorrugated, SQL); doQuery(uqOrderCorrugated, SQL);
if ( string( uqOrderCorrugated.FieldByName('colors_colors').AsString ) ) <> '' then if ( string( uqOrderCorrugated.FieldByName('colors_colors').AsString ) ) <> '' then
begin begin
PopulateColorTable(); PopulateColorTable();
end; end;
result := GeneratePDF; result := GeneratePDF;
Logger.Log(5, 'Report preparation complete.');
end; end;
function TrptOrderCorrugated.GeneratePDF: string; function TrptOrderCorrugated.GeneratePDF: string;
var var
ReportDir, ReportFileName: string; reportsDir, reportFileName: string;
reportURL: string; reportURL: string;
begin begin
ReportDir := ServerConfig.reportsFolder; reportsDir := ServerConfig.reportsFolder;
reportFileName := FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf';
reportURL := 'reports/' + FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf'; reportURL := 'reports\' + reportFilename;
ReportFileName := reportDir + reportUrl; frxPDFExport1.FileName := reportsDir + reportFileName;
frxPDFExport1.FileName := ReportFileName;
frxPDFExport1.ShowDialog := False; frxPDFExport1.ShowDialog := False;
try try
frxOrderCorrugated.PrepareReport; frxOrderCorrugated.PrepareReport;
...@@ -216,9 +213,9 @@ begin ...@@ -216,9 +213,9 @@ begin
end; end;
Logger.Log( 4, 'TrptOrderCorrugated.GeneratePDF - PDF saved to: ' + reportFileName );
Logger.Log(5, 'PDF saved to: ' + ReportFileName);
result := reportURL; result := reportURL;
end; end;
end. end.
...@@ -60,7 +60,7 @@ var ...@@ -60,7 +60,7 @@ var
implementation implementation
uses uses
uLibrary, Common.Config, XData.Sys.Exceptions; uLibrary, Common.Config;
{%CLASSGROUP 'Vcl.Controls.TControl'} {%CLASSGROUP 'Vcl.Controls.TControl'}
...@@ -68,41 +68,38 @@ uses ...@@ -68,41 +68,38 @@ uses
procedure TrptOrderCutting.DataModuleCreate(Sender: TObject); procedure TrptOrderCutting.DataModuleCreate(Sender: TObject);
begin begin
Logger.Log( 1, 'TAuthDatabase.DataModuleCreate' ); Logger.Log( 5, 'TrptOrderCutting.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' ); LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try try
ucKG.Connect; ucKG.Connect;
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(2, '--TrptOrderList.DataModuleCreate -Error connecting to database: ' + E.Message); Logger.Log( 1, '--TrptOrderCutting.DataModuleCreate -Error connecting to database: ' + E.Message );
end; end;
end; end;
end; end;
function TrptOrderCutting.PrepareReport(SQL: string): string; function TrptOrderCutting.PrepareReport(SQL: string): string;
begin begin
Logger.Log(3, 'Generated SQL for Prepare Report: ' + SQL); Logger.Log( 5, 'TrptOrderCutting.PrepareReport - SQL: ' + SQL );
doQuery(uqOrderCutting, SQL); doQuery(uqOrderCutting, SQL);
result := GeneratePDF; result := GeneratePDF;
Logger.Log(5, 'Report preparation complete.');
end; end;
function TrptOrderCutting.GeneratePDF: string; function TrptOrderCutting.GeneratePDF: string;
var var
ReportDir, ReportFileName: string; reportsDir, reportFileName: string;
reportURL: string; reportURL: string;
begin begin
ReportDir := ServerConfig.reportsFolder; reportsDir := ServerConfig.reportsFolder;
reportFileName := FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf';
reportURL := 'reports\' + FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf'; reportURL := 'reports\' + reportFilename;
ReportFileName := reportDir + reportUrl;
frxPDFExport1.FileName := ReportFileName; frxPDFExport1.FileName := reportsDir + reportFileName;
frxPDFExport1.ShowDialog := False; frxPDFExport1.ShowDialog := False;
try try
frxOrderCutting.PrepareReport; frxOrderCutting.PrepareReport;
...@@ -112,7 +109,7 @@ begin ...@@ -112,7 +109,7 @@ begin
frxOrderCutting.Clear; // Clears the report to avoid memory bloat frxOrderCutting.Clear; // Clears the report to avoid memory bloat
end; end;
Logger.Log(5, 'PDF saved to: ' + ReportFileName); Logger.Log( 4, 'TrptOrderWeb.GeneratePDF - PDF saved to: ' + reportFileName );
result := reportURL; result := reportURL;
end; end;
......
...@@ -59,7 +59,7 @@ var ...@@ -59,7 +59,7 @@ var
implementation implementation
uses uses
uLibrary, Common.Config, XData.Sys.Exceptions; uLibrary, Common.Config;
{%CLASSGROUP 'Vcl.Controls.TControl'} {%CLASSGROUP 'Vcl.Controls.TControl'}
...@@ -67,14 +67,14 @@ uses ...@@ -67,14 +67,14 @@ uses
procedure TrptOrderList.DataModuleCreate(Sender: TObject); procedure TrptOrderList.DataModuleCreate(Sender: TObject);
begin begin
Logger.Log( 1, 'TAuthDatabase.DataModuleCreate' ); Logger.Log( 5, 'TrptOrderList.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' ); LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try try
ucKG.Connect; ucKG.Connect;
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(2, '--TrptOrderList.DataModuleCreate -Error connecting to database: ' + E.Message); Logger.Log( 1, '--TrptOrderList.DataModuleCreate -Error connecting to database: ' + E.Message );
end; end;
end; end;
end; end;
...@@ -104,15 +104,12 @@ begin ...@@ -104,15 +104,12 @@ begin
uqOrdersORDER_DATE.AsDateTime := RecodeSecond(uqOrdersORDER_DATE.AsDateTime, 0); uqOrdersORDER_DATE.AsDateTime := RecodeSecond(uqOrdersORDER_DATE.AsDateTime, 0);
uqOrders.Post; uqOrders.Post;
//FormatDateTime('yyyy-mm-dd hh:nn', myDate);
result := GeneratePDF; result := GeneratePDF;
Logger.Log(5, 'Report preparation complete.'); Logger.Log(5, 'Report preparation complete.');
end; end;
procedure TrptOrderList.uqOrdersCalcFields(DataSet: TDataSet); procedure TrptOrderList.uqOrdersCalcFields(DataSet: TDataSet);
var var
ColorType: string; ColorType: string;
...@@ -140,7 +137,7 @@ begin ...@@ -140,7 +137,7 @@ begin
jsonStr := uqColors.FieldByName(ColorType).AsString; jsonStr := uqColors.FieldByName(ColorType).AsString;
DataSet.FieldByName('COLORS').AsString := getColorCount(jsonStr); DataSet.FieldByName('COLORS').AsString := getColorCount(jsonStr);
finally finally
uqColors.Close; // Ensure it is closed uqColors.Close;
end; end;
if uqOrdersORDER_DATE.AsString <> '' then if uqOrdersORDER_DATE.AsString <> '' then
...@@ -174,7 +171,7 @@ begin ...@@ -174,7 +171,7 @@ begin
uqOrdersNEW_SHIP_DONE.AsString := ''; uqOrdersNEW_SHIP_DONE.AsString := '';
end; end;
//create new field called color count
function TrptOrderList.getColorCount(colors: string): string; function TrptOrderList.getColorCount(colors: string): string;
var var
colorObject: TJSONObject; colorObject: TJSONObject;
...@@ -194,18 +191,17 @@ begin ...@@ -194,18 +191,17 @@ begin
end; end;
end; end;
function TrptOrderList.GeneratePDF: string; function TrptOrderList.GeneratePDF: string;
var var
ReportDir, ReportFileName: string; reportsDir, reportFileName: string;
reportURL: string; reportURL: string;
begin begin
ReportDir := ServerConfig.reportsFolder; reportsDir := ServerConfig.reportsFolder;
reportFileName := FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf';
reportURL := 'reports\' + reportFilename;
reportURL := 'reports/' + FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf'; frxPDFExport1.FileName := reportsDir + reportFileName;
ReportFileName := reportDir + reportUrl;
frxPDFExport1.FileName := ReportFileName;
frxPDFExport1.ShowDialog := False; frxPDFExport1.ShowDialog := False;
try try
frxOrderList.PrepareReport; frxOrderList.PrepareReport;
...@@ -215,9 +211,10 @@ begin ...@@ -215,9 +211,10 @@ begin
frxOrderList.Clear; // Clears the report to avoid memory bloat frxOrderList.Clear; // Clears the report to avoid memory bloat
end; end;
Logger.Log(5, 'PDF saved to: ' + ReportFileName); Logger.Log( 4, 'TrptOrderList.GeneratePDF - PDF saved to: ' + reportFileName );
result := reportURL; result := reportURL;
end; end;
end. end.
...@@ -132,18 +132,18 @@ implementation ...@@ -132,18 +132,18 @@ implementation
{$R *.dfm} {$R *.dfm}
uses uses
uLibrary, Common.Config, XData.Sys.Exceptions; uLibrary, Common.Config;
procedure TrptOrderWeb.DataModuleCreate(Sender: TObject); procedure TrptOrderWeb.DataModuleCreate(Sender: TObject);
begin begin
Logger.Log( 1, 'TAuthDatabase.DataModuleCreate' ); Logger.Log( 5, 'TrptOrderWeb.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' ); LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try try
ucKG.Connect; ucKG.Connect;
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(2, '--TrptOrderList.DataModuleCreate -Error connecting to database: ' + E.Message); Logger.Log( 1, '--TrptOrderWeb.DataModuleCreate -Error connecting to database: ' + E.Message );
end; end;
end; end;
end; end;
...@@ -157,7 +157,7 @@ var ...@@ -157,7 +157,7 @@ var
colorsString: string; colorsString: string;
i: Integer; i: Integer;
begin begin
logger.Log(5, 'Adding Color Rows'); logger.Log( 5, 'TrptOrderWeb.PopulateColorTable' );
colorsString := uqOrderWeb.FieldByName('quantity_and_colors_qty_colors').AsString; colorsString := uqOrderWeb.FieldByName('quantity_and_colors_qty_colors').AsString;
colorsObject := TJSONObject.ParseJSONValue(colorsString) as TJSONObject; colorsObject := TJSONObject.ParseJSONValue(colorsString) as TJSONObject;
...@@ -180,7 +180,7 @@ end; ...@@ -180,7 +180,7 @@ end;
function TrptOrderWeb.PrepareReport(SQL: string): string; function TrptOrderWeb.PrepareReport(SQL: string): string;
begin begin
Logger.Log(3, 'Generated SQL for Prepare Report: ' + SQL); Logger.Log( 5, 'TrptOrderWeb.PrepareReport - SQL: ' + SQL );
doQuery(uqOrderWeb, SQL); doQuery(uqOrderWeb, SQL);
if ( string( uqOrderWeb.FieldByName('quantity_and_colors_qty_colors').AsString ) ) <> '' then if ( string( uqOrderWeb.FieldByName('quantity_and_colors_qty_colors').AsString ) ) <> '' then
...@@ -188,23 +188,19 @@ begin ...@@ -188,23 +188,19 @@ begin
PopulateColorTable(); PopulateColorTable();
end; end;
result := GeneratePDF; result := GeneratePDF;
Logger.Log(3, 'Report preparation complete.');
end; end;
function TrptOrderWeb.GeneratePDF: string; function TrptOrderWeb.GeneratePDF: string;
var var
ReportDir, ReportFileName: string; reportsDir, reportFileName: string;
reportURL: string; reportURL: string;
begin begin
ReportDir := ServerConfig.reportsFolder; reportsDir := ServerConfig.reportsFolder;
reportFileName := FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf';
reportURL := 'reports\' + FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf'; reportURL := 'reports\' + reportFilename;
ReportFileName := reportDir + reportUrl;
frxPDFExport1.FileName := ReportFileName; frxPDFExport1.FileName := reportsDir + reportFileName;
frxPDFExport1.ShowDialog := False; frxPDFExport1.ShowDialog := False;
try try
frxOrderWeb.PrepareReport; frxOrderWeb.PrepareReport;
...@@ -213,7 +209,7 @@ begin ...@@ -213,7 +209,7 @@ begin
frxOrderWeb.Clear; // Clears the report to avoid memory bloat frxOrderWeb.Clear; // Clears the report to avoid memory bloat
end; end;
Logger.Log(5, 'PDF saved to: ' + ReportFileName); Logger.Log( 4, 'TrptOrderWeb.GeneratePDF - PDF saved to: ' + reportFileName );
result := reportURL; result := reportURL;
end; end;
......
[Settings] [Settings]
MemoLogLevel=5 MemoLogLevel=5
FileLogLevel=5 FileLogLevel=5
webClientVersion=0.9.11 webClientVersion=0.9.12
LogFileNum=205 LogFileNum=106
[Database] [Database]
--Server=192.168.116.132 Server=192.168.116.132
--Server=192.168.102.129 --Server=192.168.102.129
--Server=192.168.75.133 --Server=192.168.75.133
Server=192.168.159.10 --Server=192.168.159.10
--Database=kg_order_entry --Database=kg_order_entry
--Username=root --Username=root
--Password=emsys01 --Password=emsys01
......
...@@ -3,5 +3,5 @@ ...@@ -3,5 +3,5 @@
"jwtTokenSecret": "super_secret0123super_secret4567", "jwtTokenSecret": "super_secret0123super_secret4567",
"adminPassword": "whatisthisusedfor", "adminPassword": "whatisthisusedfor",
"webAppFolder": "static", "webAppFolder": "static",
"reportsFolder": ".\\static\\" "reportsFolder": ".\\static\\reports\\"
} }
\ No newline at end of file
...@@ -114,10 +114,10 @@ ...@@ -114,10 +114,10 @@
<VerInfo_Locale>1033</VerInfo_Locale> <VerInfo_Locale>1033</VerInfo_Locale>
<DCC_ExeOutput>.\bin</DCC_ExeOutput> <DCC_ExeOutput>.\bin</DCC_ExeOutput>
<DCC_UnitSearchPath>C:\RADTOOLS\FastMM4;$(DCC_UnitSearchPath)</DCC_UnitSearchPath> <DCC_UnitSearchPath>C:\RADTOOLS\FastMM4;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<VerInfo_Keys>CompanyName=EM Systems;FileDescription=$(MSBuildProjectName);FileVersion=0.9.11.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.11;Comments=</VerInfo_Keys> <VerInfo_Keys>CompanyName=EM Systems;FileDescription=$(MSBuildProjectName);FileVersion=0.9.12.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.11;Comments=</VerInfo_Keys>
<VerInfo_MajorVer>0</VerInfo_MajorVer> <VerInfo_MajorVer>0</VerInfo_MajorVer>
<VerInfo_MinorVer>9</VerInfo_MinorVer> <VerInfo_MinorVer>9</VerInfo_MinorVer>
<VerInfo_Release>11</VerInfo_Release> <VerInfo_Release>12</VerInfo_Release>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''"> <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode> <AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
......
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