Commit fcb79526 by cam

rebuilt order entry form to making it easier to submit info to db

parent 26156618
......@@ -246,7 +246,7 @@ object FOrderEntry: TFOrderEntry
HeightPercent = 100.000000000000000000
MaxLength = 90
WidthPercent = 100.000000000000000000
DataField = 'companyName'
DataField = 'NAME'
DataSource = WebDataSource1
end
object edtCompanyAccountName: TWebDBEdit
......@@ -258,7 +258,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtaccountcompanyname'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'accountCompanyName'
DataField = 'SHORT_NAME'
DataSource = WebDataSource1
end
object edtInQuickBooks: TWebDBEdit
......@@ -282,7 +282,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtshipvia'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'shipVia'
DataField = 'staff_fields_ship_via'
DataSource = WebDataSource1
end
object edtQuantity: TWebDBEdit
......@@ -294,7 +294,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtquantity'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'Quantity'
DataField = 'staff_fields_quantity'
DataSource = WebDataSource1
end
object edtPrice: TWebDBEdit
......@@ -306,7 +306,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtprice'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'price'
DataField = 'staff_fields_price'
DataSource = WebDataSource1
end
object edtInvoiceTo: TWebDBEdit
......@@ -318,7 +318,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtinvoiceto'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'invoiceTo'
DataField = 'staff_fields_invoice_to'
DataSource = WebDataSource1
end
object edtShipTo: TWebDBEdit
......@@ -330,7 +330,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtshipto'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'shipTo'
DataField = 'staff_fields_ship_to'
DataSource = WebDataSource1
end
object edtPONumber: TWebDBEdit
......@@ -342,7 +342,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtponumber'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'poNumber'
DataField = 'staff_fields_po_number'
DataSource = WebDataSource1
end
object edtJobName: TWebDBEdit
......@@ -354,7 +354,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtjobname'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'jobName'
DataField = 'staff_fields_job_name'
DataSource = WebDataSource1
end
object edtQuickBooksItem: TWebDBEdit
......@@ -366,7 +366,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtquickbooksitem'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'quickBooksItem'
DataField = 'staff_fields_quickbooks_item'
DataSource = WebDataSource1
end
object edtArtLocation: TWebDBEdit
......@@ -378,7 +378,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtartlocation'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'artLocation'
DataField = 'staff_fields_art_location'
DataSource = WebDataSource1
end
object edtDimensionalLayout: TWebDBEdit
......@@ -390,7 +390,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtdimensionallayout'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'dimensionalLayout'
DataField = 'supplied_by_customer_dimension'
DataSource = WebDataSource1
end
object edtEmail: TWebDBEdit
......@@ -402,7 +402,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtemail'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'email'
DataField = 'supplied_by_customer_e_mail'
DataSource = WebDataSource1
end
object edtFTP: TWebDBEdit
......@@ -414,7 +414,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtftp'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'ftp'
DataField = 'supplied_by_customer_ftp'
DataSource = WebDataSource1
end
object edtOther: TWebDBEdit
......@@ -426,7 +426,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtother'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'other'
DataField = 'supplied_by_customer_other'
DataSource = WebDataSource1
end
object edtExistingCuttingDie: TWebDBEdit
......@@ -438,7 +438,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtexistingcuttingdie'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'existingCuttingDie'
DataField = 'supplied_by_customer_existing_'
DataSource = WebDataSource1
end
object edtRefArtPrintCard: TWebDBEdit
......@@ -450,7 +450,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtrefartprintcard'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'refArtPrintCard'
DataField = 'supplied_by_customer_ref_art_p'
DataSource = WebDataSource1
end
object edtRefArtAPDF: TWebDBEdit
......@@ -462,7 +462,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtrefartapdf'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'refArtA'
DataField = 'supplied_by_customer_ref_art_a'
DataSource = WebDataSource1
end
object edtCADFile: TWebDBEdit
......@@ -474,7 +474,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtcadfile'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'cadFile'
DataField = 'layout_cad_file'
DataSource = WebDataSource1
end
object edtAroundNo: TWebDBEdit
......@@ -486,7 +486,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtaroundno'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'aroundNo'
DataField = 'layout_around_no'
DataSource = WebDataSource1
end
object edtAcrossNo: TWebDBEdit
......@@ -498,7 +498,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtacrossno'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'acrossNo'
DataField = 'layout_accross_no'
DataSource = WebDataSource1
end
object edtDieCutNo: TWebDBEdit
......@@ -510,7 +510,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtdiecutno'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'dieCutNo'
DataField = 'layout_die_cut_no'
DataSource = WebDataSource1
end
object edtRSCD: TWebDBEdit
......@@ -522,7 +522,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtrscd'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'rscd'
DataField = 'layout_rsc_d'
DataSource = WebDataSource1
end
object edtRSCW: TWebDBEdit
......@@ -534,7 +534,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtrscw'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'rscw'
DataField = 'layout_rsc_w'
DataSource = WebDataSource1
end
object edtRSCL: TWebDBEdit
......@@ -546,7 +546,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtrscl'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'rscl'
DataField = 'layout_rsc_l'
DataSource = WebDataSource1
end
object edtCustomAdhesive: TWebDBEdit
......@@ -558,7 +558,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtcustomadhesive'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'customAdhesive'
DataField = 'mounting_custom_adhesive'
DataSource = WebDataSource1
end
object edtCustomBacking: TWebDBEdit
......@@ -570,7 +570,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtcustombacking'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'customBacking'
DataField = 'mounting_custom_backing'
DataSource = WebDataSource1
end
object edtStandardSetup: TWebDBEdit
......@@ -582,7 +582,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtstandardsetup'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'standardSetup'
DataField = 'mounting_standard_setup'
DataSource = WebDataSource1
end
object edtStripMount: TWebDBEdit
......@@ -594,7 +594,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtstripmount'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'stripMount'
DataField = 'mounting_strip_mount'
DataSource = WebDataSource1
end
object edtLoose: TWebDBEdit
......@@ -606,7 +606,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtloose'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'loose'
DataField = 'mounting_loose'
DataSource = WebDataSource1
end
object edtRSCStyle: TWebDBEdit
......@@ -618,7 +618,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtrscstyle'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'rscStyle'
DataField = 'layout_rsc_style'
DataSource = WebDataSource1
end
object edtProofOther: TWebDBEdit
......@@ -630,7 +630,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtproofother'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'proofOther'
DataField = 'proofing_other'
DataSource = WebDataSource1
end
object edtProofShipTo: TWebDBEdit
......@@ -642,7 +642,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtproofshipto'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'proofShipTo'
DataField = 'proofing_ship_to'
DataSource = WebDataSource1
end
object edtEmailAttn: TWebDBEdit
......@@ -654,7 +654,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtemailattn'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'emailAttn'
DataField = 'proofing_e_mail_attn'
DataSource = WebDataSource1
end
object edtProofEmail: TWebDBEdit
......@@ -666,7 +666,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtproofemail'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'proofEmail'
DataField = 'proofing_e_mail'
DataSource = WebDataSource1
end
object edtFaxAttn: TWebDBEdit
......@@ -678,7 +678,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtfaxattn'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'faxAttn'
DataField = 'proofing_fax_attn'
DataSource = WebDataSource1
end
object edtFax: TWebDBEdit
......@@ -690,7 +690,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtfax'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'fax'
DataField = 'proofing_fax'
DataSource = WebDataSource1
end
object edtClemson: TWebDBEdit
......@@ -702,7 +702,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtclemson'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'clemson'
DataField = 'colors_clemson'
DataSource = WebDataSource1
end
object edtCrossHairs: TWebDBEdit
......@@ -714,7 +714,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtcrosshairs'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'crossHairs'
DataField = 'colors_cross_hairs'
DataSource = WebDataSource1
end
object edtMachineIndent: TWebDBEdit
......@@ -726,7 +726,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtmachineindent'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'machineIdent'
DataField = 'colors_machine_ident'
DataSource = WebDataSource1
end
object edtCylinderSize: TWebDBEdit
......@@ -738,7 +738,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtcylindersize'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'cylinderSize'
DataField = 'colors_cylinder_size'
DataSource = WebDataSource1
end
object edtJobNumber: TWebDBEdit
......@@ -750,7 +750,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtjobnumber'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'jobNumber'
DataField = 'plates_job_number'
DataSource = WebDataSource1
end
object edtPlateMaterial: TWebDBEdit
......@@ -762,7 +762,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtplatematerial'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'plateMaterial'
DataField = 'plates_plate_material'
DataSource = WebDataSource1
end
object edtThickness: TWebDBEdit
......@@ -774,7 +774,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtThickness'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'thickness'
DataField = 'plates_thickness'
DataSource = WebDataSource1
end
object cbArtApprovedAsIs: TWebDBCheckBox
......@@ -787,7 +787,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'cbartapprovedasis'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'artApprovedAsIs'
DataField = 'proofing_art_approved_as_is'
DataSource = WebDataSource1
end
object cbPDFFile: TWebDBCheckBox
......@@ -800,7 +800,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'cbpdffile'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'pdfFile'
DataField = 'proofing_pdf_file'
DataSource = WebDataSource1
end
object cbWideFormat: TWebDBCheckBox
......@@ -813,7 +813,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'cbwideformat'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'wideFormat'
DataField = 'proofing_wide_format'
DataSource = WebDataSource1
end
object cbPrintCard: TWebDBCheckBox
......@@ -826,7 +826,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'cbprintcard'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'printCard'
DataField = 'proofing_print_card'
DataSource = WebDataSource1
end
object cbFullSizePanel: TWebDBCheckBox
......@@ -839,7 +839,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'cbfullsizepanel'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'fullSizePanel'
DataField = 'proofing_full_size_panel'
DataSource = WebDataSource1
end
object cbStripMount: TWebDBCheckBox
......@@ -863,7 +863,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'cbfullmount'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'fullMount'
DataField = 'mounting_full_mount'
DataSource = WebDataSource1
end
object cbStickyBak: TWebDBCheckBox
......@@ -876,7 +876,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'cbstickybak'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'stickyBak'
DataField = 'mounting_sticky_bak'
DataSource = WebDataSource1
end
object WebDBCheckBox9: TWebDBCheckBox
......@@ -901,7 +901,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'cbexcaliburdie'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'excaliburDie'
DataField = 'layout_excalibur_die'
DataSource = WebDataSource1
end
object cbDiskorCD: TWebDBCheckBox
......@@ -914,7 +914,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'cbdiskorcd'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'diskOrCD'
DataField = 'supplied_by_customer_disk_or_cd'
DataSource = WebDataSource1
end
object cbSampleCarton: TWebDBCheckBox
......@@ -927,7 +927,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'cbsimpleCarton'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'sampleCarton'
DataField = 'supplied_by_customer_sample_ca'
DataSource = WebDataSource1
end
object cbPlate: TWebDBCheckBox
......@@ -940,7 +940,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'cbplates'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'plates'
DataField = 'supplied_by_customer_plates'
DataSource = WebDataSource1
end
object cbColorCopy: TWebDBCheckBox
......@@ -953,7 +953,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'cbcolorcopy'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'colorCopy'
DataField = 'supplied_by_customer_color_copy'
DataSource = WebDataSource1
end
object cbBWCopy: TWebDBCheckBox
......@@ -966,7 +966,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'cbbwcopy'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'bwCopy'
DataField = 'supplied_by_customer_b_w_copy'
DataSource = WebDataSource1
end
object edtSpecialInstructions: TWebDBEdit
......@@ -978,7 +978,7 @@ object FOrderEntry: TFOrderEntry
ElementID = 'edtspecialinstructions'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'specialInstructions'
DataField = 'general_special_instructions'
DataSource = WebDataSource1
end
object btnConfirm: TWebButton
......@@ -1008,206 +1008,272 @@ object FOrderEntry: TFOrderEntry
Connection = DMConnection.ApiConnection
Left = 324
Top = 104
object XDataWebDataSet1Quantity: TStringField
FieldName = 'Quantity'
object XDataWebDataSet1ORDER_ID: TIntegerField
FieldName = 'ORDER_ID'
end
object XDataWebDataSet1accountCompanyName: TStringField
FieldName = 'accountCompanyName'
object XDataWebDataSet1COMPANY_ID: TIntegerField
FieldName = 'COMPANY_ID'
end
object XDataWebDataSet1acrossNo: TStringField
FieldName = 'acrossNo'
object XDataWebDataSet1USER_ID: TIntegerField
FieldName = 'USER_ID'
end
object XDataWebDataSet1approvedDate: TStringField
FieldName = 'approvedDate'
object XDataWebDataSet1ORDER_DATE: TDateField
FieldName = 'ORDER_DATE'
end
object XDataWebDataSet1aroundNo: TStringField
FieldName = 'aroundNo'
object XDataWebDataSet1START_DATE: TDateField
FieldName = 'START_DATE'
end
object XDataWebDataSet1artApprovedAsIs: TBooleanField
FieldName = 'artApprovedAsIs'
object XDataWebDataSet1END_DATE: TDateField
FieldName = 'END_DATE'
end
object XDataWebDataSet1artDue: TStringField
FieldName = 'artDue'
object XDataWebDataSet1ORDER_STATUS: TStringField
FieldName = 'ORDER_STATUS'
end
object XDataWebDataSet1artLocation: TStringField
FieldName = 'artLocation'
object XDataWebDataSet1SCHED_JSON: TStringField
FieldName = 'SCHED_JSON'
end
object XDataWebDataSet1bwCopy: TBooleanField
FieldName = 'bwCopy'
object XDataWebDataSet1NAME: TStringField
FieldName = 'NAME'
end
object XDataWebDataSet1cadFile: TStringField
FieldName = 'cadFile'
object XDataWebDataSet1SHORT_NAME: TStringField
FieldName = 'SHORT_NAME'
end
object XDataWebDataSet1clemson: TStringField
FieldName = 'clemson'
object XDataWebDataSet1staff_fields_ship_via: TStringField
FieldName = 'staff_fields_ship_via'
end
object XDataWebDataSet1companyName: TStringField
FieldName = 'companyName'
object XDataWebDataSet1staff_fields_price: TStringField
FieldName = 'staff_fields_price'
end
object XDataWebDataSet1crossHairs: TIntegerField
FieldName = 'crossHairs'
object XDataWebDataSet1staff_fields_invoice_to: TStringField
FieldName = 'staff_fields_invoice_to'
end
object XDataWebDataSet1customAdhesive: TStringField
FieldName = 'customAdhesive'
object XDataWebDataSet1staff_fields_invoice_attention: TStringField
FieldName = 'staff_fields_invoice_attention'
end
object XDataWebDataSet1customBacking: TStringField
FieldName = 'customBacking'
object XDataWebDataSet1staff_fields_ship_to: TStringField
FieldName = 'staff_fields_ship_to'
end
object XDataWebDataSet1cylinderSize: TStringField
FieldName = 'cylinderSize'
object XDataWebDataSet1staff_fields_ship_attention: TStringField
FieldName = 'staff_fields_ship_attention'
end
object XDataWebDataSet1dieCutNo: TStringField
FieldName = 'dieCutNo'
object XDataWebDataSet1staff_fields_po_number: TStringField
FieldName = 'staff_fields_po_number'
end
object XDataWebDataSet1dimensionalLayout: TStringField
FieldName = 'dimensionalLayout'
object XDataWebDataSet1staff_fields_job_name: TStringField
FieldName = 'staff_fields_job_name'
end
object XDataWebDataSet1diskOrCD: TBooleanField
FieldName = 'diskOrCD'
object XDataWebDataSet1plates_job_number: TStringField
FieldName = 'plates_job_number'
end
object XDataWebDataSet1email: TStringField
FieldName = 'email'
object XDataWebDataSet1supplied_by_customer_b_w_copy: TBooleanField
FieldName = 'supplied_by_customer_b_w_copy'
end
object XDataWebDataSet1emailAttn: TStringField
FieldName = 'emailAttn'
object XDataWebDataSet1supplied_by_customer_dimension: TStringField
FieldName = 'supplied_by_customer_dimension'
end
object XDataWebDataSet1excaliburDie: TBooleanField
FieldName = 'excaliburDie'
object XDataWebDataSet1supplied_by_customer_e_mail: TStringField
FieldName = 'supplied_by_customer_e_mail'
end
object XDataWebDataSet1existingCuttingDie: TStringField
FieldName = 'existingCuttingDie'
object XDataWebDataSet1supplied_by_customer_ftp: TStringField
FieldName = 'supplied_by_customer_ftp'
end
object XDataWebDataSet1fax: TStringField
FieldName = 'fax'
object XDataWebDataSet1supplied_by_customer_other: TStringField
FieldName = 'supplied_by_customer_other'
end
object XDataWebDataSet1faxAttn: TStringField
FieldName = 'faxAttn'
object XDataWebDataSet1supplied_by_customer_existing_: TStringField
FieldName = 'supplied_by_customer_existing_'
end
object XDataWebDataSet1ftp: TStringField
FieldName = 'ftp'
object XDataWebDataSet1supplied_by_customer_ref_art_p: TStringField
FieldName = 'supplied_by_customer_ref_art_p'
end
object XDataWebDataSet1fullMount: TBooleanField
FieldName = 'fullMount'
object XDataWebDataSet1supplied_by_customer_ref_art_a: TStringField
FieldName = 'supplied_by_customer_ref_art_a'
end
object XDataWebDataSet1fullSizePanel: TBooleanField
FieldName = 'fullSizePanel'
object XDataWebDataSet1cut_die_cutdier: TStringField
FieldName = 'cut_die_cutdier'
end
object XDataWebDataSet1inQuickBooks: TStringField
FieldName = 'inQuickBooks'
object XDataWebDataSet1cut_die_cutdieb: TStringField
FieldName = 'cut_die_cutdieb'
end
object XDataWebDataSet1jobName: TStringField
FieldName = 'jobName'
object XDataWebDataSet1cut_die_cutdief: TStringField
FieldName = 'cut_die_cutdief'
end
object XDataWebDataSet1jobNumber: TStringField
FieldName = 'jobNumber'
object XDataWebDataSet1cut_die_cutdierkr: TStringField
FieldName = 'cut_die_cutdierkr'
end
object XDataWebDataSet1loose: TStringField
FieldName = 'loose'
object XDataWebDataSet1cut_die_cutdiefkr: TStringField
FieldName = 'cut_die_cutdiefkr'
end
object XDataWebDataSet1machineIdent: TStringField
FieldName = 'machineIdent'
object XDataWebDataSet1cut_die_cad_file: TStringField
FieldName = 'cut_die_cad_file'
end
object XDataWebDataSet1mountDue: TStringField
FieldName = 'mountDue'
object XDataWebDataSet1cut_die_attached: TStringField
FieldName = 'cut_die_attached'
end
object XDataWebDataSet1orderDate: TStringField
FieldName = 'orderDate'
object XDataWebDataSet1cut_die_boxpol250: TStringField
FieldName = 'cut_die_boxpol250'
end
object XDataWebDataSet1other: TStringField
FieldName = 'other'
object XDataWebDataSet1cut_die_boxpol155: TStringField
FieldName = 'cut_die_boxpol155'
end
object XDataWebDataSet1pdfFile: TBooleanField
FieldName = 'pdfFile'
object XDataWebDataSet1cut_die_boxpol125: TStringField
FieldName = 'cut_die_boxpol125'
end
object XDataWebDataSet1plateDue: TStringField
FieldName = 'plateDue'
object XDataWebDataSet1cut_die_brub: TStringField
FieldName = 'cut_die_brub'
end
object XDataWebDataSet1plateMaterial: TStringField
FieldName = 'plateMaterial'
object XDataWebDataSet1proofing_fax: TStringField
FieldName = 'proofing_fax'
end
object XDataWebDataSet1plates: TBooleanField
FieldName = 'plates'
object XDataWebDataSet1proofing_fax_attn: TStringField
FieldName = 'proofing_fax_attn'
end
object XDataWebDataSet1printCard: TBooleanField
FieldName = 'printCard'
object XDataWebDataSet1proofing_e_mail: TStringField
FieldName = 'proofing_e_mail'
end
object XDataWebDataSet1proofDate: TStringField
FieldName = 'proofDate'
object XDataWebDataSet1proofing_ship_to: TStringField
FieldName = 'proofing_ship_to'
end
object XDataWebDataSet1proofEmail: TStringField
FieldName = 'proofEmail'
object XDataWebDataSet1proofing_other: TStringField
FieldName = 'proofing_other'
end
object XDataWebDataSet1proofOther: TStringField
FieldName = 'proofOther'
object XDataWebDataSet1proofing_changes_required: TStringField
FieldName = 'proofing_changes_required'
end
object XDataWebDataSet1proofShipTo: TStringField
FieldName = 'proofShipTo'
object XDataWebDataSet1proofing_changes_date: TDateField
FieldName = 'proofing_changes_date'
end
object XDataWebDataSet1quickBooksItem: TStringField
FieldName = 'quickBooksItem'
object XDataWebDataSet1layout_rsc_l: TStringField
FieldName = 'layout_rsc_l'
end
object XDataWebDataSet1refArtPrintCard: TStringField
FieldName = 'refArtPrintCard'
object XDataWebDataSet1layout_rcs_w: TStringField
FieldName = 'layout_rcs_w'
end
object XDataWebDataSet1rscStyle: TStringField
FieldName = 'rscStyle'
object XDataWebDataSet1layout_rcs_d: TStringField
FieldName = 'layout_rcs_d'
end
object XDataWebDataSet1rscd: TStringField
FieldName = 'rscd'
object XDataWebDataSet1layout_die_cut_no: TStringField
FieldName = 'layout_die_cut_no'
end
object XDataWebDataSet1rescl: TStringField
FieldName = 'rescl'
object XDataWebDataSet1layout_accross_no: TStringField
FieldName = 'layout_accross_no'
end
object XDataWebDataSet1rscw: TStringField
FieldName = 'rscw'
object XDataWebDataSet1layout_around_no: TStringField
FieldName = 'layout_around_no'
end
object XDataWebDataSet1sampleCarton: TBooleanField
FieldName = 'sampleCarton'
object XDataWebDataSet1layout_cad_file: TStringField
FieldName = 'layout_cad_file'
end
object XDataWebDataSet1shipDate: TStringField
FieldName = 'shipDate'
object XDataWebDataSet1mounting_standard_setup: TStringField
FieldName = 'mounting_standard_setup'
end
object XDataWebDataSet1shipTo: TStringField
FieldName = 'shipTo'
object XDataWebDataSet1mounting_custom_backing: TStringField
FieldName = 'mounting_custom_backing'
end
object XDataWebDataSet1shipVia: TStringField
FieldName = 'shipVia'
object XDataWebDataSet1mounting_custom_adhesive: TStringField
FieldName = 'mounting_custom_adhesive'
end
object XDataWebDataSet1specialInstructions: TStringField
FieldName = 'specialInstructions'
object XDataWebDataSet1colors_cylinder_size: TStringField
FieldName = 'colors_cylinder_size'
end
object XDataWebDataSet1standardSetup: TStringField
FieldName = 'standardSetup'
object XDataWebDataSet1colors_cross_hairs: TStringField
FieldName = 'colors_cross_hairs'
end
object XDataWebDataSet1stickyBak: TBooleanField
FieldName = 'stickyBak'
object XDataWebDataSet1colors_machine_ident: TStringField
FieldName = 'colors_machine_ident'
end
object XDataWebDataSet1stripMount: TStringField
FieldName = 'stripMount'
object XDataWebDataSet1colors_clemson: TStringField
FieldName = 'colors_clemson'
end
object XDataWebDataSet1thickness: TStringField
FieldName = 'thickness'
object XDataWebDataSet1plates_thickness: TStringField
FieldName = 'plates_thickness'
end
object XDataWebDataSet1wideFormat: TStringField
FieldName = 'wideFormat'
object XDataWebDataSet1plates_plate_material: TStringField
FieldName = 'plates_plate_material'
end
object XDataWebDataSet1price: TStringField
FieldName = 'price'
object XDataWebDataSet1general_special_instructions: TStringField
FieldName = 'general_special_instructions'
end
object XDataWebDataSet1invoiceTo: TStringField
FieldName = 'invoiceTo'
object XDataWebDataSet1colors_colors: TStringField
FieldName = 'colors_colors'
end
object XDataWebDataSet1colorCopy: TBooleanField
FieldName = 'colorCopy'
object XDataWebDataSet1staff_fields_quickbooks_item: TStringField
FieldName = 'staff_fields_quickbooks_item'
end
object XDataWebDataSet1refArtAPDF: TStringField
FieldName = 'refArtAPDF'
object XDataWebDataSet1staff_fields_quantity: TStringField
FieldName = 'staff_fields_quantity'
end
object XDataWebDataSet1poNumber: TStringField
FieldName = 'poNumber'
object XDataWebDataSet1layout_rsc_style: TStringField
FieldName = 'layout_rsc_style'
end
object XDataWebDataSet1colors: TStringField
FieldName = 'colors'
object XDataWebDataSet1staff_fields_art_location: TStringField
FieldName = 'staff_fields_art_location'
end
object XDataWebDataSet1supplied_by_customer_color_copy: TBooleanField
FieldName = 'supplied_by_customer_color_copy'
end
object XDataWebDataSet1supplied_by_customer_plates: TBooleanField
FieldName = 'supplied_by_customer_plates'
end
object XDataWebDataSet1supplied_by_customer_sample_ca: TBooleanField
FieldName = 'supplied_by_customer_sample_ca'
end
object XDataWebDataSet1supplied_by_customer_disk_or_cd: TBooleanField
FieldName = 'supplied_by_customer_disk_or_cd'
end
object XDataWebDataSet1mounting_loose: TStringField
FieldName = 'mounting_loose'
end
object XDataWebDataSet1mounting_sticky_bak: TBooleanField
FieldName = 'mounting_sticky_bak'
end
object XDataWebDataSet1mounting_full_mount: TBooleanField
FieldName = 'mounting_full_mount'
end
object XDataWebDataSet1mounting_strip_mount: TStringField
FieldName = 'mounting_strip_mount'
end
object XDataWebDataSet1layout_excalibur_die: TBooleanField
FieldName = 'layout_excalibur_die'
end
object XDataWebDataSet1proofing_full_size_panel: TBooleanField
FieldName = 'proofing_full_size_panel'
end
object XDataWebDataSet1proofing_print_card: TBooleanField
FieldName = 'proofing_print_card'
end
object XDataWebDataSet1proofing_wide_format: TBooleanField
FieldName = 'proofing_wide_format'
end
object XDataWebDataSet1proofing_pdf_file: TBooleanField
FieldName = 'proofing_pdf_file'
end
object XDataWebDataSet1proofing_art_approved_as_is: TBooleanField
FieldName = 'proofing_art_approved_as_is'
end
object XDataWebDataSet1proofing_e_mail_attn: TStringField
FieldName = 'proofing_e_mail_attn'
end
object XDataWebDataSet1proofing_approved_date: TStringField
FieldName = 'proofing_approved_date'
end
object XDataWebDataSet1staff_fields_order_date: TStringField
FieldName = 'staff_fields_order_date'
end
object XDataWebDataSet1staff_fields_proof_date: TStringField
FieldName = 'staff_fields_proof_date'
end
object XDataWebDataSet1staff_fields_ship_date: TStringField
FieldName = 'staff_fields_ship_date'
end
object XDataWebDataSet1staff_fields_art_due: TStringField
FieldName = 'staff_fields_art_due'
end
object XDataWebDataSet1staff_fields_plate_due: TStringField
FieldName = 'staff_fields_plate_due'
end
object XDataWebDataSet1staff_fields_mount_due: TStringField
FieldName = 'staff_fields_mount_due'
end
end
object WebDataSource1: TWebDataSource
......
......@@ -96,74 +96,96 @@ type
tmrScrollTop: TWebTimer;
XDataWebDataSet1: TXDataWebDataSet;
WebDataSource1: TWebDataSource;
XDataWebDataSet1Quantity: TStringField;
XDataWebDataSet1accountCompanyName: TStringField;
XDataWebDataSet1acrossNo: TStringField;
XDataWebDataSet1approvedDate: TStringField;
XDataWebDataSet1aroundNo: TStringField;
XDataWebDataSet1artApprovedAsIs: TBooleanField;
XDataWebDataSet1artDue: TStringField;
XDataWebDataSet1artLocation: TStringField;
XDataWebDataSet1bwCopy: TBooleanField;
XDataWebDataSet1cadFile: TStringField;
XDataWebDataSet1clemson: TStringField;
XDataWebDataSet1companyName: TStringField;
XDataWebDataSet1crossHairs: TIntegerField;
XDataWebDataSet1customAdhesive: TStringField;
XDataWebDataSet1customBacking: TStringField;
XDataWebDataSet1cylinderSize: TStringField;
XDataWebDataSet1dieCutNo: TStringField;
XDataWebDataSet1dimensionalLayout: TStringField;
XDataWebDataSet1diskOrCD: TBooleanField;
XDataWebDataSet1email: TStringField;
XDataWebDataSet1emailAttn: TStringField;
XDataWebDataSet1excaliburDie: TBooleanField;
XDataWebDataSet1existingCuttingDie: TStringField;
XDataWebDataSet1fax: TStringField;
XDataWebDataSet1faxAttn: TStringField;
XDataWebDataSet1ftp: TStringField;
XDataWebDataSet1fullMount: TBooleanField;
XDataWebDataSet1fullSizePanel: TBooleanField;
XDataWebDataSet1inQuickBooks: TStringField;
XDataWebDataSet1jobName: TStringField;
XDataWebDataSet1jobNumber: TStringField;
XDataWebDataSet1loose: TStringField;
XDataWebDataSet1machineIdent: TStringField;
XDataWebDataSet1mountDue: TStringField;
XDataWebDataSet1orderDate: TStringField;
XDataWebDataSet1other: TStringField;
XDataWebDataSet1pdfFile: TBooleanField;
XDataWebDataSet1plateDue: TStringField;
XDataWebDataSet1plateMaterial: TStringField;
XDataWebDataSet1plates: TBooleanField;
XDataWebDataSet1printCard: TBooleanField;
XDataWebDataSet1proofDate: TStringField;
XDataWebDataSet1proofEmail: TStringField;
XDataWebDataSet1proofOther: TStringField;
XDataWebDataSet1proofShipTo: TStringField;
XDataWebDataSet1quickBooksItem: TStringField;
XDataWebDataSet1refArtPrintCard: TStringField;
XDataWebDataSet1rscStyle: TStringField;
XDataWebDataSet1rscd: TStringField;
XDataWebDataSet1rescl: TStringField;
XDataWebDataSet1rscw: TStringField;
XDataWebDataSet1sampleCarton: TBooleanField;
XDataWebDataSet1shipDate: TStringField;
XDataWebDataSet1shipTo: TStringField;
XDataWebDataSet1shipVia: TStringField;
XDataWebDataSet1specialInstructions: TStringField;
XDataWebDataSet1standardSetup: TStringField;
XDataWebDataSet1stickyBak: TBooleanField;
XDataWebDataSet1stripMount: TStringField;
XDataWebDataSet1thickness: TStringField;
XDataWebDataSet1wideFormat: TStringField;
XDataWebDataSet1price: TStringField;
XDataWebDataSet1invoiceTo: TStringField;
XDataWebDataSet1colorCopy: TBooleanField;
XDataWebDataSet1refArtAPDF: TStringField;
XDataWebDataSet1poNumber: TStringField;
XDataWebDataSet1colors: TStringField;
btnConfirm: TWebButton;
XDataWebDataSet1ORDER_ID: TIntegerField;
XDataWebDataSet1COMPANY_ID: TIntegerField;
XDataWebDataSet1USER_ID: TIntegerField;
XDataWebDataSet1ORDER_STATUS: TStringField;
XDataWebDataSet1SCHED_JSON: TStringField;
XDataWebDataSet1staff_fields_ship_via: TStringField;
XDataWebDataSet1staff_fields_price: TStringField;
XDataWebDataSet1staff_fields_invoice_to: TStringField;
XDataWebDataSet1staff_fields_invoice_attention: TStringField;
XDataWebDataSet1staff_fields_ship_to: TStringField;
XDataWebDataSet1staff_fields_ship_attention: TStringField;
XDataWebDataSet1staff_fields_po_number: TStringField;
XDataWebDataSet1staff_fields_job_name: TStringField;
XDataWebDataSet1ORDER_DATE: TDateField;
XDataWebDataSet1START_DATE: TDateField;
XDataWebDataSet1END_DATE: TDateField;
XDataWebDataSet1plates_job_number: TStringField;
XDataWebDataSet1supplied_by_customer_dimension: TStringField;
XDataWebDataSet1supplied_by_customer_e_mail: TStringField;
XDataWebDataSet1supplied_by_customer_ftp: TStringField;
XDataWebDataSet1supplied_by_customer_other: TStringField;
XDataWebDataSet1supplied_by_customer_existing_: TStringField;
XDataWebDataSet1supplied_by_customer_ref_art_p: TStringField;
XDataWebDataSet1supplied_by_customer_ref_art_a: TStringField;
XDataWebDataSet1cut_die_cutdier: TStringField;
XDataWebDataSet1cut_die_cutdieb: TStringField;
XDataWebDataSet1cut_die_cutdief: TStringField;
XDataWebDataSet1cut_die_cutdierkr: TStringField;
XDataWebDataSet1cut_die_cutdiefkr: TStringField;
XDataWebDataSet1cut_die_cad_file: TStringField;
XDataWebDataSet1cut_die_attached: TStringField;
XDataWebDataSet1cut_die_boxpol250: TStringField;
XDataWebDataSet1cut_die_boxpol155: TStringField;
XDataWebDataSet1cut_die_boxpol125: TStringField;
XDataWebDataSet1cut_die_brub: TStringField;
XDataWebDataSet1proofing_fax: TStringField;
XDataWebDataSet1proofing_fax_attn: TStringField;
XDataWebDataSet1proofing_e_mail: TStringField;
XDataWebDataSet1proofing_ship_to: TStringField;
XDataWebDataSet1proofing_other: TStringField;
XDataWebDataSet1proofing_changes_required: TStringField;
XDataWebDataSet1proofing_changes_date: TDateField;
XDataWebDataSet1layout_rsc_l: TStringField;
XDataWebDataSet1layout_rcs_w: TStringField;
XDataWebDataSet1layout_rcs_d: TStringField;
XDataWebDataSet1layout_die_cut_no: TStringField;
XDataWebDataSet1layout_accross_no: TStringField;
XDataWebDataSet1layout_around_no: TStringField;
XDataWebDataSet1layout_cad_file: TStringField;
XDataWebDataSet1colors_cylinder_size: TStringField;
XDataWebDataSet1colors_machine_ident: TStringField;
XDataWebDataSet1mounting_standard_setup: TStringField;
XDataWebDataSet1mounting_custom_backing: TStringField;
XDataWebDataSet1mounting_custom_adhesive: TStringField;
XDataWebDataSet1colors_cross_hairs: TStringField;
XDataWebDataSet1colors_clemson: TStringField;
XDataWebDataSet1plates_thickness: TStringField;
XDataWebDataSet1plates_plate_material: TStringField;
XDataWebDataSet1general_special_instructions: TStringField;
XDataWebDataSet1colors_colors: TStringField;
XDataWebDataSet1staff_fields_quickbooks_item: TStringField;
XDataWebDataSet1staff_fields_quantity: TStringField;
XDataWebDataSet1layout_rsc_style: TStringField;
XDataWebDataSet1staff_fields_art_location: TStringField;
XDataWebDataSet1NAME: TStringField;
XDataWebDataSet1SHORT_NAME: TStringField;
XDataWebDataSet1supplied_by_customer_b_w_copy: TBooleanField;
XDataWebDataSet1supplied_by_customer_color_copy: TBooleanField;
XDataWebDataSet1supplied_by_customer_plates: TBooleanField;
XDataWebDataSet1supplied_by_customer_sample_ca: TBooleanField;
XDataWebDataSet1supplied_by_customer_disk_or_cd: TBooleanField;
XDataWebDataSet1mounting_loose: TStringField;
XDataWebDataSet1mounting_sticky_bak: TBooleanField;
XDataWebDataSet1mounting_full_mount: TBooleanField;
XDataWebDataSet1mounting_strip_mount: TStringField;
XDataWebDataSet1layout_excalibur_die: TBooleanField;
XDataWebDataSet1proofing_full_size_panel: TBooleanField;
XDataWebDataSet1proofing_print_card: TBooleanField;
XDataWebDataSet1proofing_wide_format: TBooleanField;
XDataWebDataSet1proofing_pdf_file: TBooleanField;
XDataWebDataSet1proofing_art_approved_as_is: TBooleanField;
XDataWebDataSet1proofing_e_mail_attn: TStringField;
XDataWebDataSet1proofing_approved_date: TStringField;
XDataWebDataSet1staff_fields_order_date: TStringField;
XDataWebDataSet1staff_fields_proof_date: TStringField;
XDataWebDataSet1staff_fields_ship_date: TStringField;
XDataWebDataSet1staff_fields_art_due: TStringField;
XDataWebDataSet1staff_fields_plate_due: TStringField;
XDataWebDataSet1staff_fields_mount_due: TStringField;
procedure WebFormCreate(Sender: TObject);
procedure HideNotification();
procedure ShowNotification(Notification: string);
......@@ -195,7 +217,7 @@ uses
procedure TFOrderEntry.btnConfirmClick(Sender: TObject);
var
colorList: TList<TJSONObject>;
colorList: TJSONArray;
container: TJSElement;
colorCollection: TJSHTMLCollection;
color: TJSHTMLElement;
......@@ -206,7 +228,7 @@ var
header, value: string;
begin
//TJSONObject.Create;
colorList := TList<TJSONObject>.Create;
colorList := TJSONArray.Create;
container := document.getElementById('additionalFields');
colorCollection := container.children;
for I := 0 to colorCollection.length - 1 do
......@@ -220,37 +242,9 @@ begin
value := TJSHTMLInputElement(TJSHTMLElement(itemList[J]).childNodes[1]).value;
colorJSON.AddPair(header, value);
end;
colorList.Add(colorJson);
colorList.Add(colorJSON);
end;
for colorJSON in colorList do
begin
console.log(colorJSON.ToString); // Log each JSON object
end;
//XDataWebDataSet1.Insert;
//XDataWebDataSet1colors.AsString := ' ';
//XDataWebDataSet1.Post;
{asm
const container = document.getElementById('additionalFields');
const rows = container.children;
const inputData = [];
for (let i = 0; i < rows.length; i++) {
const inputs = rows[i].getElementsByTagName('input');
const rowData = {};
{for (let j = 0; j < inputs.length; j++) {
const label = inputs[j].previousElementSibling.textContent.replace(':', '').trim();
rowData[label] = inputs[j].value;
}
{inputData.push(rowData);
}
{console.log(inputData);
end;}
console.log(colorList.ToString);
end;
class function TFOrderEntry.CreateForm(AElementID, orderInfo: string): TWebForm;
......@@ -355,7 +349,8 @@ begin
XDataWebDataSet1.Close;
XDataWebDataSet1.SetJsonData(order);
XDataWebDataSet1.Open;
colorObject := TJSObject(TJSJSON.parse(XDataWebDataSet1colors.Value));
colorObject := TJSObject(TJSJSON.parse(XDataWebDataSet1colors_colors.Value));
console.log(order);
colorList := TJSArray(colorObject['items']);
colorLength := colorList.length;
for i := 0 to colorLength - 1 do
......@@ -363,20 +358,20 @@ begin
color := TJSObject(colorList[i]);
addColorRow(String(color['#']), string(color['Color']), string(color['LPI']), string(color['Size']));
end;
if not (XDataWebDataSet1orderDate.AsString = '') then
dtpOrderDate.Date := StrToDateTime(XDataWebDataSet1orderDate.Value);
if not (XDataWebDataSet1proofDate.AsString = '') then
dtpProofDate.Date := StrToDateTime(XDataWebDataSet1proofDate.Value);
if not (XDataWebDataSet1shipDate.AsString = '') then
dtpShipDate.Date := StrToDateTime(XDataWebDataSet1shipDate.Value);
if not (XDataWebDataSet1artDue.AsString = '') then
dtpArtDue.Date := StrToDateTime(XDataWebDataSet1artDue.Value);
if not (XDataWebDataSet1plateDue.AsString = '') then
dtpPlateDue.Date := StrToDateTime(XDataWebDataSet1plateDue.Value);
if not (XDataWebDataSet1mountDue.AsString = '') then
dtpMountDue.Date := StrToDateTime(XDataWebDataSet1mountDue.Value);
if not (XDataWebDataSet1approvedDate.AsString = '') then
dtpApprovedDate.Date := StrToDateTime(XDataWebDataSet1approvedDate.Value)
if not (XDataWebDataSet1staff_fields_order_date.AsString = '') then
dtpOrderDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_order_date.Value);
if not (XDataWebDataSet1staff_fields_proof_date.AsString = '') then
dtpProofDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_proof_date.AsString);
if not (XDataWebDataSet1staff_fields_ship_date.AsString = '') then
dtpShipDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_ship_date.AsString);
if not (XDataWebDataSet1staff_fields_art_due.AsString = '') then
dtpArtDue.Date := StrToDateTime(XDataWebDataSet1staff_fields_art_due.AsString);
if not (XDataWebDataSet1staff_fields_plate_due.AsString = '') then
dtpPlateDue.Date := StrToDateTime(XDataWebDataSet1staff_fields_plate_due.AsString);
if not (XDataWebDataSet1staff_fields_mount_due.AsString = '') then
dtpMountDue.Date := StrToDateTime(XDataWebDataSet1staff_fields_mount_due.AsString);
if not (XDataWebDataSet1proofing_approved_date.AsString = '') then
dtpApprovedDate.Date := StrToDateTime(XDataWebDataSet1proofing_approved_date.AsString)
else
dtpApprovedDate.Date := Now;
end;
......
......@@ -33,4 +33,347 @@ object FDatabaseModule: TFDatabaseModule
Left = 433
Top = 144
end
object uqOrders: TUniQuery
Connection = ucKG
SQL.Strings = (
'select * from corrugated_plate_orders')
Left = 527
Top = 120
object uqOrdersORDER_ID: TIntegerField
FieldName = 'ORDER_ID'
end
object uqOrdersCOMPANY_ID: TIntegerField
FieldName = 'COMPANY_ID'
Required = True
end
object uqOrdersUSER_ID: TIntegerField
FieldName = 'USER_ID'
Required = True
end
object uqOrdersORDER_DATE: TDateTimeField
FieldName = 'ORDER_DATE'
end
object uqOrdersSTART_DATE: TDateField
FieldName = 'START_DATE'
end
object uqOrdersEND_DATE: TDateField
FieldName = 'END_DATE'
end
object uqOrdersORDER_STATUS: TStringField
FieldName = 'ORDER_STATUS'
Size = 10
end
object uqOrdersSCHED_JSON: TStringField
FieldName = 'SCHED_JSON'
Size = 4096
end
object uqOrdersstaff_fields_order_date: TDateField
FieldName = 'staff_fields_order_date'
end
object uqOrdersstaff_fields_proof_date: TDateField
FieldName = 'staff_fields_proof_date'
end
object uqOrdersstaff_fields_ship_date: TDateField
FieldName = 'staff_fields_ship_date'
end
object uqOrdersstaff_fields_ship_via: TStringField
FieldName = 'staff_fields_ship_via'
Size = 45
end
object uqOrdersstaff_fields_price: TStringField
FieldName = 'staff_fields_price'
Size = 10
end
object uqOrdersstaff_fields_invoice_to: TStringField
FieldName = 'staff_fields_invoice_to'
Size = 128
end
object uqOrdersstaff_fields_invoice_attention: TStringField
FieldName = 'staff_fields_invoice_attention'
Size = 256
end
object uqOrdersstaff_fields_ship_to: TStringField
FieldName = 'staff_fields_ship_to'
Size = 128
end
object uqOrdersstaff_fields_ship_attention: TStringField
FieldName = 'staff_fields_ship_attention'
Size = 256
end
object uqOrdersstaff_fields_po_number: TStringField
FieldName = 'staff_fields_po_number'
Size = 16
end
object uqOrdersstaff_fields_job_name: TStringField
FieldName = 'staff_fields_job_name'
Size = 45
end
object uqOrdersstaff_fields_art_due: TDateField
FieldName = 'staff_fields_art_due'
end
object uqOrdersstaff_fields_plate_due: TDateField
FieldName = 'staff_fields_plate_due'
end
object uqOrdersstaff_fields_mount_due: TDateField
FieldName = 'staff_fields_mount_due'
end
object uqOrdersplates_job_number: TStringField
FieldName = 'plates_job_number'
Size = 16
end
object uqOrderssupplied_by_customer_b_w_copy: TStringField
FieldName = 'supplied_by_customer_b_w_copy'
Size = 1
end
object uqOrderssupplied_by_customer_color_copy: TStringField
FieldName = 'supplied_by_customer_color_copy'
Size = 1
end
object uqOrderssupplied_by_customer_plates: TStringField
FieldName = 'supplied_by_customer_plates'
Size = 1
end
object uqOrderssupplied_by_customer_sample_ca: TStringField
FieldName = 'supplied_by_customer_sample_ca'
Size = 1
end
object uqOrderssupplied_by_customer_dimension: TStringField
FieldName = 'supplied_by_customer_dimension'
Size = 64
end
object uqOrderssupplied_by_customer_disk_or_cd: TStringField
FieldName = 'supplied_by_customer_disk_or_cd'
Size = 1
end
object uqOrderssupplied_by_customer_e_mail: TStringField
FieldName = 'supplied_by_customer_e_mail'
Size = 256
end
object uqOrderssupplied_by_customer_ftp: TStringField
FieldName = 'supplied_by_customer_ftp'
Size = 256
end
object uqOrderssupplied_by_customer_other: TStringField
FieldName = 'supplied_by_customer_other'
Size = 96
end
object uqOrderssupplied_by_customer_existing_: TStringField
FieldName = 'supplied_by_customer_existing_'
Size = 16
end
object uqOrderssupplied_by_customer_ref_art_p: TStringField
FieldName = 'supplied_by_customer_ref_art_p'
Size = 256
end
object uqOrderssupplied_by_customer_ref_art_a: TStringField
FieldName = 'supplied_by_customer_ref_art_a'
Size = 256
end
object uqOrderscut_die_cutdier: TStringField
FieldName = 'cut_die_cutdier'
Size = 10
end
object uqOrderscut_die_cutdieb: TStringField
FieldName = 'cut_die_cutdieb'
Size = 10
end
object uqOrderscut_die_cutdief: TStringField
FieldName = 'cut_die_cutdief'
Size = 10
end
object uqOrderscut_die_cutdierkr: TStringField
FieldName = 'cut_die_cutdierkr'
Size = 10
end
object uqOrderscut_die_cutdiefkr: TStringField
FieldName = 'cut_die_cutdiefkr'
Size = 10
end
object uqOrderscut_die_cad_file: TStringField
FieldName = 'cut_die_cad_file'
Size = 128
end
object uqOrderscut_die_attached: TStringField
FieldName = 'cut_die_attached'
Size = 1
end
object uqOrderscut_die_boxpol250: TStringField
FieldName = 'cut_die_boxpol250'
Size = 10
end
object uqOrderscut_die_boxpol155: TStringField
FieldName = 'cut_die_boxpol155'
Size = 10
end
object uqOrderscut_die_boxpol125: TStringField
FieldName = 'cut_die_boxpol125'
Size = 10
end
object uqOrderscut_die_brub: TStringField
FieldName = 'cut_die_brub'
Size = 10
end
object uqOrdersproofing_fax: TStringField
FieldName = 'proofing_fax'
Size = 16
end
object uqOrdersproofing_fax_attn: TStringField
FieldName = 'proofing_fax_attn'
Size = 256
end
object uqOrdersproofing_e_mail: TStringField
FieldName = 'proofing_e_mail'
Size = 256
end
object uqOrdersproofing_e_mail_attn: TStringField
FieldName = 'proofing_e_mail_attn'
Size = 256
end
object uqOrdersproofing_ship_to: TStringField
FieldName = 'proofing_ship_to'
Size = 1024
end
object uqOrdersproofing_full_size_panel: TStringField
FieldName = 'proofing_full_size_panel'
Size = 1
end
object uqOrdersproofing_print_card: TStringField
FieldName = 'proofing_print_card'
Size = 1
end
object uqOrdersproofing_wide_format: TStringField
FieldName = 'proofing_wide_format'
Size = 1
end
object uqOrdersproofing_pdf_file: TStringField
FieldName = 'proofing_pdf_file'
Size = 1
end
object uqOrdersproofing_other: TStringField
FieldName = 'proofing_other'
Size = 64
end
object uqOrdersproofing_art_approved_as_is: TStringField
FieldName = 'proofing_art_approved_as_is'
Size = 1
end
object uqOrdersproofing_approved_date: TDateField
FieldName = 'proofing_approved_date'
end
object uqOrdersproofing_changes_required: TStringField
FieldName = 'proofing_changes_required'
Size = 1
end
object uqOrdersproofing_changes_date: TDateField
FieldName = 'proofing_changes_date'
end
object uqOrderslayout_rsc_l: TStringField
FieldName = 'layout_rsc_l'
Size = 10
end
object uqOrderslayout_rcs_w: TStringField
FieldName = 'layout_rcs_w'
Size = 10
end
object uqOrderslayout_rcs_d: TStringField
FieldName = 'layout_rcs_d'
Size = 10
end
object uqOrderslayout_die_cut_no: TStringField
FieldName = 'layout_die_cut_no'
Size = 45
end
object uqOrderslayout_accross_no: TStringField
FieldName = 'layout_accross_no'
Size = 10
end
object uqOrderslayout_around_no: TStringField
FieldName = 'layout_around_no'
Size = 10
end
object uqOrderslayout_cad_file: TStringField
FieldName = 'layout_cad_file'
Size = 45
end
object uqOrderslayout_excalibur_die: TStringField
FieldName = 'layout_excalibur_die'
Size = 1
end
object uqOrdersmounting_loose: TStringField
FieldName = 'mounting_loose'
Size = 10
end
object uqOrdersmounting_sticky_bak: TStringField
FieldName = 'mounting_sticky_bak'
Size = 1
end
object uqOrdersmounting_full_mount: TStringField
FieldName = 'mounting_full_mount'
Size = 1
end
object uqOrdersmounting_strip_mount: TStringField
FieldName = 'mounting_strip_mount'
Size = 10
end
object uqOrderscolors_cylinder_size: TStringField
FieldName = 'colors_cylinder_size'
Size = 45
end
object uqOrderscolors_machine_ident: TStringField
FieldName = 'colors_machine_ident'
Size = 45
end
object uqOrdersmounting_standard_setup: TStringField
FieldName = 'mounting_standard_setup'
Size = 45
end
object uqOrdersmounting_custom_backing: TStringField
FieldName = 'mounting_custom_backing'
Size = 96
end
object uqOrdersmounting_custom_adhesive: TStringField
FieldName = 'mounting_custom_adhesive'
Size = 45
end
object uqOrderscolors_cross_hairs: TStringField
FieldName = 'colors_cross_hairs'
Size = 10
end
object uqOrderscolors_clemson: TStringField
FieldName = 'colors_clemson'
Size = 10
end
object uqOrdersplates_thickness: TStringField
FieldName = 'plates_thickness'
Size = 5
end
object uqOrdersplates_plate_material: TStringField
FieldName = 'plates_plate_material'
Size = 16
end
object uqOrdersgeneral_special_instructions: TStringField
FieldName = 'general_special_instructions'
Size = 2048
end
object uqOrderscolors_colors: TStringField
FieldName = 'colors_colors'
Size = 4096
end
object uqOrdersstaff_fields_quickbooks_item: TStringField
FieldName = 'staff_fields_quickbooks_item'
Size = 45
end
object uqOrdersstaff_fields_quantity: TStringField
FieldName = 'staff_fields_quantity'
Size = 10
end
object uqOrderslayout_rsc_style: TStringField
FieldName = 'layout_rsc_style'
Size = 32
end
object uqOrdersstaff_fields_art_location: TStringField
FieldName = 'staff_fields_art_location'
Size = 16
end
end
end
......@@ -16,6 +16,94 @@ type
UniQuery1: TUniQuery;
MySQLUniProvider1: TMySQLUniProvider;
UniQuery2: TUniQuery;
uqOrders: TUniQuery;
uqOrdersORDER_ID: TIntegerField;
uqOrdersCOMPANY_ID: TIntegerField;
uqOrdersUSER_ID: TIntegerField;
uqOrdersORDER_DATE: TDateTimeField;
uqOrdersSTART_DATE: TDateField;
uqOrdersEND_DATE: TDateField;
uqOrdersORDER_STATUS: TStringField;
uqOrdersSCHED_JSON: TStringField;
uqOrdersstaff_fields_order_date: TDateField;
uqOrdersstaff_fields_proof_date: TDateField;
uqOrdersstaff_fields_ship_date: TDateField;
uqOrdersstaff_fields_ship_via: TStringField;
uqOrdersstaff_fields_price: TStringField;
uqOrdersstaff_fields_invoice_to: TStringField;
uqOrdersstaff_fields_invoice_attention: TStringField;
uqOrdersstaff_fields_ship_to: TStringField;
uqOrdersstaff_fields_ship_attention: TStringField;
uqOrdersstaff_fields_po_number: TStringField;
uqOrdersstaff_fields_job_name: TStringField;
uqOrdersstaff_fields_art_due: TDateField;
uqOrdersstaff_fields_plate_due: TDateField;
uqOrdersstaff_fields_mount_due: TDateField;
uqOrdersplates_job_number: TStringField;
uqOrderssupplied_by_customer_b_w_copy: TStringField;
uqOrderssupplied_by_customer_color_copy: TStringField;
uqOrderssupplied_by_customer_plates: TStringField;
uqOrderssupplied_by_customer_sample_ca: TStringField;
uqOrderssupplied_by_customer_dimension: TStringField;
uqOrderssupplied_by_customer_disk_or_cd: TStringField;
uqOrderssupplied_by_customer_e_mail: TStringField;
uqOrderssupplied_by_customer_ftp: TStringField;
uqOrderssupplied_by_customer_other: TStringField;
uqOrderssupplied_by_customer_existing_: TStringField;
uqOrderssupplied_by_customer_ref_art_p: TStringField;
uqOrderssupplied_by_customer_ref_art_a: TStringField;
uqOrderscut_die_cutdier: TStringField;
uqOrderscut_die_cutdieb: TStringField;
uqOrderscut_die_cutdief: TStringField;
uqOrderscut_die_cutdierkr: TStringField;
uqOrderscut_die_cutdiefkr: TStringField;
uqOrderscut_die_cad_file: TStringField;
uqOrderscut_die_attached: TStringField;
uqOrderscut_die_boxpol250: TStringField;
uqOrderscut_die_boxpol155: TStringField;
uqOrderscut_die_boxpol125: TStringField;
uqOrderscut_die_brub: TStringField;
uqOrdersproofing_fax: TStringField;
uqOrdersproofing_fax_attn: TStringField;
uqOrdersproofing_e_mail: TStringField;
uqOrdersproofing_e_mail_attn: TStringField;
uqOrdersproofing_ship_to: TStringField;
uqOrdersproofing_full_size_panel: TStringField;
uqOrdersproofing_print_card: TStringField;
uqOrdersproofing_wide_format: TStringField;
uqOrdersproofing_pdf_file: TStringField;
uqOrdersproofing_other: TStringField;
uqOrdersproofing_art_approved_as_is: TStringField;
uqOrdersproofing_approved_date: TDateField;
uqOrdersproofing_changes_required: TStringField;
uqOrdersproofing_changes_date: TDateField;
uqOrderslayout_rsc_l: TStringField;
uqOrderslayout_rcs_w: TStringField;
uqOrderslayout_rcs_d: TStringField;
uqOrderslayout_die_cut_no: TStringField;
uqOrderslayout_accross_no: TStringField;
uqOrderslayout_around_no: TStringField;
uqOrderslayout_cad_file: TStringField;
uqOrderslayout_excalibur_die: TStringField;
uqOrdersmounting_loose: TStringField;
uqOrdersmounting_sticky_bak: TStringField;
uqOrdersmounting_full_mount: TStringField;
uqOrdersmounting_strip_mount: TStringField;
uqOrderscolors_cylinder_size: TStringField;
uqOrderscolors_machine_ident: TStringField;
uqOrdersmounting_standard_setup: TStringField;
uqOrdersmounting_custom_backing: TStringField;
uqOrdersmounting_custom_adhesive: TStringField;
uqOrderscolors_cross_hairs: TStringField;
uqOrderscolors_clemson: TStringField;
uqOrdersplates_thickness: TStringField;
uqOrdersplates_plate_material: TStringField;
uqOrdersgeneral_special_instructions: TStringField;
uqOrderscolors_colors: TStringField;
uqOrdersstaff_fields_quickbooks_item: TStringField;
uqOrdersstaff_fields_quantity: TStringField;
uqOrderslayout_rsc_style: TStringField;
uqOrdersstaff_fields_art_location: TStringField;
procedure DataModuleCreate(Sender: TObject);
private
{ Private declarations }
......
......@@ -57,24 +57,25 @@ type
TOrderItem = class
public
ID: string;
companyName: string;
jobName: string;
orderDate: string;
proofDue: string;
proofDone: string;
artDue: string;
artDone: string;
plateDue: string;
plateDone: string;
mountDue: string;
mountDone: string;
shipDue: string;
shipDone: string;
price: string;
qbRefNum: string;
ID,
companyName,
jobName,
orderDate,
proofDue,
proofDone,
artDue,
artDone,
plateDue,
plateDone,
mountDue,
mountDone,
shipDue,
shipDone,
price,
qbRefNum,
orderType,
colors: string;
orderType: string;
end;
TOrderList = class
......@@ -86,89 +87,92 @@ type
TFullOrder = class
Public
//Company
companyName: string;
accountCompanyName: string;
NAME: string;
SHORT_NAME: string;
inQuickBooks: string;
// Staff Fields:
orderDate: string;
proofDate: string;
shipDate: string;
shipVia: string;
Quantity: string;
price: string;
invoiceTo: string;
shipTo: string;
poNumber: string;
jobName: string;
quickBooksItem: string;
artDue: string;
plateDue: string;
mountDue: string;
artLocation: string;
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:
bwCopy: boolean;
colorCopy: boolean;
plates: boolean;
sampleCarton: boolean;
dimensionalLayout: string;
diskOrCD: boolean;
email: string;
ftp: string;
other: string;
existingCuttingDie: string;
refArtPrintCard: string;
refArtAPDF: string;
supplied_by_customer_b_w_copy: boolean;
supplied_by_customer_color_copy: boolean;
supplied_by_customer_plates: boolean;
supplied_by_customer_sample_ca: boolean;
supplied_by_customer_dimension: string;
supplied_by_customer_disk_or_cd: boolean;
supplied_by_customer_e_mail: string;
supplied_by_customer_ftp: string;
supplied_by_customer_other: string;
supplied_by_customer_existing_: string;
supplied_by_customer_ref_art_p: string;
supplied_by_customer_ref_art_a: string;
// Layout
rscl: string;
rscw: string;
rscd: string;
dieCutNo: string;
acrossNo: string;
aroundNo: string;
cadFile: string;
excalliburDie: boolean;
rscStyle: string;
layout_rsc_l: string;
//Typos to match database typos
layout_rcs_w: string;
layout_rcs_d: string;
layout_die_cut_no: string;
layout_accross_no: string;
layout_around_no: string;
layout_cad_file: string;
layout_excalibur_die: boolean;
layout_rsc_style: string;
// Mounting
loose: string;
stickyBak: boolean;
fullMount: boolean;
stripMount: string;
standardSetup: string;
customBacking: string;
customAdhesive: string;
mounting_loose: string;
mounting_sticky_bak: boolean;
mounting_full_mount: boolean;
mounting_strip_mount: string;
mounting_standard_setup: string;
mounting_custom_backing: string;
mounting_custom_adhesive: string;
// Colors
cylinderSize: string;
machineIdent: string;
crossHairs: string;
clemson: string;
colors: string;
colors_cylinder_size: string;
colors_machine_ident: string;
colors_cross_hairs: string;
colors_clemson: string;
colors_colors: string;
// Proofing
fax: string;
faxAttn: string;
proofEmail: string;
emailAttn: string;
proofShipTo: string;
fullSizePanel: boolean;
printCard: boolean;
wideFormat: boolean;
pdfFile: boolean;
proofOther: string;
artApprovedAsIs: boolean;
approvedDate: string;
proofing_fax: string;
proofing_fax_attn: string;
proofing_e_mail: string;
proofing_e_mail_attn: string;
proofing_ship_to: string;
proofing_full_size_panel: boolean;
proofing_print_card: boolean;
proofing_wide_format: boolean;
proofing_pdf_file: boolean;
proofing_other: string;
proofing_art_approved_as_is: boolean;
proofing_approved_date: string;
// Plates
thickness: string;
plateMaterial: string;
jobNumber: string;
plates_thickness: string;
plates_plate_material: string;
plates_job_number: string;
// General
specialInstructions: string;
general_special_instructions: string;
end;
......
......@@ -12,7 +12,7 @@ uses
XData.Server.Module,
XData.Service.Common,
Database, Data.DB,
Lookup.Service, System.Hash, System.Classes;
Lookup.Service, System.Hash, System.Classes, System.JSON;
type
......@@ -32,6 +32,7 @@ type
function DelUser(username: string): string;
function generateSelectSQL(filterType, startDate, endDate: string): string;
function generateSubQuery(filterType: string; currStatus: string): string;
function AddCorrugatedOrder(orderInfo: string): TJSONObject;
procedure AfterConstruction; override;
procedure BeforeDestruction; override;
end;
......@@ -256,161 +257,162 @@ begin
result := TFullOrder.Create;
// Company
result.companyName := ordersDB.UniQuery1.FieldByName('NAME').AsString;
result.accountCompanyName := ordersDB.UniQuery1.FieldByName('SHORT_NAME').AsString;
result.NAME := ordersDB.UniQuery1.FieldByName('NAME').AsString;
result.SHORT_NAME := ordersDB.UniQuery1.FieldByName('SHORT_NAME').AsString;
result.inQuickBooks := '?';
// Staff Fields
result.orderDate := ordersDB.UniQuery1.FieldByName('staff_fields_order_date').AsString;
result.proofDate := ordersDB.UniQuery1.FieldByName('staff_fields_proof_date').AsString;
result.shipDate := ordersDB.UniQuery1.FieldByName('staff_fields_ship_date').AsString;
result.shipVia := ordersDB.UniQuery1.FieldByName('staff_fields_ship_via').AsString;
result.Quantity := ordersDB.UniQuery1.FieldByName('staff_fields_quantity').AsString;
result.shipTo := ordersDB.UniQuery1.FieldByName('staff_fields_ship_to').AsString;
result.poNumber := ordersDB.UniQuery1.FieldByName('staff_fields_po_number').AsString;
result.jobName := ordersDB.UniQuery1.FieldByName('staff_fields_job_name').AsString;
result.quickBooksItem := ordersDB.UniQuery1.FieldByName('staff_fields_quickbooks_item').AsString;
result.artDue := ordersDB.UniQuery1.FieldByName('staff_fields_art_due').AsString;
result.plateDue := ordersDB.UniQuery1.FieldByName('staff_fields_plate_due').AsString;
result.staff_fields_order_date := ordersDB.UniQuery1.FieldByName('staff_fields_order_date').AsString;
result.staff_fields_proof_date := ordersDB.UniQuery1.FieldByName('staff_fields_proof_date').AsString;
result.staff_fields_ship_date := ordersDB.UniQuery1.FieldByName('staff_fields_ship_date').AsString;
result.staff_fields_ship_via := ordersDB.UniQuery1.FieldByName('staff_fields_ship_via').AsString;
result.staff_fields_quantity := ordersDB.UniQuery1.FieldByName('staff_fields_quantity').AsString;
result.staff_fields_ship_to := ordersDB.UniQuery1.FieldByName('staff_fields_ship_to').AsString;
result.staff_fields_po_number := ordersDB.UniQuery1.FieldByName('staff_fields_po_number').AsString;
result.staff_fields_job_name := ordersDB.UniQuery1.FieldByName('staff_fields_job_name').AsString;
result.staff_fields_quickbooks_item := ordersDB.UniQuery1.FieldByName('staff_fields_quickbooks_item').AsString;
result.staff_fields_art_due := ordersDB.UniQuery1.FieldByName('staff_fields_art_due').AsString;
result.staff_fields_plate_due := ordersDB.UniQuery1.FieldByName('staff_fields_plate_due').AsString;
if orderType = 'corrugated_plate_order' then
result.mountDue := ordersDB.UniQuery1.FieldByName('staff_fields_mount_due').AsString;
result.artLocation := ordersDB.UniQuery1.FieldByName('staff_fields_art_location').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;
// Supplied by Customer
if ordersDB.UniQuery1.FieldByName('supplied_by_customer_b_w_copy').AsString = 'T' then
result.bwCopy := true
result.supplied_by_customer_b_w_copy := true
else
result.bwCopy := false;
result.supplied_by_customer_b_w_copy := false;
if ordersDB.UniQuery1.FieldByName('supplied_by_customer_color_copy').AsString = 'T' then
result.colorCopy := true
result.supplied_by_customer_color_copy := true
else
result.colorCopy := false;
result.supplied_by_customer_color_copy := false;
if ordersDB.UniQuery1.FieldByName('supplied_by_customer_plates').AsString = 'T' then
result.plates := true
result.supplied_by_customer_plates := true
else
result.plates := false;
result.supplied_by_customer_plates := false;
if ordersDB.UniQuery1.FieldByName('supplied_by_customer_sample_ca').AsString = 'T' then
result.sampleCarton := true
result.supplied_by_customer_sample_ca := true
else
result.sampleCarton := false;
result.dimensionalLayout := ordersDB.UniQuery1.FieldByName('supplied_by_customer_dimension').AsString;
result.supplied_by_customer_sample_ca := false;
result.supplied_by_customer_dimension := ordersDB.UniQuery1.FieldByName('supplied_by_customer_dimension').AsString;
if orderType = 'web_plate' then
begin
if ordersDB.UniQuery1.FieldByName('supplied_by_customer_disk').AsString = 'T' then
{if ordersDB.UniQuery1.FieldByName('supplied_by_customer_disk').AsString = 'T' then
result.diskOrCD := true
else
result.diskOrCD := false;
result.diskOrCD := false;}
end
else
begin
if ordersDB.UniQuery1.FieldByName('supplied_by_customer_disk_or_cd').AsString = 'T' then
result.diskOrCD := true
result.supplied_by_customer_disk_or_cd := true
else
result.diskOrCD := false;
result.supplied_by_customer_disk_or_cd := false;
end;
result.email := ordersDB.UniQuery1.FieldByName('supplied_by_customer_e_mail').AsString;
result.ftp := ordersDB.UniQuery1.FieldByName('supplied_by_customer_ftp').AsString;
result.other := ordersDB.UniQuery1.FieldByName('supplied_by_customer_other').AsString;
result.supplied_by_customer_e_mail := ordersDB.UniQuery1.FieldByName('supplied_by_customer_e_mail').AsString;
result.supplied_by_customer_ftp := ordersDB.UniQuery1.FieldByName('supplied_by_customer_ftp').AsString;
result.supplied_by_customer_other := ordersDB.UniQuery1.FieldByName('supplied_by_customer_other').AsString;
if orderType = 'corrugated_plate' then
begin
result.existingCuttingDie := ordersDB.UniQuery1.FieldByName('supplied_by_customer_existing_').AsString;
result.refArtPrintCard := ordersDB.UniQuery1.FieldByName('supplied_by_customer_ref_art_p').AsString;
result.refArtAPDF := ordersDB.UniQuery1.FieldByName('supplied_by_customer_ref_art_a').AsString;
result.supplied_by_customer_existing_ := ordersDB.UniQuery1.FieldByName('supplied_by_customer_existing_').AsString;
result.supplied_by_customer_ref_art_p := ordersDB.UniQuery1.FieldByName('supplied_by_customer_ref_art_p').AsString;
result.supplied_by_customer_ref_art_a := ordersDB.UniQuery1.FieldByName('supplied_by_customer_ref_art_a').AsString;
end;
// Layout
if orderType = 'corrugated_plate' then
begin
result.rscl := ordersDB.UniQuery1.FieldByName('layout_rsc_l').AsString;
result.rscw := ordersDB.UniQuery1.FieldByName('layout_rcs_w').AsString;
result.rscd := ordersDB.UniQuery1.FieldByName('layout_rcs_d').AsString;
result.dieCutNo := ordersDB.UniQuery1.FieldByName('layout_die_cut_no').AsString;
result.acrossNo := ordersDB.UniQuery1.FieldByName('layout_accross_no').AsString;
result.aroundNo := ordersDB.UniQuery1.FieldByName('layout_around_no').AsString;
result.cadFile := ordersDB.UniQuery1.FieldByName('layout_cad_file').AsString;
result.layout_rsc_l := ordersDB.UniQuery1.FieldByName('layout_rsc_l').AsString;
result.layout_rcs_w := ordersDB.UniQuery1.FieldByName('layout_rcs_w').AsString;
result.layout_rcs_d := ordersDB.UniQuery1.FieldByName('layout_rcs_d').AsString;
result.layout_die_cut_no := ordersDB.UniQuery1.FieldByName('layout_die_cut_no').AsString;
result.layout_accross_no := ordersDB.UniQuery1.FieldByName('layout_accross_no').AsString;
result.layout_around_no := ordersDB.UniQuery1.FieldByName('layout_around_no').AsString;
result.layout_cad_file := ordersDB.UniQuery1.FieldByName('layout_cad_file').AsString;
if ordersDB.UniQuery1.FieldByName('layout_excalibur_die').AsString = 'T' then
result.excalliburDie := true
result.layout_excalibur_die := true
else
result.excalliburDie := false;
result.rscStyle := ordersDB.UniQuery1.FieldByName('layout_rsc_style').AsString;
result.layout_excalibur_die := false;
result.layout_rsc_style := ordersDB.UniQuery1.FieldByName('layout_rsc_style').AsString;
end
else
begin
result.acrossNo := ordersDB.UniQuery1.FieldByName('layout_accross').AsString;
result.aroundNo := ordersDB.UniQuery1.FieldByName('layout_around').AsString;
//result.acrossNo := ordersDB.UniQuery1.FieldByName('layout_accross').AsString;
//result.aroundNo := ordersDB.UniQuery1.FieldByName('layout_around').AsString;
end;
// Mounting & Colors & Proofing
if orderType = 'corrugated_plate' then
begin
result.loose := ordersDB.UniQuery1.FieldByName('mounting_loose').AsString;
result.mounting_loose := ordersDB.UniQuery1.FieldByName('mounting_loose').AsString;
if ordersDB.UniQuery1.FieldByName('mounting_sticky_bak').AsString = 'T' then
result.stickyBak := true
result.mounting_sticky_bak := true
else
result.stickyBak := false;
result.mounting_sticky_bak := false;
if ordersDB.UniQuery1.FieldByName('mounting_full_mount').AsString = 'T' then
result.fullMount := true
else
result.fullMount := false;
result.stripMount := ordersDB.UniQuery1.FieldByName('mounting_strip_mount').AsString;
result.standardSetup := ordersDB.UniQuery1.FieldByName('mounting_standard_setup').AsString;
result.customBacking := ordersDB.UniQuery1.FieldByName('mounting_custom_backing').AsString;
result.customAdhesive := ordersDB.UniQuery1.FieldByName('mounting_custom_adhesive').AsString;
result.cylinderSize := ordersDB.UniQuery1.FieldByName('colors_cylinder_size').AsString;
result.machineIdent := ordersDB.UniQuery1.FieldByName('colors_machine_ident').AsString;
result.crossHairs := ordersDB.UniQuery1.FieldByName('colors_cross_hairs').AsString;
result.clemson := ordersDB.UniQuery1.FieldByName('colors_clemson').AsString;
result.colors := ordersDB.UniQuery1.FieldByName('colors_colors').AsString;
result.fax := ordersDB.UniQuery1.FieldByName('proofing_fax').AsString;
result.faxAttn := ordersDB.UniQuery1.FieldByName('proofing_fax_attn').AsString;
result.proofEmail := ordersDB.UniQuery1.FieldByName('proofing_e_mail').AsString;
result.proofShipTo := ordersDB.UniQuery1.FieldByName('proofing_ship_to').AsString;
result.mounting_full_mount := true
else
result.mounting_full_mount := false;
result.mounting_strip_mount := ordersDB.UniQuery1.FieldByName('mounting_strip_mount').AsString;
result.mounting_standard_setup := ordersDB.UniQuery1.FieldByName('mounting_standard_setup').AsString;
result.mounting_custom_backing := ordersDB.UniQuery1.FieldByName('mounting_custom_backing').AsString;
result.mounting_custom_adhesive := ordersDB.UniQuery1.FieldByName('mounting_custom_adhesive').AsString;
result.colors_cylinder_size := ordersDB.UniQuery1.FieldByName('colors_cylinder_size').AsString;
result.colors_machine_ident := ordersDB.UniQuery1.FieldByName('colors_machine_ident').AsString;
result.colors_cross_hairs := ordersDB.UniQuery1.FieldByName('colors_cross_hairs').AsString;
result.colors_clemson := ordersDB.UniQuery1.FieldByName('colors_clemson').AsString;
result.colors_colors := ordersDB.UniQuery1.FieldByName('colors_colors').AsString;
result.proofing_fax := ordersDB.UniQuery1.FieldByName('proofing_fax').AsString;
result.proofing_fax_attn := ordersDB.UniQuery1.FieldByName('proofing_fax_attn').AsString;
result.proofing_e_mail := ordersDB.UniQuery1.FieldByName('proofing_e_mail').AsString;
result.proofing_e_mail_attn := ordersDB.UniQuery1.FieldByName('proofing_e_mail_attn').AsString;
result.proofing_ship_to := ordersDB.UniQuery1.FieldByName('proofing_ship_to').AsString;
if ordersDB.UniQuery1.FieldByName('proofing_full_size_panel').AsString = 'T' then
result.fullSizePanel := true
result.proofing_full_size_panel := true
else
result.fullSizePanel := false;
result.proofing_full_size_panel := false;
if ordersDB.UniQuery1.FieldByName('proofing_print_card').AsString = 'T'then
result.printCard := true
result.proofing_print_card := true
else
result.printCard := false;
result.proofing_print_card := false;
if ordersDB.UniQuery1.FieldByName('proofing_wide_format').AsString = 'T'then
result.wideFormat := true
result.proofing_wide_format := true
else
result.wideFormat := false;
result.proofing_wide_format := false;
if ordersDB.UniQuery1.FieldByName('proofing_pdf_file').AsString = 'T'then
result.pdfFile := true
result.proofing_pdf_file := true
else
result.pdfFile := false;
result.proofOther := ordersDB.UniQuery1.FieldByName('proofing_other').AsString;
result.proofing_pdf_file := false;
result.proofing_other := ordersDB.UniQuery1.FieldByName('proofing_other').AsString;
if ordersDB.UniQuery1.FieldByName('proofing_art_approved_as_is').AsString = 'T'then
result.artApprovedAsIs := true
result.proofing_art_approved_as_is := true
else
result.artApprovedAsIs := false;
result.approvedDate := ordersDB.UniQuery1.FieldByName('proofing_approved_date').AsString;
result.proofing_art_approved_as_is := false;
result.proofing_approved_date := ordersDB.UniQuery1.FieldByName('proofing_approved_date').AsString;
end
else
begin
result.colors := ordersDB.UniQuery1.FieldByName('quatity_and_colors_qty_colors').AsString;
{result.colors := ordersDB.UniQuery1.FieldByName('quatity_and_colors_qty_colors').AsString;
if ordersDB.UniQuery1.FieldByName('proofing_pdf').AsString = 'T'then
result.pdfFile := true
else
result.pdfFile := false;
result.pdfFile := false;}
end;
// Plates
result.thickness := ordersDB.UniQuery1.FieldByName('plates_thickness').AsString;
result.plateMaterial := ordersDB.UniQuery1.FieldByName('plates_plate_material').AsString;
result.jobNumber := ordersDB.UniQuery1.FieldByName('plates_job_number').AsString;
result.plates_thickness := ordersDB.UniQuery1.FieldByName('plates_thickness').AsString;
result.plates_plate_material := ordersDB.UniQuery1.FieldByName('plates_plate_material').AsString;
result.plates_job_number := ordersDB.UniQuery1.FieldByName('plates_job_number').AsString;
// General
if orderType = 'corrugated_plate' then
result.specialInstructions := ordersDB.UniQuery1.FieldByName('general_special_instructions').AsString
result.general_special_instructions := ordersDB.UniQuery1.FieldByName('general_special_instructions').AsString
else
result.specialInstructions := ordersDB.UniQuery1.FieldByName('general_comments').AsString
//result.specialInstructions := ordersDB.UniQuery1.FieldByName('general_comments').AsString
......@@ -595,6 +597,54 @@ begin
ordersDB.UniQuery1.Close;
end;
function TLookupService.AddCorrugatedOrder(orderInfo: string): TJSONObject;
var
JSONData, ResponseData: TJSONObject;
SQL: string;
Pair: TJSONPair;
Field: TField;
DateFormat: TFormatSettings;
begin
DateFormat := TFormatSettings.Create;
DateFormat.ShortDateFormat := 'yyyy-mm-dd';
DateFormat.DateSeparator := '-';
JSONData := TJSONObject.ParseJSONValue(orderInfo) as TJSONObject;
if JSONData = nil then
raise Exception.Create('Invalid JSON format'); // If parsing fails, raise an exception
SQL := 'select * from corrugated_plate_orders where ORDER_ID = ' + JSONData.GetValue('ORDER_ID').Value;
doQuery(ordersDB.UniQuery1, SQL);
if( ordersDB.UniQuery1.IsEmpty ) then
begin
try
ordersDB.UniQuery1.Insert;
for Pair in JSONData do
begin
Field := ordersDB.UniQuery1.FindField(Pair.JsonString.Value); // Checks if the field exists in the dataset
if Assigned(Field) then
begin
// handles any dates or datetimes
if (Field is TDateTimeField) and (Pair.JsonValue.Value <> '') then
TDateTimeField(Field).AsDateTime := StrToDateTime(Pair.JsonValue.Value, DateFormat)
else if Pair.JsonValue.Value <> '' then
Field.AsString := Pair.JsonValue.Value;
end;
end;
// Post the new record to the database
ordersDB.UniQuery1.Post;
Result := TJSONObject.Create.AddPair('status', 'success');
TXDataOperationContext.Current.Handler.ManagedObjects.Add(Result);
except
on E: Exception do
begin
Result := TJSONObject.Create.AddPair('error', E.Message);
end;
end;
end
else
Result := TJSONObject.Create.AddPair('error', 'Order Already Exists');
end;
function TLookupService.AddUser(userInfo:string): string;
var
......
[Options]
LogFileNum=139
LogFileNum=142
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