Commit 7005e50c by cam

fixed all issues with data not properly being stored/displayed

parent f4f53769
......@@ -142,7 +142,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45544.402385138890000000
Date = 45638.529943136570000000
Role = ''
Text = ''
end
......@@ -155,7 +155,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45544.402385138890000000
Date = 45638.529943136570000000
Role = ''
Text = ''
end
......@@ -168,7 +168,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45544.402385138890000000
Date = 45638.529943136570000000
Role = ''
Text = ''
end
......@@ -181,7 +181,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle
ChildOrder = 17
Color = clWhite
Date = 45544.409323321760000000
Date = 45638.529943136570000000
Role = ''
Text = ''
end
......@@ -194,7 +194,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle
ChildOrder = 17
Color = clWhite
Date = 45544.409323321760000000
Date = 45638.529943136570000000
Role = ''
Text = ''
end
......@@ -207,7 +207,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle
ChildOrder = 17
Color = clWhite
Date = 45544.409323321760000000
Date = 45638.529943136570000000
Role = ''
Text = ''
end
......@@ -232,7 +232,7 @@ object FOrderEntry: TFOrderEntry
BorderStyle = bsSingle
ChildOrder = 72
Color = clWhite
Date = 45544.481204965280000000
Date = 45638.529943136570000000
Role = ''
Text = ''
end
......@@ -367,19 +367,6 @@ object FOrderEntry: TFOrderEntry
DataField = 'staff_fields_quickbooks_item'
DataSource = WebDataSource1
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
Left = 316
Top = 348
......@@ -455,7 +442,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtrscd'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'layout_rsc_d'
DataField = 'layout_rcs_d'
DataSource = WebDataSource1
end
object edtRSCW: TWebDBEdit
......@@ -468,7 +455,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtrscw'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'layout_rsc_w'
DataField = 'layout_rcs_w'
DataSource = WebDataSource1
end
object edtRSCL: TWebDBEdit
......@@ -861,7 +848,7 @@ object FOrderEntry: TFOrderEntry
Height = 22
Caption = 'FTP?'
ChildOrder = 76
ElementID = 'edtftp'
ElementID = 'cbftp'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
......@@ -949,7 +936,7 @@ object FOrderEntry: TFOrderEntry
Height = 22
Caption = 'Excalibur Die'
ChildOrder = 76
ElementID = 'edtftp'
ElementID = 'cbexcaliburdie'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
......@@ -967,6 +954,17 @@ object FOrderEntry: TFOrderEntry
ListField = 'ADDRESS'
ListSource = wdsShipTo
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
Connection = DMConnection.ApiConnection
Left = 244
......@@ -1252,6 +1250,9 @@ object FOrderEntry: TFOrderEntry
object XDataWebDataSet1ADDRESS_LIST: TStringField
FieldName = 'ADDRESS_LIST'
end
object XDataWebDataSet1supplied_by_customer_order_date: TStringField
FieldName = 'supplied_by_customer_order_date'
end
end
object WebDataSource1: TWebDataSource
DataSet = XDataWebDataSet1
......
......@@ -99,16 +99,12 @@
<input type="checkbox" id="cbsampleCarton">
</div>
<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>
<input type="checkbox" id="edtemail"/>
</div>
<div class="col-auto">
<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 class="col-auto">
<label class='pe-2' style="font-weight: 700; font-size: 15px;">Other:</label>
......
......@@ -41,7 +41,6 @@ type
edtPONumber: TWebDBEdit;
edtJobName: TWebDBEdit;
edtQuickBooksItem: TWebDBEdit;
edtEmail: TWebDBEdit;
edtOther: TWebDBEdit;
edtCADFile: TWebDBEdit;
edtAroundNo: TWebDBEdit;
......@@ -186,6 +185,8 @@ type
xdwdsShipTo: TXDataWebDataSet;
xdwdsShipToADDRESS: TStringField;
WebDBComboBox1: TWebDBComboBox;
cbEmail: TWebCheckBox;
XDataWebDataSet1supplied_by_customer_order_date: TStringField;
procedure WebFormCreate(Sender: TObject);
procedure HideNotification();
procedure ShowNotification(Notification: string);
......@@ -233,11 +234,11 @@ var
Field: TField;
Response: TXDataClientResponse;
begin
//TJSONObject.Create;
orderJSON := TJSONObject.Create;
colorList := TJSONArray.Create;
container := document.getElementById('additionalFields');
colorCollection := container.children;
for I := 0 to colorCollection.length - 1 do
begin
colorJSON := TJSONObject.Create;
......@@ -262,7 +263,8 @@ begin
XDataWebDataSet1staff_fields_art_due.Value := DateTimeToStr(dtpArtDue.Date);
XDataWebDataSet1staff_fields_mount_due.Value := DateTimeToStr(dtpMountDue.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
if cbFTP.Checked then
......@@ -293,14 +295,38 @@ begin
XDataWebDataSet1supplied_by_customer_sample_ca.AsString := 'T'
else
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
XDataWebDataSet1proofing_pdf_file.AsString := 'T'
else
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.First;
console.log(XDataWebDataSet1supplied_by_customer_sample_ca.AsString);
while not XDataWebDataSet1.Eof do
begin
for Field in XDataWebDataSet1.Fields do
......@@ -322,7 +348,7 @@ begin
end;
XDataWebDataSet1.Next;
end;
orderJSON.AddPair('COMPANY_ID', '749');
orderJSON.AddPair('COMPANY_ID', customerID);
orderJSON.AddPair('USER_ID', '1011');
orderJSON.AddPair('mode', mode);
if mode = 'EDIT' then
......@@ -353,7 +379,6 @@ begin
TFOrderEntry(AForm).customerID := customerInfo;
TFOrderEntry(AForm).orderID := orderInfo;
TFOrderEntry(AForm).mode := localMode;
console.log(TFOrderEntry(AForm).mode);
end;
end
);
......@@ -488,10 +513,7 @@ begin
dtpApprovedDate.Date := StrToDateTime(XDataWebDataSet1proofing_approved_date.AsString)
else
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
cbExistingCuttingDie.Checked := true
else
......@@ -505,33 +527,59 @@ begin
else
cbRefArtPrintCard.Checked := false;
console.log(XDataWebDataSet1supplied_by_customer_color_copy.AsString);
// Supplied by customers check boxes
if XDataWebDataSet1supplied_by_customer_color_copy.AsString = 'T' then
if XDataWebDataSet1supplied_by_customer_color_copy.AsBoolean then
cbColorCopy.Checked := true
else
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
else
cbPlates.Checked := false;
if XDataWebDataSet1supplied_by_customer_sample_ca.AsString = 'T' then
if XDataWebDataSet1supplied_by_customer_sample_ca.AsBoolean then
cbSampleCarton.Checked := true
else
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 = 'T' then
if XDataWebDataSet1mounting_sticky_bak.AsString <> '' then
cbStickyBak.Checked := true
else
cbStickyBak.Checked := false;
if XDataWebDataSet1mounting_full_mount.AsString = 'T' then
if XDataWebDataSet1mounting_full_mount.AsString <> '' then
cbFullMount.Checked := true
else
cbFullMount.Checked := false;
......@@ -561,8 +609,6 @@ begin
xdwdsShipTo.Close;
xdwdsShipTo.SetJSONData(customer['ADDRESS_LIST']);
xdwdsShipTo.Open;
console.log(xdwdsShipToADDRESS.AsString);
console.log(customer['ADDRESS_LIST']);
end;
......@@ -572,7 +618,6 @@ begin
getOrder(orderID)
else
getCustomer(customerID);
console.log(customerID);
HideNotification();
end;
......
......@@ -141,6 +141,7 @@ type
supplied_by_customer_existing_: string;
supplied_by_customer_ref_art_p: string;
supplied_by_customer_ref_art_a: string;
supplied_by_customer_order_date: string;
// Layout
layout_rsc_l: string;
......
......@@ -383,6 +383,7 @@ begin
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_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
if ordersDB.UniQuery1.FieldByName('supplied_by_customer_b_w_copy').AsString = 'T' then
......
[Options]
LogFileNum=230
LogFileNum=234
UpdateTimerLength=0
......
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