Commit 5b01b1ab by cam

Web Plate Orders is completely finished and I fixed some old errors to match the old program

parent 510c8469
...@@ -354,19 +354,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -354,19 +354,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
DataField = 'staff_fields_job_name' DataField = 'staff_fields_job_name'
DataSource = WebDataSource1 DataSource = WebDataSource1
end end
object edtQuickBooksItem: TWebDBEdit
Left = 26
Top = 514
Width = 121
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtquickbooksitem'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'staff_fields_quickbooks_item'
DataSource = WebDataSource1
end
object edtOther: TWebDBEdit object edtOther: TWebDBEdit
Left = 316 Left = 316
Top = 348 Top = 348
...@@ -692,32 +679,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -692,32 +679,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
DataField = 'plates_job_number' DataField = 'plates_job_number'
DataSource = WebDataSource1 DataSource = WebDataSource1
end end
object edtPlateMaterial: TWebDBEdit
Left = 852
Top = 72
Width = 121
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtplatematerial'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'plates_plate_material'
DataSource = WebDataSource1
end
object edtThickness: TWebDBEdit
Left = 852
Top = 39
Width = 121
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtThickness'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'plates_thickness'
DataSource = WebDataSource1
end
object cbArtApprovedAsIs: TWebDBCheckBox object cbArtApprovedAsIs: TWebDBCheckBox
Left = 662 Left = 662
Top = 480 Top = 480
...@@ -988,6 +949,53 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -988,6 +949,53 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = btnCancelClick OnClick = btnCancelClick
end end
object WebDBComboBox2: TWebDBComboBox
Left = 26
Top = 515
Width = 145
Height = 22
ElementID = 'wcbqbitem'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
ItemIndex = -1
DataField = 'staff_fields_quickbooks_item'
DataSource = WebDataSource1
ListField = 'name'
ListSource = wdsQBItem
end
object WebDBComboBox3: TWebDBComboBox
Left = 833
Top = 77
Width = 145
Height = 22
ElementID = 'wcbmaterial'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
ItemIndex = -1
Items.Strings = (
'PhotoPolymer'
'Rubber')
DataField = 'plates_plate_material'
DataSource = WebDataSource1
end
object WebDBComboBox4: TWebDBComboBox
Left = 833
Top = 48
Width = 145
Height = 22
ElementID = 'wcbthickness'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
ItemIndex = -1
Items.Strings = (
'.250'
'.155'
'.107'
'.067'
'.045')
DataField = 'plates_thickness'
DataSource = WebDataSource1
end
object XDataWebClient1: TXDataWebClient object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 160 Left = 160
...@@ -1288,10 +1296,22 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -1288,10 +1296,22 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
Top = 436 Top = 436
end end
object xdwdsShipTo: TXDataWebDataSet object xdwdsShipTo: TXDataWebDataSet
Left = 192 Left = 202
Top = 486 Top = 416
object xdwdsShipToADDRESS: TStringField object xdwdsShipToADDRESS: TStringField
FieldName = 'ADDRESS' FieldName = 'ADDRESS'
end end
end end
object wdsQBItem: TWebDataSource
DataSet = xdwdsQBItem
Left = 240
Top = 518
end
object xdwdsQBItem: TXDataWebDataSet
Left = 200
Top = 512
object xdwdsQBItemname: TStringField
FieldName = 'name'
end
end
end end
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QuickBooks Item:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QuickBooks Item:</label>
<input id="edtquickbooksitem" class="form-control input-sm" width='50%'/> <select id="wcbqbitem" class='form-select'></select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Art Due:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Art Due:</label>
...@@ -278,15 +278,15 @@ ...@@ -278,15 +278,15 @@
<hr class="custom-hr"> <hr class="custom-hr">
<div class="row"> <div class="row">
<div class="col-auto"> <div class="col-auto">
<label class='pe-2' style="font-weight: 700; font-size: 15px;" id="lblthickness">Thickness:</label> <label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Thickness:</label>
<input id="edtThickness" class="form-control input-sm" style="width: 150px"/> <select id="wcbthickness" class='form-select'></select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label class='pe-2' style="font-weight: 700; font-size: 15px;" id="lblplatematerial">Plate Material:</label> <label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Plate Material:</label>
<input id="edtplatematerial" class="form-control input-sm" style="width: 150px"/> <select id="wcbmaterial" class='form-select'></select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label class='pe-2' style="font-weight: 700; font-size: 15px;" id="lbljobnumber">Job Number:</label> <label class="form-label mt-2" style="font-weight: 700; font-size: 15px;" id="lbljobnumber">Job Number:</label>
<input id="edtjobnumber" class="form-control input-sm" style="width: 150px"/> <input id="edtjobnumber" class="form-control input-sm" style="width: 150px"/>
</div> </div>
</div> </div>
......
...@@ -42,7 +42,6 @@ type ...@@ -42,7 +42,6 @@ type
edtInvoiceTo: TWebDBEdit; edtInvoiceTo: TWebDBEdit;
edtPONumber: TWebDBEdit; edtPONumber: TWebDBEdit;
edtJobName: TWebDBEdit; edtJobName: TWebDBEdit;
edtQuickBooksItem: TWebDBEdit;
edtOther: TWebDBEdit; edtOther: TWebDBEdit;
edtCADFile: TWebDBEdit; edtCADFile: TWebDBEdit;
edtAroundNo: TWebDBEdit; edtAroundNo: TWebDBEdit;
...@@ -68,8 +67,6 @@ type ...@@ -68,8 +67,6 @@ type
edtMachineIndent: TWebDBEdit; edtMachineIndent: TWebDBEdit;
edtCylinderSize: TWebDBEdit; edtCylinderSize: TWebDBEdit;
edtJobNumber: TWebDBEdit; edtJobNumber: TWebDBEdit;
edtPlateMaterial: TWebDBEdit;
edtThickness: TWebDBEdit;
cbArtApprovedAsIs: TWebDBCheckBox; cbArtApprovedAsIs: TWebDBCheckBox;
cbPDFFile: TWebDBCheckBox; cbPDFFile: TWebDBCheckBox;
cbWideFormat: TWebDBCheckBox; cbWideFormat: TWebDBCheckBox;
...@@ -191,6 +188,12 @@ type ...@@ -191,6 +188,12 @@ type
XDataWebDataSet1supplied_by_customer_order_date: TStringField; XDataWebDataSet1supplied_by_customer_order_date: TStringField;
btnEdit: TWebButton; btnEdit: TWebButton;
btnCancel: TWebButton; btnCancel: TWebButton;
WebDBComboBox2: TWebDBComboBox;
wdsQBItem: TWebDataSource;
xdwdsQBItem: TXDataWebDataSet;
xdwdsQBItemname: TStringField;
WebDBComboBox3: TWebDBComboBox;
WebDBComboBox4: TWebDBComboBox;
procedure WebFormCreate(Sender: TObject); procedure WebFormCreate(Sender: TObject);
procedure HideNotification(); procedure HideNotification();
procedure ShowNotification(Notification: string); procedure ShowNotification(Notification: string);
...@@ -355,7 +358,7 @@ begin ...@@ -355,7 +358,7 @@ begin
XDataWebDataSet1.Next; XDataWebDataSet1.Next;
end; end;
orderJSON.AddPair('COMPANY_ID', customerID); orderJSON.AddPair('COMPANY_ID', customerID);
orderJSON.AddPair('USER_ID', '1011'); orderJSON.AddPair('USER_ID', JS.toString(AuthService.TokenPayload.Properties['user_id']));
orderJSON.AddPair('mode', mode); orderJSON.AddPair('mode', mode);
if mode = 'EDIT' then if mode = 'EDIT' then
orderJSON.AddPair('ORDER_ID', orderID); orderJSON.AddPair('ORDER_ID', orderID);
...@@ -480,6 +483,7 @@ var ...@@ -480,6 +483,7 @@ var
color: TJSObject; color: TJSObject;
colorJSON: TJSONObject; colorJSON: TJSONObject;
colorListJSON: TJSONArray; colorListJSON: TJSONArray;
items: TJSObject;
begin begin
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetOrder', xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetOrder',
[Order_ID])); [Order_ID]));
...@@ -602,7 +606,17 @@ begin ...@@ -602,7 +606,17 @@ begin
cbStripMount.Checked := false; cbStripMount.Checked := false;
if mode = 'EDIT' then if mode = 'EDIT' then
begin
CustomerID := XDataWebDataSet1COMPANY_ID.AsString; CustomerID := XDataWebDataSet1COMPANY_ID.AsString;
xdwdsShipTo.Close;
xdwdsShipTo.SetJSONData(order['ADDRESS_LIST']);
xdwdsShipTo.Open;
end;
xdwdsQBItem.Close;
items := TJSObject(order['ITEMS']);
xdwdsQBItem.SetJsonData(items['data']);
xdwdsQBITEM.Open;
end; end;
......
...@@ -345,7 +345,6 @@ begin ...@@ -345,7 +345,6 @@ begin
StatusJSON.AddPair('staff_fields_art_due', DateToStr(newForm.dtpNewArtDue.Date)); StatusJSON.AddPair('staff_fields_art_due', DateToStr(newForm.dtpNewArtDue.Date));
console.log(StatusJSON);
SetStatus(StatusJSON.ToString); SetStatus(StatusJSON.ToString);
OrderID := ''; OrderID := '';
getOrders(GenerateSearchOptions()); getOrders(GenerateSearchOptions());
...@@ -722,7 +721,6 @@ begin ...@@ -722,7 +721,6 @@ begin
if orderID <> '' then if orderID <> '' then
searchOptions := searchOptions + '&orderID=' + orderID; searchOptions := searchOptions + '&orderID=' + orderID;
console.log(searchOptions);
Result := searchOptions; Result := searchOptions;
end; end;
......
...@@ -125,13 +125,15 @@ type ...@@ -125,13 +125,15 @@ type
data: TList<TCustomerItem>; data: TList<TCustomerItem>;
end; end;
TFullOrder = class TFullOrder = class //TODO change name to TCorrugatedOrder
Public Public
//Company //Company
COMPANY_ID: integer; COMPANY_ID: integer;
NAME: string; NAME: string;
SHORT_NAME: string; SHORT_NAME: string;
inQuickBooks: string; inQuickBooks: string;
ADDRESS_LIST: TList<TAddressItem>;
ITEMS: TItemList;
// Staff Fields: // Staff Fields:
staff_fields_order_date: string; staff_fields_order_date: string;
...@@ -215,9 +217,115 @@ type ...@@ -215,9 +217,115 @@ type
// General // General
general_special_instructions: string; general_special_instructions: string;
end; end;
TWebOrder = class
Public
//Company
COMPANY_ID: integer;
NAME: string;
SHORT_NAME: string;
inQuickBooks: string;
ADDRESS_LIST: TList<TAddressItem>;
ITEMS: TItemList;
// Staff Fields:
staff_fields_order_date: string;
staff_fields_proof_date: string;
staff_fields_ship_date: string;
staff_fields_ship_via: string;
staff_fields_quantity: string;
staff_fields_price: string;
staff_fields_invoice_to: string;
staff_fields_ship_to: string;
staff_fields_po_number: string;
staff_fields_job_name: string;
staff_fields_quickbooks_item: string;
staff_fields_art_due: string;
staff_fields_plate_due: string;
staff_fields_mount_due: string;
staff_fields_art_location: string;
// Supplied by Customer:
supplied_by_customer_b_w_or_co: string;
supplied_by_customer_plates: string;
supplied_by_customer_sample: string;
supplied_by_customer_dimension: string;
supplied_by_customer_other: string;
supplied_by_customer_disk: string;
supplied_by_customer_e_mail: string;
supplied_by_customer_ftp: string;
supplied_by_customer_total_inc: string;
supplied_by_customer_sheets_us: string;
supplied_by_customer_initials: string;
// Proofing
proofing_pdf: boolean;
proofing_pdf_to: string;
proofing_pdf_date_1: string;
proofing_pdf_date_2: string;
proofing_pdf_date_3: string;
proofing_full_size_ink_jet_for: boolean;
proofing_ink_jet_to: string;
proofing_ink_jet_to_2: string;
proofing_ink_jet_date_1: string;
proofing_ink_jet_date_2: string;
proofing_color_contract: string;
proofing_color_contrac_to: string;
proofing_color_contrac_date_1: string;
proofing_color_contrac_date_2: string;
proofing_digital_color_key: string;
proofing_digital_color_to: string;
proofing_digital_color_date_1: string;
// Print Orientation
print_orientation_print_orient: string;
// Plate
plates_plate_material: string;
plates_thickness: string;
plates_job_number: string;
// Quantity and Color
quantity_and_colors_press_name: string;
quantity_and_colors_anilox_info: string;
quantity_and_colors_qty_colors: string;
// Plate Marks
plate_marks_microdots: string;
plate_marks_microdots_comments: string;
plate_marks_crosshairs: string;
plate_marks_crosshairs_comments: string;
plate_marks_color_bars: string;
plate_marks_color_bars_comments: string;
plate_marks_other: string;
plate_marks_other_comments: string;
// Layout
layout_around: string;
layout_accross: string;
layout_surface_print: string;
layout_reverse_print: string;
layout_cylinder_repeat: string;
layout_cutoff_dimension: string;
layout_pitch: string;
layout_teeth: string;
layout_bleed: string;
layout_cutback: string;
layout_minimum_trap_dim: string;
layout_maximum_trap_dim: string;
// UPC
upc_size: string;
upc_bar_width_reduction: string;
upc_distortion_percent: string;
upc_distortion_amount: string;
// General
general_comments: string;
end;
type type
...@@ -228,6 +336,7 @@ type ...@@ -228,6 +336,7 @@ type
[HttpGet] function GetItems(searchOptions: string): TItemList; [HttpGet] function GetItems(searchOptions: string): TItemList;
[HttpGet] function GetOrders(searchOptions: string): TOrderList; [HttpGet] function GetOrders(searchOptions: string): TOrderList;
[HttpGet] function GetOrder(orderInfo: string): TFullOrder; [HttpGet] function GetOrder(orderInfo: string): TFullOrder;
[HttpGet] function GetWebOrder(orderInfo: string): TWebOrder;
[HttpGet] function GetCustomers(): TCustomerList; [HttpGet] function GetCustomers(): TCustomerList;
[HttpGet] function GetCustomer(ID: string): TCustomerItem; [HttpGet] function GetCustomer(ID: string): TCustomerItem;
[HttpGet] function GenerateReportPDF(searchOptions: string): string; [HttpGet] function GenerateReportPDF(searchOptions: string): string;
...@@ -238,6 +347,7 @@ type ...@@ -238,6 +347,7 @@ type
function DelUser(username: string): string; function DelUser(username: string): string;
function EditUser(const editOptions: string): string; function EditUser(const editOptions: string): string;
function AddCorrugatedOrder(orderInfo: string): TJSONObject; function AddCorrugatedOrder(orderInfo: string): TJSONObject;
function AddWebOrder(orderInfo: string): TJSONObject;
function AddStatusSchedule(StatusType: string; order: TJSONObject; ORDER_ID: integer): string; function AddStatusSchedule(StatusType: string; order: TJSONObject; ORDER_ID: integer): string;
function SetStatus(statusOptions: string): string; function SetStatus(statusOptions: string): string;
end; end;
......
[Settings] [Settings]
MemoLogLevel=4 MemoLogLevel=4
FileLogLevel=5 FileLogLevel=5
LogFileNum=125 LogFileNum=146
webClientVersion=1.0.0 webClientVersion=1.0.0
[Database] [Database]
......
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