Commit 3a2f4189 by Cam Hayes

Made changes discussed to the customer page.

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