Commit b7274906 by Elias Sarraf

Fixed minor issues with SetStatus and increased checkbox size.

Done by Cam
parent 94933534
......@@ -460,7 +460,7 @@ end;
procedure TFViewAddCustomer.btnShipDeleteClick(Sender: TObject);
begin
ShowToast('Deleting Shipping AddressesF is not yet implemented.', 'info');
ShowToast('Deleting Shipping Addresses is not yet implemented.', 'info');
{ShowConfirmationModal(
'Are you sure you want to delete this address?',
'Delete',
......
......@@ -59,7 +59,8 @@
</div>
<div class="col-auto d-flex flex-column">
<label for="wdbcbinqb" class="form-label mt-2" style="font-weight: 700; font-size: 15px;">In QB?:</label>
<input id="wdbcbinqb" type="checkbox" class="form-check-input mt-1">
<input id="wdbcbinqb" type="checkbox" class="form-check-input mt-1"
style="transform: scale(1.2); width: 20px; height: 20px;">
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QB Order Number:</label>
......
......@@ -62,7 +62,8 @@
</div>
<div class="col-auto d-flex flex-column">
<label for="wdbcbinqb" class="form-label mt-2" style="font-weight: 700; font-size: 15px;">In QB?:</label>
<input id="wdbcbinqb" type="checkbox" class="form-check-input mt-1">
<input id="wdbcbinqb" type="checkbox" class="form-check-input mt-1"
style="transform: scale(1.2); width: 20px; height: 20px;">
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QB Order Number:</label>
......
......@@ -59,7 +59,8 @@
</div>
<div class="col-auto d-flex flex-column">
<label for="wdbcbinqb" class="form-label mt-2" style="font-weight: 700; font-size: 15px;">In QB?:</label>
<input id="wdbcbinqb" type="checkbox" class="form-check-input mt-1">
<input id="wdbcbinqb" type="checkbox" class="form-check-input mt-1"
style="transform: scale(1.2); width: 20px; height: 20px;">
</div>
<div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QB Order Number:</label>
......
......@@ -230,7 +230,7 @@ begin
[searchOptions]));
jsObject := TJSObject(xdcResponse.Result);
pdfURL := String(jsObject.Properties['value']);
console.log(pdfURL);
if Assigned(APdfTab) then
APdfTab.location.href := pdfURL;
except
......@@ -443,20 +443,20 @@ begin
newForm.Position := poScreenCenter;
newForm.OrderID := statusOrderID;
newForm.JobName := wdbtcOrders.Cells[3, row];
if wdbtcOrders.Cells[14, row] <> '' then
newForm.ShipDue := StrToDateTime(wdbtcOrders.Cells[14, row])
if wdbtcOrders.Cells[15, row] <> '' then
newForm.ShipDue := StrToDateTime(wdbtcOrders.Cells[15, row])
else
newForm.MountDue := 0;
if wdbtcOrders.Cells[12, row] <> '' then
newForm.MountDue := StrToDateTime(wdbtcOrders.Cells[12, row])
if wdbtcOrders.Cells[13, row] <> '' then
newForm.MountDue := StrToDateTime(wdbtcOrders.Cells[13, row])
else
newForm.MountDue := 0;
if wdbtcOrders.Cells[10, row] <> '' then
newForm.PlateDue := StrToDateTime(wdbtcOrders.Cells[10, row])
if wdbtcOrders.Cells[11, row] <> '' then
newForm.PlateDue := StrToDateTime(wdbtcOrders.Cells[11, row])
else
newForm.PlateDue := 0;
if wdbtcOrders.Cells[8, row] <> '' then
newForm.ArtDue := StrToDateTime(wdbtcOrders.Cells[8, row])
if wdbtcOrders.Cells[9, row] <> '' then
newForm.ArtDue := StrToDateTime(wdbtcOrders.Cells[9, row])
else
newForm.ArtDue := 0 ;
newForm.OrderType := statusOrderType;
......
......@@ -188,6 +188,7 @@ object FSetStatus: TFSetStatus
Width = 145
Height = 22
ElementClassName = 'custom-select'
ElementID = 'wlc_status'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
ItemIndex = -1
......@@ -198,6 +199,7 @@ object FSetStatus: TFSetStatus
Top = 52
Width = 145
Height = 22
ElementID = 'dtpdate'
BorderStyle = bsSingle
ChildOrder = 1
Color = clWhite
......
......@@ -40,6 +40,7 @@ type
procedure btnCancelClick(Sender: TObject);
private
{ Private declarations }
function Verify(): boolean;
public
{ Public declarations }
confirm: boolean;
......@@ -59,10 +60,41 @@ begin
Close;
end;
function TFSetStatus.Verify: Boolean;
var
input: TJSHTMLElement;
begin
result := true;
input := TJSHTMLElement(document.getElementById('dtpdate'));
if dtpDate.Date = 0 then
begin
input.style.setProperty('background-color', 'yellow');
result := false;
end
else
input.style.setProperty('background-color', 'white');
input := TJSHTMLElement(document.getElementById('wlc_status'));
if wlcbStatus.Value = '' then
begin
input.style.setProperty('background-color', 'yellow');
result := false;
end
else
input.style.setProperty('background-color', 'white');
end;
procedure TFSetStatus.btnConfirmClick(Sender: TObject);
var
el: tjshtmlElement;
begin
if ( (dtpDate.Date = 0 ) or ( wlcbStatus.value = '' ) ) then
ShowToast('Failure: Please fill in all information')
if ( not Verify() ) then
begin
ShowToast('Failure: Please fill in all highlighted information')
end
else if ( ( OrderType = 'web plate' ) and ( wlcbStatus.Value = 'MOUNT' ) ) then
ShowToast('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
......
......@@ -5,7 +5,7 @@
<FrameworkType>VCL</FrameworkType>
<MainSource>webKGOrders.dpr</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<Config Condition="'$(Config)'==''">Debug</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>1</TargetedPlatforms>
<AppType>Application</AppType>
......@@ -99,7 +99,7 @@
<VerInfo_MajorVer>0</VerInfo_MajorVer>
<VerInfo_MinorVer>9</VerInfo_MinorVer>
<VerInfo_Release>8</VerInfo_Release>
<TMSWebBrowser>3</TMSWebBrowser>
<TMSWebBrowser>1</TMSWebBrowser>
<TMSWebSingleInstance>1</TMSWebSingleInstance>
<TMSUseJSDebugger>2</TMSUseJSDebugger>
</PropertyGroup>
......
......@@ -4,9 +4,13 @@ object ApiDatabase: TApiDatabase
Width = 519
object ucKG: TUniConnection
ProviderName = 'MySQL'
Database = 'kg_order_entry'
Username = 'root'
Server = '192.168.159.158'
LoginPrompt = False
Left = 75
Top = 65
EncryptedPassword = '9AFF92FF8CFF86FF8CFFCFFFCEFF'
end
object UniQuery1: TUniQuery
Connection = ucKG
......@@ -369,4 +373,39 @@ object ApiDatabase: TApiDatabase
Size = 16
end
end
object uqOrdersStatusSchedule: TUniQuery
Connection = ucKG
SQL.Strings = (
'select * from ORDERS_STATUS_SCHEDULE')
Left = 365
Top = 146
object uqOrdersStatusScheduleORDERS_STATUS_SCHEDULE_ID: TLongWordField
FieldName = 'ORDERS_STATUS_SCHEDULE_ID'
end
object uqOrdersStatusScheduleORDER_ID: TLongWordField
FieldName = 'ORDER_ID'
Required = True
end
object uqOrdersStatusScheduleORDER_STATUS: TStringField
FieldName = 'ORDER_STATUS'
Required = True
Size = 45
end
object uqOrdersStatusScheduleSTATUS_DATE: TDateField
FieldName = 'STATUS_DATE'
Required = True
end
object uqOrdersStatusScheduleORIGINAL_STATUS_DATE: TDateField
FieldName = 'ORIGINAL_STATUS_DATE'
Required = True
end
object uqOrdersStatusScheduleUSER_ID: TLongWordField
FieldName = 'USER_ID'
Required = True
end
object uqOrdersStatusScheduleORDER_REVISION: TLongWordField
FieldName = 'ORDER_REVISION'
Required = True
end
end
end
......@@ -104,6 +104,14 @@ type
uqOrdersstaff_fields_quantity: TStringField;
uqOrderslayout_rsc_style: TStringField;
uqOrdersstaff_fields_art_location: TStringField;
uqOrdersStatusSchedule: TUniQuery;
uqOrdersStatusScheduleORDERS_STATUS_SCHEDULE_ID: TLongWordField;
uqOrdersStatusScheduleORDER_ID: TLongWordField;
uqOrdersStatusScheduleORDER_STATUS: TStringField;
uqOrdersStatusScheduleSTATUS_DATE: TDateField;
uqOrdersStatusScheduleORIGINAL_STATUS_DATE: TDateField;
uqOrdersStatusScheduleUSER_ID: TLongWordField;
uqOrdersStatusScheduleORDER_REVISION: TLongWordField;
procedure DataModuleCreate(Sender: TObject);
private
{ Private declarations }
......
......@@ -1889,50 +1889,42 @@ var
SQL: string;
mode: string;
change: boolean;
date: string;
begin
logger.Log(3, 'TLookupService.AddStatusSchedule');
mode := order.GetValue<string>('mode');
if mode = 'ADD' then
begin
SQL := 'select * from orders_status_schedule where ORDER_ID = 0 and ORDER_ID <> 0';
doQuery(ordersDB.UniQuery1, SQL);
ordersDB.UniQuery1.Insert;
end
else
begin
SQL := 'select * from orders_status_schedule where ORDER_ID = ' + IntToStr(ORDER_ID) + ' AND ORDER_STATUS = ' + quotedStr(StatusType);
doQuery(ordersDB.UniQuery1, SQL);
ordersDB.UniQuery1.Edit;
end;
ordersDB.UniQuery1.FieldByName('ORDER_ID').AsInteger := ORDER_ID;
ordersDB.UniQuery1.FieldByName('ORDER_STATUS').AsString := StatusType;
SQL := 'select * from orders_status_schedule where ORDER_ID = ' + IntToStr(ORDER_ID) + ' AND ORDER_STATUS = ' + quotedStr(StatusType);
doQuery(ordersDB.uqOrdersStatusSchedule, SQL);
if( (StatusType = 'PROOF') or (StatusType = 'SHIP') ) then
begin
change := ordersDB.UniQuery1.FieldByName('STATUS_DATE').AsString <> order.GetValue<string>('staff_fields_'+ StatusType.ToLower +'_date');
ordersDB.UniQuery1.FieldByName('STATUS_DATE').AsString := order.GetValue<string>('staff_fields_'+ StatusType.ToLower +'_date');
if mode <> 'EDIT' then
ordersDB.UniQuery1.FieldByName('ORIGINAL_STATUS_DATE').AsString := order.GetValue<string>('staff_fields_'+ StatusType.ToLower +'_date')
date := order.GetValue<string>('staff_fields_'+ StatusType.ToLower + '_date');
end
else
begin
change := ordersDB.UniQuery1.FieldByName('STATUS_DATE').AsDateTime <> StrToDateTime(order.GetValue<string>('staff_fields_'+ StatusType.ToLower +'_due'));
ordersDB.UniQuery1.FieldByName('STATUS_DATE').AsDateTime := StrToDateTime(order.GetValue<string>('staff_fields_'+ StatusType.ToLower +'_due'));
if mode <> 'EDIT' then
ordersDB.UniQuery1.FieldByName('ORIGINAL_STATUS_DATE').AsDateTime := StrToDateTime(order.GetValue<string>('staff_fields_'+ StatusType.ToLower +'_due'))
end;
ordersDB.UniQuery1.FieldByName('USER_ID').AsString := order.GetValue<string>('USER_ID');
date := order.GetValue<string>('staff_fields_'+ StatusType.ToLower +'_due');
if mode = 'ADD' then
ordersDB.UniQuery1.FieldByName('ORDER_REVISION').AsInteger := 1
if ordersDB.uqOrdersStatusSchedule.IsEmpty then
begin
ordersDB.uqOrdersStatusSchedule.Insert;
ordersDB.uqOrdersStatusScheduleORDER_REVISION.AsInteger := 1;
ordersDB.uqOrdersStatusScheduleORIGINAL_STATUS_DATE.AsString := date;
ordersDB.uqOrdersStatusScheduleUSER_ID.AsString := order.GetValue<string>('USER_ID');
end
else
begin
ordersDB.uqOrdersStatusSchedule.Edit;
change := ordersDB.uqOrdersStatusScheduleSTATUS_DATE.AsDateTime <> StrToDateTime(date);
if change then
ordersDB.UniQuery1.FieldByName('ORDER_REVISION').AsInteger := ordersDB.UniQuery1.FieldByName('ORDER_REVISION').AsInteger + 1;
begin
ordersDB.uqOrdersStatusScheduleORDER_REVISION.AsInteger := ordersDB.uqOrdersStatusScheduleORDER_REVISION.AsInteger + 1;
ordersDB.uqOrdersStatusScheduleUSER_ID.AsString := order.GetValue<string>('USER_ID');
end;
end;
ordersDB.uqOrdersStatusScheduleSTATUS_DATE.AsDateTime := StrToDateTime(date);
ordersDB.uqOrdersStatusScheduleORDER_ID.AsInteger := ORDER_ID;
ordersDB.uqOrdersStatusScheduleORDER_STATUS.AsString := StatusType;
ordersDB.UniQuery1.Post;
ordersDB.uqOrdersStatusSchedule.Post;
Result := 'success';
end;
......@@ -2050,9 +2042,19 @@ begin
table := 'corrugated_plate_orders';
SQL := 'select ORDER_ID, ' + StatusField + ' from ' + table + ' where ORDER_ID = ' + IntToStr(ORDER_ID);
SQL := 'select * from ' + table + ' where ORDER_ID = ' + IntToStr(ORDER_ID);
doQuery(OrdersDB.UniQuery1, SQL);
OrdersDB.UniQuery1.Edit;
if StatusInfo.GetValue<string>('staff_fields_ship_date') <> '12/30/1899' then
OrdersDB.UniQuery1.FieldByName('staff_fields_ship_date').AsString := StatusInfo.GetValue<string>('staff_fields_ship_date');
if StatusInfo.GetValue<string>('staff_fields_art_due') <> '12/30/1899' then
OrdersDB.UniQuery1.FieldByName('staff_fields_art_due').AsString := StatusInfo.GetValue<string>('staff_fields_art_due');
if StatusInfo.GetValue<string>('staff_fields_plate_due') <> '12/30/1899' then
OrdersDB.UniQuery1.FieldByName('staff_fields_plate_due').AsString := StatusInfo.GetValue<string>('staff_fields_plate_due');
if StatusInfo.GetValue<string>('staff_fields_mount_due') <> '12/30/1899' then
OrdersDB.UniQuery1.FieldByName('staff_fields_mount_due').AsString := StatusInfo.GetValue<string>('staff_fields_mount_due');
OrdersDB.UniQuery1.FieldByName(StatusField).AsString := Date;
OrdersDB.UniQuery1.Post;
......
......@@ -133,6 +133,7 @@
<VerInfo_MinorVer>9</VerInfo_MinorVer>
<VerInfo_Release>2</VerInfo_Release>
<VerInfo_Locale>1033</VerInfo_Locale>
<DCC_ExeOutput>.</DCC_ExeOutput>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
<AppDPIAwarenessMode>PerMonitorV2</AppDPIAwarenessMode>
......
......@@ -2,7 +2,7 @@
MemoLogLevel=5
FileLogLevel=5
webClientVersion=1.0.0
LogFileNum=993
LogFileNum=1021
[Database]
Server=192.168.159.158
......@@ -18,5 +18,5 @@ CompanyID=9341454336461805
ClientID=ABYqlDx1EsacZYXvHIJ7RDB7zmnQdwABU3fwQLIZPmBgU0VW1P
ClientSecret=PM7OnvQWsgOqjWfDpZAnyRttDN9446Am6d85pDxr
RefreshToken=RT1-2-H0-1769887296o3747tv75irrt167rolf
AccessToken=eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..84BZUCQk1D0zH5dIEEW2zw.tmbh1n6DyHI3Z9BVuuztZNe8Y75GzsC5sMwqrIec0-yfcr9aBxO8FTQOAhpe4JLeZ1M2h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efresh=10/23/2025 12:28:19 PM
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