Commit 5af369e8 by Elias Sarraf

Merge branch 'master' into cam2

parents 86de47e4 f1a2333b
......@@ -7,9 +7,9 @@ kgOrdersClient/css/__history/
kgOrdersClient/config/__history/
kgOrdersServer/__history
kgOrdersServer/__recovery
kgOrdersServer/*.log
kgOrdersServer/*.txt
kgOrdersServer/doc/
kgOrdersServer/logs
kgOrdersServer/Win32/
kgOrdersServer/Source/__history/
kgOrdersServer/Source/__recovery/
......
......@@ -38,6 +38,163 @@ object FAddOrder: TFAddOrder
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object TMSFNCGrid1: TTMSFNCGrid
Left = 0
Top = 146
Width = 871
Height = 331
Align = alBottom
ParentDoubleBuffered = False
DoubleBuffered = True
TabOrder = 2
DefaultRowHeight = 40.000000000000000000
FixedColumns = 0
ColumnCount = 4
Options.Bands.Enabled = True
Options.ColumnSize.Stretch = True
Options.Editing.CalcFormat = '%g'
Options.Grouping.CalcFormat = '%g'
Options.Grouping.GroupCountFormat = '(%d)'
Options.IO.XMLEncoding = 'ISO-8859-1'
Options.Mouse.ClickMargin = 0
Options.Mouse.ColumnSizeMargin = 6
Options.Mouse.RowSizeMargin = 6
OnSelectedCell = TMSFNCGrid1SelectedCell
Columns = <
item
BorderWidth = 1
FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 4539717
FixedFont.Height = -11
FixedFont.Name = 'Segoe UI'
FixedFont.Style = [fsBold]
Font.Charset = DEFAULT_CHARSET
Font.Color = 8026746
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 70.000000000000000000
end
item
BorderWidth = 1
FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 4539717
FixedFont.Height = -11
FixedFont.Name = 'Segoe UI'
FixedFont.Style = [fsBold]
Font.Charset = DEFAULT_CHARSET
Font.Color = 8026746
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 250.000000000000000000
end
item
BorderWidth = 1
FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 4539717
FixedFont.Height = -11
FixedFont.Name = 'Segoe UI'
FixedFont.Style = [fsBold]
Font.Charset = DEFAULT_CHARSET
Font.Color = 8026746
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 100.000000000000000000
end
item
BorderWidth = 1
FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 4539717
FixedFont.Height = -11
FixedFont.Name = 'Segoe UI'
FixedFont.Style = [fsBold]
Font.Charset = DEFAULT_CHARSET
Font.Color = 8026746
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 432.000000000000000000
end
item
BorderWidth = 1
FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 4539717
FixedFont.Height = -11
FixedFont.Name = 'Segoe UI'
FixedFont.Style = [fsBold]
Font.Charset = DEFAULT_CHARSET
Font.Color = 8026746
Font.Height = -11
Font.Name = 'Segoe UI'
Font.Style = []
ID = ''
Width = 90.000000000000000000
end>
DefaultFont.Charset = DEFAULT_CHARSET
DefaultFont.Color = clWindowText
DefaultFont.Height = -11
DefaultFont.Name = 'Segoe UI'
DefaultFont.Style = []
TopRow = 1
Appearance.FixedLayout.Fill.Color = 16380654
Appearance.FixedLayout.Font.Charset = DEFAULT_CHARSET
Appearance.FixedLayout.Font.Color = 4539717
Appearance.FixedLayout.Font.Height = -13
Appearance.FixedLayout.Font.Name = 'Segoe UI'
Appearance.FixedLayout.Font.Style = [fsBold]
Appearance.NormalLayout.Fill.Color = 16578806
Appearance.NormalLayout.Font.Charset = DEFAULT_CHARSET
Appearance.NormalLayout.Font.Color = 8026746
Appearance.NormalLayout.Font.Height = -11
Appearance.NormalLayout.Font.Name = 'Segoe UI'
Appearance.NormalLayout.Font.Style = []
Appearance.GroupLayout.Fill.Color = 12817262
Appearance.GroupLayout.Font.Charset = DEFAULT_CHARSET
Appearance.GroupLayout.Font.Color = clBlack
Appearance.GroupLayout.Font.Height = -11
Appearance.GroupLayout.Font.Name = 'Segoe UI'
Appearance.GroupLayout.Font.Style = []
Appearance.SummaryLayout.Fill.Color = 14009785
Appearance.SummaryLayout.Font.Charset = DEFAULT_CHARSET
Appearance.SummaryLayout.Font.Color = clBlack
Appearance.SummaryLayout.Font.Height = -11
Appearance.SummaryLayout.Font.Name = 'Segoe UI'
Appearance.SummaryLayout.Font.Style = []
Appearance.SelectedLayout.Fill.Color = 16441019
Appearance.SelectedLayout.Font.Charset = DEFAULT_CHARSET
Appearance.SelectedLayout.Font.Color = 4539717
Appearance.SelectedLayout.Font.Height = -11
Appearance.SelectedLayout.Font.Name = 'Segoe UI'
Appearance.SelectedLayout.Font.Style = []
Appearance.FocusedLayout.Fill.Color = 16039284
Appearance.FocusedLayout.Font.Charset = DEFAULT_CHARSET
Appearance.FocusedLayout.Font.Color = 4539717
Appearance.FocusedLayout.Font.Height = -11
Appearance.FocusedLayout.Font.Name = 'Segoe UI'
Appearance.FocusedLayout.Font.Style = []
Appearance.FixedSelectedLayout.Fill.Color = clLightsteelblue
Appearance.FixedSelectedLayout.Font.Charset = DEFAULT_CHARSET
Appearance.FixedSelectedLayout.Font.Color = clBlack
Appearance.FixedSelectedLayout.Font.Height = -11
Appearance.FixedSelectedLayout.Font.Name = 'Segoe UI'
Appearance.FixedSelectedLayout.Font.Style = []
Appearance.BandLayout.Fill.Color = 16711679
Appearance.BandLayout.Font.Charset = DEFAULT_CHARSET
Appearance.BandLayout.Font.Color = 8026746
Appearance.BandLayout.Font.Height = -11
Appearance.BandLayout.Font.Name = 'Segoe UI'
Appearance.BandLayout.Font.Style = []
Appearance.ProgressLayout.Format = '%.0f%%'
LeftCol = 0
ScrollMode = scmItemScrolling
DesignTimeSampleData = True
end
object cbCorrugatedPlate: TWebCheckBox
Left = 26
Top = 63
......@@ -253,13 +410,13 @@ object FAddOrder: TFAddOrder
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left = 728
Top = 109
Left = 730
Top = 93
end
object xdwdsCustomers: TXDataWebDataSet
Connection = DMConnection.ApiConnection
Left = 600
Top = 109
Top = 95
object xdwdsCustomersID: TIntegerField
FieldName = 'ID'
end
......@@ -276,7 +433,7 @@ object FAddOrder: TFAddOrder
end
object wdsCustomers: TWebDataSource
DataSet = xdwdsCustomers
Left = 470
Top = 109
Left = 468
Top = 93
end
end
......@@ -12,8 +12,8 @@ object FViewOrders: TFViewOrders
OnCreate = WebFormCreate
OnShow = WebFormShow
object lblEntries: TWebLabel
Left = 68
Top = 333
Left = 59
Top = 113
Width = 77
Height = 13
Caption = 'Showing 0 of ...'
......@@ -163,8 +163,8 @@ object FViewOrders: TFViewOrders
TabStop = False
WidthPercent = 100.000000000000000000
end
object WebButton2: TWebButton
Left = 328
object btnPDF: TWebButton
Left = 332
Top = 79
Width = 96
Height = 25
......@@ -177,6 +177,114 @@ object FViewOrders: TFViewOrders
TabOrder = 8
TabStop = False
WidthPercent = 100.000000000000000000
OnClick = btnPDFClick
end
object wdbtcOrders: TWebDBTableControl
Left = 26
Top = 132
Width = 631
Height = 200
ElementClassName = 'table'
ElementId = 'tblPhoneGrid'
BorderColor = clSilver
ChildOrder = 11
ElementFont = efCSS
ElementHeaderClassName = 'thead-light'
ElementPosition = epRelative
ElementTableClassName = 'table table-striped table-hover table-bordered text-sm'
Footer.ButtonActiveElementClassName = 'btn btn-primary'
Footer.ButtonElementClassName = 'btn btn-light'
Footer.DropDownElementClassName = 'form-control'
Footer.InputElementClassName = 'form-control'
Footer.LinkActiveElementClassName = 'link-primary'
Footer.LinkElementClassName = 'link-secondary'
Footer.ListElementClassName = 'pagination'
Footer.ListItemElementClassName = 'page-item'
Footer.ListLinkElementClassName = 'page-link'
Header.ButtonActiveElementClassName = 'btn btn-primary'
Header.ButtonElementClassName = 'btn btn-light'
Header.DropDownElementClassName = 'form-control'
Header.InputElementClassName = 'form-control'
Header.LinkActiveElementClassName = 'link-primary'
Header.LinkElementClassName = 'link-secondary'
Header.ListElementClassName = 'pagination'
Header.ListItemElementClassName = 'page-item'
Header.ListLinkElementClassName = 'page-link'
WordWrap = True
Columns = <
item
DataField = 'ID'
Title = 'ID'
end
item
DataField = 'companyName'
Title = 'Company Name'
end
item
DataField = 'jobName'
Title = 'Job Name'
end
item
DataField = 'orderDate'
Title = 'Order Date'
end
item
DataField = 'proofDue'
Title = 'Proof Due'
end
item
DataField = 'proofDone'
Title = 'Proof Done'
end
item
DataField = 'artDue'
Title = 'Art Due'
end
item
DataField = 'artDone'
Title = 'Art Done'
end
item
DataField = 'mountDue'
Title = 'Mount Due'
end
item
DataField = 'mountDone'
Title = 'Mount Done'
end
item
DataField = 'shipDue'
Title = 'Ship Due'
end
item
DataField = 'shipDone'
Title = 'Ship Done'
end
item
DataField = 'price'
Title = 'Price'
end
item
DataField = 'qbRefNum'
Title = 'Quickbooks Reference Number'
end
item
DataField = 'colors'
Title = 'Colors'
end
item
DataField = 'plateDue'
Title = 'Plate Due'
end
item
DataField = 'plateDone'
Title = 'Plate Done'
end
item
DataField = 'orderType'
Title = 'Order Type'
end>
DataSource = wdsOrders
end
object pnlMessage: TWebPanel
Left = 52
......@@ -221,70 +329,70 @@ object FViewOrders: TFViewOrders
Left = 28
Top = 410
end
object XDataWebDataSet1: TXDataWebDataSet
object xdwdsOrders: TXDataWebDataSet
Connection = DMConnection.ApiConnection
Left = 70
Top = 410
object XDataWebDataSet1ID: TStringField
object xdwdsOrdersID: TStringField
FieldName = 'ID'
end
object XDataWebDataSet1companyName: TStringField
object xdwdsOrderscompanyName: TStringField
FieldName = 'companyName'
end
object XDataWebDataSet1jobName: TStringField
object xdwdsOrdersjobName: TStringField
FieldName = 'jobName'
end
object XDataWebDataSet1orderDate: TStringField
object xdwdsOrdersorderDate: TStringField
FieldName = 'orderDate'
end
object XDataWebDataSet1proofDue: TStringField
object xdwdsOrdersproofDue: TStringField
FieldName = 'proofDue'
end
object XDataWebDataSet1proofDone: TStringField
object xdwdsOrdersproofDone: TStringField
FieldName = 'proofDone'
end
object XDataWebDataSet1artDue: TStringField
object xdwdsOrdersartDue: TStringField
FieldName = 'artDue'
end
object XDataWebDataSet1artDone: TStringField
object xdwdsOrdersartDone: TStringField
FieldName = 'artDone'
end
object XDataWebDataSet1mountDue: TStringField
object xdwdsOrdersmountDue: TStringField
FieldName = 'mountDue'
end
object XDataWebDataSet1mountDone: TStringField
object xdwdsOrdersmountDone: TStringField
FieldName = 'mountDone'
end
object XDataWebDataSet1shipDue: TStringField
object xdwdsOrdersshipDue: TStringField
FieldName = 'shipDue'
end
object XDataWebDataSet1shipDone: TStringField
object xdwdsOrdersshipDone: TStringField
FieldName = 'shipDone'
end
object XDataWebDataSet1price: TStringField
object xdwdsOrdersprice: TStringField
FieldName = 'price'
end
object XDataWebDataSet1qbRefNum: TStringField
object xdwdsOrdersqbRefNum: TStringField
FieldName = 'qbRefNum'
end
object XDataWebDataSet1colors: TStringField
object xdwdsOrderscolors: TStringField
FieldName = 'colors'
end
object XDataWebDataSet1plateDue: TStringField
object xdwdsOrdersplateDue: TStringField
FieldName = 'plateDue'
end
object XDataWebDataSet1plateDone: TStringField
object xdwdsOrdersplateDone: TStringField
FieldName = 'plateDone'
end
object XDataWebDataSet1orderType: TStringField
object xdwdsOrdersorderType: TStringField
FieldName = 'orderType'
end
object XDataWebDataSet1SQL: TStringField
FieldName = 'SQL'
end
end
object WebDataSource1: TWebDataSource
DataSet = XDataWebDataSet1
object wdsOrders: TWebDataSource
DataSet = xdwdsOrders
Left = 120
Top = 410
end
......
<!-- <div class="container vh-100 d-flex flex-column pb-5" style="max-width: 80%;"> -->
<div class="container h-100 d-flex flex-column mt-0" style="max-width: 95%;">
<!-- Alert Section -->
<div class="row justify-content-center">
<div class="col-12 col-md-8">
......@@ -50,7 +49,10 @@
<button id="btnsetstatus" class="btn btn-secondary mt-3">Set Status</button>
</div>
<div class="col-auto">
<button id="btngeneratepdf" class="btn btn-secondary mt-3">Generate PDF</button>
<button id="btngeneratepdf" class="btn btn-secondary mt-3" type="button">Generate PDF</button>
<div class="invalid-feedback">
No order selected. Please select an order to generate a PDF.
</div>
</div>
<div class="col-auto">
<button id="btnfilters" class="btn btn-secondary mt-3">Filters</button>
......@@ -58,57 +60,33 @@
</div>
</div>
<!-- Entries Label Section -->
<div class="container mt-2">
<div class="row">
<div class="col">
<label id="lblentries"></label>
</div>
</div>
<div class="d-flex justify-content-between w-100 mt-2">
<label id="lblentries"></label>
</div>
<!-- Table Section -->
<div id="order_table_section" class="overflow-auto mt-2 flex-grow-1">
<div id="order_table_section" class="overflow-auto mt-2"
style="max-height: calc(100vh - 380px); border-bottom: none; padding-bottom: 0;">
<table id="tblPhoneGrid" class="table table-striped table-bordered">
<thead style="position: sticky; top: 0; z-index: 1; background-color: white; border-bottom: 2px solid #dee2e6;">
<tr>
<th>Order ID</th>
<th>Company Name</th>
<th>Job Name</th>
<th>Order Date</th>
<th>Proof Due</th>
<th>Proof Date</th>
<th>Art Due</th>
<th>Art Done</th>
<th>Plate Due</th>
<th>Plate Done</th>
<th>Mount Due</th>
<th>Mount Done</th>
<th>Ship Due</th>
<th>Ship Done</th>
<th>Price</th>
<th>QuickBooks Ref Number</th>
<th>Colors</th>
<thead class="sticky-top bg-light">
<tr style="font-size: 0.875rem;">
<!-- Table headers are dynamically generated -->
</tr>
</thead>
<tbody>
<!-- Rows will be dynamically added -->
<tbody id="orderTableBody" class="align-middle">
<!-- Table rows are dynamically generated -->
</tbody>
</table>
</div>
<!-- Pagination Section -->
<div class="container mt-4">
<div class="row justify-content-center">
<nav aria-label="Page navigation">
<ul id="pagination" class="pagination">
<!-- Pagination items added dynamically -->
</ul>
</nav>
</div>
<div class="d-flex justify-content-center w-100 mt-4">
<nav aria-label="Page navigation">
<ul id="pagination" class="pagination">
<!-- Pagination items added dynamically -->
</ul>
</nav>
</div>
</div>
......
......@@ -2,7 +2,7 @@
// to sort the entries, filter their search, and search for a specific person.
// Authors:
// Cameron Hayes
// Mac ...
// Mac Stephens
unit View.Orders;
......@@ -13,41 +13,45 @@ uses
WEBLib.Forms, WEBLib.Dialogs, WEBLib.Menus, WEBLib.ExtCtrls, WEBLib.StdCtrls,
WEBLib.JSON, Auth.Service, XData.Web.Client, WebLib.Storage,
ConnectionModule, App.Types, Vcl.StdCtrls, Vcl.Controls, WEBLib.DBCtrls,
XData.Web.JsonDataset, WEBLib.DB, Data.DB, XData.Web.Dataset;
XData.Web.JsonDataset, WEBLib.DB, Data.DB, XData.Web.Dataset, View.AddOrder,
WEBLib.Grids;
type
TFViewOrders = class(TWebForm)
XDataWebClient1: TXDataWebClient;
XDataWebDataSet1: TXDataWebDataSet;
xdwdsOrders: TXDataWebDataSet;
lblEntries: TWebLabel;
wcbSortBy: TWebComboBox;
btnApply: TWebButton;
edtSearch: TWebEdit;
WebDataSource1: TWebDataSource;
XDataWebDataSet1companyName: TStringField;
XDataWebDataSet1jobName: TStringField;
XDataWebDataSet1orderDate: TStringField;
XDataWebDataSet1proofDue: TStringField;
XDataWebDataSet1proofDone: TStringField;
XDataWebDataSet1artDue: TStringField;
XDataWebDataSet1artDone: TStringField;
XDataWebDataSet1mountDue: TStringField;
XDataWebDataSet1mountDone: TStringField;
XDataWebDataSet1shipDue: TStringField;
XDataWebDataSet1shipDone: TStringField;
XDataWebDataSet1price: TStringField;
XDataWebDataSet1ID: TStringField;
XDataWebDataSet1qbRefNum: TStringField;
XDataWebDataSet1colors: TStringField;
wdsOrders: TWebDataSource;
xdwdsOrderscompanyName: TStringField;
xdwdsOrdersjobName: TStringField;
xdwdsOrdersorderDate: TStringField;
xdwdsOrdersproofDue: TStringField;
xdwdsOrdersproofDone: TStringField;
xdwdsOrdersartDue: TStringField;
xdwdsOrdersartDone: TStringField;
xdwdsOrdersmountDue: TStringField;
xdwdsOrdersmountDone: TStringField;
xdwdsOrdersshipDue: TStringField;
xdwdsOrdersshipDone: TStringField;
xdwdsOrdersprice: TStringField;
xdwdsOrdersID: TStringField;
xdwdsOrdersqbRefNum: TStringField;
xdwdsOrderscolors: TStringField;
btnAddOrder: TWebButton;
btnFilters: TWebButton;
dtpStartDate: TWebDateTimePicker;
dtpEndDate: TWebDateTimePicker;
XDataWebDataSet1plateDue: TStringField;
XDataWebDataSet1plateDone: TStringField;
XDataWebDataSet1orderType: TStringField;
xdwdsOrdersplateDue: TStringField;
xdwdsOrdersplateDone: TStringField;
xdwdsOrdersorderType: TStringField;
pnlMessage: TWebPanel;
lblMessage: TWebLabel;
btnCloseNotification: TWebButton;
WebButton1: TWebButton;
WebButton2: TWebButton;
btnPDF: TWebButton;
wdsCustomers: TWebDataSource;
xdwdsCustomers: TXDataWebDataSet;
xdwdsCustomersNAME: TStringField;
......@@ -56,10 +60,7 @@ type
xdwdsSave: TXDataWebDataSet;
wdsSave: TWebDataSource;
xdwdsSaveCURR_ID: TIntegerField;
pnlMessage: TWebPanel;
lblMessage: TWebLabel;
btnCloseNotification: TWebButton;
XDataWebDataSet1SQL: TStringField;
wdbtcOrders: TWebDBTableControl;
procedure WebFormCreate(Sender: TObject);
procedure btnApplyClick(Sender: TObject);
procedure btnSearchClick(Sender: TObject);
......@@ -68,19 +69,21 @@ type
procedure btnCloseNotificationClick(Sender: TObject);
procedure WebFormShow(Sender: TObject);
procedure btnConfirmClick(Sender: TObject);
procedure btnPDFClick(Sender: TObject);
private
FChildForm: TWebForm;
procedure AddRowToTable(temp: string);
procedure ClearTable();
procedure GeneratePagination(TotalPages: Integer);
function GenerateSearchOptions(): string;
procedure orderEntry(orderInfo, customerInfo, mode: string);
procedure HideNotification();
procedure ShowNotification(Notification: string);
procedure ShowOrderListForm();
procedure ShowAddOrderForm();
[async] procedure Search(searchOptions: string);
[async] procedure GetOrders(searchOptions: string);
[async] procedure getUser();
procedure GeneratePDF(OrderID: string);
[async] procedure GenerateReportPDF;
var
PageNumber: integer;
PageSize: integer;
......@@ -106,6 +109,23 @@ uses
{$R *.dfm}
procedure TFViewOrders.btnPDFClick(Sender: TObject);
begin
GenerateReportPDF;
end;
[async] procedure TFViewOrders.GenerateReportPDF;
var
searchOptions: string;
begin
searchOptions := GenerateSearchOptions;
// Call the server method to generate the PDF
await(XDataWebClient1.RawInvokeAsync('ILookupService.GenerateReportPDF', [searchOptions]));
ShowMessage('PDF Report Generated Successfully');
end;
procedure TFViewOrders.WebFormCreate(Sender: TObject);
// Initializes important values:
// PageNumber: What page number the user is on IE 1: 1-10, 2: 11-20 etc
......@@ -124,6 +144,7 @@ begin
getOrders(GenerateSearchOptions());
end;
procedure TFViewOrders.WebFormShow(Sender: TObject);
begin
console.log(info);
......@@ -133,6 +154,7 @@ begin
HideNotification();
end;
procedure TFViewOrders.getUser();
var
xdcResponse: TXDataClientResponse;
......@@ -146,6 +168,7 @@ begin
user := TJSObject(data[0]);
end;
class function TFViewOrders.CreateForm(AElementID, Info: string): TWebForm;
var
localInfo: string;
......@@ -163,7 +186,7 @@ begin
end;
procedure TFViewOrders.ShowOrderListForm();
procedure TFViewOrders.ShowAddOrderForm();
var
newform: TFAddOrder;
begin
......@@ -191,192 +214,6 @@ begin
end;
procedure TFViewOrders.AddRowToTable(temp: string);
// Adds rows to the table
// PhoneNumber: phone number of the location
// Caller: phone number of the caller
// Duration: duration of the call
// Transcript: transcription of the recording
// MediaUrl: Link to the recording
var
NewRow, Cell, P, Button, Audio: TJSHTMLElement;
colorObject: TJSObject;
colorList: TJSArray;
colorListJSON: TJSONArray;
colors: integer;
ClickHandler: TJSFunction;
id, strColorList: string;
begin
NewRow := TJSHTMLElement(document.createElement('tr'));
NewRow.Attrs['orderType'] := XDataWebDataSet1orderType.Value;
NewRow.addEventListener('click', procedure
begin
orderEntry(NewRow.Attrs['id'], '', 'EDIT');
end);
// Order ID Cell
NewRow.Attrs['id'] := XDataWebDataSet1ID.Value;
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Order ID');
if XDataWebDataSet1ID.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1ID.Value;
NewRow.appendChild(Cell);
// Company Name Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Company Name');
if XDataWebDataSet1companyName.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1companyName.Value;
NewRow.appendChild(Cell);
// Job Name Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Job Name');
if XDataWebDataSet1jobName.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1jobName.Value;
NewRow.appendChild(Cell);
// Order Date Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Order Date');
if XDataWebDataSet1orderDate.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1orderDate.Value;
NewRow.appendChild(Cell);
// Proof Due Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Proof Due');
if XDataWebDataSet1proofDue.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1proofDue.Value;
NewRow.appendChild(Cell);
// Proof Done Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Proof Done');
if XDataWebDataSet1proofDone.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1proofDone.Value;
NewRow.appendChild(Cell);
// Art Due Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Art Due');
if XDataWebDataSet1artDue.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1artDue.Value;
NewRow.appendChild(Cell);
// Art Done Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Art Done');
if XDataWebDataSet1artDone.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1artDone.Value;
NewRow.appendChild(Cell);
// Plate Due Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Plate Due');
if XDataWebDataSet1plateDue.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1plateDue.Value;
NewRow.appendChild(Cell);
// Plate Done Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Plate Done');
if XDataWebDataSet1plateDone.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1plateDone.Value;
NewRow.appendChild(Cell);
// Mount Due Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Mount Due');
if XDataWebDataSet1mountDue.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1mountDue.Value;
NewRow.appendChild(Cell);
// Mount Done Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Mount Done');
if XDataWebDataSet1mountDone.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1mountDone.Value;
NewRow.appendChild(Cell);
// Ship Due Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Ship Due');
if XDataWebDataSet1shipDue.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1shipDue.Value;
NewRow.appendChild(Cell);
// Ship Done Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Ship Done');
if XDataWebDataSet1shipDone.Value = '' then
Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1shipDone.Value;
NewRow.appendChild(Cell);
// Price Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Price');
if XDataWebDataSet1price.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1price.Value;
NewRow.appendChild(Cell);
// QuickBooks Reference Number Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Quickbooks Reference Number');
if XDataWebDataSet1qbRefNum.Value = '' then
//Cell.innerText := 'None'
else
Cell.innerText := XDataWebDataSet1qbRefNum.Value;
NewRow.appendChild(Cell);
// Colors Cell
Cell := TJSHTMLElement(document.createElement('td'));
Cell.setAttribute('data-label', 'Colors');
if XDataWebDataSet1colors.Value = '' then
Cell.innerText := '0'
else
begin
colorObject := TJSObject(TJSJSON.parse(XDataWebDataSet1colors.Value));
colorList := TJSArray(colorObject['items']);
colors := colorList.flength;
Cell.innerText := IntToStr(colors);
end;
NewRow.appendChild(Cell);
// Appends new rows to the table body
TJSHTMLElement(document.getElementById('tblPhoneGrid').getElementsByTagName('tbody')[0]).appendChild(NewRow);
end;
procedure TFViewOrders.GeneratePagination(TotalPages: Integer);
// Generates pagination for the table.
// TotalPages: Total amount of pages generated by the search
......@@ -577,74 +414,46 @@ end;
procedure TFViewOrders.GetOrders(searchOptions: string);
// Retrieves list of orders from the server that meet the criteria searchOptions
// searchOptions: information about how to generate the SQL statement based on
// user input.
var
xdcResponse: TXDataClientResponse;
orderList : TJSObject;
i: integer;
data: TJSArray;
order: TJSObject;
callListLength: integer;
tempString: string;
orderList: TJSObject;
begin
if PageNumber > 0 then
begin
asm
startSpinner();
end;
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetOrders',
[searchOptions]));
orderList := TJSObject(xdcResponse.Result);
data := TJSArray(orderList['data']);
callListLength := integer(orderList['count']);
ClearTable();
XDataWebDataSet1.Close;
XDataWebDataSet1.SetJsonData(orderList['data']);
XDataWebDataSet1.Open;
console.log(XDataWebDataSet1SQL.AsString);
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetOrders', [searchOptions]));
orderList := TJSObject(xdcResponse.Result);
// Load data into the dataset
xdwdsOrders.Close;
xdwdsOrders.SetJsonData(orderList['data']);
xdwdsOrders.Open;
asm
setTimeout(endSpinner, 2000);
end;
for i := 0 to data.Length - 1 do
begin
order := TJSObject(data[i]);
AddRowToTable(tempString);
XDataWebDataSet1.Next;
end;
TotalPages := (callListLength + PageSize - 1) div PageSize;
if callListLength = 0 then
begin
lblEntries.Caption := 'No entries found';
end
else if (PageNumber * PageSize) < callListLength then
begin
lblEntries.Caption := 'Showing entries ' + IntToStr((PageNumber - 1) * PageSize + 1) +
' - ' + IntToStr(PageNumber * PageSize) +
' of ' + IntToStr(callListLength);
end
else if (PageNumber * PageSize) >= callListLength then
begin
lblEntries.Caption := 'Showing entries ' + IntToStr((PageNumber - 1) * PageSize + 1) +
' - ' + IntToStr(callListLength) +
' of ' + IntToStr(callListLength);
end;
GeneratePagination(TotalPages);
lblEntries.Caption := 'Total entries: ' + IntToStr(integer(orderList['count']));
// Optional: Continue using pagination if needed
GeneratePagination((integer(orderList['count']) + PageSize - 1) div PageSize);
end;
end;
procedure TFViewOrders.btnAddOrderClick(Sender: TObject);
begin
ShowOrderListForm();
ShowAddOrderForm();
end;
procedure TFViewOrders.orderEntry(orderInfo, customerInfo, mode: string);
begin
FViewMain.ViewOrderEntry(orderInfo, customerInfo, mode);
end;
procedure TFViewOrders.btnApplyClick(Sender: TObject);
// Button that effectively functions as a GetOrders() button
var
......@@ -667,17 +476,20 @@ begin
ShowNotification('Failure: Please Select a Status Type');
end;
procedure TFViewOrders.btnCloseNotificationClick(Sender: TObject);
begin
console.log('hit');
HideNotification();
end;
procedure TFViewOrders.btnConfirmClick(Sender: TObject);
begin
//orderEntry('', 'ADD');
end;
procedure TFViewOrders.btnFiltersClick(Sender: TObject);
var
filterSection: TJSHTMLElement;
......@@ -702,6 +514,7 @@ begin
end;
end;
procedure TFViewOrders.Search(searchOptions: string);
// Search method that searches the database for a specific phone number
var
......@@ -732,12 +545,14 @@ begin
end;
end;
procedure TFViewOrders.btnSearchClick(Sender: TObject);
// orders Search method
begin
Search(edtSearch.Text);
end;
procedure TFViewOrders.ClearTable();
// clears the table
var
......@@ -747,6 +562,7 @@ begin
tbody.innerHTML := '';
end;
function TFViewOrders.GenerateSearchOptions(): string;
// Generates searchOptions for GetOrders.
var
......@@ -768,6 +584,7 @@ begin
Result := searchOptions;
end;
procedure TFViewOrders.HideNotification;
begin
console.log('hit');
......@@ -775,6 +592,7 @@ begin
info := '';
end;
procedure TFViewOrders.ShowNotification(Notification: string);
var
splitNotification: TArray<string>;
......@@ -804,4 +622,23 @@ begin
end;
procedure TFViewOrders.GeneratePDF(OrderID: string);
var
XDCResponse: TXDataClientResponse;
PDFBase64: string;
PDFBlob: TJSUint8Array;
PDFLink: TJSHTMLElement;
begin
// XDCResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GenerateOrderPDF', [OrderID]));
// PDFBase64 := string(XDCResponse.Result);
//
// // Convert Base64 to binary and create a link to download it
// PDFBlob := TJSUint8Array.new(TJSBase64.decodeBase64(PDFBase64));
// PDFLink := TJSHTMLElement(document.createElement('a'));
// PDFLink.setAttribute('href', 'data:application/pdf;base64,' + PDFBase64);
// PDFLink.setAttribute('download', 'Order_' + OrderID + '.pdf');
// PDFLink.click;
end;
end.
......@@ -279,6 +279,20 @@ input[type="text"] {
color: #fff !important;
}
.card {
border: none !important;
box-shadow: none !important; /* If shadow is causing the issue */
}
.color-column {
width: 200px; /* Fixed width for the column */
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis; /* Adds ellipsis */
}
.grid-container {
position: relative; /* Ensure the container is the reference for child positioning */
......
object KGOrdersDatabase: TKGOrdersDatabase
object ApiDatabase: TApiDatabase
OnCreate = DataModuleCreate
Height = 358
Width = 519
......
// Where the database is kept. Only used by Lookup.ServiceImpl to retrieve info
// from the data base and send it to the client.
// Author: ???
unit KGOrders.Database;
unit Api.Database;
interface
......@@ -11,7 +11,7 @@ uses
Common.Logging, Vcl.Forms, MySQLUniProvider;
type
TKGOrdersDatabase = class(TDataModule)
TApiDatabase = class(TDataModule)
ucKG: TUniConnection;
UniQuery1: TUniQuery;
MySQLUniProvider1: TMySQLUniProvider;
......@@ -113,79 +113,35 @@ type
end;
var
KGOrdersDatabase: TKGOrdersDatabase;
ApiDatabase: TApiDatabase;
implementation
uses
uLibrary;
{%CLASSGROUP 'Vcl.Controls.TControl'}
{$R *.dfm}
procedure TKGOrdersDatabase.DataModuleCreate(Sender: TObject);
var
iniFile: TIniFile;
iniStr: string;
procedure TApiDatabase.DataModuleCreate(Sender: TObject);
begin
Logger.Log( 5, 'TKGOrdersDatabase.DataModuleCreate' );
iniFile := TIniFile.Create( ExtractFilePath(Application.ExeName) + 'kgOrdersServer.ini' );
Logger.Log( 3, 'TApiDatabase.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try
Logger.Log( 5, '--iniFile entries:' );
iniStr := iniFile.ReadString('Database', 'Server', '');
if iniStr.IsEmpty then
Logger.Log( 5, '----Database->Server: Entry not found' )
else
begin
Logger.Log( 5, '----Database->Server: ' + iniStr );
ucKG.Server := iniStr;
end;
iniStr := iniFile.ReadString('Database', 'Database', '');
if iniStr.IsEmpty then
Logger.Log( 5, '----Database->Database: Entry not found' )
else
begin
Logger.Log( 5, '----Database->Database: ' + iniStr );
ucKG.Database := iniStr;
end;
iniStr := iniFile.ReadString('Database', 'Username', '');
if iniStr.IsEmpty then
Logger.Log( 5, '----Database->Username: Entry not found' )
else
ucKG.Connect;
except
on E: Exception do
begin
Logger.Log( 5, '----Database->Username: ' + iniStr );
ucKG.Username := iniStr;
Logger.Log(3, '--TApiDatabase.DataModuleCreate -Error connecting to database: ' + E.Message);
end;
iniStr := iniFile.ReadString('Database', 'Password', '');
if iniStr.IsEmpty then
Logger.Log( 5, '----Database->Password: Entry not found' )
else
begin
Logger.Log( 5, '----Database->Password: xxxxxxxx' );
ucKG.Password := iniStr;
end;
try
ucKG.Connect;
except
on E: Exception do
begin
Logger.Log(3, '--TKGOrdersDatabase.DataModuleCreate -Error connecting to database: ' + E.Message);
end;
end;
Logger.Log(1, '');
finally
iniFile.Free;
end;
end;
class procedure TKGOrdersDatabase.ExecSQL(const SQL: string);
class procedure TApiDatabase.ExecSQL(const SQL: string);
var
DB: TKGOrdersDatabase;
DB: TApiDatabase;
begin
DB := TKGOrdersDatabase.Create(nil);
DB := TApiDatabase.Create(nil);
try
DB.UniQuery1.SQL.Text := SQL;
DB.UniQuery1.ExecSQL;
......
......@@ -2,12 +2,10 @@ object ApiServerModule: TApiServerModule
Height = 273
Width = 230
object SparkleHttpSysDispatcher: TSparkleHttpSysDispatcher
Active = True
Left = 86
Top = 30
end
object XDataServer: TXDataServer
BaseUrl = 'http://localhost:2004/emsys/kgOrders/api/'
Dispatcher = SparkleHttpSysDispatcher
ModelName = 'Api'
EntitySetPermissions = <>
......
......@@ -38,62 +38,16 @@ uses
{$R *.dfm}
procedure TAuthDatabase.DataModuleCreate(Sender: TObject);
var
iniFile: TIniFile;
iniStr: string;
begin
Logger.Log( 5, 'TAuthDatabase.DataModuleCreate' );
iniFile := TIniFile.Create( ExtractFilePath(Application.ExeName) + 'kgOrdersServer.ini' );
Logger.Log( 3, 'TAuthDatabase.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try
Logger.Log( 5, '--iniFile entries:' );
iniStr := iniFile.ReadString('Database', 'Server', '');
if iniStr.IsEmpty then
Logger.Log( 5, '----Database->Server: Entry not found' )
else
begin
Logger.Log( 5, '----Database->Server: ' + iniStr );
ucKG.Server := iniStr;
end;
iniStr := iniFile.ReadString('Database', 'Database', '');
if iniStr.IsEmpty then
Logger.Log( 5, '----Database->Database: Entry not found' )
else
begin
Logger.Log( 5, '----Database->Database: ' + iniStr );
ucKG.Database := iniStr;
end;
iniStr := iniFile.ReadString('Database', 'Username', '');
if iniStr.IsEmpty then
Logger.Log( 5, '----Database->Username: Entry not found' )
else
ucKG.Connect;
except
on E: Exception do
begin
Logger.Log( 5, '----Database->Username: ' + iniStr );
ucKG.Username := iniStr;
Logger.Log(3, '--TAuthDatabase.DataModuleCreate -Error connecting to database: ' + E.Message);
end;
iniStr := iniFile.ReadString('Database', 'Password', '');
if iniStr.IsEmpty then
Logger.Log( 5, '----Database->Password: Entry not found' )
else
begin
Logger.Log( 5, '----Database->Password: xxxxxxxx' );
ucKG.Password := iniStr;
end;
try
ucKG.Connect;
except
on E: Exception do
begin
Logger.Log(3, '--TAuthDatabase.DataModuleCreate -Error connecting to database: ' + E.Message);
end;
end;
Logger.Log(1, '');
finally
iniFile.Free;
end;
end;
......
......@@ -6,7 +6,6 @@ object AuthServerModule: TAuthServerModule
Top = 16
end
object XDataServer: TXDataServer
BaseUrl = 'http://localhost:2004/emsys/kgOrders/auth/'
Dispatcher = SparkleHttpSysDispatcher
ModelName = 'Auth'
EntitySetPermissions = <>
......
......@@ -47,7 +47,7 @@ object FData: TFData
object DBAdvGrid1: TDBAdvGrid
Left = 6
Top = 84
Width = 632
Width = 689
Height = 154
ColCount = 11
DrawingStyle = gdsClassic
......@@ -628,7 +628,7 @@ object FData: TFData
object DBAdvGrid2: TDBAdvGrid
Left = 6
Top = 237
Width = 631
Width = 985
Height = 199
ColCount = 20
DrawingStyle = gdsClassic
......@@ -1495,6 +1495,15 @@ object FData: TFData
TabOrder = 10
TextHint = 'Email Address'
end
object btnPDF: TButton
Left = 330
Top = 38
Width = 75
Height = 25
Caption = 'Preview PDF'
TabOrder = 11
OnClick = btnPDFClick
end
object dsUsers: TDataSource
DataSet = uqUsers
Left = 482
......
......@@ -14,7 +14,7 @@ uses
BaseGrid, AdvGrid, DBAdvGrid, MemDS, DBAccess, Uni, Vcl.StdCtrls, Vcl.Mask,
vcl.wwdbedit, vcl.wwdotdot, vcl.wwdbcomb, REST.Client, REST.Types, System.JSON,
System.Generics.Collections, AdvEdit, vcl.wwdblook, vcl.wwdbdatetimepicker,
System.Hash;
System.Hash, Api.Database;
type
TFData = class(TForm)
......@@ -34,14 +34,16 @@ type
edtFullName: TEdit;
edtPhoneNumber: TEdit;
edtEmailAddress: TEdit;
btnPDF: TButton;
procedure FormCreate(Sender: TObject);
procedure btnFindClick(Sender: TObject);
procedure btnPDFClick(Sender: TObject);
private
{ Private declarations }
kgDB: TApiDatabase;
accountSID: string;
authHeader: string;
public
{ Public declarations }
function GetReportPDF(OrderID: string): string;
end;
var
......@@ -51,11 +53,17 @@ implementation
{$R *.dfm}
uses KGOrders.Database, uLibrary;
uses uLibrary, rOrders;
procedure TFData.btnPDFClick(Sender: TObject);
begin
GetReportPDF('');
end;
procedure TFData.FormCreate(Sender: TObject);
begin
KGOrdersDatabase := TKGOrdersDatabase.Create(Self);
kgDB := TApiDatabase.Create(Self);
end;
procedure TFData.btnFindClick(Sender: TObject);
......@@ -76,4 +84,29 @@ begin
end;
function TFData.GetReportPDF(OrderID: string): string;
var
rptOrders: TrptOrders; // Local instance
OrderIDList: TStringList;
begin
rptOrders := TrptOrders.Create(nil); // Always create locally
try
// Create a list of hardcoded OrderIDs for testing
OrderIDList := TStringList.Create;
try
OrderIDList.Add('18995');
OrderIDList.Add('18994');
OrderIDList.Add('18993'); // Add more OrderIDs as needed
// Generate the PDF Report with the list of OrderIDs
rptOrders.GenerateSimpleReport(350);
finally
OrderIDList.Free; // Free the TStringList
end;
finally
rptOrders.Free; // Ensure rptOrders is freed
end;
end;
end.
......@@ -209,6 +209,8 @@ type
[HttpGet] function GetOrder(orderInfo: string): TFullOrder;
[HttpGet] function GetCustomers(): TCustomerList;
[HttpGet] function GetCustomer(ID: string): TCustomerItem;
[HttpGet] procedure GenerateReportPDF(searchOptions: string);
function AddUser(userInfo: string): string;
function AddItem(itemInfo: string): string;
......
......@@ -11,15 +11,21 @@ interface
uses
XData.Server.Module,
XData.Service.Common,
KGOrders.Database, Data.DB,
Lookup.Service, System.Hash, System.Classes, System.JSON;
Api.Database, Data.DB, frxClass, frxExportPDF,
Lookup.Service, System.Hash, System.JSON, Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, MemDS, DBAccess, Uni,
hyiedefs, hyieutils, iexBitmaps, iesettings, iexLayers, iexRulers,
iexToolbars, iexUserInteractions, imageenio, imageenproc, QuickRpt, QRCtrls,
dbimageen, Vcl.ExtCtrls, ieview, imageenview, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdExplicitTLSClientServerBase, IdFTP,
iexProcEffects, frxDBSet, frxExportBaseDialog, frCoreClasses, rOrders, Common.Logging;
type
[ServiceImplementation]
TLookupService = class(TInterfacedObject, ILookupService)
strict private
ordersDB: TKGOrdersDatabase;
ordersDB: TApiDatabase;
private
function GetItems(searchOptions: string): TItemList;
function GetUsers(searchOptions: string): TUserList;
......@@ -29,6 +35,8 @@ type
function GetCustomer(ID: string): TCustomerItem;
function EditUser(const editOptions: string): string;
function Search(phoneNum: string): TOrderList;
procedure GenerateReportPDF(searchOptions: string);
function BuildOrderQuery(searchOptions: string): string;
function AddUser(userInfo: string): string;
function AddItem(itemInfo: string): string;
function DelUser(username: string): string;
......@@ -44,14 +52,13 @@ type
implementation
uses
System.SysUtils,
System.Generics.Collections,
XData.Sys.Exceptions, uLibrary;
procedure TLookupService.AfterConstruction;
begin
inherited;
ordersDB := TKGOrdersDatabase.Create(nil);
ordersDB := TApiDatabase.Create(nil);
end;
......@@ -141,21 +148,128 @@ begin
TXDataOperationContext.Current.Handler.ManagedObjects.Add( Result.data );
while not ordersDB.UniQuery1.Eof do
begin
order := TOrderItem.Create;
TXDataOperationContext.Current.Handler.ManagedObjects.Add( order );
Result.data.Add( order );
//TODO
end;
ordersDB.UniQuery1.Close;
SQL:= '';
doQuery(ordersDB.UniQuery1, SQL);
Result.count := ordersDB.UniQuery1.FieldByName('total_count').AsInteger;
end;
procedure TLookupService.GenerateReportPDF(searchOptions: string);
var
SQL: string;
rptOrders: TrptOrders; // Local instance of rptOrders
begin
// Create instance of rptOrders
rptOrders := TrptOrders.Create(nil);
try
// Generate SQL dynamically using the existing GetOrders logic
SQL := BuildOrderQuery(searchOptions);
// Prepare the report dataset
rptOrders.PrepareReport(SQL);
// Generate the PDF report
rptOrders.GeneratePDF;
// Optionally, log success
Logger.log(5, 'PDF Report successfully generated for searchOptions: ' + searchOptions);
finally
rptOrders.Free; // Ensure proper cleanup
end;
end;
function TLookupService.BuildOrderQuery(searchOptions: string): string;
var
params: TStringList;
PageNum, PageSize: integer;
startDate, endDate, filterType, statusType, statusSuffix: string;
statusTableShort, statusTableLong, whereSQL, SQL: string;
begin
params := TStringList.Create;
try
params.StrictDelimiter := true;
params.Delimiter := '&';
params.DelimitedText := searchOptions;
// Parse parameters
PageNum := StrToIntDef(params.Values['pagenumber'], 1);
PageSize := StrToIntDef(params.Values['pagesize'], 50);
startDate := params.Values['startDate'];
endDate := params.Values['endDate'];
filterType := params.Values['filterType'];
statusType := '';
statusSuffix := '';
if filterType <> '' then
begin
order := TOrderItem.Create;
TXDataOperationContext.Current.Handler.ManagedObjects.Add( order );
Result.data.Add( order );
//TODO
statusType := filterType.Split(['_'])[0];
statusSuffix := filterType.Split(['_'])[1];
filterType := statusType + '_' + statusSuffix;
end;
ordersDB.UniQuery1.Close;
SQL:= '';
doQuery(ordersDB.UniQuery1, SQL);
Result.count := ordersDB.UniQuery1.FieldByName('total_count').AsInteger;
// Determine status table
if statusSuffix = 'DUE' then
begin
statusTableShort := 'oss';
statusTableLong := 'orders_status_schedule';
end
else
begin
statusTableShort := 'os';
statusTableLong := 'orders_status';
end;
// Build the SELECT query with dynamically generated subqueries
SQL := 'SELECT o.ORDER_ID, c.NAME AS COMPANY_NAME, o.JOB_NAME, o.ORDER_DATE, o.ORDER_TYPE, ';
// Add dynamically generated subqueries
SQL := SQL + generateSubQuery(filterType, statusType, 'PROOF');
SQL := SQL + generateSubQuery(filterType, statusType, 'ART');
SQL := SQL + generateSubQuery(filterType, statusType, 'PLATE');
SQL := SQL + generateSubQuery(filterType, statusType, 'MOUNT');
SQL := SQL + generateSubQuery(filterType, statusType, 'SHIP');
// Include additional static fields
SQL := SQL + 'o.PRICE, qb.QB_REF_NUM ';
// FROM clause
SQL := SQL + 'FROM orders o ' +
'JOIN customers c ON o.COMPANY_ID = c.CUSTOMER_ID ' +
'LEFT JOIN qb_sales_orders qb ON qb.ORDER_ID = o.ORDER_ID ';
// WHERE clause
whereSQL := 'WHERE 1=1 ';
if startDate <> '' then
whereSQL := whereSQL + ' AND o.ORDER_DATE >= ' + QuotedStr(startDate);
if endDate <> '' then
whereSQL := whereSQL + ' AND o.ORDER_DATE <= ' + QuotedStr(endDate);
if statusType <> '' then
whereSQL := whereSQL + ' AND ' + statusTableShort + '.ORDER_STATUS = ' + QuotedStr(statusType);
// Add WHERE and ORDER clauses
SQL := SQL + whereSQL +
' ORDER BY o.ORDER_DATE DESC ' +
' LIMIT ' + IntToStr(PageSize) +
' OFFSET ' + IntToStr((PageNum - 1) * PageSize);
Result := SQL;
Logger.log(5, 'Generated SQL in Build order Query: ' + SQL);
finally
params.Free;
end;
end;
function TLookupService.generateSelectSQL(filterType, startDate, endDate: string): string;
begin
......@@ -164,7 +278,7 @@ end;
function TLookupService.generateSubQuery(filterType, statusType, currStatus: string): string;
var
statusSuffix: string;
statusSuffix: string;
begin
result := '';
statusSuffix := '';
......@@ -184,7 +298,7 @@ begin
if (statusSuffix = 'DUE') or (statusSuffix = '') then
begin
result := result +'(select os.STATUS_TIMESTAMP from orders_status os where os.ORDER_ID = o.ORDER_ID and os.ORDER_STATUS = ' +
result := result +'(select os.STATUS_TIMESTAMP from orders_status os where os.ORDER_ID = o.ORDER_ID and os.ORDER_STATUS = ' +
quotedStr(currStatus) + ' order by os.STATUS_TIMESTAMP desc LIMIT 1) AS ' + currStatus + '_DONE, ';
end
else
......@@ -297,6 +411,29 @@ begin
Result.data := TList<TOrderItem>.Create;
TXDataOperationContext.Current.Handler.ManagedObjects.Add( Result.data );
while not ordersDB.UniQuery1.Eof do
begin
Order := TOrderItem.Create;
TXDataOperationContext.Current.Handler.ManagedObjects.Add( Order );
Result.data.Add( Order );
order.ID := ordersDB.UniQuery1.FieldByName('ORDER_ID').AsString;
order.companyName := ordersDB.UniQuery1.FieldByName('COMPANY_NAME').AsString;
order.jobName := ordersDB.UniQuery1.FieldByName('JOB_NAME').AsString;
order.orderDate := ordersDB.UniQuery1.FieldByName('ORDER_DATE').AsString;
order.proofDue := ordersDB.UniQuery1.FieldByName('PROOF_DUE').AsString;
order.proofDone := ordersDB.UniQuery1.FieldByName('PROOF_DONE').AsString;
order.artDue := ordersDB.UniQuery1.FieldByName('ART_DUE').AsString;
order.artDone := ordersDB.UniQuery1.FieldByName('ART_DONE').AsString;
order.plateDue := ordersDB.UniQuery1.FieldByName('PLATE_DUE').AsString;
order.plateDone := ordersDB.UniQuery1.FieldByName('PLATE_DONE').AsString;
order.mountDue := ordersDB.UniQuery1.FieldByName('MOUNT_DUE').AsString;
order.mountDone := ordersDB.UniQuery1.FieldByName('MOUNT_DONE').AsString;
order.shipDue := ordersDB.UniQuery1.FieldByName('SHIP_DUE').AsString;
order.shipDone := ordersDB.UniQuery1.FieldByName('SHIP_DONE').AsString;
order.price := ordersDB.UniQuery1.FieldByName('PRICE').AsString;
order.qbRefNum := ordersDB.UniQuery1.FieldByName('QB_REF_NUM').AsString;
order.orderType := ordersDB.UniQuery1.FieldByName('ORDER_TYPE').AsString;
if ordersDB.UniQuery1.FieldByName('ORDER_TYPE').AsString = 'web_plate' then
begin
Order := TOrderItem.Create;
TXDataOperationContext.Current.Handler.ManagedObjects.Add( Order );
......@@ -320,33 +457,20 @@ begin
order.orderType := ordersDB.UniQuery1.FieldByName('ORDER_TYPE').AsString;
if ordersDB.UniQuery1.FieldByName('ORDER_TYPE').AsString = 'web_plate' then
begin
colorType := 'quantity_and_colors_qty_colors';
SQL := 'Select quantity_and_colors_qty_colors from web_plate_orders where order_id = ' + order.ID;
end
else
begin
colorType := 'colors_colors';
SQL := 'Select colors_colors from corrugated_plate_orders where order_id = ' + order.ID;
end;
doQuery(ordersDB.UniQuery2, SQL);
colors := ordersDB.UniQuery2.FieldByName(ColorType).AsString;
order.colors := colors;
doQuery(ordersDB.UniQuery2, SQL);
colors := ordersDB.UniQuery2.FieldByName(ColorType).AsString;
order.colors := colors;
ordersDB.UniQuery1.Next;
end;
ordersDB.UniQuery1.Next;
end;
ordersDB.UniQuery1.Close;
SQL := 'SELECT COUNT(*) AS total_count ' + whereSQL;
ordersDB.UniQuery1.Close;
SQL := 'SELECT COUNT(*) AS total_count ' + whereSQL;
doQuery(ordersDB.UniQuery1, SQL);
Result.count := ordersDB.UniQuery1.FieldByName('total_count').AsInteger;
doQuery(ordersDB.UniQuery1, SQL);
Result.count := ordersDB.UniQuery1.FieldByName('total_count').AsInteger;
ordersDB.UniQuery1.Close;
ordersDB.UniQuery1.Close;
end;
function TLookupService.GetOrder(orderInfo: string): TFullOrder;
......@@ -506,7 +630,6 @@ begin
else
result.proofing_art_approved_as_is := false;
result.proofing_approved_date := ordersDB.UniQuery1.FieldByName('proofing_approved_date').AsString;
end
else
begin
......@@ -527,9 +650,6 @@ begin
result.general_special_instructions := ordersDB.UniQuery1.FieldByName('general_special_instructions').AsString
else
//result.specialInstructions := ordersDB.UniQuery1.FieldByName('general_comments').AsString
end;
function TLookupService.GetItems(searchOptions: string): TItemList;
......@@ -565,28 +685,28 @@ begin
TXDataOperationContext.Current.Handler.ManagedObjects.Add( Result.data );
while not ordersDB.UniQuery1.Eof do
begin
item := TItemItem.Create;
TXDataOperationContext.Current.Handler.ManagedObjects.Add( item );
Result.data.Add( item );
item.ID := ordersDB.UniQuery1.FieldByName('qb_items_id').AsString;
item.name := ordersDB.UniQuery1.FieldByName('qb_item_name').AsString;
item.description := ordersDB.UniQuery1.FieldByName('item_desc').AsString;
item.status := ordersDB.UniQuery1.FieldByName('status').AsString;
begin
item := TItemItem.Create;
TXDataOperationContext.Current.Handler.ManagedObjects.Add( item );
Result.data.Add( item );
item.ID := ordersDB.UniQuery1.FieldByName('qb_items_id').AsString;
item.name := ordersDB.UniQuery1.FieldByName('qb_item_name').AsString;
item.description := ordersDB.UniQuery1.FieldByName('item_desc').AsString;
item.status := ordersDB.UniQuery1.FieldByName('status').AsString;
ordersDB.UniQuery1.Next;
end;
ordersDB.UniQuery1.Close;
SQL:= 'select count(*) as total_count from qb_items';
doQuery(ordersDB.UniQuery1, SQL);
Result.count := ordersDB.UniQuery1.FieldByName('total_count').AsInteger;
ordersDB.UniQuery1.Close;
ordersDB.UniQuery1.Next;
end;
ordersDB.UniQuery1.Close;
SQL:= 'select count(*) as total_count from qb_items';
doQuery(ordersDB.UniQuery1, SQL);
Result.count := ordersDB.UniQuery1.FieldByName('total_count').AsInteger;
ordersDB.UniQuery1.Close;
end;
function TLookupService.GetUsers(searchOptions: string): TUserList;
var
SQL: string;
user: TUserItem;
SQL: string;
user: TUserItem;
begin
if searchOptions = '' then
SQL := 'select * from users order by NAME ASC'
......@@ -624,22 +744,20 @@ end;
function TLookupService.EditUser(const editOptions: string): string;
var
params: TStringList;
user: string;
password: string;
full_name: string;
status: string;
email: string;
access: string;
rights: string;
perspective: string;
QB: string;
SQL: string;
newUser: string;
hashString: string;
hashPW: string;
params: TStringList;
user: string;
password: string;
full_name: string;
status: string;
email: string;
access: string;
rights: string;
perspective: string;
QB: string;
SQL: string;
newUser: string;
hashString: string;
hashPW: string;
begin
params := TStringList.Create;
// parse the searchOptions
......@@ -668,36 +786,35 @@ begin
//user.password := ordersDB.UniQuery1.FieldByName('PASSWORD').AsString;
if (not (newUser.IsEmpty)) then
if not newUser.IsEmpty then
ordersDB.UniQuery1.FieldByName('USER_NAME').AsString := newUser;
if (not (full_name.IsEmpty)) then
if not full_name.IsEmpty then
ordersDB.UniQuery1.FieldByName('NAME').AsString := full_name;
if (not (status.IsEmpty)) then
if not status.IsEmpty then
begin
if( StrToBool(status) ) then
if StrToBool(status) then
ordersDB.UniQuery1.FieldByName('STATUS').AsString := 'ACTIVE'
else
ordersDB.UniQuery1.FieldByName('STATUS').AsString := 'INACTIVE'
end;
if (not (email.IsEmpty)) then
if not email.IsEmpty then
ordersDB.UniQuery1.FieldByName('EMAIL').AsString := email;
if (not (access.IsEmpty)) then
if not access.IsEmpty then
ordersDB.UniQuery1.FieldByName('ACCESS_TYPE').AsString := Access;
if (not (rights.IsEmpty)) then
if not rights.IsEmpty then
ordersDB.UniQuery1.FieldByName('SYSTEM_RIGHTS').AsInteger := StrToInt(rights);
if (not (perspective.IsEmpty)) then
if not perspective.IsEmpty then
ordersDB.UniQuery1.FieldByName('PERSPECTIVE_ID').AsString := perspective;
if (not (QB.IsEmpty)) then
if not QB.IsEmpty then
ordersDB.UniQuery1.FieldByName('QB_ID').AsString := QB;
{if((not (Password = 'hidden')) and (not (Password.IsEmpty))) then
begin
hashString := ordersDB.UniQuery1.FieldByName('date_created').AsString + password;
......@@ -781,6 +898,7 @@ begin
ordersDB.UniQuery1.FieldByName('PRICE').AsString := '0'
else
ordersDB.UniQuery1.FieldByName('PRICE').AsString := JSONData.GetValue<string>('staff_fields_price');
ordersDB.UniQuery1.FieldByName('JOB_NAME').AsString := JSONData.GetValue<string>('staff_fields_job_name');
ordersDB.UniQuery1.FieldByName('USER_ID').AsString := JSONData.GetValue<string>('USER_ID');
ordersDB.UniQuery1.FieldByName('LOCATION').AsString := JSONData.GetValue<string>('staff_fields_art_location');
......@@ -868,20 +986,20 @@ end;
function TLookupService.AddUser(userInfo:string): string;
var
user: string;
password: string;
full_name: string;
status: string;
email: string;
access: string;
rights: string;
perspective: string;
QB: string;
SQL: string;
dateCreated: TDateTime;
hashString: string;
hashPW: string;
params: TStringList;
user: string;
password: string;
full_name: string;
status: string;
email: string;
access: string;
rights: string;
perspective: string;
QB: string;
SQL: string;
dateCreated: TDateTime;
hashString: string;
hashPW: string;
params: TStringList;
begin
params := TStringList.Create;
params.StrictDelimiter := true;
......@@ -935,11 +1053,11 @@ end;
function TLookupService.AddItem(itemInfo: string): string;
var
params: TStringList;
Name: string;
Description: string;
Status: boolean;
SQL: string;
params: TStringList;
Name: string;
Description: string;
Status: boolean;
SQL: string;
begin
params := TStringList.Create;
params.StrictDelimiter := true;
......@@ -995,6 +1113,7 @@ begin
end;
end;
initialization
RegisterServiceType(TLookupService);
......
......@@ -41,7 +41,7 @@ uses
Common.Logging,
Common.Config,
Sparkle.Utils,
KGOrders.Database,
Api.Database,
Data;
{$R *.dfm}
......@@ -110,7 +110,7 @@ begin
try
Logger.Log( 1, 'iniFile: ' + ExtractFilePath(Application.ExeName) + 'kgOrdersServer.ini' );
Logger.Log( 1, 'LogLevels are displayed here. They were set in kgOrders.dpr, it executes first' );
Logger.Log( 1, 'LogLevels are displayed here. They were set in kgOrdersServer.dpr, it executes first' );
iniStr := iniFile.ReadString( 'Settings', 'MemoLogLevel', '' );
if iniStr.IsEmpty then
Logger.Log( 1, '--Settings->memoLogLevel: Entry not found - default: 3' )
......@@ -130,11 +130,29 @@ begin
else
Logger.Log( 1, '--Settings->LogFileNum: ' + IntToStr(StrToInt(iniStr) - 1) );
Logger.Log( 1, '' );
iniStr := IniFile.ReadString( 'Database', 'Server', '' );
if iniStr.IsEmpty then
Logger.Log( 1, '--Database->Server: Entry not found' )
else
Logger.Log( 1, '--Database->Server: ' + iniStr );
iniStr := iniFile.ReadString('Database', 'Database', '');
if iniStr.IsEmpty then
Logger.Log( 1, '----Database->Database: Entry not found' )
else
Logger.Log( 1, '----Database->Database: ' + iniStr );
iniStr := iniFile.ReadString('Database', 'Username', '');
if iniStr.IsEmpty then
Logger.Log( 1, '----Database->Username: Entry not found' )
else
Logger.Log( 1, '----Database->Username: ' + iniStr );
iniStr := iniFile.ReadString('Database', 'Password', '');
if iniStr.IsEmpty then
Logger.Log( 1, '----Database->Password: Entry not found' )
else
Logger.Log( 1, '----Database->Password: xxxxxxxx' );
Logger.Log( 1, '' );
finally
......@@ -149,6 +167,8 @@ begin
AppServerModule := TAppServerModule.Create(Self);
AppServerModule.StartAppServer( serverConfig.url );
UpdateGUI;
end;
procedure TFMain.FormClose(Sender: TObject; var Action: TCloseAction);
......@@ -160,9 +180,6 @@ begin
end;
procedure TFMain.UpdateGUI;
const
cHttp = 'http://+';
cHttpLocalhost = 'http://localhost';
begin
if AuthServerModule.SparkleHttpSysDispatcher.Active then
memoInfo.Lines.Add( 'AuthServer started at: ' + AuthServerModule.XDataServer.BaseUrl )
......
object rptOrders: TrptOrders
OnCreate = DataModuleCreate
Height = 480
Width = 640
object frxOrders: TfrxReport
Version = '2025.1.3'
DotMatrixReport = False
IniFile = '\Software\Fast Reports'
PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick, pbCopy, pbSelection]
PreviewOptions.Zoom = 1.000000000000000000
PrintOptions.Printer = 'Default'
PrintOptions.PrintOnSheet = 0
ReportOptions.CreateDate = 45642.449265416670000000
ReportOptions.LastChange = 45642.798259189820000000
ScriptLanguage = 'PascalScript'
ScriptText.Strings = (
'begin'
''
'end.')
Left = 288
Top = 222
Datasets = <
item
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
end>
Variables = <>
Style = <>
object Data: TfrxDataPage
Height = 1000.000000000000000000
Width = 1000.000000000000000000
end
object Page1: TfrxReportPage
Orientation = poLandscape
PaperWidth = 279.400000000000000000
PaperHeight = 215.900000000000000000
PaperSize = 1
LeftMargin = 10.000000000000000000
RightMargin = 10.000000000000000000
TopMargin = 10.000000000000000000
BottomMargin = 10.000000000000000000
Frame.Typ = []
MirrorMode = []
object ttlMain: TfrxReportTitle
FillType = ftBrush
FillGap.Top = 0
FillGap.Left = 0
FillGap.Bottom = 0
FillGap.Right = 0
Frame.Typ = []
Height = 22.677180000000000000
Top = 18.897650000000000000
Width = 980.410082000000000000
object Memo1: TfrxMemoView
AllowVectorExport = True
Left = 7.559059670000000000
Top = -0.000000230000000000
Width = 102.047313590000000000
Height = 18.897649770000000000
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = []
Memo.UTF8W = (
'Order Schedule')
end
object frxDBDataset1COMPANY_NAME: TfrxMemoView
IndexTag = 1
AllowVectorExport = True
Left = 313.700990000000000000
Width = 343.937230000000000000
Height = 18.897650000000000000
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = []
Memo.UTF8W = (
'Company Name - [frxDBDataset1."COMPANY_NAME"]')
end
end
object MasterData1: TfrxMasterData
FillType = ftBrush
FillGap.Top = 0
FillGap.Left = 0
FillGap.Bottom = 0
FillGap.Right = 0
Frame.Typ = []
Height = 612.283860000000000000
Top = 102.047310000000000000
Width = 980.410082000000000000
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
RowCount = 0
object TableObject1: TfrxTableObject
AllowVectorExport = True
Top = -0.000002780000000001
object TableColumn1: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn2: TfrxTableColumn
Width = 30.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn3: TfrxTableColumn
Width = 62.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn4: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn5: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn6: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn7: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn8: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn9: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn10: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn11: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn12: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn13: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn14: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn15: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn16: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn17: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableColumn18: TfrxTableColumn
Width = 54.383237222222220000
MaxWidth = 75.590600000000000000
end
object TableRow1: TfrxTableRow
Height = 125.732364666666700000
object TableCell1: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Order ID')
end
object TableCell2: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Loc')
end
object TableCell3: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Company Name')
end
object TableCell4: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Job Name')
end
object TableCell5: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Order Date')
end
object TableCell26: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Proof Due')
end
object TableCell31: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Proof Done')
end
object TableCell36: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Art Due')
end
object TableCell41: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Art Done')
end
object TableCell46: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Plate Due')
end
object TableCell51: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Plate Done')
end
object TableCell56: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Mount Due')
end
object TableCell61: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Mount Done')
end
object TableCell66: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Ship Due')
end
object TableCell71: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Ship Done')
end
object TableCell76: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Price')
end
object TableCell81: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'QB Ref Num')
end
object TableCell86: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'Colors')
end
end
object TableRow2: TfrxTableRow
AutoSize = True
Height = 125.732364666666700000
object TableCell6: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
DataField = 'ORDER_ID'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."ORDER_ID"]')
end
object TableCell7: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
DataField = 'LOCATION'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."LOCATION"]')
end
object TableCell8: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
DataField = 'COMPANY_NAME'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."COMPANY_NAME"]')
end
object TableCell9: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'JOB_NAME'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."JOB_NAME"]')
end
object TableCell10: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'ORDER_DATE'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."ORDER_DATE"]')
end
object TableCell27: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'PROOF_DUE'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."PROOF_DUE"]')
end
object TableCell32: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'PROOF_DONE'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."PROOF_DONE"]')
end
object TableCell37: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'ART_DUE'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."ART_DUE"]')
end
object TableCell42: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'ART_DONE'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."ART_DONE"]')
end
object TableCell47: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'PLATE_DUE'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."PLATE_DUE"]')
end
object TableCell52: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'PLATE_DONE'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."PLATE_DONE"]')
end
object TableCell57: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
ContentScaleOptions.Constraints.MaxIterationValue = 0
ContentScaleOptions.Constraints.MinIterationValue = 0
DataField = 'MOUNT_DUE'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."MOUNT_DUE"]')
end
object TableCell62: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'MOUNT_DONE'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."MOUNT_DONE"]')
end
object TableCell67: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'SHIP_DUE'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."SHIP_DUE"]')
end
object TableCell72: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'SHIP_DONE'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."SHIP_DONE"]')
end
object TableCell77: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'PRICE'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."PRICE"]')
end
object TableCell82: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'QB_REF_NUM'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."QB_REF_NUM"]')
end
object TableCell87: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
DataField = 'COLORS'
DataSet = frxDBOrders
DataSetName = 'frxDBOrders'
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
Memo.UTF8W = (
'[frxDBOrders."COLORS"]')
end
end
object TableRow3: TfrxTableRow
Height = 51.653576666666670000
object TableCell38: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell39: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell40: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell43: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell44: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell45: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell48: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell49: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell50: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell53: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell54: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell55: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell58: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell59: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell60: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell63: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell64: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell65: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
end
object TableRow4: TfrxTableRow
Height = 51.653576666666670000
object TableCell68: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell69: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell70: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell73: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell74: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell75: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell78: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell79: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell80: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell83: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell84: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell85: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell88: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell89: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell90: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell91: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell92: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell93: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
end
object TableRow5: TfrxTableRow
Height = 51.653576666666670000
object TableCell94: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell95: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell96: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell97: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell98: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell99: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell100: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell101: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell102: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell103: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell104: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell105: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell106: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell107: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell108: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell109: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell110: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell111: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
end
object TableRow6: TfrxTableRow
Height = 51.653576666666670000
object TableCell112: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell113: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell114: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell115: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell116: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell117: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell118: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell119: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell120: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell121: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell122: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell123: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell124: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell125: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell126: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell127: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell128: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell129: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
end
object TableRow7: TfrxTableRow
Height = 51.653576666666670000
object TableCell130: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell131: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell132: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell133: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell134: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell135: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell136: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell137: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell138: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell139: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell140: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell141: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell142: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell143: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell144: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell145: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell146: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell147: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
end
object TableRow8: TfrxTableRow
Height = 51.653576666666670000
object TableCell148: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell149: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell150: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell151: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell152: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell153: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell154: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell155: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell156: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell157: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell158: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell159: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell160: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell161: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell162: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell163: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell164: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell165: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
end
object TableRow9: TfrxTableRow
Height = 51.653576666666670000
object TableCell166: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell167: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell168: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell169: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell170: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell171: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell172: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell173: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell174: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell175: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell176: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell177: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell178: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell179: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell180: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell181: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell182: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
object TableCell183: TfrxTableCell
AllowVectorExport = True
Restrictions = [rfDontDelete]
Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
end
end
end
end
end
end
object frxPDFExport1: TfrxPDFExport
UseFileCache = True
ShowProgress = True
OverwritePrompt = False
DataOnly = False
EmbedFontsIfProtected = False
InteractiveFormsFontSubset = 'A-Z,a-z,0-9,#43-#47 '
OpenAfterExport = False
PrintOptimized = False
Outline = False
Background = False
HTMLTags = True
Quality = 95
Author = 'FastReport'
Subject = 'FastReport PDF export'
Creator = 'FastReport'
ProtectionFlags = [ePrint, eModify, eCopy, eAnnot]
HideToolbar = False
HideMenubar = False
HideWindowUI = False
FitWindow = False
CenterWindow = False
PrintScaling = False
PdfA = False
PDFStandard = psNone
PDFVersion = pv17
Left = 288
Top = 166
end
object ucKG: TUniConnection
ProviderName = 'MySQL'
Database = 'kg_order_entry'
Username = 'root'
Server = '192.168.102.130'
LoginPrompt = False
Left = 289
Top = 99
EncryptedPassword = '9AFF92FF8CFF86FF8CFFCFFFCEFF'
end
object uqOrders: TUniQuery
Connection = ucKG
SQL.Strings = (
'SELECT '
' 18947 AS ORDER_ID,'
' '#39'B'#39' AS LOCATION,'
' '#39'CHOICE CANNING'#39' AS COMPANY_NAME,'
' '#39'TYOGA CONTAINER'#39' AS JOB_NAME,'
' '#39'2024-12-16'#39' AS ORDER_DATE,'
' '#39'2024-12-03 04:35'#39' AS PROOF_DUE,'
' '#39'2024-11-27 14:17'#39' AS PROOF_DONE,'
' '#39'2024-11-29'#39' AS ART_DUE,'
' '#39'2024-11-26 15:00'#39' AS ART_DONE,'
' '#39'2024-12-02 06:12'#39' AS PLATE_DUE,'
' '#39'2024-12-03 08:58'#39' AS PLATE_DONE,'
' '#39'2024-12-23 08:00'#39' AS MOUNT_DUE,'
' '#39'2024-12-23 15:00'#39' AS MOUNT_DONE,'
' '#39'2024-12-24 08:00'#39' AS SHIP_DUE,'
' '#39'2024-12-24 15:00'#39' AS SHIP_DONE, '
' 323.0 AS PRICE,'
' 1 AS QB_REF_NUM,'
' 3 AS COLORS'
'FROM DUAL'
'')
Left = 415
Top = 136
end
object frxReportTableObject1: TfrxReportTableObject
Left = 300
Top = 312
end
object frxDBOrders: TfrxDBDataset
UserName = 'frxDBOrders'
CloseDataSource = False
DataSet = uqOrders
BCDToCurrency = False
DataSetOptions = []
Left = 424
Top = 224
end
end
unit rOrders;
interface
uses
System.SysUtils, System.Classes, frxClass, frxExportBaseDialog, frxExportPDF,
Data.DB, DBAccess, Uni, UniProvider, MySQLUniProvider, System.IniFiles, Vcl.Forms,
MemDS, frxDBSet, frxTableObject, frCoreClasses, Common.Logging, System.IOUtils;
type
TrptOrders = class(TDataModule)
frxOrders: TfrxReport;
frxPDFExport1: TfrxPDFExport;
ucKG: TUniConnection;
uqOrders: TUniQuery;
frxReportTableObject1: TfrxReportTableObject;
frxDBOrders: TfrxDBDataset;
procedure DataModuleCreate(Sender: TObject);
private
public
procedure GenerateSimpleReport(OrderID: Integer);
procedure PrepareReport(const SQL: string);
procedure GeneratePDF;
end;
var
rptOrders: TrptOrders;
implementation
uses
uLibrary;
{%CLASSGROUP 'Vcl.Controls.TControl'}
{$R *.dfm}
procedure TrptOrders.DataModuleCreate(Sender: TObject);
begin
Logger.Log( 3, 'TAuthDatabase.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try
ucKG.Connect;
except
on E: Exception do
begin
Logger.Log(3, '--TrptOrders.DataModuleCreate -Error connecting to database: ' + E.Message);
end;
end;
end;
procedure TrptOrders.GenerateSimpleReport(OrderID: Integer);
begin
try
Logger.Log(5, 'Generating Report for Order ID: ' + OrderID.ToString);
uqOrders.Close;
uqOrders.SQL.Text := 'SELECT ORDER_ID FROM corrugated_plate_orders WHERE ORDER_ID = :OrderID';
uqOrders.ParamByName('OrderID').AsInteger := OrderID;
try
uqOrders.Open;
except
on E: Exception do
begin
Logger.Log(1, 'Error executing query: ' + E.Message);
Exit;
end;
end;
frxOrders.PrepareReport;
frxOrders.ShowReport;
finally
uqOrders.Close;
frxOrders.Clear;
Logger.Log(5, 'Report generation complete for Order ID: ' + OrderID.ToString);
end;
end;
procedure TrptOrders.PrepareReport(const SQL: string);
begin
// Prepare and load data into the query
uqOrders.Close;
uqOrders.SQL.Text := SQL;
uqOrders.Open;
end;
procedure TrptOrders.GeneratePDF;
var
ReportDir, ReportFileName: string;
begin
ReportDir := 'C:\Projects\KGOrders\Reports';
// Define output file
ReportFileName := TPath.Combine(ReportDir, 'OrderReport_' + FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf');
// Prepare and export the report
frxOrders.PrepareReport;
frxPDFExport1.FileName := ReportFileName;
frxPDFExport1.ShowDialog := False;
frxOrders.Export(frxPDFExport1);
frxOrders.ShowPreparedReport;
Logger.Log(5, 'PDF saved to: ' + ReportFileName);
end;
end.
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<TfrxReport Version="2024.2.1" DotMatrixReport="False" IniFile="\Software\Fast Reports" PreviewOptions.Buttons="167935" PreviewOptions.Zoom="1" PrintOptions.Printer="Default" PrintOptions.PrintOnSheet="0" ReportOptions.CreateDate="45642.4492654167" ReportOptions.Description.Text="" ReportOptions.LastChange="45642.8021125694" ScriptLanguage="PascalScript" ScriptText.Text="begin&#13;&#10;&#13;&#10;end.">
<Datasets>
<item DataSet="frxDBOrders" DataSetName="frxDBOrders"/>
</Datasets>
<TfrxDataPage Name="Data" HGuides.Text="" VGuides.Text="" Height="1000" Left="0" Top="0" Width="1000"/>
<TfrxReportPage Name="Page1" HGuides.Text="" VGuides.Text="" Orientation="poLandscape" PaperWidth="279.4" PaperHeight="215.9" PaperSize="1" LeftMargin="10" RightMargin="10" TopMargin="10" BottomMargin="10" ColumnWidth="0" ColumnPositions.Text="" Frame.Typ="0" MirrorMode="0">
<TfrxReportTitle Name="ttlMain" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="22.67718" Left="0" Top="18.89765" Width="980.410082">
<TfrxMemoView Name="Memo1" AllowVectorExport="True" Left="7.55905967" Top="-2.3E-7" Width="102.04731359" Height="18.89764977" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="0" Text="Order Schedule"/>
</TfrxReportTitle>
<TfrxMasterData Name="MasterData1" FillType="ftBrush" FillGap.Top="0" FillGap.Left="0" FillGap.Bottom="0" FillGap.Right="0" Frame.Typ="0" Height="612.28386" Left="0" Top="102.04731" Width="980.410082" ColumnWidth="0" ColumnGap="0" DataSet="frxDBOrders" DataSetName="frxDBOrders" RowCount="0">
<TfrxTableObject Name="TableObject1" AllowVectorExport="True" Left="0" Top="-2.78000000000084E-6">
<TfrxTableColumn Name="TableColumn1" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn2" Width="30.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn3" Width="62.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn4" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn5" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn6" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn7" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn8" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn9" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn10" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn11" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn12" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn13" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn14" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn15" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn16" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn17" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableColumn Name="TableColumn18" Width="54.3832372222222" MinWidth="0" MaxWidth="75.5906"/>
<TfrxTableRow Name="TableRow1" MinHeight="0" MaxHeight="0" Height="125.732364666667">
<TfrxTableCell Name="TableCell1" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Order ID"/>
<TfrxTableCell Name="TableCell2" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Loc"/>
<TfrxTableCell Name="TableCell3" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Company Name"/>
<TfrxTableCell Name="TableCell4" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Job Name"/>
<TfrxTableCell Name="TableCell5" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Order Date"/>
<TfrxTableCell Name="TableCell26" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Proof Due"/>
<TfrxTableCell Name="TableCell31" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Proof Done"/>
<TfrxTableCell Name="TableCell36" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Art Due"/>
<TfrxTableCell Name="TableCell41" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Art Done"/>
<TfrxTableCell Name="TableCell46" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Plate Due"/>
<TfrxTableCell Name="TableCell51" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Plate Done"/>
<TfrxTableCell Name="TableCell56" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Mount Due"/>
<TfrxTableCell Name="TableCell61" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Mount Done"/>
<TfrxTableCell Name="TableCell66" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Ship Due"/>
<TfrxTableCell Name="TableCell71" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Ship Done"/>
<TfrxTableCell Name="TableCell76" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Price"/>
<TfrxTableCell Name="TableCell81" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="QB Ref Num"/>
<TfrxTableCell Name="TableCell86" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" Frame.Typ="15" Text="Colors"/>
</TfrxTableRow>
<TfrxTableRow Name="TableRow2" AutoSize="True" MinHeight="0" MaxHeight="0" Height="125.732364666667">
<TfrxTableCell Name="TableCell6" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" DataField="ORDER_ID" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;ORDER_ID&#34;]"/>
<TfrxTableCell Name="TableCell7" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" DataField="LOCATION" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;LOCATION&#34;]"/>
<TfrxTableCell Name="TableCell8" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" DataField="COMPANY_NAME" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;COMPANY_NAME&#34;]"/>
<TfrxTableCell Name="TableCell9" AllowVectorExport="True" Restrictions="8" DataField="JOB_NAME" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;JOB_NAME&#34;]"/>
<TfrxTableCell Name="TableCell10" AllowVectorExport="True" Restrictions="8" DataField="ORDER_DATE" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;ORDER_DATE&#34;]"/>
<TfrxTableCell Name="TableCell27" AllowVectorExport="True" Restrictions="8" DataField="PROOF_DUE" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;PROOF_DUE&#34;]"/>
<TfrxTableCell Name="TableCell32" AllowVectorExport="True" Restrictions="8" DataField="PROOF_DONE" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;PROOF_DONE&#34;]"/>
<TfrxTableCell Name="TableCell37" AllowVectorExport="True" Restrictions="8" DataField="ART_DUE" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;ART_DUE&#34;]"/>
<TfrxTableCell Name="TableCell42" AllowVectorExport="True" Restrictions="8" DataField="ART_DONE" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;ART_DONE&#34;]"/>
<TfrxTableCell Name="TableCell47" AllowVectorExport="True" Restrictions="8" DataField="PLATE_DUE" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;PLATE_DUE&#34;]"/>
<TfrxTableCell Name="TableCell52" AllowVectorExport="True" Restrictions="8" DataField="PLATE_DONE" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;PLATE_DONE&#34;]"/>
<TfrxTableCell Name="TableCell57" AllowVectorExport="True" Restrictions="8" ContentScaleOptions.Constraints.MaxIterationValue="0" ContentScaleOptions.Constraints.MinIterationValue="0" DataField="MOUNT_DUE" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;MOUNT_DUE&#34;]"/>
<TfrxTableCell Name="TableCell62" AllowVectorExport="True" Restrictions="8" DataField="MOUNT_DONE" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;MOUNT_DONE&#34;]"/>
<TfrxTableCell Name="TableCell67" AllowVectorExport="True" Restrictions="8" DataField="SHIP_DUE" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;SHIP_DUE&#34;]"/>
<TfrxTableCell Name="TableCell72" AllowVectorExport="True" Restrictions="8" DataField="SHIP_DONE" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;SHIP_DONE&#34;]"/>
<TfrxTableCell Name="TableCell77" AllowVectorExport="True" Restrictions="8" DataField="PRICE" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;PRICE&#34;]"/>
<TfrxTableCell Name="TableCell82" AllowVectorExport="True" Restrictions="8" DataField="QB_REF_NUM" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;QB_REF_NUM&#34;]"/>
<TfrxTableCell Name="TableCell87" AllowVectorExport="True" Restrictions="8" DataField="COLORS" DataSet="frxDBOrders" DataSetName="frxDBOrders" Frame.Typ="15" Text="[frxDBOrders.&#34;COLORS&#34;]"/>
</TfrxTableRow>
<TfrxTableRow Name="TableRow3" MinHeight="0" MaxHeight="0" Height="51.6535766666667">
<TfrxTableCell Name="TableCell38" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell39" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell40" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell43" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell44" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell45" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell48" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell49" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell50" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell53" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell54" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell55" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell58" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell59" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell60" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell63" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell64" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell65" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
</TfrxTableRow>
<TfrxTableRow Name="TableRow4" MinHeight="0" MaxHeight="0" Height="51.6535766666667">
<TfrxTableCell Name="TableCell68" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell69" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell70" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell73" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell74" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell75" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell78" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell79" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell80" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell83" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell84" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell85" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell88" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell89" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell90" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell91" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell92" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell93" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
</TfrxTableRow>
<TfrxTableRow Name="TableRow5" MinHeight="0" MaxHeight="0" Height="51.6535766666667">
<TfrxTableCell Name="TableCell94" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell95" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell96" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell97" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell98" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell99" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell100" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell101" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell102" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell103" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell104" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell105" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell106" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell107" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell108" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell109" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell110" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell111" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
</TfrxTableRow>
<TfrxTableRow Name="TableRow6" MinHeight="0" MaxHeight="0" Height="51.6535766666667">
<TfrxTableCell Name="TableCell112" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell113" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell114" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell115" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell116" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell117" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell118" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell119" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell120" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell121" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell122" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell123" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell124" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell125" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell126" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell127" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell128" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell129" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
</TfrxTableRow>
<TfrxTableRow Name="TableRow7" MinHeight="0" MaxHeight="0" Height="51.6535766666667">
<TfrxTableCell Name="TableCell130" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell131" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell132" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell133" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell134" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell135" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell136" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell137" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell138" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell139" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell140" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell141" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell142" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell143" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell144" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell145" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell146" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell147" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
</TfrxTableRow>
<TfrxTableRow Name="TableRow8" MinHeight="0" MaxHeight="0" Height="51.6535766666667">
<TfrxTableCell Name="TableCell148" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell149" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell150" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell151" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell152" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell153" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell154" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell155" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell156" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell157" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell158" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell159" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell160" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell161" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell162" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell163" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell164" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell165" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
</TfrxTableRow>
<TfrxTableRow Name="TableRow9" MinHeight="0" MaxHeight="0" Height="51.6535766666667">
<TfrxTableCell Name="TableCell166" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell167" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell168" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell169" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell170" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell171" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell172" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell173" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell174" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell175" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell176" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell177" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell178" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell179" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell180" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell181" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell182" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
<TfrxTableCell Name="TableCell183" AllowVectorExport="True" Restrictions="8" Frame.Typ="15" Text=""/>
</TfrxTableRow>
</TfrxTableObject>
</TfrxMasterData>
</TfrxReportPage>
</TfrxReport>
......@@ -5,46 +5,43 @@ interface
uses
System.Classes, Uni;
const
ADD_REC_AUDIT_ENTRY = '0';
EDIT_REC_AUDIT_ENTRY = '1';
DEL_REC_AUDIT_ENTRY = '2';
REVIEW_REC_AUDIT_ENTRY = '3';
VIEW_REC_AUDIT_ENTRY = '4';
FIND_REC_AUDIT_ENTRY = '5';
PRINT_REC_AUDIT_ENTRY = '6';
OTHER_REC_AUDIT_ENTRY = '99';
function GetServerTimeStamp( uq: TUniQuery ): TDateTime;
procedure LoadDatabaseSettings( uc: TUniConnection; iniFilename: string );
procedure DoQuery( uq: TUniQuery; sql: string );
function CalculateAge( const dob, dt: TDateTime ): Integer;
function GetNextSeqVal( uq: TUniQuery; sequence: string ): string;
function FormatNamePersonnel( uq: TUniQuery; format: string ): string;
function FormatBkNum( bkNum: string ): string;
function GetAssociatedNumber( uq: TUniQuery; numberType: string ): string;
function FormatBookingAddress( uq: TUniQuery; format: string ): string;
function SetMasterAuditEntry( uq: TUniQuery; const entryId, auditType, linkId, agency, personnelId, recUser, details, searchKey, execSource: string ): Boolean;
function SetDetailAuditEntry( uq: TUniQuery; const entryId, title, auditType: string; auditList: TStringList ): Boolean;
function GetOfficerName( agency, officer: string; uq: TUniQuery ): string;
function GetRiciOfficerName( agency, officer: string; uq: TUniQuery ): string;
implementation
uses
System.SysUtils,
System.IniFiles,
Vcl.Forms,
Data.DB;
function GetServerTimeStamp( uq: TUniQuery ): TDateTime;
procedure LoadDatabaseSettings( uc: TUniConnection; iniFilename: string );
var
sql: string;
serverDateTime: TDateTime;
iniFile: TIniFile;
iniStr: string;
begin
sql := 'select sysdate as currentdatetime from dual';
DoQuery( uq, sql );
serverDateTime := uq.FieldByName('CURRENTDATETIME').AsDateTime;
uq.Close;
Result := serverDateTime;
iniFile := TIniFile.Create( ExtractFilePath(Application.ExeName) + iniFilename );
try
iniStr := iniFile.ReadString('Database', 'Server', '');
if not iniStr.IsEmpty then
uc.Server := iniStr;
iniStr := iniFile.ReadString('Database', 'Database', '');
if not iniStr.IsEmpty then
uc.Database := iniStr;
iniStr := iniFile.ReadString('Database', 'Username', '');
if not iniStr.IsEmpty then
uc.Username := iniStr;
iniStr := iniFile.ReadString('Database', 'Password', '');
if not iniStr.IsEmpty then
uc.Password := iniStr;
finally
iniFile.Free;
end;
end;
procedure DoQuery(uq: TUniQuery; sql: string);
......@@ -82,204 +79,5 @@ begin
Result := age
end;
function GetNextSeqVal(uq: TUniQuery; sequence: string ): string;
var
sql: string;
begin
sql := 'select ' + sequence + '.NEXTVAL as nextseqval from dual';
uq.Close;
uq.SQL.Text := sql;
uq.Open;
Result := uq.FieldByName('NEXTSEQVAL').AsString;
end;
function FormatNamePersonnel( uq: TUniQuery; format: string ): string;
var
leng: Integer;
i: Integer;
officerText: String;
begin
leng := Length( format );
for i := 0 to leng - 1 do
begin
case format[i+1] of
'S':
officerText := officerText + uq.FieldByName('PF_LNAME').AsString;
'F':
if not uq.FieldByName('PF_FNAME').AsString.IsEmpty then
officerText := TrimRight( officerText + uq.FieldByName('PF_FNAME').AsString ) ;
'M':
if not uq.FieldByName('PF_MI').AsString.IsEmpty then
officerText := TrimRight( officerText + uq.FieldByName('PF_MI').AsString );
',':
officerText := officerText + ',';
'.':
officerText := officerText + '.';
' ':
officerText := officerText + ' ';
end;
end;
Result := officerText;
end;
function FormatBkNum( bkNum: string ): string;
var
bkNumStr: string;
begin
bkNumStr := bkNum;
Result := bkNumStr.Insert( 4, '-' );
end;
function GetAssociatedNumber( uq: TUniQuery; numberType: string): string;
var
TLocateOptions: set of TLocateOption;
begin
if uq.Locate('OTHER_AGENCY_CODE', numberType, TLocateOptions)
then Result := uq.FieldByName('IDENTIFICATION').AsString
end;
function FormatBookingAddress( uq: TUniQuery; format: string ): string;
var
addressText: AnsiString;
leng: Integer;
i : Integer;
begin
leng := Length( format );
for i := 0 to leng - 1 do
begin
case format[i+1] of
'S':
begin
addressText := addressText + uq.FieldByName('STREET_NUM').AsString;
if uq.FieldByName('STREET_NUM_HALF').AsString = 'Y' then
addressText := addressText + ' 1/2';
if uq.FieldByName('STREET_DIRECTION').AsString <> '' then
addressText := addressText + ' ' + uq.FieldByName('STREET_DIRECTION').AsString;
if uq.FieldByName('STREET_NAME').AsString <> '' then
addressText := addressText + ' ' + TrimRight( uq.FieldByName('STREET_NAME').AsString );
if uq.FieldByName('STREET_TYPE').AsString <> '' then
addressText := addressText + ' ' + TrimRight( uq.FieldByName('STREET_TYPE').AsString );
if uq.FieldByName('APARTMENT_NUM').AsString <> '' then
addressText := addressText + ' APT: ' + TrimRight( uq.FieldByName('APARTMENT_NUM').AsString );
end;
'C':
if uq.FieldByName('CITY').AsString <> '' then
addressText := addressText + ' ' + TrimRight( uq.FieldByName('CITY').AsString );
'T':
if uq.FieldByName('STATE').AsString <> '' then
addressText := addressText + ' ' + TrimRight( uq.FieldByName('STATE').AsString );
'Z':
if uq.FieldByName('ZIP_CODE').AsString <> '' then
addressText := addressText + ' ' + TrimRight( uq.FieldByName('ZIP_CODE').AsString );
'R':
if uq.FieldByName('COUNTRY').AsString <> '' then
addressText := addressText + ' ' + TrimRight( uq.FieldByName('COUNTRY').AsString );
',':
addressText := addressText + ',';
'.':
addressText := addressText + '.';
' ':
addressText := addressText + ' ';
end;
end;
Result := addressText;
end;
function SetMasterAuditEntry(uq: TUniQuery; const entryId, auditType, linkId, agency, personnelId, recUser, details, searchKey, execSource: string) : Boolean;
var
sql: string;
begin
sql := 'insert into auditmaster ';
sql := sql + '( AUDITMASTERID, SOURCEID, AUDITTYPE, AGENCY, PERSONNELID, RECUSER, RECDATE, DETAILS, SEARCHKEY, EXECSRC) ';
sql := sql + 'values (';
sql := sql + entryID + ', ';
sql := sql + QuotedStr(linkID) + ', ';
sql := sql + QuotedStr(auditType) + ', ';
sql := sql + QuotedStr(agency) + ', ';
sql := sql + personnelid + ', ';
sql := sql + QuotedStr(recUser) + ', ';
sql := sql + 'sysdate, ';
sql := sql + QuotedStr(details) + ', ';
sql := sql + QuotedStr(searchKey) + ', ';
sql := sql + QuotedStr(execSource) + ')';
uq.Close;
uq.SQL.Text := sql;
uq.Execute;
uq.Close;
Result := True;
end;
function SetDetailAuditEntry(uq: TUniQuery; const entryId, title, auditType: string; auditList: TStringList) : Boolean;
var
i: Integer;
sql: string;
begin
for i := 0 to auditList.Count - 1 do
begin
sql := 'insert into auditdetail values (';
sql := sql + entryId + ', ';
sql := sql + QuotedStr( auditList.Names[i] ) + ', ';
sql := sql + QuotedStr( '' ) + ', ';
sql := sql + QuotedStr( auditList.ValueFromIndex[i] ) + ', ';
sql := sql + auditType + ')';
uq.Close;
uq.SQL.Text := sql;
uq.Execute;
uq.Close;
end;
Result := True;
end;
function GetOfficerName( agency, officer: string; uq: TUniQuery ): string;
var
sql: string;
begin
if agency.IsEmpty or officer.IsEmpty then
Exit;
sql := 'select a.agency_id, p.agency, p.pf_nameid, pf_lname, pf_fname, pf_mi, pf_badge ';
sql := sql + 'from personnel p ';
sql := sql + 'join agencycodes a on a.agency = p.agency ';
sql := sql + 'where a.agency_id = ' + agency + ' and p.pf_nameid = ' + officer;
uq.Close;
uq.SQL.Text := sql;
uq.Open;
if uq.IsEmpty then
Result := agency + '-' + officer + ': not found'
else
begin
Result := uq.FieldByName('pf_lname').AsString + ', ' + uq.FieldByName('pf_fname').AsString;
Result := Result + ' ' + uq.FieldByName('pf_mi').AsString + ' (' + uq.FieldByName('pf_badge').AsString + ')';
end;
end;
function GetRiciOfficerName( agency, officer: string; uq: TUniQuery ): string;
var
sql: string;
begin
if agency.IsEmpty or officer.IsEmpty then
Exit;
sql := 'select * from rici.officer@rici_link where agency = ' + agency + ' and empno = ' + QuotedStr(officer);
uq.Close;
uq.SQL.Text := sql;
uq.Open;
if uq.IsEmpty then
Result := agency + '-' + officer + ': not found'
else
Result := uq.FieldByName('surname').AsString + ', ' + uq.FieldByName('given1').AsString + ' (' + uq.FieldByName('empno').AsString + ')';
end;
end.
......@@ -9,7 +9,7 @@ uses
Api.Server.Module in 'Source\Api.Server.Module.pas' {ApiServerModule: TDataModule},
Main in 'Source\Main.pas' {FMain},
Common.Logging in 'Source\Common.Logging.pas',
KGOrders.Database in 'Source\KGOrders.Database.pas' {KGOrdersDatabase: TDataModule},
Api.Database in 'Source\Api.Database.pas' {ApiDatabase: TDataModule},
Common.Middleware.Logging in 'Source\Common.Middleware.Logging.pas',
Common.Config in 'Source\Common.Config.pas',
Auth.Server.Module in 'Source\Auth.Server.Module.pas' {AuthServerModule: TDataModule},
......@@ -20,7 +20,8 @@ uses
Auth.ServiceImpl in 'Source\Auth.ServiceImpl.pas',
Lookup.ServiceImpl in 'Source\Lookup.ServiceImpl.pas',
App.Server.Module in 'Source\App.Server.Module.pas' {AppServerModule: TDataModule},
Data in 'Source\Data.pas' {FData};
Data in 'Source\Data.pas' {FData},
rOrders in 'Source\rOrders.pas' {rptOrders: TDataModule};
type
TMemoLogAppender = class( TInterfacedObject, ILogAppender )
......@@ -37,7 +38,7 @@ type
TFileLogAppender = class( TInterfacedObject, ILogAppender )
private
FLogLevel: Integer;
FFilename: string;
FLogFile: string;
FCriticalSection: TCriticalSection;
public
constructor Create(ALogLevel: Integer; AFilename: string);
......@@ -89,14 +90,18 @@ constructor TFileLogAppender.Create(ALogLevel: integer; AFilename: string);
var
iniFile: TIniFile;
fileNum: integer;
logsDir: string;
begin
FLogLevel := ALogLevel;
FCriticalSection := TCriticalSection.Create;
logsDir := ExtractFilePath(Application.ExeName) + 'logs\';
if not DirectoryExists(logsDir) then
CreateDir(logsDir);
iniFile := TIniFile.Create( ExtractFilePath(Application.ExeName) + 'kgOrdersServer.ini' );
try
fileNum := iniFile.ReadInteger( 'Settings', 'LogFileNum', 0 );
// FFilename := AFilename + Format('%.*d',[4, fileNum]);
FFilename := AFilename + Format('%.4d',[fileNum]);
FLogFile := logsDir + AFilename + Format( '%.4d', [fileNum] ) + '.log';
iniFile.WriteInteger( 'Settings', 'LogFileNum', fileNum + 1 );
finally
iniFile.Free;
......@@ -111,35 +116,33 @@ end;
procedure TFileLogAppender.Send(logLevel: integer; Log: ILog);
var
FormattedMessage: string;
LogFile: string;
LogTime: TDateTime;
LogMsg: string;
FLogFile: TextFile;
formattedMessage: string;
logTime: TDateTime;
logMsg: string;
txtFile: TextFile;
begin
FCriticalSection.Acquire;
try
LogTime := Now;
LogFile := ExtractFilePath(Application.ExeName) + FFilename + '.log';
logTime := Now;
FormattedMessage := FormatDateTime('[yyyy-mm-dd HH:nn:ss.zzz]', LogTime);
LogMsg := Log.GetMessage;
if LogMsg.IsEmpty then
FormattedMessage := ''
formattedMessage := FormatDateTime('[yyyy-mm-dd HH:nn:ss.zzz]', logTime);
logMsg := Log.GetMessage;
if logMsg.IsEmpty then
formattedMessage := ''
else
FormattedMessage := FormattedMessage + '[' + IntToStr(logLevel) +'] ' + LogMsg;
formattedMessage := formattedMessage + '[' + IntToStr(logLevel) +'] ' + logMsg;
try
AssignFile( FLogFile, LogFile );
if FileExists(LogFile) then
Append( FLogFile )
AssignFile( txtFile, FLogFile );
if FileExists(FLogFile) then
Append( txtFile )
else
ReWrite( FLogFile );
ReWrite( txtFile );
if logLevel <= FLogLevel then
WriteLn( FLogFile, FormattedMessage );
WriteLn( txtFile, formattedMessage );
finally
CloseFile(FLogFile);
CloseFile(txtFile);
end;
finally
FCriticalSection.Release;
......
......@@ -133,8 +133,8 @@
<Form>FMain</Form>
</DCCReference>
<DCCReference Include="Source\Common.Logging.pas"/>
<DCCReference Include="Source\KGOrders.Database.pas">
<Form>KGOrdersDatabase</Form>
<DCCReference Include="Source\Api.Database.pas">
<Form>ApiDatabase</Form>
<FormType>dfm</FormType>
<DesignClass>TDataModule</DesignClass>
</DCCReference>
......@@ -164,6 +164,11 @@
<Form>FData</Form>
<FormType>dfm</FormType>
</DCCReference>
<DCCReference Include="Source\rOrders.pas">
<Form>rptOrders</Form>
<FormType>dfm</FormType>
<DesignClass>TDataModule</DesignClass>
</DCCReference>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
......
[Settings]
MemoLogLevel=4
FileLogLevel=5
LogFileNum=36
LogFileNum=30
webClientVersion=1.0.0
[Database]
Server=192.168.159.132
--Server=192.168.198.131
--Server=192.168.159.132
Server=192.168.60.129
--Server=192.168.75.133
--Database=
--Username=
--Password=
Password=emsys!012
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