Commit 3a2f4189 by Cam Hayes

Made changes discussed to the customer page.

parent 20155abe
......@@ -166,6 +166,8 @@ begin
dtpStartDate.Date := 0;
dtpEndDate.Date := 0;
dtpStartDate.Date := XDataWebDataSet1.FieldByName('START_DATE').AsDateTime;
dtpEndDate.Date := XDataWebDataSet1.FieldByName('END_DATE').AsDateTime;
end;
procedure TFViewAddCustomer.Clear();
......
......@@ -119,6 +119,10 @@ object FViewCustomers: TFViewCustomers
Title = 'Customer Num'
end
item
DataField = 'QB_LIST_ID'
Title = 'QB ID'
end
item
DataField = 'SHORT_NAME'
Title = 'Customer ID'
end
......@@ -170,5 +174,8 @@ object FViewCustomers: TFViewCustomers
object xdwdsCustomersCUSTOMER_ID: TIntegerField
FieldName = 'CUSTOMER_ID'
end
object xdwdsCustomersQB_LIST_ID: TStringField
FieldName = 'QB_LIST_ID'
end
end
end
......@@ -18,27 +18,33 @@
</div>
<!-- Entries Label Section d-flex justify-content-between w-100 mt-2-->
<!-- Table Section -->
<div class="row justify-content-center">
<div class="col-12 col-md-8">
<div class="row">
<div class="col-auto">
<label id="lblentries" style="font-size: 1.10rem;"></label>
</div>
</div>
<!-- Table Section -->
<div id="order_table_section" class="overflow-auto mt-2"
style="max-height: calc(100vh - 250px); padding-bottom: 0; width: 100%;">
<table id="tblPhoneGrid" class="table table-striped table-bordered" style="width: 100%;">
<div id="order_table_section"
class="overflow-auto mt-2"
style="max-height: calc(100vh - 250px);">
<table id="tblPhoneGrid"
class="table table-striped table-bordered w-100">
<thead class="sticky-top thead-light">
<tr style="font-size: 0.875rem;">
<!-- Table headers are dynamically generated -->
</tr>
<tr style="font-size: 0.875rem;"></tr>
</thead>
<tbody id="orderTableBody" class="align-middle">
<!-- Table rows are dynamically generated -->
</tbody>
<tbody id="orderTableBody" class="align-middle"></tbody>
</table>
</div>
</div>
</div>
<!-- Pagination Section -->
<div class="d-flex justify-content-center w-100 mt-4">
<nav aria-label="Page navigation">
......
......@@ -32,6 +32,7 @@ type
wdbtcCustomers: TWebDBTableControl;
edtFilter: TWebEdit;
lblEntries: TWebLabel;
xdwdsCustomersQB_LIST_ID: TStringField;
procedure WebFormCreate(Sender: TObject);
procedure btnAddCustomerClick(Sender: TObject);
procedure wdbtcCustomersDblClickCell(Sender: TObject; ACol, ARow: Integer);
......
......@@ -206,6 +206,10 @@ object FViewOrders: TFViewOrders
Title = 'Price'
end
item
DataField = 'cadFile'
Title = 'CAD File'
end
item
ElementClassName = 'text-nowrap'
DataField = 'qbRefNum'
Title = 'QB Order Num'
......@@ -409,6 +413,9 @@ object FViewOrders: TFViewOrders
object xdwdsOrdersqbRefNum: TStringField
FieldName = 'qbRefNum'
end
object xdwdsOrderscadFile: TStringField
FieldName = 'cadFile'
end
end
object wdsOrders: TWebDataSource
DataSet = xdwdsOrders
......
......@@ -60,6 +60,7 @@ type
xdwdsOrdersIN_QB: TStringField;
xdwdsOrdersqbRefNum: TStringField;
btnOrderBy: TWebButton;
xdwdsOrderscadFile: TStringField;
procedure WebFormCreate(Sender: TObject);
procedure btnAddOrderClick(Sender: TObject);
procedure btnSearchClick(Sender: TObject);
......
......@@ -78,7 +78,8 @@ type
price,
qbRefNum,
orderType,
colors: string;
colors,
cadFile: string;
end;
......
......@@ -459,6 +459,7 @@ begin
', ' + ordersDB.UniQuery1.FieldByName('BILL_STATE').AsString +
' ' + ordersDB.UniQuery1.FieldByName('BILL_ZIP').AsString;
customer.START_DATE := ordersDB.UniQuery1.FieldByName('START_DATE').AsString;
customer.QB_LIST_ID := ordersDB.UniQuery1.FieldByName('QB_LIST_ID').AsString;
result.data.Add(customer);
ordersDB.UniQuery1.Next;
......@@ -1117,7 +1118,7 @@ begin
status2 := createStatusSearchInfo(params, '2');
SQL := 'SELECT o.ORDER_ID, c.SHORT_NAME, o.LOCATION AS Loc, c.NAME AS COMPANY_NAME, ' +
'o.JOB_NAME, o.ORDER_TYPE, o.IN_QB, o.QB_ORDER_NUM,' +
'o.JOB_NAME, o.ORDER_TYPE, o.IN_QB, o.QB_ORDER_NUM, cpo.layout_cad_file, ' +
generateSubquery('PROOF') +
generateSubquery('ART') +
generateSubquery('PLATE') +
......@@ -1265,6 +1266,7 @@ begin
Order.price := FieldByName('PRICE').AsString;
Order.qbRefNum := FieldByName('QB_ORDER_NUM').AsString;
Order.orderType := FieldByName('ORDER_TYPE').AsString.Replace('_', ' ');
Order.cadFile := FieldByName('layout_cad_file').AsString;
end;
if ordersDB.UniQuery1.FieldByName('ORDER_TYPE').AsString = 'web_plate' then
......
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