Commit 1589dd42 by Elias Sarraf

Merge remote-tracking branch 'origin/cam2'

parents 726b409a 7005e50c
...@@ -142,7 +142,7 @@ object FOrderEntry: TFOrderEntry ...@@ -142,7 +142,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle BorderStyle = bsSingle
ChildOrder = 4 ChildOrder = 4
Color = clWhite Color = clWhite
Date = 45544.402385138890000000 Date = 45638.529943136570000000
Role = '' Role = ''
Text = '' Text = ''
end end
...@@ -155,7 +155,7 @@ object FOrderEntry: TFOrderEntry ...@@ -155,7 +155,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle BorderStyle = bsSingle
ChildOrder = 4 ChildOrder = 4
Color = clWhite Color = clWhite
Date = 45544.402385138890000000 Date = 45638.529943136570000000
Role = '' Role = ''
Text = '' Text = ''
end end
...@@ -168,7 +168,7 @@ object FOrderEntry: TFOrderEntry ...@@ -168,7 +168,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle BorderStyle = bsSingle
ChildOrder = 4 ChildOrder = 4
Color = clWhite Color = clWhite
Date = 45544.402385138890000000 Date = 45638.529943136570000000
Role = '' Role = ''
Text = '' Text = ''
end end
...@@ -181,7 +181,7 @@ object FOrderEntry: TFOrderEntry ...@@ -181,7 +181,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle BorderStyle = bsSingle
ChildOrder = 17 ChildOrder = 17
Color = clWhite Color = clWhite
Date = 45544.409323321760000000 Date = 45638.529943136570000000
Role = '' Role = ''
Text = '' Text = ''
end end
...@@ -194,7 +194,7 @@ object FOrderEntry: TFOrderEntry ...@@ -194,7 +194,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle BorderStyle = bsSingle
ChildOrder = 17 ChildOrder = 17
Color = clWhite Color = clWhite
Date = 45544.409323321760000000 Date = 45638.529943136570000000
Role = '' Role = ''
Text = '' Text = ''
end end
...@@ -207,7 +207,7 @@ object FOrderEntry: TFOrderEntry ...@@ -207,7 +207,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle BorderStyle = bsSingle
ChildOrder = 17 ChildOrder = 17
Color = clWhite Color = clWhite
Date = 45544.409323321760000000 Date = 45638.529943136570000000
Role = '' Role = ''
Text = '' Text = ''
end end
...@@ -232,7 +232,7 @@ object FOrderEntry: TFOrderEntry ...@@ -232,7 +232,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle BorderStyle = bsSingle
ChildOrder = 72 ChildOrder = 72
Color = clWhite Color = clWhite
Date = 45544.481204965280000000 Date = 45638.529943136570000000
Role = '' Role = ''
Text = '' Text = ''
end end
...@@ -367,19 +367,6 @@ object FOrderEntry: TFOrderEntry ...@@ -367,19 +367,6 @@ object FOrderEntry: TFOrderEntry
DataField = 'staff_fields_quickbooks_item' DataField = 'staff_fields_quickbooks_item'
DataSource = WebDataSource1 DataSource = WebDataSource1
end end
object edtEmail: TWebDBEdit
Left = 316
Top = 376
Width = 121
Height = 22
AutoSize = True
ChildOrder = 79
ElementID = 'edtemail'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_e_mail'
DataSource = WebDataSource1
end
object edtOther: TWebDBEdit object edtOther: TWebDBEdit
Left = 316 Left = 316
Top = 348 Top = 348
...@@ -455,7 +442,7 @@ object FOrderEntry: TFOrderEntry ...@@ -455,7 +442,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtrscd' ElementID = 'edtrscd'
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_rsc_d' DataField = 'layout_rcs_d'
DataSource = WebDataSource1 DataSource = WebDataSource1
end end
object edtRSCW: TWebDBEdit object edtRSCW: TWebDBEdit
...@@ -468,7 +455,7 @@ object FOrderEntry: TFOrderEntry ...@@ -468,7 +455,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtrscw' ElementID = 'edtrscw'
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_rsc_w' DataField = 'layout_rcs_w'
DataSource = WebDataSource1 DataSource = WebDataSource1
end end
object edtRSCL: TWebDBEdit object edtRSCL: TWebDBEdit
...@@ -861,7 +848,7 @@ object FOrderEntry: TFOrderEntry ...@@ -861,7 +848,7 @@ object FOrderEntry: TFOrderEntry
Height = 22 Height = 22
Caption = 'FTP?' Caption = 'FTP?'
ChildOrder = 76 ChildOrder = 76
ElementID = 'edtftp' ElementID = 'cbftp'
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
...@@ -949,7 +936,7 @@ object FOrderEntry: TFOrderEntry ...@@ -949,7 +936,7 @@ object FOrderEntry: TFOrderEntry
Height = 22 Height = 22
Caption = 'Excalibur Die' Caption = 'Excalibur Die'
ChildOrder = 76 ChildOrder = 76
ElementID = 'edtftp' ElementID = 'cbexcaliburdie'
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
...@@ -967,6 +954,17 @@ object FOrderEntry: TFOrderEntry ...@@ -967,6 +954,17 @@ object FOrderEntry: TFOrderEntry
ListField = 'ADDRESS' ListField = 'ADDRESS'
ListSource = wdsShipTo ListSource = wdsShipTo
end end
object cbEmail: TWebCheckBox
Left = 316
Top = 376
Width = 113
Height = 22
Caption = 'Email?'
ChildOrder = 75
ElementID = 'edtemail'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object XDataWebClient1: TXDataWebClient object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 244 Left = 244
...@@ -1252,6 +1250,9 @@ object FOrderEntry: TFOrderEntry ...@@ -1252,6 +1250,9 @@ object FOrderEntry: TFOrderEntry
object XDataWebDataSet1ADDRESS_LIST: TStringField object XDataWebDataSet1ADDRESS_LIST: TStringField
FieldName = 'ADDRESS_LIST' FieldName = 'ADDRESS_LIST'
end end
object XDataWebDataSet1supplied_by_customer_order_date: TStringField
FieldName = 'supplied_by_customer_order_date'
end
end end
object WebDataSource1: TWebDataSource object WebDataSource1: TWebDataSource
DataSet = XDataWebDataSet1 DataSet = XDataWebDataSet1
......
...@@ -99,16 +99,12 @@ ...@@ -99,16 +99,12 @@
<input type="checkbox" id="cbsampleCarton"> <input type="checkbox" id="cbsampleCarton">
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label class='pe-2' style="font-weight: 700; font-size: 15px;">Disk or CD:</label>
<input type="checkbox" id="cbdiskorcd">
</div>
<div class="col-auto">
<label class='pe-2' style="font-weight: 700; font-size: 15px;">Email:</label> <label class='pe-2' style="font-weight: 700; font-size: 15px;">Email:</label>
<input type="checkbox" id="edtemail"/> <input type="checkbox" id="edtemail"/>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label class='pe-2' style="font-weight: 700; font-size: 15px;">FTP:</label> <label class='pe-2' style="font-weight: 700; font-size: 15px;">FTP:</label>
<input type="checkbox" id="edtftp"/> <input type="checkbox" id="cbftp"/>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label class='pe-2' style="font-weight: 700; font-size: 15px;">Other:</label> <label class='pe-2' style="font-weight: 700; font-size: 15px;">Other:</label>
......
...@@ -41,7 +41,6 @@ type ...@@ -41,7 +41,6 @@ type
edtPONumber: TWebDBEdit; edtPONumber: TWebDBEdit;
edtJobName: TWebDBEdit; edtJobName: TWebDBEdit;
edtQuickBooksItem: TWebDBEdit; edtQuickBooksItem: TWebDBEdit;
edtEmail: TWebDBEdit;
edtOther: TWebDBEdit; edtOther: TWebDBEdit;
edtCADFile: TWebDBEdit; edtCADFile: TWebDBEdit;
edtAroundNo: TWebDBEdit; edtAroundNo: TWebDBEdit;
...@@ -186,6 +185,8 @@ type ...@@ -186,6 +185,8 @@ type
xdwdsShipTo: TXDataWebDataSet; xdwdsShipTo: TXDataWebDataSet;
xdwdsShipToADDRESS: TStringField; xdwdsShipToADDRESS: TStringField;
WebDBComboBox1: TWebDBComboBox; WebDBComboBox1: TWebDBComboBox;
cbEmail: TWebCheckBox;
XDataWebDataSet1supplied_by_customer_order_date: TStringField;
procedure WebFormCreate(Sender: TObject); procedure WebFormCreate(Sender: TObject);
procedure HideNotification(); procedure HideNotification();
procedure ShowNotification(Notification: string); procedure ShowNotification(Notification: string);
...@@ -233,11 +234,11 @@ var ...@@ -233,11 +234,11 @@ var
Field: TField; Field: TField;
Response: TXDataClientResponse; Response: TXDataClientResponse;
begin begin
//TJSONObject.Create;
orderJSON := TJSONObject.Create; orderJSON := TJSONObject.Create;
colorList := TJSONArray.Create; colorList := TJSONArray.Create;
container := document.getElementById('additionalFields'); container := document.getElementById('additionalFields');
colorCollection := container.children; colorCollection := container.children;
for I := 0 to colorCollection.length - 1 do for I := 0 to colorCollection.length - 1 do
begin begin
colorJSON := TJSONObject.Create; colorJSON := TJSONObject.Create;
...@@ -262,7 +263,8 @@ begin ...@@ -262,7 +263,8 @@ begin
XDataWebDataSet1staff_fields_art_due.Value := DateTimeToStr(dtpArtDue.Date); XDataWebDataSet1staff_fields_art_due.Value := DateTimeToStr(dtpArtDue.Date);
XDataWebDataSet1staff_fields_mount_due.Value := DateTimeToStr(dtpMountDue.Date); XDataWebDataSet1staff_fields_mount_due.Value := DateTimeToStr(dtpMountDue.Date);
XDataWebDataSet1staff_fields_plate_due.Value := DateTimeToStr(dtpPlateDue.Date); XDataWebDataSet1staff_fields_plate_due.Value := DateTimeToStr(dtpPlateDue.Date);
XDataWebDataSet1ORDER_DATE.Value := dtpOrderDate.Date; XDataWebDataSet1supplied_by_customer_order_date.Value := DateTimeToStr(dtpOrderDate.Date);
XDataWebDataSet1proofing_approved_date.Value := DateTimeToStr(dtpOrderDate.Date);
// Convert all check boxes to strings because the database stores them as strings // Convert all check boxes to strings because the database stores them as strings
if cbFTP.Checked then if cbFTP.Checked then
...@@ -293,14 +295,38 @@ begin ...@@ -293,14 +295,38 @@ begin
XDataWebDataSet1supplied_by_customer_sample_ca.AsString := 'T' XDataWebDataSet1supplied_by_customer_sample_ca.AsString := 'T'
else else
XDataWebDataSet1supplied_by_customer_sample_ca.AsString := ''; XDataWebDataSet1supplied_by_customer_sample_ca.AsString := '';
if cbEmail.Checked then
XDataWebDataSet1supplied_by_customer_e_mail.AsString := 'T'
else
XDataWebDataSet1supplied_by_customer_e_mail.AsString := '';
// layout
if cbExcaliburDie.Checked then
XDataWebDataSet1layout_excalibur_die.AsString := 'T'
else
XDataWebDataSet1layout_excalibur_die.AsString := '';
// proofing
if cbPDFFile.Checked then if cbPDFFile.Checked then
XDataWebDataSet1proofing_pdf_file.AsString := 'T' XDataWebDataSet1proofing_pdf_file.AsString := 'T'
else else
XDataWebDataSet1proofing_pdf_file.AsString := ''; XDataWebDataSet1proofing_pdf_file.AsString := '';
// Mounting
if cbStickyBak.Checked then
XDataWebDataSet1mounting_sticky_bak.AsString := 'T'
else
XDataWebDataSet1mounting_sticky_bak.AsString := '';
if cbStickyBak.Checked then
XDataWebDataSet1mounting_full_mount.AsString := 'T'
else
XDataWebDataSet1mounting_full_mount.AsString := '';
XDataWebDataSet1.Post; XDataWebDataSet1.Post;
XDataWebDataSet1.First; XDataWebDataSet1.First;
console.log(XDataWebDataSet1supplied_by_customer_sample_ca.AsString);
while not XDataWebDataSet1.Eof do while not XDataWebDataSet1.Eof do
begin begin
for Field in XDataWebDataSet1.Fields do for Field in XDataWebDataSet1.Fields do
...@@ -322,7 +348,7 @@ begin ...@@ -322,7 +348,7 @@ begin
end; end;
XDataWebDataSet1.Next; XDataWebDataSet1.Next;
end; end;
orderJSON.AddPair('COMPANY_ID', '749'); orderJSON.AddPair('COMPANY_ID', customerID);
orderJSON.AddPair('USER_ID', '1011'); orderJSON.AddPair('USER_ID', '1011');
orderJSON.AddPair('mode', mode); orderJSON.AddPair('mode', mode);
if mode = 'EDIT' then if mode = 'EDIT' then
...@@ -353,7 +379,6 @@ begin ...@@ -353,7 +379,6 @@ begin
TFOrderEntry(AForm).customerID := customerInfo; TFOrderEntry(AForm).customerID := customerInfo;
TFOrderEntry(AForm).orderID := orderInfo; TFOrderEntry(AForm).orderID := orderInfo;
TFOrderEntry(AForm).mode := localMode; TFOrderEntry(AForm).mode := localMode;
console.log(TFOrderEntry(AForm).mode);
end; end;
end end
); );
...@@ -457,7 +482,9 @@ begin ...@@ -457,7 +482,9 @@ begin
addColorRow(String(color['#']), string(color['Color']), string(color['LPI']), string(color['Size'])); addColorRow(String(color['#']), string(color['Color']), string(color['LPI']), string(color['Size']));
end; end;
end; end;
console.log(XDataWebDataSet1staff_fields_invoice_to.AsString);
// Check boxes and dates need to be manually set
if not (XDataWebDataSet1staff_fields_order_date.AsString = '') then if not (XDataWebDataSet1staff_fields_order_date.AsString = '') then
dtpOrderDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_order_date.Value) dtpOrderDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_order_date.Value)
else else
...@@ -486,10 +513,7 @@ begin ...@@ -486,10 +513,7 @@ begin
dtpApprovedDate.Date := StrToDateTime(XDataWebDataSet1proofing_approved_date.AsString) dtpApprovedDate.Date := StrToDateTime(XDataWebDataSet1proofing_approved_date.AsString)
else else
dtpApprovedDate.Date := 0; dtpApprovedDate.Date := 0;
if XDataWebDataSet1supplied_by_customer_ftp.AsString = 'T' then
cbFTP.Checked := true
else
cbFTP.Checked := false;
if XDataWebDataSet1supplied_by_customer_existing_.AsString = 'T' then if XDataWebDataSet1supplied_by_customer_existing_.AsString = 'T' then
cbExistingCuttingDie.Checked := true cbExistingCuttingDie.Checked := true
else else
...@@ -502,19 +526,70 @@ begin ...@@ -502,19 +526,70 @@ begin
cbRefArtPrintCard.Checked := true cbRefArtPrintCard.Checked := true
else else
cbRefArtPrintCard.Checked := false; cbRefArtPrintCard.Checked := false;
if XDataWebDataSet1supplied_by_customer_color_copy.AsString = 'T' then
// Supplied by customers check boxes
if XDataWebDataSet1supplied_by_customer_color_copy.AsBoolean then
cbColorCopy.Checked := true cbColorCopy.Checked := true
else else
cbColorCopy.checked := false; cbColorCopy.checked := false;
if XDataWebDataSet1supplied_by_customer_plates.AsString = 'T' then
console.log(XDataWebDataSet1supplied_by_customer_ftp.AsString);
if XDataWebDataSet1supplied_by_customer_ftp.AsString <> '' then
begin
console.log('hit');
cbFTP.Checked := true;
console.log(cbFTP.Checked);
end
else
cbFTP.Checked := false;
if XDataWebDataSet1supplied_by_customer_plates.AsBoolean then
cbPlates.Checked := true cbPlates.Checked := true
else else
cbPlates.Checked := false; cbPlates.Checked := false;
if XDataWebDataSet1supplied_by_customer_sample_ca.AsString = 'T' then
if XDataWebDataSet1supplied_by_customer_sample_ca.AsBoolean then
cbSampleCarton.Checked := true cbSampleCarton.Checked := true
else else
cbSampleCarton.Checked := false; cbSampleCarton.Checked := false;
if XDataWebDataSet1supplied_by_customer_e_mail.AsBoolean then
cbEmail.Checked := true
else
cbSampleCarton.Checked := false;
// layout
if XDataWebDataSet1layout_excalibur_die.AsBoolean then
cbExcaliburDie.Checked := true
else
cbExcaliburDie.Checked := false;
// Mounting check boxes
if XDataWebDataSet1mounting_loose.AsString <> '' then
cbLoose.Checked := true
else
cbLoose.Checked := false;
if XDataWebDataSet1mounting_sticky_bak.AsString <> '' then
cbStickyBak.Checked := true
else
cbStickyBak.Checked := false;
if XDataWebDataSet1mounting_full_mount.AsString <> '' then
cbFullMount.Checked := true
else
cbFullMount.Checked := false;
if XDataWebDataSet1mounting_strip_mount.AsString <> '' then
cbStripMount.Checked := true
else
cbStripMount.Checked := false;
end; end;
...@@ -534,8 +609,6 @@ begin ...@@ -534,8 +609,6 @@ begin
xdwdsShipTo.Close; xdwdsShipTo.Close;
xdwdsShipTo.SetJSONData(customer['ADDRESS_LIST']); xdwdsShipTo.SetJSONData(customer['ADDRESS_LIST']);
xdwdsShipTo.Open; xdwdsShipTo.Open;
console.log(xdwdsShipToADDRESS.AsString);
console.log(customer['ADDRESS_LIST']);
end; end;
...@@ -545,7 +618,6 @@ begin ...@@ -545,7 +618,6 @@ begin
getOrder(orderID) getOrder(orderID)
else else
getCustomer(customerID); getCustomer(customerID);
console.log(customerID);
HideNotification(); HideNotification();
end; end;
......
...@@ -141,6 +141,7 @@ type ...@@ -141,6 +141,7 @@ type
supplied_by_customer_existing_: string; supplied_by_customer_existing_: string;
supplied_by_customer_ref_art_p: string; supplied_by_customer_ref_art_p: string;
supplied_by_customer_ref_art_a: string; supplied_by_customer_ref_art_a: string;
supplied_by_customer_order_date: string;
// Layout // Layout
layout_rsc_l: string; layout_rsc_l: string;
......
...@@ -383,6 +383,7 @@ begin ...@@ -383,6 +383,7 @@ begin
result.staff_fields_mount_due := ordersDB.UniQuery1.FieldByName('staff_fields_mount_due').AsString; result.staff_fields_mount_due := ordersDB.UniQuery1.FieldByName('staff_fields_mount_due').AsString;
result.staff_fields_art_location := ordersDB.UniQuery1.FieldByName('staff_fields_art_location').AsString; result.staff_fields_art_location := ordersDB.UniQuery1.FieldByName('staff_fields_art_location').AsString;
result.staff_fields_invoice_to := ordersDB.UniQuery1.FieldByName('staff_fields_invoice_to').AsString; result.staff_fields_invoice_to := ordersDB.UniQuery1.FieldByName('staff_fields_invoice_to').AsString;
result.staff_fields_order_date := ordersDB.UniQuery1.FieldByName('staff_fields_order_date').AsString;
// Supplied by Customer // Supplied by Customer
if ordersDB.UniQuery1.FieldByName('supplied_by_customer_b_w_copy').AsString = 'T' then if ordersDB.UniQuery1.FieldByName('supplied_by_customer_b_w_copy').AsString = 'T' 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