Commit df22fc95 by Cam Hayes

Finished misc bug fixes previously found

parent 41023b04
......@@ -651,10 +651,7 @@ begin
else
showNotification(notification);
if mode = 'ADD' then
EditMode()
else
ViewMode();
EditMode();
getCustomer();
......
......@@ -1198,7 +1198,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
Items.Strings = (
'Cromapro Ink Jet'
'Kodak Approval')
DataField = 'print_orientation_print_orient'
DataField = 'proofing_color_contract'
DataSource = WebDataSource1
end
object btnCopy: TWebButton
......
......@@ -538,6 +538,7 @@ begin
orderJSON.AddPair('COMPANY_ID', customerID);
orderJSON.AddPair('USER_ID', JS.toString(AuthService.TokenPayload.Properties['user_id']));
orderJSON.AddPair('mode', mode);
console.log(orderJSON);
if mode = 'EDIT' then
begin
orderJSON.AddPair('ORDER_ID', orderID);
......
......@@ -91,10 +91,12 @@ type
PageNumber: integer;
PageSize: integer;
TotalPages: integer;
OrderID: string;
statusOrderID: string; // used strictly for setting status.
OrderID: string; // used strictly for search string.
CompanyID: string;
JobName: string;
orderType: string;
statusOrderType: string; // used strictly for setting status.
orderType: string; // used strictly for search string.on
//Status 1
StartDate1: string;
......@@ -177,7 +179,7 @@ end;
procedure TFViewOrders.WebButton1Click(Sender: TObject);
begin
if OrderID <> '' then
if statusOrderID <> '' then
ShowSetStatusForm()
else
ShowNotification('Failure:Please select an order');
......@@ -232,8 +234,8 @@ begin
wcbPageSize.Text := IntToStr(PageSize);
OrderBy := params.Values['orderby'];
wlcbOrderBy.DisplayText := OrderBy;
orderType := params.Values['orderType'].ToLower();
OrderID := params.Values['orderID'];
statusOrderType := params.Values['orderType'].ToLower();
statusOrderID := params.Values['orderID'];
companyID := params.Values['companyID'];
jobName := params.Values['jobName'];
......@@ -368,7 +370,7 @@ begin
newform.Caption := 'Input Search Options';
newForm.Popup := True;
newForm.Border := fbDialog;
newForm.OrderID := OrderID;
newForm.OrderID := statusOrderID;
newForm.JobName := wdbtcOrders.Cells[3, row];
if wdbtcOrders.Cells[14, row] <> '' then
newForm.ShipDue := StrToDateTime(wdbtcOrders.Cells[14, row])
......@@ -386,7 +388,7 @@ begin
newForm.ArtDue := StrToDateTime(wdbtcOrders.Cells[8, row])
else
newForm.ArtDue := 0 ;
newForm.OrderType := OrderType;
newForm.OrderType := statusOrderType;
// used to manage Back button handling to close subform
window.location.hash := 'subform';
......@@ -401,7 +403,7 @@ begin
begin
Utils.ShowSpinner('spinner');
StatusJSON := TJSONObject.Create;
StatusJSON.AddPair('ORDER_ID', OrderID);
StatusJSON.AddPair('ORDER_ID', StatusOrderID);
StatusJSON.AddPair('date', DateTimeToStr(newform.dtpDate.Date));
StatusJSON.AddPair('status', newform.wlcbStatus.Value);
StatusJSON.AddPair('USER_ID', 1011);
......@@ -446,8 +448,8 @@ end;
procedure TFViewOrders.wdbtcOrdersClickCell(Sender: TObject; ACol,
ARow: Integer);
begin
OrderID := wdbtcOrders.Cells[0, ARow];
OrderType := wdbtcOrders.Cells[4, ARow];
statusOrderID := wdbtcOrders.Cells[0, ARow];
statusOrderType := wdbtcOrders.Cells[4, ARow];
row := ARow;
end;
......
......@@ -53,6 +53,9 @@ type
[Async] procedure SendCustomerToServer();
procedure PopulateGridManually();
procedure ApplyFilter();
var
customerID: string;
msg: string;
public
{ Public declarations }
end;
......@@ -206,9 +209,10 @@ begin
notification := TJSObject(Response.Result);
customerID := string(notification['CustomerID']);
msg := string(notification['status']);
Utils.HideSpinner('spinner');
FViewMain.ViewAddCustomer(string(notification['CustomerID']), string(notification['status']));
FViewMain.ViewAddCustomer(customerID, msg);
Close();
end;
......
......@@ -68,7 +68,7 @@ begin
ShowNotification('Failure:Please fill in all information')
else if ( ( OrderType = 'web plate' ) and ( wlcbStatus.Value = 'MOUNT' ) ) then
ShowNotification('Failure:Web Plate Orders do not have Mount Due/Done dates')
else if ( ( OrderType = 'cutting die' ) and ( wlcbStatus.Value = 'MOUNT' ) or ( wlcbStatus.Value = 'ART' ) or (wlcbStatus.Value = 'PLATE') ) then
else if ( ( OrderType = 'cutting die' ) and ( ( wlcbStatus.Value = 'MOUNT' ) or ( wlcbStatus.Value = 'ART' ) or (wlcbStatus.Value = 'PLATE') ) ) then
ShowNotification('Failure:Cutting Die Orders do not have Art/Plate/Mount Due or Done Dates')
else
begin
......@@ -96,6 +96,7 @@ begin
dtpNewPlateDue.Date := 0;
dtpNewArtDue.Date := 0;
ItemsToRemove := TStringList.Create;
console.log(orderType);
if orderType = 'web plate' then
begin
dtpNewMountDue.Visible := false;
......@@ -103,7 +104,7 @@ begin
lblMount.Visible := false;
lblMountNew.Visible := false;
wlcbStatus.LookupValues.AddPair('PROOF', 'Proof Done');
wlcbStatus.LookupValues.AddPair('Art', 'Art Done');
wlcbStatus.LookupValues.AddPair('ART', 'Art Done');
wlcbStatus.LookupValues.AddPair('PLATE', 'Plate Done');
wlcbStatus.LookupValues.AddPair('SHIP', 'Ship Done');
end
......@@ -130,7 +131,7 @@ begin
else
begin
wlcbStatus.LookupValues.AddPair('PROOF', 'Proof Done');
wlcbStatus.LookupValues.AddPair('Art', 'Art Done');
wlcbStatus.LookupValues.AddPair('ART', 'Art Done');
wlcbStatus.LookupValues.AddPair('PLATE', 'Plate Done');
wlcbStatus.LookupValues.AddPair('MOUNT', 'Mount Done');
wlcbStatus.LookupValues.AddPair('SHIP', 'Ship Done');
......
......@@ -1686,9 +1686,9 @@ begin
addToRevisionsTable(intToStr(ORDER_ID), 'corrugated_plate_orders_revisions', JSONData);
if mode = 'ADD' then
msg := 'Success:Customer Successfully Added'
msg := 'Success:Order Successfully Added'
else
msg := 'Success:Customer Successfully Edited';
msg := 'Success:Order Successfully Edited';
Result := TJSONObject.Create.AddPair('status', msg);
Result.AddPair('OrderID', ORDER_ID);
......@@ -2122,9 +2122,9 @@ begin
AddToRevisionsTable(IntToStr(ORDER_ID), 'web_plate_orders_revisions', JSONData);
if mode = 'ADD' then
msg := 'Success:Customer Successfully Added'
msg := 'Success:Order Successfully Added'
else
msg := 'Success:Customer Successfully Edited';
msg := 'Success:Order Successfully Edited';
Result := TJSONObject.Create.AddPair('status', msg);
Result.AddPair('OrderID', ORDER_ID);
......@@ -2213,9 +2213,9 @@ begin
AddToRevisionsTable(IntToStr(ORDER_ID), 'cutting_die_orders_revisions', JSONData);
if mode = 'ADD' then
msg := 'Success:Customer Successfully Added'
msg := 'Success:Order Successfully Added'
else
msg := 'Success:Customer Successfully Edited';
msg := 'Success:Order Successfully Edited';
Result := TJSONObject.Create.AddPair('status', msg);
Result.AddPair('OrderID', ORDER_ID);
......@@ -2417,7 +2417,7 @@ begin
// End Area
ordersDB.UniQuery1.FieldByName('ORDER_STATUS').AsString := 'ACTIVE';
ordersDB.UniQuery1.FieldByName('REVISION_NUMBER').AsInteger := 1;
ordersDB.UniQuery1.FieldByName('REVISION_NUMBER').AsInteger := rev_num;
ordersDB.UniQuery1.FieldByName('ORDER_REVISION_ID').AsInteger := RevisionID;
ordersDB.UniQuery1.FieldByName('REVISION_USER_ID').AsString := order.GetValue<string>('USER_ID');
// Post the record to the database
......@@ -2435,6 +2435,7 @@ var
jsValue: TJSONValue;
ParsedCustomer, Customer, BillAddr: TJSONObject;
jsObj: TJSONObject;
PhoneObj: TJSONObject;
CustomerList: TJSONArray;
AccessToken, RefreshToken, CompanyID, Client, Secret: string;
LastRefresh: TDateTime;
......@@ -2503,6 +2504,8 @@ begin
ParsedCustomer.AddPair('In KGOrders', not(ordersDB.UniQuery1.IsEmpty));
ParsedCustomer.AddPair('Id', Customer.GetValue<string>('Id'));
ParsedCustomer.AddPair('CompanyName', Customer.GetValue<string>('DisplayName'));
if Customer.TryGetValue<TJSONObject>('PrimaryPhone', PhoneObj) then
ParsedCustomer.AddPair('PrimaryPhone', PhoneObj.GetValue<string>('FreeFormNumber'));
// Handle Bill Address
if Customer.GetValue('BillAddr') is TJSONObject then
......
......@@ -2,7 +2,7 @@
MemoLogLevel=3
FileLogLevel=5
webClientVersion=0.9.4
LogFileNum=722
LogFileNum=735
[Database]
Server=192.168.159.131
......@@ -17,6 +17,7 @@ Password=emsys01
CompanyID=9341454272655710
ClientID=ABgO14uvjh8XqLud7spQ8lkb98AUpcdA7HbyMJfCAtl65sQ5yy
ClientSecret=bQ06TRemHeAGFzVHRaTUvUoBU9jpU9itK6MOMgqN
RefreshToken=RT1-7-H0-1758919884sgbdvdaawcewm26l9f9k
AccessToken=eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..PLd51yew2irHDBrcsT_EpA.iOyzK2ssY_1bRGAyxZIrqJyl2wvT70A6JrZt-oaBITJUTUp9NLql9g06PxuhgKB8t-ajFDCXtqyZEbtLx0T9-XntK5IkGuXXW5KZcWLGYAUm-T7ZDwiAVS3nyQhGkUr_yMqcPkktvCizQZjA7WscP1hWMHWSc9dMW2qfZc-fZartku7ffZXWlaJK03__8iRSBciZz4uRhVj6UAsGyE9QdBSemLmnZgXtB_v2iKoJk0Fh4Y-X-6u2yUVxM7fpBpx6QM93I0Ckjf_grK1Q_wNecc7QsBrNF1O13vW3q52viI0vuhTmLjZLNq9lrMqm3dX088ZgSnASkmgvLV-dg8zBK4J50GeTNngSHDYIMD7_xTgRCc9Vhmw7sACVPgmlVDO55B8w7AbF2VZGoJMk4XmZwR4Biie3cyQLZZ9cLR7KRb3uLRDI_exehnhsyDf4qzTk9SXYgs9TIfIWX8vyaHxXS-rvDElJ2BYr99wavTs1p9b8qwuWEqnfL08VYeZbuzxuTTNX2EqiIkIk-g-fRPuUcyu853co4YdY8yXs97aX9LDGlTl1Qv8U7IEaLHgeB6mRUmpC_uSuYjxMNsSmpBPVNH-mXrKINHodfrOXcvljPxqe48E9oFcplc0EApX0LYJ6.JgN4KV7iDxMEOK1otv66xA
LastRefresh=6/18/2025 1:45:15 PM
RefreshToken=RT1-251-H0-1759499151mghzkhn74tjkqi2vg5c0
AccessToken=eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..swWerhSONJsQ3kK2n0Z6Mw.hKhH99-B-e1no4mO69AheB1JQi9AVo_2uT_e9Urpto2s_JM_hGuytHiCYkSAt6f8KVoej5YXyB2JRjteqO0FbxLa6UwEx2zYfgKV2bdVDlHWjU1f3nVtJw7RNXc3kOUL8xHDo7a-wAdAl7u3f7HWHxyptZac49L4iZCQ-wTVKHGATp6GIhmS8Al4ICPDV0BGLOLVsc69xIi2vqJwQgfazilPfJAB_9p3hHlpv0xafuAUNpBUATTDSVO8C65cuPQ_pGNZIR4MPjTZIH0vgmOruFsyOynqO1JyZd_bqOCGhO0bS0pfDdoLai1XERlnQsb_2UXE2arFvEqygEq1oqSglj0vW_uy8F6XWoR1mmwr68MXMRE_IbauNV4LuXnYBm_qh2vztX6fk7r-Cja51508Z-YjjBi4uwEpnKf7dBBNpI6J-z7bfKffuVRdVBxuQo1ZUePwz6Df41nkjPqv1cw3NLp4IyyCToqX_wzGhnkx19zzMbjkK5ZaHRxpsms29qpHxpikR8QOtXni0o2DBK9xNGhRuCRTPxuEDZzaf26_c258rz0bd2xFl0IfMsfid9iki8O_u6KLfDcQJPPR50UI150HqvNlzPZQuYBRKzXDnwv7h75igYH0NH2rwellgU_k.Y_Nxh6SpCFATsEzsAUs26g
LastRefresh=6/24/2025 9:57:16 AM
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment