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
DataField = 'staff_fields_job_name'
DataSource = WebDataSource1
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
Left = 316
Top = 348
......@@ -692,32 +679,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
DataField = 'plates_job_number'
DataSource = WebDataSource1
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
Left = 662
Top = 480
......@@ -988,6 +949,53 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
WidthPercent = 100.000000000000000000
OnClick = btnCancelClick
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
Connection = DMConnection.ApiConnection
Left = 160
......@@ -1288,10 +1296,22 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
Top = 436
end
object xdwdsShipTo: TXDataWebDataSet
Left = 192
Top = 486
Left = 202
Top = 416
object xdwdsShipToADDRESS: TStringField
FieldName = 'ADDRESS'
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
......@@ -68,7 +68,7 @@
</div>
<div class="col-auto">
<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 class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Art Due:</label>
......@@ -278,15 +278,15 @@
<hr class="custom-hr">
<div class="row">
<div class="col-auto">
<label class='pe-2' style="font-weight: 700; font-size: 15px;" id="lblthickness">Thickness:</label>
<input id="edtThickness" class="form-control input-sm" style="width: 150px"/>
<label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Thickness:</label>
<select id="wcbthickness" class='form-select'></select>
</div>
<div class="col-auto">
<label class='pe-2' style="font-weight: 700; font-size: 15px;" id="lblplatematerial">Plate Material:</label>
<input id="edtplatematerial" class="form-control input-sm" style="width: 150px"/>
<label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Plate Material:</label>
<select id="wcbmaterial" class='form-select'></select>
</div>
<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"/>
</div>
</div>
......
......@@ -42,7 +42,6 @@ type
edtInvoiceTo: TWebDBEdit;
edtPONumber: TWebDBEdit;
edtJobName: TWebDBEdit;
edtQuickBooksItem: TWebDBEdit;
edtOther: TWebDBEdit;
edtCADFile: TWebDBEdit;
edtAroundNo: TWebDBEdit;
......@@ -68,8 +67,6 @@ type
edtMachineIndent: TWebDBEdit;
edtCylinderSize: TWebDBEdit;
edtJobNumber: TWebDBEdit;
edtPlateMaterial: TWebDBEdit;
edtThickness: TWebDBEdit;
cbArtApprovedAsIs: TWebDBCheckBox;
cbPDFFile: TWebDBCheckBox;
cbWideFormat: TWebDBCheckBox;
......@@ -191,6 +188,12 @@ type
XDataWebDataSet1supplied_by_customer_order_date: TStringField;
btnEdit: TWebButton;
btnCancel: TWebButton;
WebDBComboBox2: TWebDBComboBox;
wdsQBItem: TWebDataSource;
xdwdsQBItem: TXDataWebDataSet;
xdwdsQBItemname: TStringField;
WebDBComboBox3: TWebDBComboBox;
WebDBComboBox4: TWebDBComboBox;
procedure WebFormCreate(Sender: TObject);
procedure HideNotification();
procedure ShowNotification(Notification: string);
......@@ -355,7 +358,7 @@ begin
XDataWebDataSet1.Next;
end;
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);
if mode = 'EDIT' then
orderJSON.AddPair('ORDER_ID', orderID);
......@@ -480,6 +483,7 @@ var
color: TJSObject;
colorJSON: TJSONObject;
colorListJSON: TJSONArray;
items: TJSObject;
begin
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetOrder',
[Order_ID]));
......@@ -602,7 +606,17 @@ begin
cbStripMount.Checked := false;
if mode = 'EDIT' then
begin
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;
......
......@@ -345,7 +345,6 @@ begin
StatusJSON.AddPair('staff_fields_art_due', DateToStr(newForm.dtpNewArtDue.Date));
console.log(StatusJSON);
SetStatus(StatusJSON.ToString);
OrderID := '';
getOrders(GenerateSearchOptions());
......@@ -722,7 +721,6 @@ begin
if orderID <> '' then
searchOptions := searchOptions + '&orderID=' + orderID;
console.log(searchOptions);
Result := searchOptions;
end;
......
......@@ -125,13 +125,15 @@ type
data: TList<TCustomerItem>;
end;
TFullOrder = class
TFullOrder = class //TODO change name to TCorrugatedOrder
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;
......@@ -215,9 +217,115 @@ type
// General
general_special_instructions: string;
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
......@@ -228,6 +336,7 @@ type
[HttpGet] function GetItems(searchOptions: string): TItemList;
[HttpGet] function GetOrders(searchOptions: string): TOrderList;
[HttpGet] function GetOrder(orderInfo: string): TFullOrder;
[HttpGet] function GetWebOrder(orderInfo: string): TWebOrder;
[HttpGet] function GetCustomers(): TCustomerList;
[HttpGet] function GetCustomer(ID: string): TCustomerItem;
[HttpGet] function GenerateReportPDF(searchOptions: string): string;
......@@ -238,6 +347,7 @@ type
function DelUser(username: string): string;
function EditUser(const editOptions: string): string;
function AddCorrugatedOrder(orderInfo: string): TJSONObject;
function AddWebOrder(orderInfo: string): TJSONObject;
function AddStatusSchedule(StatusType: string; order: TJSONObject; ORDER_ID: integer): string;
function SetStatus(statusOptions: string): string;
end;
......
[Settings]
MemoLogLevel=4
FileLogLevel=5
LogFileNum=125
LogFileNum=146
webClientVersion=1.0.0
[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