Commit 553e411e by Cameron Hayes

Merge remote-tracking branch 'origin/cam3'

parents a063c805 a9c2147a
...@@ -61,6 +61,7 @@ object FViewAddAddress: TFViewAddAddress ...@@ -61,6 +61,7 @@ object FViewAddAddress: TFViewAddAddress
Width = 78 Width = 78
Height = 22 Height = 22
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
TabOrder = 4
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object edtFirstLine: TWebEdit object edtFirstLine: TWebEdit
...@@ -70,6 +71,7 @@ object FViewAddAddress: TFViewAddAddress ...@@ -70,6 +71,7 @@ object FViewAddAddress: TFViewAddAddress
Height = 22 Height = 22
ChildOrder = 1 ChildOrder = 1
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
TabOrder = 1
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object edtCity: TWebEdit object edtCity: TWebEdit
...@@ -79,6 +81,7 @@ object FViewAddAddress: TFViewAddAddress ...@@ -79,6 +81,7 @@ object FViewAddAddress: TFViewAddAddress
Height = 22 Height = 22
ChildOrder = 2 ChildOrder = 2
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
TabOrder = 3
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object edtZip: TWebEdit object edtZip: TWebEdit
...@@ -88,6 +91,7 @@ object FViewAddAddress: TFViewAddAddress ...@@ -88,6 +91,7 @@ object FViewAddAddress: TFViewAddAddress
Height = 22 Height = 22
ChildOrder = 3 ChildOrder = 3
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
TabOrder = 5
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object edtContact: TWebEdit object edtContact: TWebEdit
...@@ -97,6 +101,7 @@ object FViewAddAddress: TFViewAddAddress ...@@ -97,6 +101,7 @@ object FViewAddAddress: TFViewAddAddress
Height = 22 Height = 22
ChildOrder = 4 ChildOrder = 4
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
TabOrder = 6
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object edtAddress: TWebEdit object edtAddress: TWebEdit
...@@ -106,6 +111,7 @@ object FViewAddAddress: TFViewAddAddress ...@@ -106,6 +111,7 @@ object FViewAddAddress: TFViewAddAddress
Height = 22 Height = 22
ChildOrder = 1 ChildOrder = 1
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
TabOrder = 2
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object edtNotification: TWebEdit object edtNotification: TWebEdit
......
...@@ -107,90 +107,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -107,90 +107,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object dtpOrderDate: TWebDateTimePicker
Left = 22
Top = 218
Width = 170
Height = 22
ElementID = 'dtporderdate'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45748.499176736110000000
ElementPosition = epRelative
Role = 'null'
Text = ''
end
object dtpProofDate: TWebDateTimePicker
Left = 22
Top = 250
Width = 170
Height = 22
ElementID = 'dtpproofdate'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45748.499176770830000000
ElementPosition = epRelative
Role = 'null'
Text = ''
end
object dtpShipDate: TWebDateTimePicker
Left = 22
Top = 282
Width = 170
Height = 22
ElementID = 'dtpshipdate'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45748.499176770830000000
ElementPosition = epRelative
Role = 'null'
Text = ''
end
object dtpArtDue: TWebDateTimePicker
Left = 24
Top = 544
Width = 170
Height = 22
ElementID = 'dtpartdue'
BorderStyle = bsSingle
ChildOrder = 17
Color = clWhite
Date = 45748.499176770830000000
ElementPosition = epRelative
Role = 'null'
Text = ''
end
object dtpPlateDue: TWebDateTimePicker
Left = 24
Top = 568
Width = 170
Height = 22
ElementID = 'dtpplatedue'
BorderStyle = bsSingle
ChildOrder = 17
Color = clWhite
Date = 45748.499176770830000000
ElementPosition = epRelative
Role = 'null'
Text = ''
end
object dtpMountDue: TWebDateTimePicker
Left = 24
Top = 592
Width = 170
Height = 22
ElementID = 'dtpmountdue'
BorderStyle = bsSingle
ChildOrder = 17
Color = clWhite
Date = 45748.499176770830000000
ElementPosition = epRelative
Role = 'null'
Text = ''
end
object btnAddColor: TWebButton object btnAddColor: TWebButton
Left = 658 Left = 658
Top = 150 Top = 150
...@@ -206,22 +122,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -206,22 +122,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = btnAddColorClick OnClick = btnAddColorClick
end end
object dtpApprovedDate: TWebDateTimePicker
Left = 662
Top = 508
Width = 170
Height = 22
ElementID = 'dtpapproveddate'
BorderStyle = bsSingle
ChildOrder = 72
Color = clWhite
Date = 45748.499176770830000000
ElementPosition = epRelative
Role = 'null'
ShowFocus = False
TabStop = False
Text = ''
end
object edtCompanyName: TWebDBEdit object edtCompanyName: TWebDBEdit
Left = 18 Left = 18
Top = 92 Top = 92
...@@ -238,7 +138,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -238,7 +138,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
WidthStyle = ssAuto WidthStyle = ssAuto
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'NAME' DataField = 'NAME'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtCompanyAccountName: TWebDBEdit object edtCompanyAccountName: TWebDBEdit
Left = 24 Left = 24
...@@ -254,7 +154,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -254,7 +154,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'SHORT_NAME' DataField = 'SHORT_NAME'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtShipVia: TWebDBEdit object edtShipVia: TWebDBEdit
Left = 24 Left = 24
...@@ -270,7 +170,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -270,7 +170,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'staff_fields_ship_via' DataField = 'staff_fields_ship_via'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtQuantity: TWebDBEdit object edtQuantity: TWebDBEdit
Left = 26 Left = 26
...@@ -286,7 +186,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -286,7 +186,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'staff_fields_quantity' DataField = 'staff_fields_quantity'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtPrice: TWebDBEdit object edtPrice: TWebDBEdit
Left = 24 Left = 24
...@@ -301,7 +201,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -301,7 +201,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'staff_fields_price' DataField = 'staff_fields_price'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtInvoiceTo: TWebDBEdit object edtInvoiceTo: TWebDBEdit
Left = 26 Left = 26
...@@ -317,7 +217,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -317,7 +217,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'staff_fields_invoice_to' DataField = 'staff_fields_invoice_to'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtPONumber: TWebDBEdit object edtPONumber: TWebDBEdit
Left = 26 Left = 26
...@@ -333,11 +233,11 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -333,11 +233,11 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'staff_fields_po_number' DataField = 'staff_fields_po_number'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtJobName: TWebDBEdit object edtJobName: TWebDBEdit
Left = 26 Left = 24
Top = 486 Top = 523
Width = 200 Width = 200
Height = 22 Height = 22
TabStop = False TabStop = False
...@@ -348,8 +248,9 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -348,8 +248,9 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnExit = edtJobNameExit
DataField = 'staff_fields_job_name' DataField = 'staff_fields_job_name'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtOther: TWebDBEdit object edtOther: TWebDBEdit
Left = 316 Left = 316
...@@ -365,7 +266,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -365,7 +266,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_other' DataField = 'supplied_by_customer_other'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtCADFile: TWebDBEdit object edtCADFile: TWebDBEdit
Left = 496 Left = 496
...@@ -381,7 +282,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -381,7 +282,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_cad_file' DataField = 'layout_cad_file'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtAroundNo: TWebDBEdit object edtAroundNo: TWebDBEdit
Left = 496 Left = 496
...@@ -397,7 +298,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -397,7 +298,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_around_no' DataField = 'layout_around_no'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtAcrossNo: TWebDBEdit object edtAcrossNo: TWebDBEdit
Left = 496 Left = 496
...@@ -413,7 +314,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -413,7 +314,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_accross_no' DataField = 'layout_accross_no'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtDieCutNo: TWebDBEdit object edtDieCutNo: TWebDBEdit
Left = 496 Left = 496
...@@ -429,7 +330,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -429,7 +330,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_die_cut_no' DataField = 'layout_die_cut_no'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtRSCD: TWebDBEdit object edtRSCD: TWebDBEdit
Left = 496 Left = 496
...@@ -445,7 +346,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -445,7 +346,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_rcs_d' DataField = 'layout_rcs_d'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtRSCW: TWebDBEdit object edtRSCW: TWebDBEdit
Left = 496 Left = 496
...@@ -461,7 +362,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -461,7 +362,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_rcs_w' DataField = 'layout_rcs_w'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtRSCL: TWebDBEdit object edtRSCL: TWebDBEdit
Left = 496 Left = 496
...@@ -477,7 +378,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -477,7 +378,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_rsc_l' DataField = 'layout_rsc_l'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtCustomAdhesive: TWebDBEdit object edtCustomAdhesive: TWebDBEdit
Left = 496 Left = 496
...@@ -494,7 +395,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -494,7 +395,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'mounting_custom_adhesive' DataField = 'mounting_custom_adhesive'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtCustomBacking: TWebDBEdit object edtCustomBacking: TWebDBEdit
Left = 496 Left = 496
...@@ -510,7 +411,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -510,7 +411,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'mounting_custom_backing' DataField = 'mounting_custom_backing'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtStandardSetup: TWebDBEdit object edtStandardSetup: TWebDBEdit
Left = 496 Left = 496
...@@ -526,7 +427,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -526,7 +427,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'mounting_standard_setup' DataField = 'mounting_standard_setup'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtStripMount: TWebDBEdit object edtStripMount: TWebDBEdit
Left = 496 Left = 496
...@@ -542,7 +443,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -542,7 +443,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'mounting_strip_mount' DataField = 'mounting_strip_mount'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtLoose: TWebDBEdit object edtLoose: TWebDBEdit
Left = 496 Left = 496
...@@ -558,7 +459,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -558,7 +459,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'mounting_loose' DataField = 'mounting_loose'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtRSCStyle: TWebDBEdit object edtRSCStyle: TWebDBEdit
Left = 496 Left = 496
...@@ -574,7 +475,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -574,7 +475,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HideSelection = False HideSelection = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_rsc_style' DataField = 'layout_rsc_style'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtProofOther: TWebDBEdit object edtProofOther: TWebDBEdit
Left = 658 Left = 658
...@@ -591,7 +492,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -591,7 +492,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_other' DataField = 'proofing_other'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtProofShipTo: TWebDBEdit object edtProofShipTo: TWebDBEdit
Left = 658 Left = 658
...@@ -608,7 +509,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -608,7 +509,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_ship_to' DataField = 'proofing_ship_to'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtEmailAttn: TWebDBEdit object edtEmailAttn: TWebDBEdit
Left = 658 Left = 658
...@@ -625,7 +526,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -625,7 +526,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_e_mail_attn' DataField = 'proofing_e_mail_attn'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtProofEmail: TWebDBEdit object edtProofEmail: TWebDBEdit
Left = 658 Left = 658
...@@ -642,7 +543,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -642,7 +543,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_e_mail' DataField = 'proofing_e_mail'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtFaxAttn: TWebDBEdit object edtFaxAttn: TWebDBEdit
Left = 658 Left = 658
...@@ -659,7 +560,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -659,7 +560,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_fax_attn' DataField = 'proofing_fax_attn'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtFax: TWebDBEdit object edtFax: TWebDBEdit
Left = 658 Left = 658
...@@ -676,7 +577,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -676,7 +577,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_fax' DataField = 'proofing_fax'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtClemson: TWebDBEdit object edtClemson: TWebDBEdit
Left = 658 Left = 658
...@@ -693,7 +594,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -693,7 +594,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'colors_clemson' DataField = 'colors_clemson'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtCrossHairs: TWebDBEdit object edtCrossHairs: TWebDBEdit
Left = 658 Left = 658
...@@ -710,7 +611,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -710,7 +611,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'colors_cross_hairs' DataField = 'colors_cross_hairs'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtMachineIndent: TWebDBEdit object edtMachineIndent: TWebDBEdit
Left = 658 Left = 658
...@@ -727,7 +628,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -727,7 +628,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'colors_machine_ident' DataField = 'colors_machine_ident'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtCylinderSize: TWebDBEdit object edtCylinderSize: TWebDBEdit
Left = 658 Left = 658
...@@ -744,11 +645,11 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -744,11 +645,11 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'colors_cylinder_size' DataField = 'colors_cylinder_size'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtJobNumber: TWebDBEdit object edtJobNumber: TWebDBEdit
Left = 852 Left = 833
Top = 105 Top = 109
Width = 121 Width = 121
Height = 22 Height = 22
TabStop = False TabStop = False
...@@ -761,7 +662,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -761,7 +662,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'plates_job_number' DataField = 'plates_job_number'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object cbArtApprovedAsIs: TWebDBCheckBox object cbArtApprovedAsIs: TWebDBCheckBox
Left = 662 Left = 662
...@@ -773,15 +674,14 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -773,15 +674,14 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ChildOrder = 79 ChildOrder = 79
ElementID = 'cbartapprovedasis' ElementID = 'cbartapprovedasis'
ElementPosition = epRelative ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
Role = 'null' Role = 'null'
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_art_approved_as_is' DataField = 'proofing_art_approved_as_is'
DataSource = WebDataSource1 DataSource = wdsOrder
ValueChecked = 'True' ValueChecked = 'T'
ValueUnChecked = 'False' ValueUnChecked = 'F'
end end
object cbPDFFile: TWebDBCheckBox object cbPDFFile: TWebDBCheckBox
Left = 662 Left = 662
...@@ -793,15 +693,14 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -793,15 +693,14 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ChildOrder = 79 ChildOrder = 79
ElementID = 'cbpdffile' ElementID = 'cbpdffile'
ElementPosition = epRelative ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
Role = 'null' Role = 'null'
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_pdf_file' DataField = 'proofing_pdf_file'
DataSource = WebDataSource1 DataSource = wdsOrder
ValueChecked = 'True' ValueChecked = 'T'
ValueUnChecked = 'False' ValueUnChecked = 'F'
end end
object cbWideFormat: TWebDBCheckBox object cbWideFormat: TWebDBCheckBox
Left = 658 Left = 658
...@@ -813,15 +712,14 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -813,15 +712,14 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ChildOrder = 79 ChildOrder = 79
ElementID = 'cbwideformat' ElementID = 'cbwideformat'
ElementPosition = epRelative ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
Role = 'null' Role = 'null'
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_wide_format' DataField = 'proofing_wide_format'
DataSource = WebDataSource1 DataSource = wdsOrder
ValueChecked = 'True' ValueChecked = 'T'
ValueUnChecked = 'False' ValueUnChecked = 'F'
end end
object cbPrintCard: TWebDBCheckBox object cbPrintCard: TWebDBCheckBox
Left = 658 Left = 658
...@@ -833,15 +731,14 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -833,15 +731,14 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ChildOrder = 79 ChildOrder = 79
ElementID = 'cbprintcard' ElementID = 'cbprintcard'
ElementPosition = epRelative ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
Role = 'null' Role = 'null'
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_print_card' DataField = 'proofing_print_card'
DataSource = WebDataSource1 DataSource = wdsOrder
ValueChecked = 'True' ValueChecked = 'T'
ValueUnChecked = 'False' ValueUnChecked = 'F'
end end
object cbFullSizePanel: TWebDBCheckBox object cbFullSizePanel: TWebDBCheckBox
Left = 658 Left = 658
...@@ -853,15 +750,14 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -853,15 +750,14 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ChildOrder = 79 ChildOrder = 79
ElementID = 'cbfullsizepanel' ElementID = 'cbfullsizepanel'
ElementPosition = epRelative ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
Role = 'null' Role = 'null'
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_full_size_panel' DataField = 'proofing_full_size_panel'
DataSource = WebDataSource1 DataSource = wdsOrder
ValueChecked = 'True' ValueChecked = 'T'
ValueUnChecked = 'False' ValueUnChecked = 'F'
end end
object edtSpecialInstructions: TWebDBEdit object edtSpecialInstructions: TWebDBEdit
Left = 852 Left = 852
...@@ -878,7 +774,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -878,7 +774,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'general_special_instructions' DataField = 'general_special_instructions'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object btnSave: TWebButton object btnSave: TWebButton
Left = 530 Left = 530
...@@ -894,186 +790,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -894,186 +790,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = btnSaveClick OnClick = btnSaveClick
end end
object cbRefArtAPDF: TWebCheckBox
Left = 316
Top = 463
Width = 113
Height = 22
Caption = 'Ref Art A PDF?'
ChildOrder = 76
ElementID = 'edtrefartapdf'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
Role = 'null'
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object cbRefArtPrintCard: TWebCheckBox
Left = 316
Top = 435
Width = 113
Height = 22
Caption = 'Ref Art Print Card?'
ChildOrder = 76
ElementID = 'edtrefartprintcard'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
Role = 'null'
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object cbExistingCuttingDie: TWebCheckBox
Left = 316
Top = 407
Width = 113
Height = 22
Caption = 'Existing Cutting Die?'
ChildOrder = 76
ElementID = 'edtexistingcuttingdie'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
Role = 'null'
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object cbFTP: TWebCheckBox
Left = 320
Top = 318
Width = 113
Height = 22
Caption = 'FTP?'
ChildOrder = 76
ElementID = 'cbftp'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
Role = 'null'
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object cbSampleCarton: TWebCheckBox
Left = 316
Top = 283
Width = 113
Height = 22
Caption = 'Sample Carton'
ChildOrder = 76
ElementID = 'cbsampleCarton'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
Role = 'null'
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object cbPlates: TWebCheckBox
Left = 316
Top = 255
Width = 113
Height = 22
Caption = 'Plates'
ChildOrder = 76
ElementID = 'cbplates'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
Role = 'null'
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object cbColorCopy: TWebCheckBox
Left = 316
Top = 227
Width = 113
Height = 22
Caption = 'Color Copy'
ChildOrder = 76
ElementID = 'cbcolorcopy'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
Role = 'null'
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object cbStripMount: TWebCheckBox
Left = 496
Top = 406
Width = 113
Height = 22
Caption = 'Strip Mount'
ChildOrder = 76
ElementID = 'cbstripmount'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
Role = 'null'
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object cbFullMount: TWebCheckBox
Left = 496
Top = 382
Width = 113
Height = 22
Caption = 'Full Mount'
ChildOrder = 76
ElementID = 'cbfullmount'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
Role = 'null'
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object cbStickyBak: TWebCheckBox
Left = 496
Top = 358
Width = 113
Height = 22
Caption = 'Sticky Bak'
ChildOrder = 76
ElementID = 'cbstickybak'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
Role = 'null'
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object cbLoose: TWebCheckBox
Left = 496
Top = 309
Width = 113
Height = 22
Caption = 'Loose'
ChildOrder = 76
ElementID = 'cbloose'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
Role = 'null'
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object cbExcaliburDie: TWebCheckBox
Left = 496
Top = 233
Width = 113
Height = 22
Caption = 'Excalibur Die'
ChildOrder = 76
ElementID = 'cbexcaliburdie'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
Role = 'null'
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object wdbcbShipTo: TWebDBComboBox object wdbcbShipTo: TWebDBComboBox
Left = 26 Left = 26
Top = 430 Top = 430
...@@ -1084,28 +800,12 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -1084,28 +800,12 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
Role = 'null' Role = 'null'
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnChange = wdbcbShipToChange
ItemIndex = -1 ItemIndex = -1
DataField = 'staff_fields_ship_to' DataField = 'staff_fields_ship_to'
DataSource = WebDataSource1 DataSource = wdsOrder
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'
ElementPosition = epRelative
Enabled = False
HeightPercent = 100.000000000000000000
Role = 'null'
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object btnCancel: TWebButton object btnCancel: TWebButton
Left = 764 Left = 764
Top = 560 Top = 560
...@@ -1122,7 +822,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -1122,7 +822,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
end end
object wdbcbQuickbooksItem: TWebDBComboBox object wdbcbQuickbooksItem: TWebDBComboBox
Left = 26 Left = 26
Top = 515 Top = 491
Width = 145 Width = 145
Height = 22 Height = 22
ElementID = 'wcbqbitem' ElementID = 'wcbqbitem'
...@@ -1130,9 +830,10 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -1130,9 +830,10 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
Role = 'null' Role = 'null'
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnChange = wdbcbQuickbooksItemChange
ItemIndex = -1 ItemIndex = -1
DataField = 'staff_fields_quickbooks_item' DataField = 'staff_fields_quickbooks_item'
DataSource = WebDataSource1 DataSource = wdsOrder
ListField = 'name' ListField = 'name'
ListSource = wdsQBItem ListSource = wdsQBItem
end end
...@@ -1153,7 +854,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -1153,7 +854,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
'PhotoPolymer' 'PhotoPolymer'
'Rubber') 'Rubber')
DataField = 'plates_plate_material' DataField = 'plates_plate_material'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object WebDBComboBox4: TWebDBComboBox object WebDBComboBox4: TWebDBComboBox
Left = 833 Left = 833
...@@ -1175,7 +876,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -1175,7 +876,7 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
'.067' '.067'
'.045') '.045')
DataField = 'plates_thickness' DataField = 'plates_thickness'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object btnPDF: TWebButton object btnPDF: TWebButton
Left = 877 Left = 877
...@@ -1227,18 +928,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -1227,18 +928,6 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = btnCloseClick OnClick = btnCloseClick
end end
object edtOrderNum: TWebEdit
Left = 126
Top = 194
Width = 121
Height = 22
TabStop = False
ChildOrder = 81
ElementID = 'edtordernum'
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object btnEdit: TWebButton object btnEdit: TWebButton
Left = 1202 Left = 1202
Top = 560 Top = 560
...@@ -1276,308 +965,667 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -1276,308 +965,667 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = WebButton2Click OnClick = WebButton2Click
end end
object XDataWebClient1: TXDataWebClient object dtpShipDate: TWebDBDateTimePicker
Connection = DMConnection.ApiConnection Left = 24
Left = 1014 Top = 278
Width = 170
Height = 22
ElementID = 'dtpshipdate'
BorderStyle = bsSingle
ChildOrder = 85
Color = clWhite
Date = 45862.469870092590000000
Role = ''
Text = ''
DataField = 'staff_fields_ship_date'
DataSource = wdsOrder
end
object dtpProofDate: TWebDBDateTimePicker
Left = 24
Top = 250
Width = 170
Height = 22
ElementID = 'dtpproofdate'
BorderStyle = bsSingle
ChildOrder = 85
Color = clWhite
Date = 45862.469870092590000000
Role = ''
Text = ''
DataField = 'staff_fields_proof_date'
DataSource = wdsOrder
end
object dtpOrderDate: TWebDBDateTimePicker
Left = 24
Top = 222
Width = 170
Height = 22
ElementID = 'dtporderdate'
BorderStyle = bsSingle
ChildOrder = 85
Color = clWhite
Date = 45862.469870092590000000
Role = ''
Text = ''
DataField = 'staff_fields_order_date'
DataSource = wdsOrder
end
object dtpApprovedDate: TWebDBDateTimePicker
Left = 658
Top = 508
Width = 170
Height = 22
ElementID = 'dtpapproveddate'
BorderStyle = bsSingle
ChildOrder = 85
Color = clWhite
Date = 45862.469870092590000000
Role = ''
ShowFocus = False
ShowSeconds = False
TabStop = False
Text = ''
DataField = 'proofing_approved_date'
DataSource = wdsOrder
end
object dtpMountDue: TWebDBDateTimePicker
Left = 24
Top = 648
Width = 170
Height = 22
ElementID = 'dtpmountdue'
BorderStyle = bsSingle
ChildOrder = 85
Color = clWhite
Date = 45862.469870092590000000
Role = ''
Text = ''
DataField = 'staff_fields_mount_due'
DataSource = wdsOrder
end
object dtpPlateDue: TWebDBDateTimePicker
Left = 24
Top = 624
Width = 170
Height = 22
ElementID = 'dtpplatedue'
BorderStyle = bsSingle
ChildOrder = 85
Color = clWhite
Date = 45862.469870092590000000
Role = ''
Text = ''
DataField = 'staff_fields_plate_due'
DataSource = wdsOrder
end
object dtpArtDue: TWebDBDateTimePicker
Left = 24
Top = 582
Width = 170
Height = 22
ElementID = 'dtpartdue'
BorderStyle = bsSingle
ChildOrder = 85
Color = clWhite
Date = 45862.469870092590000000
Role = ''
Text = ''
DataField = 'staff_fields_art_due'
DataSource = wdsOrder
end
object cbPlates: TWebDBCheckBox
Left = 316
Top = 255
Width = 113
Height = 22
Caption = 'Plates'
ChildOrder = 85
ElementID = 'cbplates'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_plates'
DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end
object cbSampleCarton: TWebDBCheckBox
Left = 316
Top = 286
Width = 113
Height = 22
Caption = 'Sample Carton'
ChildOrder = 85
ElementID = 'cbsampleCarton'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_sample_ca'
DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end
object cbFTP: TWebDBCheckBox
Left = 316
Top = 314
Width = 113
Height = 22
Caption = 'FTP?'
ChildOrder = 85
ElementID = 'cbftp'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_ftp'
DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end
object cbColorCopy: TWebDBCheckBox
Left = 316
Top = 227
Width = 113
Height = 22
Caption = 'Color Copy?'
ChildOrder = 85
ElementID = 'cbcolorcopy'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_color_copy'
DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end
object cbEmail: TWebDBCheckBox
Left = 316
Top = 376
Width = 113
Height = 22
Caption = 'Email?'
ChildOrder = 85
ElementID = 'edtemail'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_e_mail'
DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end
object cbExistingCuttingDie: TWebDBCheckBox
Left = 316
Top = 407
Width = 113
Height = 22
Caption = 'Existing Cutting Die?'
ChildOrder = 85
ElementID = 'edtexistingcuttingdie'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_existing_'
DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end
object cbRefArtAPDF: TWebDBCheckBox
Left = 316
Top = 470
Width = 113
Height = 22
Caption = 'Ref Art A PDF?'
ChildOrder = 85
ElementID = 'edtrefartapdf'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_ref_art_a'
DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end
object cbRefArtPrintCard: TWebDBCheckBox
Left = 316
Top = 435
Width = 113
Height = 22
Caption = 'Ref Art Print Card?'
ChildOrder = 85
ElementID = 'edtrefartprintcard'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_ref_art_p'
DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end
object cbFullMount: TWebDBCheckBox
Left = 496
Top = 378
Width = 113
Height = 22
TabStop = False
Caption = 'Full Mount'
ChildOrder = 85
ElementID = 'cbfullmount'
HeightPercent = 100.000000000000000000
ShowFocus = False
WidthPercent = 100.000000000000000000
DataField = 'mounting_full_mount'
DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end
object cbStickyBak: TWebDBCheckBox
Left = 496
Top = 356
Width = 113
Height = 22
TabStop = False
Caption = 'Sticky Bak'
ChildOrder = 85
ElementID = 'cbstickybak'
HeightPercent = 100.000000000000000000
ShowFocus = False
WidthPercent = 100.000000000000000000
DataField = 'mounting_sticky_bak'
DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end
object cbExcaliburDie: TWebDBCheckBox
Left = 496
Top = 235
Width = 113
Height = 22
TabStop = False
Caption = 'Excalibur Die'
ChildOrder = 85
ElementID = 'cbexcaliburdie'
HeightPercent = 100.000000000000000000
ShowFocus = False
WidthPercent = 100.000000000000000000
DataField = 'layout_excalibur_die'
DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end
object cbLoose: TWebCheckBox
Left = 496
Top = 309
Width = 113
Height = 22
TabStop = False
Caption = 'Loose'
ChildOrder = 84
ElementID = 'cbloose'
HeightPercent = 100.000000000000000000
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object cbStripMount: TWebCheckBox
Left = 494
Top = 402
Width = 113
Height = 22
TabStop = False
Caption = 'Strip Mount'
ChildOrder = 84
ElementID = 'cbstripmount'
HeightPercent = 100.000000000000000000
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object edtQBItemDescription: TWebEdit
Left = 24
Top = 551
Width = 121
Height = 22
ChildOrder = 31
ElementID = 'edtitemdescription'
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object edtQBOrderNum: TWebDBEdit
Left = 151
Top = 149
Width = 121
Height = 22
AutoCompletion = acNope
AutoSize = True
ChildOrder = 79
ElementID = 'edtqbordernum'
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'QB_ORDER_NUM'
DataSource = wdsOrder
end
object wdbcbINQB: TWebDBCheckBox
Left = 26
Top = 149
Width = 113
Height = 22
Caption = 'In Quickbooks?'
ChildOrder = 29
ElementID = 'wdbcbinqb'
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'IN_QB'
DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end
object edtOrderNum: TWebDBEdit
Left = 103
Top = 185
Width = 121
Height = 22
ChildOrder = 30
ElementID = 'edtordernum'
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'ORDER_ID'
DataSource = wdsOrder
end
object btnQB: TWebButton
Left = 1080
Top = 517
Width = 96
Height = 25
Caption = 'Send To QB'
ChildOrder = 30
ElementID = 'btnsendtoqb'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnQBClick
end
object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection
Left = 1014
Top = 44 Top = 44
end end
object XDataWebDataSet1: TXDataWebDataSet object xdwdsOrder: TXDataWebDataSet
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 1060 Left = 1060
Top = 182 Top = 182
object XDataWebDataSet1inQuickBooks: TStringField object xdwdsOrderORDER_ID: TIntegerField
FieldName = 'inQuickBooks'
end
object XDataWebDataSet1ORDER_ID: TIntegerField
FieldName = 'ORDER_ID' FieldName = 'ORDER_ID'
end end
object XDataWebDataSet1COMPANY_ID: TIntegerField object xdwdsOrderCOMPANY_ID: TIntegerField
FieldName = 'COMPANY_ID' FieldName = 'COMPANY_ID'
end end
object XDataWebDataSet1USER_ID: TIntegerField object xdwdsOrderUSER_ID: TIntegerField
FieldName = 'USER_ID' FieldName = 'USER_ID'
end end
object XDataWebDataSet1ORDER_DATE: TDateField object xdwdsOrderORDER_DATE: TDateField
FieldName = 'ORDER_DATE' FieldName = 'ORDER_DATE'
end end
object XDataWebDataSet1START_DATE: TDateField object xdwdsOrderSTART_DATE: TDateField
FieldName = 'START_DATE' FieldName = 'START_DATE'
end end
object XDataWebDataSet1END_DATE: TDateField object xdwdsOrderEND_DATE: TDateField
FieldName = 'END_DATE' FieldName = 'END_DATE'
end end
object XDataWebDataSet1ORDER_STATUS: TStringField object xdwdsOrderORDER_STATUS: TStringField
FieldName = 'ORDER_STATUS' FieldName = 'ORDER_STATUS'
end end
object XDataWebDataSet1SCHED_JSON: TStringField object xdwdsOrderSCHED_JSON: TStringField
FieldName = 'SCHED_JSON' FieldName = 'SCHED_JSON'
end end
object XDataWebDataSet1NAME: TStringField object xdwdsOrderNAME: TStringField
FieldName = 'NAME' FieldName = 'NAME'
end end
object XDataWebDataSet1SHORT_NAME: TStringField object xdwdsOrderSHORT_NAME: TStringField
FieldName = 'SHORT_NAME' FieldName = 'SHORT_NAME'
end end
object XDataWebDataSet1staff_fields_ship_via: TStringField object xdwdsOrderstaff_fields_ship_via: TStringField
FieldName = 'staff_fields_ship_via' FieldName = 'staff_fields_ship_via'
end end
object XDataWebDataSet1staff_fields_price: TStringField object xdwdsOrderstaff_fields_price: TStringField
FieldName = 'staff_fields_price' FieldName = 'staff_fields_price'
end end
object XDataWebDataSet1staff_fields_invoice_to: TStringField object xdwdsOrderstaff_fields_invoice_to: TStringField
FieldName = 'staff_fields_invoice_to' FieldName = 'staff_fields_invoice_to'
end end
object XDataWebDataSet1staff_fields_invoice_attention: TStringField object xdwdsOrderstaff_fields_invoice_attention: TStringField
FieldName = 'staff_fields_invoice_attention' FieldName = 'staff_fields_invoice_attention'
end end
object XDataWebDataSet1staff_fields_ship_to: TStringField object xdwdsOrderstaff_fields_ship_to: TStringField
FieldName = 'staff_fields_ship_to' FieldName = 'staff_fields_ship_to'
end end
object XDataWebDataSet1staff_fields_ship_attention: TStringField object xdwdsOrderstaff_fields_ship_attention: TStringField
FieldName = 'staff_fields_ship_attention' FieldName = 'staff_fields_ship_attention'
end end
object XDataWebDataSet1staff_fields_po_number: TStringField object xdwdsOrderstaff_fields_po_number: TStringField
FieldName = 'staff_fields_po_number' FieldName = 'staff_fields_po_number'
end end
object XDataWebDataSet1staff_fields_job_name: TStringField object xdwdsOrderstaff_fields_job_name: TStringField
FieldName = 'staff_fields_job_name' FieldName = 'staff_fields_job_name'
end end
object XDataWebDataSet1plates_job_number: TStringField object xdwdsOrderplates_job_number: TStringField
FieldName = 'plates_job_number' FieldName = 'plates_job_number'
end end
object XDataWebDataSet1supplied_by_customer_b_w_copy: TBooleanField object xdwdsOrdersupplied_by_customer_dimension: TStringField
FieldName = 'supplied_by_customer_b_w_copy'
DisplayValues = 'True;False'
end
object XDataWebDataSet1supplied_by_customer_dimension: TStringField
FieldName = 'supplied_by_customer_dimension' FieldName = 'supplied_by_customer_dimension'
end end
object XDataWebDataSet1supplied_by_customer_e_mail: TStringField object xdwdsOrdersupplied_by_customer_other: TStringField
FieldName = 'supplied_by_customer_e_mail'
end
object XDataWebDataSet1supplied_by_customer_ftp: TStringField
FieldName = 'supplied_by_customer_ftp'
end
object XDataWebDataSet1supplied_by_customer_other: TStringField
FieldName = 'supplied_by_customer_other' FieldName = 'supplied_by_customer_other'
end end
object XDataWebDataSet1supplied_by_customer_existing_: TStringField object xdwdsOrdercut_die_cutdier: TStringField
FieldName = 'supplied_by_customer_existing_'
end
object XDataWebDataSet1supplied_by_customer_ref_art_p: TStringField
FieldName = 'supplied_by_customer_ref_art_p'
end
object XDataWebDataSet1supplied_by_customer_ref_art_a: TStringField
FieldName = 'supplied_by_customer_ref_art_a'
end
object XDataWebDataSet1cut_die_cutdier: TStringField
FieldName = 'cut_die_cutdier' FieldName = 'cut_die_cutdier'
end end
object XDataWebDataSet1cut_die_cutdieb: TStringField object xdwdsOrdercut_die_cutdieb: TStringField
FieldName = 'cut_die_cutdieb' FieldName = 'cut_die_cutdieb'
end end
object XDataWebDataSet1cut_die_cutdief: TStringField object xdwdsOrdercut_die_cutdief: TStringField
FieldName = 'cut_die_cutdief' FieldName = 'cut_die_cutdief'
end end
object XDataWebDataSet1cut_die_cutdierkr: TStringField object xdwdsOrdercut_die_cutdierkr: TStringField
FieldName = 'cut_die_cutdierkr' FieldName = 'cut_die_cutdierkr'
end end
object XDataWebDataSet1cut_die_cutdiefkr: TStringField object xdwdsOrdercut_die_cutdiefkr: TStringField
FieldName = 'cut_die_cutdiefkr' FieldName = 'cut_die_cutdiefkr'
end end
object XDataWebDataSet1cut_die_cad_file: TStringField object xdwdsOrdercut_die_cad_file: TStringField
FieldName = 'cut_die_cad_file' FieldName = 'cut_die_cad_file'
end end
object XDataWebDataSet1cut_die_attached: TStringField object xdwdsOrdercut_die_attached: TStringField
FieldName = 'cut_die_attached' FieldName = 'cut_die_attached'
end end
object XDataWebDataSet1cut_die_boxpol250: TStringField object xdwdsOrdercut_die_boxpol250: TStringField
FieldName = 'cut_die_boxpol250' FieldName = 'cut_die_boxpol250'
end end
object XDataWebDataSet1cut_die_boxpol155: TStringField object xdwdsOrdercut_die_boxpol155: TStringField
FieldName = 'cut_die_boxpol155' FieldName = 'cut_die_boxpol155'
end end
object XDataWebDataSet1cut_die_boxpol125: TStringField object xdwdsOrdercut_die_boxpol125: TStringField
FieldName = 'cut_die_boxpol125' FieldName = 'cut_die_boxpol125'
end end
object XDataWebDataSet1cut_die_brub: TStringField object xdwdsOrdercut_die_brub: TStringField
FieldName = 'cut_die_brub' FieldName = 'cut_die_brub'
end end
object XDataWebDataSet1proofing_fax: TStringField object xdwdsOrderproofing_fax: TStringField
FieldName = 'proofing_fax' FieldName = 'proofing_fax'
end end
object XDataWebDataSet1proofing_fax_attn: TStringField object xdwdsOrderproofing_fax_attn: TStringField
FieldName = 'proofing_fax_attn' FieldName = 'proofing_fax_attn'
end end
object XDataWebDataSet1proofing_e_mail: TStringField object xdwdsOrderproofing_e_mail: TStringField
FieldName = 'proofing_e_mail' FieldName = 'proofing_e_mail'
end end
object XDataWebDataSet1proofing_ship_to: TStringField object xdwdsOrderproofing_ship_to: TStringField
FieldName = 'proofing_ship_to' FieldName = 'proofing_ship_to'
end end
object XDataWebDataSet1proofing_other: TStringField object xdwdsOrderproofing_other: TStringField
FieldName = 'proofing_other' FieldName = 'proofing_other'
end end
object XDataWebDataSet1proofing_changes_required: TStringField object xdwdsOrderproofing_changes_required: TStringField
FieldName = 'proofing_changes_required' FieldName = 'proofing_changes_required'
end end
object XDataWebDataSet1proofing_changes_date: TDateField object xdwdsOrderproofing_changes_date: TDateField
FieldName = 'proofing_changes_date' FieldName = 'proofing_changes_date'
end end
object XDataWebDataSet1layout_rsc_l: TStringField object xdwdsOrderlayout_rsc_l: TStringField
FieldName = 'layout_rsc_l' FieldName = 'layout_rsc_l'
end end
object XDataWebDataSet1layout_rcs_w: TStringField object xdwdsOrderlayout_rcs_w: TStringField
FieldName = 'layout_rcs_w' FieldName = 'layout_rcs_w'
end end
object XDataWebDataSet1layout_rcs_d: TStringField object xdwdsOrderlayout_rcs_d: TStringField
FieldName = 'layout_rcs_d' FieldName = 'layout_rcs_d'
end end
object XDataWebDataSet1layout_die_cut_no: TStringField object xdwdsOrderlayout_die_cut_no: TStringField
FieldName = 'layout_die_cut_no' FieldName = 'layout_die_cut_no'
end end
object XDataWebDataSet1layout_accross_no: TStringField object xdwdsOrderlayout_accross_no: TStringField
FieldName = 'layout_accross_no' FieldName = 'layout_accross_no'
end end
object XDataWebDataSet1layout_around_no: TStringField object xdwdsOrderlayout_around_no: TStringField
FieldName = 'layout_around_no' FieldName = 'layout_around_no'
end end
object XDataWebDataSet1layout_cad_file: TStringField object xdwdsOrderlayout_cad_file: TStringField
FieldName = 'layout_cad_file' FieldName = 'layout_cad_file'
end end
object XDataWebDataSet1mounting_standard_setup: TStringField object xdwdsOrdermounting_standard_setup: TStringField
FieldName = 'mounting_standard_setup' FieldName = 'mounting_standard_setup'
end end
object XDataWebDataSet1mounting_custom_backing: TStringField object xdwdsOrdermounting_custom_backing: TStringField
FieldName = 'mounting_custom_backing' FieldName = 'mounting_custom_backing'
end end
object XDataWebDataSet1mounting_custom_adhesive: TStringField object xdwdsOrdermounting_custom_adhesive: TStringField
FieldName = 'mounting_custom_adhesive' FieldName = 'mounting_custom_adhesive'
end end
object XDataWebDataSet1colors_cylinder_size: TStringField object xdwdsOrdercolors_cylinder_size: TStringField
FieldName = 'colors_cylinder_size' FieldName = 'colors_cylinder_size'
end end
object XDataWebDataSet1colors_cross_hairs: TStringField object xdwdsOrdercolors_cross_hairs: TStringField
FieldName = 'colors_cross_hairs' FieldName = 'colors_cross_hairs'
end end
object XDataWebDataSet1colors_machine_ident: TStringField object xdwdsOrdercolors_machine_ident: TStringField
FieldName = 'colors_machine_ident' FieldName = 'colors_machine_ident'
end end
object XDataWebDataSet1colors_clemson: TStringField object xdwdsOrdercolors_clemson: TStringField
FieldName = 'colors_clemson' FieldName = 'colors_clemson'
end end
object XDataWebDataSet1plates_thickness: TStringField object xdwdsOrderplates_thickness: TStringField
FieldName = 'plates_thickness' FieldName = 'plates_thickness'
end end
object XDataWebDataSet1plates_plate_material: TStringField object xdwdsOrderplates_plate_material: TStringField
FieldName = 'plates_plate_material' FieldName = 'plates_plate_material'
end end
object XDataWebDataSet1general_special_instructions: TStringField object xdwdsOrdergeneral_special_instructions: TStringField
FieldName = 'general_special_instructions' FieldName = 'general_special_instructions'
end end
object XDataWebDataSet1colors_colors: TStringField object xdwdsOrdercolors_colors: TStringField
FieldName = 'colors_colors' FieldName = 'colors_colors'
end end
object XDataWebDataSet1staff_fields_quickbooks_item: TStringField object xdwdsOrderstaff_fields_quickbooks_item: TStringField
FieldName = 'staff_fields_quickbooks_item' FieldName = 'staff_fields_quickbooks_item'
end end
object XDataWebDataSet1staff_fields_quantity: TStringField object xdwdsOrderstaff_fields_quantity: TStringField
FieldName = 'staff_fields_quantity' FieldName = 'staff_fields_quantity'
end end
object XDataWebDataSet1layout_rsc_style: TStringField object xdwdsOrderlayout_rsc_style: TStringField
FieldName = 'layout_rsc_style' FieldName = 'layout_rsc_style'
end end
object XDataWebDataSet1staff_fields_art_location: TStringField object xdwdsOrderstaff_fields_art_location: TStringField
FieldName = 'staff_fields_art_location' FieldName = 'staff_fields_art_location'
end end
object XDataWebDataSet1supplied_by_customer_color_copy: TBooleanField object xdwdsOrdermounting_loose: TStringField
FieldName = 'mounting_loose'
end
object xdwdsOrdermounting_strip_mount: TStringField
FieldName = 'mounting_strip_mount'
end
object xdwdsOrderproofing_e_mail_attn: TStringField
FieldName = 'proofing_e_mail_attn'
end
object xdwdsOrderproofing_approved_date: TStringField
FieldName = 'proofing_approved_date'
end
object xdwdsOrderstaff_fields_order_date: TStringField
FieldName = 'staff_fields_order_date'
end
object xdwdsOrderstaff_fields_proof_date: TStringField
FieldName = 'staff_fields_proof_date'
end
object xdwdsOrderstaff_fields_ship_date: TStringField
FieldName = 'staff_fields_ship_date'
end
object xdwdsOrderstaff_fields_art_due: TStringField
FieldName = 'staff_fields_art_due'
end
object xdwdsOrderstaff_fields_plate_due: TStringField
FieldName = 'staff_fields_plate_due'
end
object xdwdsOrderstaff_fields_mount_due: TStringField
FieldName = 'staff_fields_mount_due'
end
object xdwdsOrderADDRESS_LIST: TStringField
FieldName = 'ADDRESS_LIST'
end
object xdwdsOrdersupplied_by_customer_order_date: TStringField
FieldName = 'supplied_by_customer_order_date'
end
object xdwdsOrderinQuickBooks: TStringField
FieldName = 'inQuickBooks'
end
object xdwdsOrdersupplied_by_customer_color_copy: TStringField
FieldName = 'supplied_by_customer_color_copy' FieldName = 'supplied_by_customer_color_copy'
DisplayValues = 'True;False'
end end
object XDataWebDataSet1supplied_by_customer_plates: TBooleanField object xdwdsOrdersupplied_by_customer_plates: TStringField
FieldName = 'supplied_by_customer_plates' FieldName = 'supplied_by_customer_plates'
DisplayValues = 'True;False'
end end
object XDataWebDataSet1supplied_by_customer_sample_ca: TBooleanField object xdwdsOrdersupplied_by_customer_sample_ca: TStringField
FieldName = 'supplied_by_customer_sample_ca' FieldName = 'supplied_by_customer_sample_ca'
DisplayValues = 'True;False'
end end
object XDataWebDataSet1supplied_by_customer_disk_or_cd: TBooleanField object xdwdsOrdersupplied_by_customer_ftp: TStringField
FieldName = 'supplied_by_customer_disk_or_cd' FieldName = 'supplied_by_customer_ftp'
DisplayValues = 'True;False'
end end
object XDataWebDataSet1mounting_loose: TStringField object xdwdsOrdersupplied_by_customer_e_mail: TStringField
FieldName = 'mounting_loose' FieldName = 'supplied_by_customer_e_mail'
end end
object XDataWebDataSet1mounting_sticky_bak: TBooleanField object xdwdsOrdersupplied_by_customer_existing_: TStringField
FieldName = 'mounting_sticky_bak' FieldName = 'supplied_by_customer_existing_'
DisplayValues = 'True;False'
end end
object XDataWebDataSet1mounting_full_mount: TBooleanField object xdwdsOrdersupplied_by_customer_ref_art_p: TStringField
FieldName = 'mounting_full_mount' FieldName = 'supplied_by_customer_ref_art_p'
DisplayValues = 'True;False'
end end
object XDataWebDataSet1mounting_strip_mount: TStringField object xdwdsOrdersupplied_by_customer_ref_art_a: TStringField
FieldName = 'mounting_strip_mount' FieldName = 'supplied_by_customer_ref_art_a'
end end
object XDataWebDataSet1layout_excalibur_die: TBooleanField object xdwdsOrderlayout_excalibur_die: TStringField
FieldName = 'layout_excalibur_die' FieldName = 'layout_excalibur_die'
DisplayValues = 'True;False'
end end
object XDataWebDataSet1proofing_full_size_panel: TBooleanField object xdwdsOrdermounting_sticky_bak: TStringField
FieldName = 'mounting_sticky_bak'
end
object xdwdsOrdermounting_full_mount: TStringField
FieldName = 'mounting_full_mount'
end
object xdwdsOrderproofing_full_size_panel: TStringField
FieldName = 'proofing_full_size_panel' FieldName = 'proofing_full_size_panel'
DisplayValues = 'True;False'
end end
object XDataWebDataSet1proofing_print_card: TBooleanField object xdwdsOrderproofing_print_card: TStringField
FieldName = 'proofing_print_card' FieldName = 'proofing_print_card'
DisplayValues = 'True;False'
end end
object XDataWebDataSet1proofing_wide_format: TBooleanField object xdwdsOrderproofing_wide_format: TStringField
FieldName = 'proofing_wide_format' FieldName = 'proofing_wide_format'
DisplayValues = 'True;False'
end end
object XDataWebDataSet1proofing_pdf_file: TBooleanField object xdwdsOrderproofing_pdf_file: TStringField
FieldName = 'proofing_pdf_file' FieldName = 'proofing_pdf_file'
DisplayValues = 'True;False'
end end
object XDataWebDataSet1proofing_art_approved_as_is: TBooleanField object xdwdsOrderproofing_art_approved_as_is: TStringField
FieldName = 'proofing_art_approved_as_is' FieldName = 'proofing_art_approved_as_is'
DisplayValues = 'True;False'
end end
object XDataWebDataSet1proofing_e_mail_attn: TStringField object xdwdsOrderIN_QB: TStringField
FieldName = 'proofing_e_mail_attn' FieldName = 'IN_QB'
end end
object XDataWebDataSet1proofing_approved_date: TStringField object xdwdsOrderQB_ORDER_NUM: TStringField
FieldName = 'proofing_approved_date' FieldName = 'QB_ORDER_NUM'
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 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 end
object XDataWebDataSet1staff_fields_mount_due: TStringField object wdsOrder: TWebDataSource
FieldName = 'staff_fields_mount_due'
end
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
AutoEdit = False AutoEdit = False
DataSet = XDataWebDataSet1 DataSet = xdwdsOrder
Left = 1176 Left = 1176
Top = 182 Top = 182
end end
...@@ -1606,6 +1654,13 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated ...@@ -1606,6 +1654,13 @@ object FOrderEntryCorrugated: TFOrderEntryCorrugated
object xdwdsQBItemname: TStringField object xdwdsQBItemname: TStringField
FieldName = 'name' FieldName = 'name'
end end
object xdwdsQBItemdescription: TStringField
FieldName = 'description'
end
object xdwdsQBItemQB_ID: TStringField
FieldName = 'QB_ID'
Size = 0
end
end end
object tmrReturn: TWebTimer object tmrReturn: TWebTimer
Enabled = False Enabled = False
......
...@@ -21,14 +21,17 @@ ...@@ -21,14 +21,17 @@
<button id="btndelete" class="btn btn-danger btn-sm">Delete</button> <button id="btndelete" class="btn btn-danger btn-sm">Delete</button>
</li> </li>
<li class="nav-item pe-2"> <li class="nav-item pe-2">
<button id="btnpdf" class="btn btn-primary btn-sm">PDF</button>
</li>
<li class="nav-item pe-2">
<button id="btnconfirm" class="btn btn-success btn-sm">Save</button> <button id="btnconfirm" class="btn btn-success btn-sm">Save</button>
</li> </li>
<li class="nav-item pe-2"> <li class="nav-item pe-2">
<button id="btncancel" class="btn btn-danger btn-sm">Cancel</button> <button id="btncancel" class="btn btn-danger btn-sm">Cancel</button>
</li> </li>
<li class="nav-item pe-2">
<button id="btnpdf" class="btn btn-primary btn-sm">PDF</button>
</li>
<li class="nav-item pe-2">
<button id="btnsendtoqb" class="btn btn-primary btn-sm">Send To QB</button>
</li>
<li class="nav-item"> <li class="nav-item">
<button id="btnclose" class="btn btn-primary btn-sm">Close</button> <button id="btnclose" class="btn btn-primary btn-sm">Close</button>
</li> </li>
...@@ -37,9 +40,6 @@ ...@@ -37,9 +40,6 @@
</div> </div>
</nav> </nav>
<div class="row mx-5"> <div class="row mx-5">
<div class="col-12 col-md-8">
</div>
<h4 class="custom-h4 mt-3">Customer</h4> <h4 class="custom-h4 mt-3">Customer</h4>
<hr class="custom-hr"> <hr class="custom-hr">
<div class="row"> <div class="row">
...@@ -57,9 +57,13 @@ ...@@ -57,9 +57,13 @@
Please Provide a Customer ID Name. Please Provide a Customer ID Name.
</div> </div>
</div> </div>
<div class="col-auto d-flex flex-column">
<label for="wdbcbinqb" class="form-label mt-2" style="font-weight: 700; font-size: 15px;">In QB?:</label>
<input id="wdbcbinqb" type="checkbox" class="form-check-input mt-1">
</div>
<div class="col-auto"> <div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">In Quickbooks?:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QB Order Number:</label>
<input id="edtinquickbooks"type="text" class="form-control" style="width: 150px"/> <input id="edtqbordernum"type="text" class="form-control" style="width: 150px" required/>
</div> </div>
</div> </div>
<h4 class="custom-h4 mt-3">Staff Fields</h4> <h4 class="custom-h4 mt-3">Staff Fields</h4>
...@@ -90,11 +94,17 @@ ...@@ -90,11 +94,17 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Quantity:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Quantity:</label>
<input id="edtquantity" class="form-control input-sm" style="width: 100px"/> <input id="edtquantity" class="form-control input-sm" style="width: 100px" type="number" min="1" required/>
<div class="invalid-feedback" style="font-size: 15px;" required>
Please Provide a Quantity.
</div>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Price:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Price:</label>
<input id="edtprice" class="form-control input-sm" style="width: 100px" type="number" min="0"/> <input id="edtprice" class="form-control input-sm" style="width: 100px" type="number" min="1" required/>
<div class="invalid-feedback" style="font-size: 15px;">
Please Provide a Price.
</div>
</div> </div>
<div> <div>
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Invoice To:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Invoice To:</label>
...@@ -118,12 +128,26 @@ ...@@ -118,12 +128,26 @@
<input id="edtponumber" class="form-control input-sm" width='50%'/> <input id="edtponumber" class="form-control input-sm" width='50%'/>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Job Name:</label> <label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QB Item:</label>
<input id="edtjobname" class="form-control input-sm" style="width: 300px"/> <select id="wcbqbitem" class='form-select' required></select>
<div class="invalid-feedback" style="font-size: 15px;">
Please Provide a QB Item.
</div>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QuickBooks Item:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Job Name:</label>
<select id="wcbqbitem" class='form-select'></select> <input id="edtjobname" class="form-control input-sm" style="width: 600px"/>
<div class="invalid-feedback" style="font-size: 15px;">
Please Provide a Job Name.
</div>
</div>
<div class="row">
<div class="col-12">
<label for="edtitemdescription" class="form-label mt-2" style="font-weight: 700; font-size: 15px;">
Item Description:
</label>
<input id="edtitemdescription" class="form-control" style="width: 100%;" />
</div>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Art Due:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Art Due:</label>
......
...@@ -13,21 +13,14 @@ uses ...@@ -13,21 +13,14 @@ uses
type type
TFOrderEntryCorrugated = class(TWebForm) TFOrderEntryCorrugated = class(TWebForm)
dtpOrderDate: TWebDateTimePicker;
dtpProofDate: TWebDateTimePicker;
dtpShipDate: TWebDateTimePicker;
WebLabel1: TWebLabel; WebLabel1: TWebLabel;
WebLabel2: TWebLabel; WebLabel2: TWebLabel;
dtpArtDue: TWebDateTimePicker;
dtpPlateDue: TWebDateTimePicker;
dtpMountDue: TWebDateTimePicker;
WebLabel3: TWebLabel; WebLabel3: TWebLabel;
WebLabel4: TWebLabel; WebLabel4: TWebLabel;
WebLabel5: TWebLabel; WebLabel5: TWebLabel;
WebLabel6: TWebLabel; WebLabel6: TWebLabel;
btnAddColor: TWebButton; btnAddColor: TWebButton;
WebLabel7: TWebLabel; WebLabel7: TWebLabel;
dtpApprovedDate: TWebDateTimePicker;
WebLabel8: TWebLabel; WebLabel8: TWebLabel;
WebLabel9: TWebLabel; WebLabel9: TWebLabel;
edtCompanyName: TWebDBEdit; edtCompanyName: TWebDBEdit;
...@@ -70,117 +63,86 @@ type ...@@ -70,117 +63,86 @@ type
cbFullSizePanel: TWebDBCheckBox; cbFullSizePanel: TWebDBCheckBox;
XDataWebClient1: TXDataWebClient; XDataWebClient1: TXDataWebClient;
edtSpecialInstructions: TWebDBEdit; edtSpecialInstructions: TWebDBEdit;
XDataWebDataSet1: TXDataWebDataSet; xdwdsOrder: TXDataWebDataSet;
WebDataSource1: TWebDataSource; wdsOrder: TWebDataSource;
btnSave: TWebButton; btnSave: TWebButton;
XDataWebDataSet1ORDER_ID: TIntegerField; xdwdsOrderORDER_ID: TIntegerField;
XDataWebDataSet1COMPANY_ID: TIntegerField; xdwdsOrderCOMPANY_ID: TIntegerField;
XDataWebDataSet1USER_ID: TIntegerField; xdwdsOrderUSER_ID: TIntegerField;
XDataWebDataSet1ORDER_STATUS: TStringField; xdwdsOrderORDER_STATUS: TStringField;
XDataWebDataSet1SCHED_JSON: TStringField; xdwdsOrderSCHED_JSON: TStringField;
XDataWebDataSet1staff_fields_ship_via: TStringField; xdwdsOrderstaff_fields_ship_via: TStringField;
XDataWebDataSet1staff_fields_price: TStringField; xdwdsOrderstaff_fields_price: TStringField;
XDataWebDataSet1staff_fields_invoice_to: TStringField; xdwdsOrderstaff_fields_invoice_to: TStringField;
XDataWebDataSet1staff_fields_invoice_attention: TStringField; xdwdsOrderstaff_fields_invoice_attention: TStringField;
XDataWebDataSet1staff_fields_ship_to: TStringField; xdwdsOrderstaff_fields_ship_to: TStringField;
XDataWebDataSet1staff_fields_ship_attention: TStringField; xdwdsOrderstaff_fields_ship_attention: TStringField;
XDataWebDataSet1staff_fields_po_number: TStringField; xdwdsOrderstaff_fields_po_number: TStringField;
XDataWebDataSet1staff_fields_job_name: TStringField; xdwdsOrderstaff_fields_job_name: TStringField;
XDataWebDataSet1ORDER_DATE: TDateField; xdwdsOrderORDER_DATE: TDateField;
XDataWebDataSet1START_DATE: TDateField; xdwdsOrderSTART_DATE: TDateField;
XDataWebDataSet1END_DATE: TDateField; xdwdsOrderEND_DATE: TDateField;
XDataWebDataSet1plates_job_number: TStringField; xdwdsOrderplates_job_number: TStringField;
XDataWebDataSet1supplied_by_customer_dimension: TStringField; xdwdsOrdersupplied_by_customer_dimension: TStringField;
XDataWebDataSet1supplied_by_customer_e_mail: TStringField; xdwdsOrdersupplied_by_customer_other: TStringField;
XDataWebDataSet1supplied_by_customer_ftp: TStringField; xdwdsOrdercut_die_cutdier: TStringField;
XDataWebDataSet1supplied_by_customer_other: TStringField; xdwdsOrdercut_die_cutdieb: TStringField;
XDataWebDataSet1supplied_by_customer_existing_: TStringField; xdwdsOrdercut_die_cutdief: TStringField;
XDataWebDataSet1supplied_by_customer_ref_art_p: TStringField; xdwdsOrdercut_die_cutdierkr: TStringField;
XDataWebDataSet1supplied_by_customer_ref_art_a: TStringField; xdwdsOrdercut_die_cutdiefkr: TStringField;
XDataWebDataSet1cut_die_cutdier: TStringField; xdwdsOrdercut_die_cad_file: TStringField;
XDataWebDataSet1cut_die_cutdieb: TStringField; xdwdsOrdercut_die_attached: TStringField;
XDataWebDataSet1cut_die_cutdief: TStringField; xdwdsOrdercut_die_boxpol250: TStringField;
XDataWebDataSet1cut_die_cutdierkr: TStringField; xdwdsOrdercut_die_boxpol155: TStringField;
XDataWebDataSet1cut_die_cutdiefkr: TStringField; xdwdsOrdercut_die_boxpol125: TStringField;
XDataWebDataSet1cut_die_cad_file: TStringField; xdwdsOrdercut_die_brub: TStringField;
XDataWebDataSet1cut_die_attached: TStringField; xdwdsOrderproofing_fax: TStringField;
XDataWebDataSet1cut_die_boxpol250: TStringField; xdwdsOrderproofing_fax_attn: TStringField;
XDataWebDataSet1cut_die_boxpol155: TStringField; xdwdsOrderproofing_e_mail: TStringField;
XDataWebDataSet1cut_die_boxpol125: TStringField; xdwdsOrderproofing_ship_to: TStringField;
XDataWebDataSet1cut_die_brub: TStringField; xdwdsOrderproofing_other: TStringField;
XDataWebDataSet1proofing_fax: TStringField; xdwdsOrderproofing_changes_required: TStringField;
XDataWebDataSet1proofing_fax_attn: TStringField; xdwdsOrderproofing_changes_date: TDateField;
XDataWebDataSet1proofing_e_mail: TStringField; xdwdsOrderlayout_rsc_l: TStringField;
XDataWebDataSet1proofing_ship_to: TStringField; xdwdsOrderlayout_rcs_w: TStringField;
XDataWebDataSet1proofing_other: TStringField; xdwdsOrderlayout_rcs_d: TStringField;
XDataWebDataSet1proofing_changes_required: TStringField; xdwdsOrderlayout_die_cut_no: TStringField;
XDataWebDataSet1proofing_changes_date: TDateField; xdwdsOrderlayout_accross_no: TStringField;
XDataWebDataSet1layout_rsc_l: TStringField; xdwdsOrderlayout_around_no: TStringField;
XDataWebDataSet1layout_rcs_w: TStringField; xdwdsOrderlayout_cad_file: TStringField;
XDataWebDataSet1layout_rcs_d: TStringField; xdwdsOrdercolors_cylinder_size: TStringField;
XDataWebDataSet1layout_die_cut_no: TStringField; xdwdsOrdercolors_machine_ident: TStringField;
XDataWebDataSet1layout_accross_no: TStringField; xdwdsOrdermounting_standard_setup: TStringField;
XDataWebDataSet1layout_around_no: TStringField; xdwdsOrdermounting_custom_backing: TStringField;
XDataWebDataSet1layout_cad_file: TStringField; xdwdsOrdermounting_custom_adhesive: TStringField;
XDataWebDataSet1colors_cylinder_size: TStringField; xdwdsOrdercolors_cross_hairs: TStringField;
XDataWebDataSet1colors_machine_ident: TStringField; xdwdsOrdercolors_clemson: TStringField;
XDataWebDataSet1mounting_standard_setup: TStringField; xdwdsOrderplates_thickness: TStringField;
XDataWebDataSet1mounting_custom_backing: TStringField; xdwdsOrderplates_plate_material: TStringField;
XDataWebDataSet1mounting_custom_adhesive: TStringField; xdwdsOrdergeneral_special_instructions: TStringField;
XDataWebDataSet1colors_cross_hairs: TStringField; xdwdsOrdercolors_colors: TStringField;
XDataWebDataSet1colors_clemson: TStringField; xdwdsOrderstaff_fields_quickbooks_item: TStringField;
XDataWebDataSet1plates_thickness: TStringField; xdwdsOrderstaff_fields_quantity: TStringField;
XDataWebDataSet1plates_plate_material: TStringField; xdwdsOrderlayout_rsc_style: TStringField;
XDataWebDataSet1general_special_instructions: TStringField; xdwdsOrderstaff_fields_art_location: TStringField;
XDataWebDataSet1colors_colors: TStringField; xdwdsOrderNAME: TStringField;
XDataWebDataSet1staff_fields_quickbooks_item: TStringField; xdwdsOrderSHORT_NAME: TStringField;
XDataWebDataSet1staff_fields_quantity: TStringField; xdwdsOrdermounting_loose: TStringField;
XDataWebDataSet1layout_rsc_style: TStringField; xdwdsOrdermounting_strip_mount: TStringField;
XDataWebDataSet1staff_fields_art_location: TStringField; xdwdsOrderproofing_e_mail_attn: TStringField;
XDataWebDataSet1NAME: TStringField; xdwdsOrderproofing_approved_date: TStringField;
XDataWebDataSet1SHORT_NAME: TStringField; xdwdsOrderstaff_fields_order_date: TStringField;
XDataWebDataSet1supplied_by_customer_b_w_copy: TBooleanField; xdwdsOrderstaff_fields_proof_date: TStringField;
XDataWebDataSet1supplied_by_customer_color_copy: TBooleanField; xdwdsOrderstaff_fields_ship_date: TStringField;
XDataWebDataSet1supplied_by_customer_plates: TBooleanField; xdwdsOrderstaff_fields_art_due: TStringField;
XDataWebDataSet1supplied_by_customer_sample_ca: TBooleanField; xdwdsOrderstaff_fields_plate_due: TStringField;
XDataWebDataSet1supplied_by_customer_disk_or_cd: TBooleanField; xdwdsOrderstaff_fields_mount_due: TStringField;
XDataWebDataSet1mounting_loose: TStringField; xdwdsOrderADDRESS_LIST: 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;
cbRefArtAPDF: TWebCheckBox;
cbRefArtPrintCard: TWebCheckBox;
cbExistingCuttingDie: TWebCheckBox;
cbFTP: TWebCheckBox;
cbSampleCarton: TWebCheckBox;
cbPlates: TWebCheckBox;
cbColorCopy: TWebCheckBox;
cbStripMount: TWebCheckBox;
cbFullMount: TWebCheckBox;
cbStickyBak: TWebCheckBox;
cbLoose: TWebCheckBox;
cbExcaliburDie: TWebCheckBox;
XDataWebDataSet1ADDRESS_LIST: TStringField;
wdsShipTo: TWebDataSource; wdsShipTo: TWebDataSource;
xdwdsShipTo: TXDataWebDataSet; xdwdsShipTo: TXDataWebDataSet;
xdwdsShipToADDRESS: TStringField; xdwdsShipToADDRESS: TStringField;
wdbcbShipTo: TWebDBComboBox; wdbcbShipTo: TWebDBComboBox;
cbEmail: TWebCheckBox; xdwdsOrdersupplied_by_customer_order_date: TStringField;
XDataWebDataSet1supplied_by_customer_order_date: TStringField;
btnCancel: TWebButton; btnCancel: TWebButton;
wdbcbQuickbooksItem: TWebDBComboBox; wdbcbQuickbooksItem: TWebDBComboBox;
wdsQBItem: TWebDataSource; wdsQBItem: TWebDataSource;
...@@ -192,26 +154,69 @@ type ...@@ -192,26 +154,69 @@ type
btnCopy: TWebButton; btnCopy: TWebButton;
btnDelete: TWebButton; btnDelete: TWebButton;
btnClose: TWebButton; btnClose: TWebButton;
edtOrderNum: TWebEdit;
tmrReturn: TWebTimer; tmrReturn: TWebTimer;
btnEdit: TWebButton; btnEdit: TWebButton;
btnAdd: TWebButton; btnAdd: TWebButton;
WebButton2: TWebButton; WebButton2: TWebButton;
lblFormState: TWebLabel; lblFormState: TWebLabel;
XDataWebDataSet1inQuickBooks: TStringField; xdwdsOrderinQuickBooks: TStringField;
dtpShipDate: TWebDBDateTimePicker;
dtpProofDate: TWebDBDateTimePicker;
dtpOrderDate: TWebDBDateTimePicker;
dtpApprovedDate: TWebDBDateTimePicker;
dtpMountDue: TWebDBDateTimePicker;
dtpPlateDue: TWebDBDateTimePicker;
dtpArtDue: TWebDBDateTimePicker;
cbPlates: TWebDBCheckBox;
cbSampleCarton: TWebDBCheckBox;
cbFTP: TWebDBCheckBox;
cbColorCopy: TWebDBCheckBox;
cbEmail: TWebDBCheckBox;
cbExistingCuttingDie: TWebDBCheckBox;
cbRefArtAPDF: TWebDBCheckBox;
cbRefArtPrintCard: TWebDBCheckBox;
cbFullMount: TWebDBCheckBox;
cbStickyBak: TWebDBCheckBox;
cbExcaliburDie: TWebDBCheckBox;
cbLoose: TWebCheckBox;
cbStripMount: TWebCheckBox;
xdwdsOrdersupplied_by_customer_color_copy: TStringField;
xdwdsOrdersupplied_by_customer_plates: TStringField;
xdwdsOrdersupplied_by_customer_sample_ca: TStringField;
xdwdsOrdersupplied_by_customer_ftp: TStringField;
xdwdsOrdersupplied_by_customer_e_mail: TStringField;
xdwdsOrdersupplied_by_customer_existing_: TStringField;
xdwdsOrdersupplied_by_customer_ref_art_p: TStringField;
xdwdsOrdersupplied_by_customer_ref_art_a: TStringField;
xdwdsOrderlayout_excalibur_die: TStringField;
xdwdsOrdermounting_sticky_bak: TStringField;
xdwdsOrdermounting_full_mount: TStringField;
xdwdsOrderproofing_full_size_panel: TStringField;
xdwdsOrderproofing_print_card: TStringField;
xdwdsOrderproofing_wide_format: TStringField;
xdwdsOrderproofing_pdf_file: TStringField;
xdwdsOrderproofing_art_approved_as_is: TStringField;
edtQBItemDescription: TWebEdit;
edtQBOrderNum: TWebDBEdit;
wdbcbINQB: TWebDBCheckBox;
edtOrderNum: TWebDBEdit;
xdwdsQBItemdescription: TStringField;
xdwdsQBItemQB_ID: TStringField;
btnQB: TWebButton;
xdwdsOrderIN_QB: TStringField;
xdwdsOrderQB_ORDER_NUM: TStringField;
procedure WebFormCreate(Sender: TObject); procedure WebFormCreate(Sender: TObject);
[async] procedure getOrder(Order_ID: string); [async] procedure getOrder(Order_ID: string);
[async] procedure getCustomer(customerID: string); [async] procedure SetEmptyOrderInfo(customerID: string);
procedure btnAddColorClick(Sender: TObject); procedure btnAddColorClick(Sender: TObject);
procedure addColorRow(num, Color, LPI, Size: string); procedure addColorRow(num, Color, LPI, Size: string);
procedure btnSaveClick(Sender: TObject); procedure btnSaveClick(Sender: TObject);
[async] procedure AddCorrugatedOrder(orderJSON: TJSONObject); [async] procedure SendCorrugatedOrder();
[async] procedure GenerateReportPDF; [async] procedure GenerateReportPDF;
[async] procedure DelOrder(); [async] procedure DelOrder();
procedure btnCancelClick(Sender: TObject); procedure btnCancelClick(Sender: TObject);
procedure btnPDFClick(Sender: TObject); procedure btnPDFClick(Sender: TObject);
procedure btnCopyClick(Sender: TObject); procedure btnCopyClick(Sender: TObject);
procedure sendOrderToServer();
procedure btnCloseClick(Sender: TObject); procedure btnCloseClick(Sender: TObject);
procedure btnDeleteClick(Sender: TObject); procedure btnDeleteClick(Sender: TObject);
procedure tmrReturnTimer(Sender: TObject); procedure tmrReturnTimer(Sender: TObject);
...@@ -223,7 +228,10 @@ type ...@@ -223,7 +228,10 @@ type
procedure WebButton2Click(Sender: TObject); procedure WebButton2Click(Sender: TObject);
procedure ShowAddAddressForm(); procedure ShowAddAddressForm();
[async] procedure SendAddressToServer(AddressJSON: TJSONObject); [async] procedure SendAddressToServer(AddressJSON: TJSONObject);
procedure wdbcbShipToChange(Sender: TObject); procedure edtJobNameExit(Sender: TObject);
procedure wdbcbQuickbooksItemChange(Sender: TObject);
procedure btnQBClick(Sender: TObject);
function VerifyQBOrder: Boolean;
private private
FAgencyCode: string; FAgencyCode: string;
FCurrentReportType: string; FCurrentReportType: string;
...@@ -233,8 +241,10 @@ type ...@@ -233,8 +241,10 @@ type
customerID: string; customerID: string;
changed: boolean; changed: boolean;
notification: string; notification: string;
customer_qb_id: string;
procedure RemoveColorRow(Sender: TObject); procedure RemoveColorRow(Sender: TObject);
[async] procedure InitializeForm; [async] procedure InitializeForm;
[async] procedure AddEstimate(orderID: string);
//FJSONProc1: TJSONProc1; //FJSONProc1: TJSONProc1;
public public
class function CreateForm(AElementID, orderInfo, customerInfo, modeparam, info: string): TWebForm; class function CreateForm(AElementID, orderInfo, customerInfo, modeparam, info: string): TWebForm;
...@@ -272,7 +282,7 @@ end; ...@@ -272,7 +282,7 @@ end;
begin begin
if mode = 'ADD' then if mode = 'ADD' then
begin begin
await(getCustomer(customerID)); await(SetEmptyOrderInfo(customerID));
EditMode; EditMode;
end end
else else
...@@ -286,230 +296,53 @@ begin ...@@ -286,230 +296,53 @@ begin
ShowToast(notification); ShowToast(notification);
end; end;
procedure TFOrderEntryCorrugated.sendOrderToServer();
// This can be improved. I was struggling to get the checkboxes to work with
// The dataset at first, but if you just change the fields in the database to be
// Booleans it should work
var
colorList: TJSONArray;
container: TJSElement;
colorCollection: TJSHTMLCollection;
color: TJSHTMLElement;
I, J: integer;
colorJSON, orderJSON, colorListJSON: TJSONObject;
fieldNames: TStringList;
itemList: TJSNodeList;
header, value: string;
Field: TField;
Response: TXDataClientResponse;
begin
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;
itemList := colorCollection[I].childNodes;
for J := 0 to itemList.length - 2 do
begin
header := TJSHTMLElement(itemList[J]).children[0].innerText.Replace(':', '').Trim();
value := TJSHTMLInputElement(TJSHTMLElement(itemList[J]).childNodes[1]).value;
colorJSON.AddPair(header, value);
end;
colorList.Add(colorJSON);
end;
colorListJSON := TJSONObject.Create;
colorListJSON.AddPair('items', colorList);
XDataWebDataSet1.Edit;
XDataWebDataSet1colors_colors.Value := colorListJSON.ToString;
//Convert all dates to strings because I was having less issues with that data type.
XDataWebDataSet1staff_fields_proof_date.Value := DateTimeToStr(dtpProofDate.Date);
XDataWebDataSet1staff_fields_ship_date.Value := DateTimeToStr(dtpShipDate.Date);
XDataWebDataSet1staff_fields_art_due.Value := DateTimeToStr(dtpArtDue.Date);
XDataWebDataSet1staff_fields_mount_due.Value := DateTimeToStr(dtpMountDue.Date);
XDataWebDataSet1staff_fields_plate_due.Value := DateTimeToStr(dtpPlateDue.Date);
XDataWebDataSet1staff_fields_order_date.Value := DateTimeToStr(dtpOrderDate.Date);
XDataWebDataSet1proofing_approved_date.Value := DateTimeToStr(dtpApprovedDate.Date);
// Convert all check boxes to strings because the database stores them as strings
if cbFTP.Checked then
XDataWebDataSet1supplied_by_customer_ftp.AsString := 'T'
else
XDataWebDataSet1supplied_by_customer_ftp.AsString := '';
if cbExistingCuttingDie.Checked then
XDataWebDataSet1supplied_by_customer_existing_.AsString := 'T'
else
XDataWebDataSet1supplied_by_customer_existing_.AsString := '';
if cbRefArtPrintCard.Checked then
XDataWebDataSet1supplied_by_customer_ref_art_p.AsString := 'T'
else
XDataWebDataSet1supplied_by_customer_ref_art_p.AsString := '';
if cbRefArtAPDF.Checked then
XDataWebDataSet1supplied_by_customer_ref_art_a.AsString := 'T'
else
XDataWebDataSet1supplied_by_customer_ref_art_a.AsString := '';
if cbColorCopy.Checked then
XDataWebDataSet1supplied_by_customer_color_copy.AsString := 'T'
else
XDataWebDataSet1supplied_by_customer_color_copy.AsString := '';
if cbPlates.Checked then
XDataWebDataSet1supplied_by_customer_plates.AsString := 'T'
else
XDataWebDataSet1supplied_by_customer_plates.AsString := '';
if cbSampleCarton.Checked then
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;
//xdwdsShipTo.Post;
//xdwdsQBItem.Post;
XDataWebDataSet1.First;
while not XDataWebDataSet1.Eof do
begin
for Field in XDataWebDataSet1.Fields do
begin
if Field is TStringField then
begin
if Field.AsString = '' then
begin
orderJSON.AddPair(Field.FieldName, '');
end
else
orderJSON.AddPair(Field.FieldName, Field.AsString); // Add all other fields
end
else if Field is TBooleanField then
begin
if Field.AsBoolean then
orderJSON.AddPair(Field.FieldName, 'T')
else
orderJSON.AddPair(Field.FieldName, '');
end;
end;
XDataWebDataSet1.Next;
end;
orderJSON.AddPair('COMPANY_ID', customerID);
orderJSON.AddPair('USER_ID', JS.toString(AuthService.TokenPayload.Properties['user_id']));
orderJSON.AddPair('mode', mode);
if mode = 'EDIT' then
orderJSON.AddPair('ORDER_ID', orderID);
AddCorrugatedOrder(orderJSON);
end;
procedure TFOrderEntryCorrugated.btnSaveClick(Sender: TObject); procedure TFOrderEntryCorrugated.btnSaveClick(Sender: TObject);
// Converts all the information on the page into a JSON to then send to the server // Converts all the information on the page into a JSON to then send to the server
begin begin
if VerifyOrder() then if VerifyOrder() then
begin begin
sendOrderToServer(); SendCorrugatedOrder();
ViewMode(); ViewMode();
end; end;
end; end;
function TFOrderEntryCorrugated.VerifyOrder: Boolean; procedure TFOrderEntryCorrugated.AddEstimate(orderID: string);
var var
input: TJSHTMLInputElement; Response: TXDataClientResponse;
notification: TJSObject;
msg: string;
begin begin
result := true; try
Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.AddEstimate',
input := TJSHTMLInputElement(document.getElementById('edtcompanyname')); [orderID]));
if edtCompanyName.Text = '' then notification := TJSObject(Response.Result);
begin msg := string(notification['status']);
input.classList.add('is-invalid'); Utils.HideSpinner('spinner');
result := false; getOrder(orderID);
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtaccountcompanyname'));
if edtCompanyAccountName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtinvoiceto'));
if edtInvoiceTo.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('wcbshipto'));
if wdbcbShipTo.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('dtporderdate')); ShowToast(msg);
if dtpOrderDate.Date = 0 then except
begin on E: EXDataClientRequestException do
input.classList.add('is-invalid'); Utils.ShowErrorModal(E.ErrorResult.ErrorMessage);
result := false; end;
end
else
input.classList.remove('is-invalid');
end; end;
procedure TFOrderEntryCorrugated.btnCopyClick(Sender: TObject); procedure TFOrderEntryCorrugated.btnCopyClick(Sender: TObject);
begin begin
mode := 'ADD'; mode := 'ADD';
window.scrollTo(0, 0); xdwdsOrder.Edit;
dtpOrderDate.Date := 0; xdwdsOrder.FieldByName('staff_fields_order_date').AsDateTime := 0;
dtpProofDate.Date := 0; xdwdsOrder.FieldByName('staff_fields_proof_date').AsDateTime := 0;
dtpArtDue.Date := 0; xdwdsOrder.FieldByName('staff_fields_art_due').AsDateTime := 0;
dtpPlateDue.Date := 0; xdwdsOrder.FieldByName('staff_fields_plate_due').AsDateTime := 0;
dtpMountDue.Date := 0; xdwdsOrder.FieldByName('staff_fields_mount_due').AsDateTime := 0;
dtpShipDate.Date := 0; xdwdsOrder.FieldByName('staff_fields_ship_date').AsDateTime := 0;
dtpApprovedDate.Date := 0; xdwdsOrder.FieldByName('proofing_approved_date').AsDateTime := 0;
edtOrderNum.Text := '';
xdwdsOrder.FieldByName('IN_QB').AsString := 'F';
xdwdsOrder.FieldByName('QB_ORDER_NUM').AsString := '';
xdwdsOrder.FieldByName('ORDER_ID').AsString := '';
xdwdsOrder.Post;
EditMode(); EditMode();
ShowToast('Success: Order Successfully Copied'); ShowToast('Success: Order Successfully Copied');
window.scrollTo(0, 0); window.scrollTo(0, 0);
...@@ -550,6 +383,25 @@ begin ...@@ -550,6 +383,25 @@ begin
end; end;
procedure TFOrderEntryCorrugated.btnQBClick(Sender: TObject);
begin
if JS.toString(AuthService.TokenPayload.Properties['user_qb_id']) <> '' then
begin
if ( VerifyQBOrder() )then
begin
if wdbcbINQB.Checked = false then
begin
Utils.ShowSpinner('spinner');
addEstimate(xdwdsOrder.FieldByName('ORDER_ID').AsString);
end
else
ShowToast('Failure:Cannot submit orders already in QuickBooks', 'failure');
end;
end
else
ShowToast('Failure:User not authorized to add to QuickBooks', 'failure');
end;
[async] procedure TFOrderEntryCorrugated.GenerateReportPDF; [async] procedure TFOrderEntryCorrugated.GenerateReportPDF;
// sends the search to the server which then sends back a pdf of the results // sends the search to the server which then sends back a pdf of the results
var var
...@@ -573,19 +425,86 @@ begin ...@@ -573,19 +425,86 @@ begin
end; end;
procedure TFOrderEntryCorrugated.AddCorrugatedOrder(orderJSON: TJSONObject); procedure TFOrderEntryCorrugated.SendCorrugatedOrder();
// sends the order JSON object to the server // sends the order JSON object to the server
var var
Response: TXDataClientResponse; Response: TXDataClientResponse;
jsObj: TJSObject; jsObj: TJSObject;
colorList: TJSONArray;
container: TJSElement;
colorCollection: TJSHTMLCollection;
color: TJSHTMLElement;
I, J: integer;
colorJSON, orderJSON, colorListJSON: TJSONObject;
fieldNames: TStringList;
itemList: TJSNodeList;
header, value: string;
Field: TField;
begin begin
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;
itemList := colorCollection[I].childNodes;
for J := 0 to itemList.length - 2 do
begin
header := TJSHTMLElement(itemList[J]).children[0].innerText.Replace(':', '').Trim();
value := TJSHTMLInputElement(TJSHTMLElement(itemList[J]).childNodes[1]).value;
colorJSON.AddPair(header, value);
end;
colorList.Add(colorJSON);
end;
colorListJSON := TJSONObject.Create;
colorListJSON.AddPair('items', colorList);
xdwdsOrder.Edit;
xdwdsOrdercolors_colors.Value := colorListJSON.ToString;
xdwdsOrderUSER_ID.AsString := JS.toString(AuthService.TokenPayload.Properties['user_id']);
xdwdsOrder.Post;
xdwdsOrder.First;
while not xdwdsOrder.Eof do
begin
for Field in xdwdsOrder.Fields do
begin
if Field is TStringField then
begin
if Field.AsString = '' then
begin
orderJSON.AddPair(Field.FieldName, '');
end
else
orderJSON.AddPair(Field.FieldName, Field.AsString); // Add all other fields
end
else if Field is TBooleanField then
begin
if Field.AsBoolean then
orderJSON.AddPair(Field.FieldName, 'T')
else
orderJSON.AddPair(Field.FieldName, 'F');
end
else if Field is TIntegerField then
orderJSON.AddPair(Field.FieldName, Field.AsInteger);
end;
xdwdsOrder.Next;
end;
orderJSON.AddPair('mode', mode);
Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.AddCorrugatedOrder', Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.AddCorrugatedOrder',
[orderJSON.ToString])); [orderJSON.ToString]));
jsObj := JS.TJSObject(Response.Result); jsObj := JS.TJSObject(Response.Result);
if mode = 'ADD' then
OrderID := String(jsObj.Properties['OrderID']); xdwdsOrder.Close;
edtOrderNum.Text := OrderID; xdwdsOrder.SetJsonData(jsObj);
xdwdsOrder.Open;
mode := 'EDIT'; mode := 'EDIT';
ShowToast(string(jsObj.Properties['status'])); ShowToast(string(jsObj.Properties['status']));
end; end;
...@@ -690,7 +609,6 @@ begin ...@@ -690,7 +609,6 @@ begin
ShowAddAddressForm(); ShowAddAddressForm();
end; end;
procedure TFOrderEntryCorrugated.SendAddressToServer(AddressJSON: TJSONObject); procedure TFOrderEntryCorrugated.SendAddressToServer(AddressJSON: TJSONObject);
var var
Response: TXDataClientResponse; Response: TXDataClientResponse;
...@@ -847,19 +765,23 @@ var ...@@ -847,19 +765,23 @@ var
color: TJSObject; color: TJSObject;
colorJSON: TJSONObject; colorJSON: TJSONObject;
colorListJSON: TJSONArray; colorListJSON: TJSONArray;
container: TJSHTMLElement;
begin begin
try try
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetOrder', [Order_ID])); xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetCorrugatedOrder', [Order_ID]));
order := TJSObject(xdcResponse.Result); order := TJSObject(xdcResponse.Result);
data := TJSArray(order['data']); data := TJSArray(order['data']);
XDataWebDataSet1.Close; xdwdsOrder.Close;
XDataWebDataSet1.SetJsonData(order); xdwdsOrder.SetJsonData(order);
XDataWebDataSet1.Open; xdwdsOrder.Open;
XDataWebDataSet1.Edit;
if XDataWebDataSet1colors_colors.Value <> '' then container := TJSHTMLElement(document.getElementById('additionalFields'));
if Assigned(container) then
container.innerHTML := ''; // Wipe previous content
if xdwdsOrdercolors_colors.Value <> '' then
begin begin
colorObject := TJSObject(TJSJSON.parse(XDataWebDataSet1colors_colors.Value)); colorObject := TJSObject(TJSJSON.parse(xdwdsOrdercolors_colors.Value));
colorList := TJSArray(colorObject['items']); colorList := TJSArray(colorObject['items']);
for I := 0 to colorList.length -1 do for I := 0 to colorList.length -1 do
begin begin
...@@ -868,122 +790,31 @@ begin ...@@ -868,122 +790,31 @@ begin
end; end;
end; end;
// Check boxes and dates need to be manually set if xdwdsOrder.FieldByName('mounting_loose').AsString <> '' then
cbLoose.Checked := true;
if not (XDataWebDataSet1staff_fields_order_date.AsString = '') then
dtpOrderDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_order_date.Value)
else
dtpOrderDate.Date := 0;
if not (XDataWebDataSet1staff_fields_proof_date.AsString = '') then
dtpProofDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_proof_date.AsString)
else
dtpProofDate.Date := 0;
if not (XDataWebDataSet1staff_fields_ship_date.AsString = '') then
dtpShipDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_ship_date.AsString)
else
dtpShipDate.Date := 0;
if not (XDataWebDataSet1staff_fields_art_due.AsString = '') then
dtpArtDue.Date := StrToDateTime(XDataWebDataSet1staff_fields_art_due.AsString)
else
dtpArtDue.Date := 0;
if not (XDataWebDataSet1staff_fields_plate_due.AsString = '') then
dtpPlateDue.Date := StrToDateTime(XDataWebDataSet1staff_fields_plate_due.AsString)
else
dtpPlateDue.Date := 0;
if not (XDataWebDataSet1staff_fields_mount_due.AsString = '') then
dtpMountDue.Date := StrToDateTime(XDataWebDataSet1staff_fields_mount_due.AsString)
else
dtpMountDue.Date := 0;
if not (XDataWebDataSet1proofing_approved_date.AsString = '') then
dtpApprovedDate.Date := StrToDateTime(XDataWebDataSet1proofing_approved_date.AsString)
else
dtpApprovedDate.Date := 0;
if XDataWebDataSet1supplied_by_customer_existing_.AsString = 'T' then
cbExistingCuttingDie.Checked := true
else
cbExistingCuttingDie.Checked := false;
if XDataWebDataSet1supplied_by_customer_ref_art_a.AsString = 'T' then
cbRefArtAPDF.Checked := true
else
cbRefArtAPDF.Checked := false;
if XDataWebDataSet1supplied_by_customer_ref_art_p.AsString = 'T' then
cbRefArtPrintCard.Checked := true
else
cbRefArtPrintCard.Checked := false;
// Supplied by customers check boxes if xdwdsOrder.FieldByName('mounting_strip_mount').AsString <> '' then
cbStripMount.Checked := true;
if XDataWebDataSet1supplied_by_customer_color_copy.AsBoolean then
cbColorCopy.Checked := true
else
cbColorCopy.checked := false;
if XDataWebDataSet1supplied_by_customer_ftp.AsString <> '' then
begin
cbFTP.Checked := true;
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.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 xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetCustomer', [xdwdsOrder.FieldByName('COMPANY_ID').AsString]));
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;
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetCustomer', [XDataWebDataSet1.FieldByName('COMPANY_ID').AsString]));
customer := TJSObject(xdcResponse.Result); customer := TJSObject(xdcResponse.Result);
xdwdsShipTo.Close; xdwdsShipTo.Close;
xdwdsShipTo.SetJSONData(customer['SHIPPING_ADDRESS_LIST']); xdwdsShipTo.SetJSONData(customer['SHIPPING_ADDRESS_LIST']);
xdwdsShipTo.Open; xdwdsShipTo.Open;
customer_qb_id := string(customer['QB_LIST_ID']);
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetItems', [])); xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetItems', []));
items := TJSObject(xdcResponse.Result); items := TJSObject(xdcResponse.Result);
xdwdsQBItem.Close; xdwdsQBItem.Close;
items := TJSObject(order['ITEMS']);
xdwdsQBItem.SetJsonData(items['data']); xdwdsQBItem.SetJsonData(items['data']);
xdwdsQBITEM.Open; xdwdsQBITEM.Open;
xdwdsQBItem.Locate('name', wdbcbQuickbooksItem.Text , []);
wdbcbQuickbooksItem.Text := xdwdsQBItem.FieldByName('name').AsString;
edtQBItemDescription.text := xdwdsQBItem.FieldByName('description').AsString +
' - ' + xdwdsOrder.FieldByName('staff_fields_job_name').AsString;
except except
on E: EXDataClientRequestException do on E: EXDataClientRequestException do
Utils.ShowErrorModal(E.ErrorResult.ErrorMessage); Utils.ShowErrorModal(E.ErrorResult.ErrorMessage);
...@@ -991,7 +822,7 @@ begin ...@@ -991,7 +822,7 @@ begin
end; end;
procedure TFOrderEntryCorrugated.getCustomer(customerID: string); procedure TFOrderEntryCorrugated.SetEmptyOrderInfo(customerID: string);
// gets a customer from the database then loads the appropiate fields // gets a customer from the database then loads the appropiate fields
var var
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
...@@ -1002,15 +833,26 @@ begin ...@@ -1002,15 +833,26 @@ begin
try try
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetCustomer', [customerID])); xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetCustomer', [customerID]));
customer := TJSObject(xdcResponse.Result); customer := TJSObject(xdcResponse.Result);
XDataWebDataSet1.Close; xdwdsOrder.Close;
XDataWebDataSet1.SetJsonData(customer); xdwdsOrder.SetJsonData(customer);
XDataWebDataSet1.Open; xdwdsOrder.Open;
XDataWebDataSet1.Edit; xdwdsOrder.Edit;
xdwdsShipTo.Close; xdwdsShipTo.Close;
xdwdsShipTo.SetJSONData(customer['SHIPPING_ADDRESS_LIST']); xdwdsShipTo.SetJSONData(customer['SHIPPING_ADDRESS_LIST']);
xdwdsShipTo.Open; xdwdsShipTo.Open;
customer_qb_id := string(customer['QB_LIST_ID']);
xdwdsOrder.Close;
xdwdsOrder.Open;
xdwdsOrder.Append;
xdwdsOrder.FieldByName('NAME').AsString := string(customer['NAME']);
xdwdsOrder.FieldByName('SHORT_NAME').AsString := string(customer['SHORT_NAME']);
xdwdsOrder.FieldByName('staff_fields_invoice_to').AsString := string(customer['staff_fields_invoice_to']);
xdwdsOrder.FieldByName('COMPANY_ID').AsString := customerID;
xdwdsOrder.Post;
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetItems', [])); xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetItems', []));
items := TJSObject(xdcResponse.Result); items := TJSObject(xdcResponse.Result);
...@@ -1018,13 +860,13 @@ begin ...@@ -1018,13 +860,13 @@ begin
xdwdsQBItem.SetJsonData(items['data']); xdwdsQBItem.SetJsonData(items['data']);
xdwdsQBITEM.Open; xdwdsQBITEM.Open;
dtpOrderDate.Date := 0; {dtpOrderDate.Date := 0;
dtpProofDate.Date := 0; dtpProofDate.Date := 0;
dtpArtDue.Date := 0; dtpArtDue.Date := 0;
dtpPlateDue.Date := 0; dtpPlateDue.Date := 0;
dtpMountDue.Date := 0; dtpMountDue.Date := 0;
dtpShipDate.Date := 0; dtpShipDate.Date := 0;
dtpApprovedDate.Date := 0; dtpApprovedDate.Date := 0;}
except except
on E: EXDataClientRequestException do on E: EXDataClientRequestException do
Utils.ShowErrorModal(E.ErrorResult.ErrorMessage); Utils.ShowErrorModal(E.ErrorResult.ErrorMessage);
...@@ -1046,7 +888,7 @@ procedure TFOrderEntryCorrugated.EditMode(); ...@@ -1046,7 +888,7 @@ procedure TFOrderEntryCorrugated.EditMode();
begin begin
xdwdsShipTo.Edit; xdwdsShipTo.Edit;
xdwdsQBItem.Edit; xdwdsQBItem.Edit;
XDataWebDataSet1.Edit; xdwdsOrder.Edit;
FViewMain.change := true; FViewMain.change := true;
btnCopy.Enabled := false; btnCopy.Enabled := false;
...@@ -1057,6 +899,7 @@ begin ...@@ -1057,6 +899,7 @@ begin
btnCancel.Enabled := True; btnCancel.Enabled := True;
btnEdit.Enabled := false; btnEdit.Enabled := false;
btnAdd.Enabled := false; btnAdd.Enabled := false;
btnQB.Enabled := false;
// Enable all non-DB checkboxes manually // Enable all non-DB checkboxes manually
cbRefArtAPDF.Enabled := True; cbRefArtAPDF.Enabled := True;
...@@ -1086,6 +929,12 @@ begin ...@@ -1086,6 +929,12 @@ begin
end; end;
procedure TFOrderEntryCorrugated.edtJobNameExit(Sender: TObject);
begin
edtQBItemDescription.text := xdwdsQBItem.FieldByName('description').AsString +
' - ' + xdwdsOrder.FieldByName('staff_fields_job_name').AsString;
end;
procedure TFOrderEntryCorrugated.ViewMode; procedure TFOrderEntryCorrugated.ViewMode;
begin begin
btnPDF.Enabled := true; btnPDF.Enabled := true;
...@@ -1096,6 +945,7 @@ begin ...@@ -1096,6 +945,7 @@ begin
btnCancel.Enabled := false; btnCancel.Enabled := false;
btnEdit.Enabled := true; btnEdit.Enabled := true;
btnAdd.Enabled := true; btnAdd.Enabled := true;
btnQB.Enabled := true;
FViewMain.change := false; FViewMain.change := false;
// Explicitly disable all non-DB checkboxes // Explicitly disable all non-DB checkboxes
...@@ -1126,10 +976,186 @@ begin ...@@ -1126,10 +976,186 @@ begin
end; end;
procedure TFOrderEntryCorrugated.wdbcbShipToChange(Sender: TObject); procedure TFOrderEntryCorrugated.wdbcbQuickbooksItemChange(Sender: TObject);
begin
xdwdsQBItem.Locate('name', wdbcbQuickbooksItem.Text , []);
wdbcbQuickbooksItem.Text := xdwdsQBItem.FieldByName('name').AsString;
edtQBItemDescription.text := xdwdsQBItem.FieldByName('description').AsString +
' - ' + xdwdsOrder.FieldByName('staff_fields_job_name').AsString;
end;
function TFOrderEntryCorrugated.VerifyQBOrder: Boolean;
var
msg, SQL: string;
begin
Result := True;
msg := 'To add an order to QuickBooks, the following must be present:' + sLineBreak;
if edtCompanyName.Text = '' then
begin
msg := msg + '- Company Name cannot be empty' + sLineBreak;
Result := False;
end;
if edtCompanyAccountName.Text = '' then
begin
msg := msg + '- Company ID cannot be empty' + sLineBreak;
Result := False;
end;
if edtInvoiceTo.Text = '' then
begin
msg := msg + '- Invoice To cannot be empty' + sLineBreak;
Result := False;
end;
if wdbcbShipTo.Text = '' then
begin
msg := msg + '- Ship To cannot be empty' + sLineBreak;
Result := False;
end;
if dtpOrderDate.Date = 0 then
begin
msg := msg + '- Order Date cannot be empty' + sLineBreak;
Result := False;
end;
if edtPrice.Text = '' then
begin
msg := msg + '- Price cannot be empty' + sLineBreak;
Result := False;
end;
if edtQuantity.Text = '' then
begin
msg := msg + '- Quantity cannot be empty' + sLineBreak;
Result := False;
end;
if wdbcbQuickBooksItem.Text = '' then
begin
msg := msg + '- Item cannot be empty' + sLineBreak;
Result := False;
end;
if edtJobName.Text = '' then
begin
msg := msg + '- Job Name Cannot be empty' + sLineBreak;
Result := False;
end;
xdwdsQBItem.Locate('name', xdwdsOrder.FieldByName('staff_fields_quickbooks_item').AsString, []);
if xdwdsQBItem.FieldByName('QB_ID').AsString = '' then
begin
msg := msg + '- Item Must be Linked to QuickBooks' + sLineBreak;
Result := False;
end;
if customer_qb_id = '' then
begin
msg := msg + '- Customer Must be Linked to QuickBooks' + sLineBreak;
Result := False;
end;
if not result then
asm
alert(msg);
end;
end;
function TFOrderEntryCorrugated.VerifyOrder: Boolean;
var
input: TJSHTMLInputElement;
begin begin
console.log(XDataWebDataSet1.FieldByName('staff_fields_ship_to').AsString); result := true;
console.log(xdwdsShipTo.FieldByName('ADDRESS').AsString);
input := TJSHTMLInputElement(document.getElementById('edtcompanyname'));
if edtCompanyName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtjobname'));
if edtJobName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtaccountcompanyname'));
if edtCompanyAccountName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtinvoiceto'));
if edtInvoiceTo.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('wcbshipto'));
if wdbcbShipTo.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('dtporderdate'));
if dtpOrderDate.Date = 0 then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtprice'));
if edtPrice.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtquantity'));
if edtQuantity.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('wcbqbitem'));
if wdbcbQuickbooksItem.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
end; end;
initialization initialization
......
...@@ -210,21 +210,6 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie ...@@ -210,21 +210,6 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
DataField = 'NAME' DataField = 'NAME'
DataSource = wdsOrder DataSource = wdsOrder
end end
object wcbQBItem: TWebDBComboBox
Left = 26
Top = 487
Width = 145
Height = 23
ElementID = 'wcbqbitem'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnChange = wcbQBItemChange
ItemIndex = -1
DataField = 'staff_fields_quickbooks_item'
DataSource = wdsOrder
ListField = 'name'
ListSource = wdsQBItem
end
object btnPDF: TWebButton object btnPDF: TWebButton
Left = 742 Left = 742
Top = 417 Top = 417
...@@ -406,6 +391,21 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie ...@@ -406,6 +391,21 @@ object FOrderEntryCuttingDie: TFOrderEntryCuttingDie
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
end end
object wcbQBItem: TWebDBComboBox
Left = 26
Top = 491
Width = 145
Height = 23
ElementID = 'wcbqbitem'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnChange = wcbQBItemChange
ItemIndex = -1
DataField = 'staff_fields_quickbooks_item'
DataSource = wdsOrder
ListField = 'name'
ListSource = wdsQBItem
end
object wdsOrder: TWebDataSource object wdsOrder: TWebDataSource
AutoEdit = False AutoEdit = False
DataSet = xdwdsOrder DataSet = xdwdsOrder
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QB Order Number:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QB Order Number:</label>
<input id="edtqbordernum"type="text" class="form-control" style="width: 150px" required/> <input id="edtqbordernum"type="text" class="form-control" style="width: 150px"/>
</div> </div>
</div> </div>
<h4 class="custom-h4 mt-3">Staff Fields</h4> <h4 class="custom-h4 mt-3">Staff Fields</h4>
......
...@@ -53,7 +53,6 @@ type ...@@ -53,7 +53,6 @@ type
wdsQBItem: TWebDataSource; wdsQBItem: TWebDataSource;
xdwdsQBItem: TXDataWebDataSet; xdwdsQBItem: TXDataWebDataSet;
xdwdsQBItemname: TStringField; xdwdsQBItemname: TStringField;
wcbQBItem: TWebDBComboBox;
btnPDF: TWebButton; btnPDF: TWebButton;
btnDelete: TWebButton; btnDelete: TWebButton;
btnClose: TWebButton; btnClose: TWebButton;
...@@ -79,15 +78,15 @@ type ...@@ -79,15 +78,15 @@ type
xdwdsOrderQB_LIST_ID: TStringField; xdwdsOrderQB_LIST_ID: TStringField;
xdwdsQBItemdescription: TStringField; xdwdsQBItemdescription: TStringField;
edtQBItemDescription: TWebEdit; edtQBItemDescription: TWebEdit;
wcbQBItem: TWebDBComboBox;
procedure btnSaveClick(Sender: TObject); procedure btnSaveClick(Sender: TObject);
procedure btnCancelClick(Sender: TObject); procedure btnCancelClick(Sender: TObject);
procedure WebFormCreate(Sender: TObject); procedure WebFormCreate(Sender: TObject);
[async] procedure GetCuttingDieOrder(Order_ID: string); [async] procedure GetCuttingDieOrder(Order_ID: string);
[async] procedure GetEmptyOrderInfo(customerID: string); [async] procedure SetNewOrderInfo(customerID: string);
[async] procedure AddCuttingDieOrder(orderJSON: TJSONObject); [async] procedure SendCuttingDieOrder();
procedure btnPDFClick(Sender: TObject); procedure btnPDFClick(Sender: TObject);
[async] procedure GenerateReportPDF; [async] procedure GenerateReportPDF;
procedure SendOrderToServer();
function VerifyOrder(): boolean; function VerifyOrder(): boolean;
[async] procedure btnDeleteClick(Sender: TObject); [async] procedure btnDeleteClick(Sender: TObject);
[async] procedure delOrder(); [async] procedure delOrder();
...@@ -155,7 +154,7 @@ end; ...@@ -155,7 +154,7 @@ end;
begin begin
if mode = 'ADD' then if mode = 'ADD' then
begin begin
await(getEmptyOrderInfo(customerID)); await(SetNewOrderInfo(customerID));
EditMode; EditMode;
end end
else else
...@@ -191,8 +190,6 @@ end; ...@@ -191,8 +190,6 @@ end;
procedure TFOrderEntryCuttingDie.btnQBClick(Sender: TObject); procedure TFOrderEntryCuttingDie.btnQBClick(Sender: TObject);
begin begin
//ShowToast('Sending Orders To QuickBooks is not yet Implemented', 'info');
console.log(customer_qb_id);
if JS.toString(AuthService.TokenPayload.Properties['user_qb_id']) <> '' then if JS.toString(AuthService.TokenPayload.Properties['user_qb_id']) <> '' then
begin begin
if ( VerifyQBOrder() )then if ( VerifyQBOrder() )then
...@@ -278,152 +275,12 @@ begin ...@@ -278,152 +275,12 @@ begin
); );
end; end;
function TFOrderEntryCuttingDie.VerifyOrder: Boolean;
var
input: TJSHTMLInputElement;
begin
result := true;
input := TJSHTMLInputElement(document.getElementById('edtcompanyname'));
if edtCompanyName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtjobname'));
if edtJobName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtaccountcompanyname'));
if edtCompanyAccountName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtinvoiceto'));
if edtInvoiceTo.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('wcbshipto'));
if wdbcbShipTo.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('dtporderdate'));
if dtpOrderDate.Date = 0 then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtprice'));
if edtPrice.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtquantity'));
if edtQuantity.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('wcbqbitem'));
if wcbQBItem.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
end;
procedure TFOrderEntryCuttingDie.SendOrderToServer;
var
orderJSON: TJSONObject;
fieldNames: TStringList;
itemList: TJSNodeList;
header, value: string;
Field: TField;
Response: TXDataClientResponse;
begin
orderJSON := TJSONObject.Create;
xdwdsOrder.Edit;
xdwdsOrder.Post;
xdwdsOrder.First;
while not xdwdsOrder.Eof do
begin
for Field in xdwdsOrder.Fields do
begin
if Field is TStringField then
begin
if Field.AsString = '' then
orderJSON.AddPair(Field.FieldName, '')
else
orderJSON.AddPair(Field.FieldName, Field.AsString); // Add all other fields
end
else if Field is TBooleanField then
begin
if Field.AsBoolean then
orderJSON.AddPair(Field.FieldName, 'T')
else
orderJSON.AddPair(Field.FieldName, '');
end
else if Field is TIntegerField then
orderJSON.AddPair(Field.FieldName, Field.AsInteger);
end;
xdwdsOrder.Next;
end;
orderJSON.AddPair('mode', mode);
console.log(orderJSON);
AddCuttingDieOrder(orderJSON);
end;
procedure TFOrderEntryCuttingDie.btnSaveClick(Sender: TObject); procedure TFOrderEntryCuttingDie.btnSaveClick(Sender: TObject);
// Converts all the information on the page into a JSON to then send to the server // Converts all the information on the page into a JSON to then send to the server
begin begin
if VerifyOrder() then if VerifyOrder() then
begin begin
sendOrderToServer(); sendCuttingDieOrder();
ViewMode(); ViewMode();
end; end;
window.scrollTo(0, 0); window.scrollTo(0, 0);
...@@ -437,6 +294,8 @@ begin ...@@ -437,6 +294,8 @@ begin
xdwdsOrder.FieldByName('staff_fields_order_date').AsDateTime := 0; xdwdsOrder.FieldByName('staff_fields_order_date').AsDateTime := 0;
xdwdsOrder.FieldByName('staff_fields_proof_date').AsDateTime := 0; xdwdsOrder.FieldByName('staff_fields_proof_date').AsDateTime := 0;
xdwdsOrder.FieldByName('staff_fields_ship_date').AsDateTime := 0; xdwdsOrder.FieldByName('staff_fields_ship_date').AsDateTime := 0;
xdwdsOrder.FieldByName('IN_QB').AsString := 'F';
xdwdsOrder.FieldByName('QB_ORDER_NUM').AsString := '';
xdwdsOrder.FieldByName('ORDER_ID').AsString := ''; xdwdsOrder.FieldByName('ORDER_ID').AsString := '';
xdwdsOrder.Post; xdwdsOrder.Post;
...@@ -508,24 +367,59 @@ begin ...@@ -508,24 +367,59 @@ begin
end; end;
procedure TFOrderEntryCuttingDie.AddCuttingDieOrder(orderJSON: TJSONObject); procedure TFOrderEntryCuttingDie.SendCuttingDieOrder();
// sends the order JSON object to the server // sends the order JSON object to the server
var var
Response: TXDataClientResponse; Response: TXDataClientResponse;
jsObj: TJSObject; jsObj: TJSObject;
orderJSON: TJSONObject;
fieldNames: TStringList;
itemList: TJSNodeList;
header, value: string;
Field: TField;
begin begin
orderJSON := TJSONObject.Create;
xdwdsOrder.Edit;
xdwdsOrderUSER_ID.AsString := JS.toString(AuthService.TokenPayload.Properties['user_id']);
xdwdsOrder.Post;
xdwdsOrder.First;
while not xdwdsOrder.Eof do
begin
for Field in xdwdsOrder.Fields do
begin
if Field is TStringField then
begin
if Field.AsString = '' then
orderJSON.AddPair(Field.FieldName, '')
else
orderJSON.AddPair(Field.FieldName, Field.AsString);
end
else if Field is TBooleanField then
begin
if Field.AsBoolean then
orderJSON.AddPair(Field.FieldName, 'T')
else
orderJSON.AddPair(Field.FieldName, 'F');
end
else if Field is TIntegerField then
orderJSON.AddPair(Field.FieldName, Field.AsInteger);
end;
xdwdsOrder.Next;
end;
orderJSON.AddPair('mode', mode);
try try
Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.AddCuttingDieOrder', Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.AddCuttingDieOrder',
[orderJSON.ToString])); [orderJSON.ToString]));
jsObj := JS.TJSObject(Response.Result); jsObj := JS.TJSObject(Response.Result);
{if mode = 'ADD' then
OrderID := String(jsObj.Properties['OrderID']);}
xdwdsOrder.Close; xdwdsOrder.Close;
xdwdsOrder.SetJsonData(jsObj); xdwdsOrder.SetJsonData(jsObj);
xdwdsOrder.Open; xdwdsOrder.Open;
edtOrderNum.Text := xdwdsOrder.FieldByName('ORDER_ID').AsString;
mode := 'EDIT'; mode := 'EDIT';
ShowToast(String(jsObj.Properties['status'])); ShowToast(String(jsObj.Properties['status']));
except except
...@@ -651,6 +545,8 @@ begin ...@@ -651,6 +545,8 @@ begin
xdwdsQBItem.SetJsonData(items['data']); xdwdsQBItem.SetJsonData(items['data']);
xdwdsQBITEM.Open; xdwdsQBITEM.Open;
xdwdsQBItem.Locate('name', wcbQBItem.Text , []);
wcbQBItem.Text := xdwdsQBItem.FieldByName('name').AsString;
edtQBItemDescription.text := xdwdsQBItem.FieldByName('description').AsString + edtQBItemDescription.text := xdwdsQBItem.FieldByName('description').AsString +
' - ' + xdwdsOrder.FieldByName('staff_fields_job_name').AsString; ' - ' + xdwdsOrder.FieldByName('staff_fields_job_name').AsString;
...@@ -662,8 +558,9 @@ begin ...@@ -662,8 +558,9 @@ begin
end; end;
procedure TFOrderEntryCuttingDie.getEmptyOrderInfo(customerID: string); procedure TFOrderEntryCuttingDie.SetNewOrderInfo(customerID: string);
// gets a customer from the database then loads the appropiate fields // Set new blank order and then gets the customer and items from the database
// then loads the appropiate fields
var var
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
customer, items : TJSObject; customer, items : TJSObject;
...@@ -684,7 +581,6 @@ begin ...@@ -684,7 +581,6 @@ begin
xdwdsOrder.FieldByName('staff_fields_invoice_to').AsString := string(customer['staff_fields_invoice_to']); xdwdsOrder.FieldByName('staff_fields_invoice_to').AsString := string(customer['staff_fields_invoice_to']);
xdwdsOrder.FieldByName('COMPANY_ID').AsString := customerID; xdwdsOrder.FieldByName('COMPANY_ID').AsString := customerID;
xdwdsOrderUSER_ID.AsString := JS.toString(AuthService.TokenPayload.Properties['user_id']);
xdwdsOrder.Post; xdwdsOrder.Post;
xdwdsShipTo.Close; xdwdsShipTo.Close;
...@@ -712,6 +608,7 @@ end; ...@@ -712,6 +608,7 @@ end;
procedure TFOrderEntryCuttingDie.EditMode; procedure TFOrderEntryCuttingDie.EditMode;
begin begin
xdwdsOrder.Edit; xdwdsOrder.Edit;
xdwdsQBItem.Edit;
FViewMain.change := true; FViewMain.change := true;
btnCopy.Enabled := false; btnCopy.Enabled := false;
btnPDF.Enabled := false; btnPDF.Enabled := false;
...@@ -755,10 +652,106 @@ end; ...@@ -755,10 +652,106 @@ end;
procedure TFOrderEntryCuttingDie.wcbQBItemChange(Sender: TObject); procedure TFOrderEntryCuttingDie.wcbQBItemChange(Sender: TObject);
begin begin
xdwdsQBItem.Locate('name', wcbQBItem.Text , []);
wcbQBItem.Text := xdwdsQBItem.FieldByName('name').AsString;
edtQBItemDescription.text := xdwdsQBItem.FieldByName('description').AsString + edtQBItemDescription.text := xdwdsQBItem.FieldByName('description').AsString +
' - ' + xdwdsOrder.FieldByName('staff_fields_job_name').AsString; ' - ' + xdwdsOrder.FieldByName('staff_fields_job_name').AsString;
end; end;
function TFOrderEntryCuttingDie.VerifyOrder: Boolean;
var
input: TJSHTMLInputElement;
begin
result := true;
input := TJSHTMLInputElement(document.getElementById('edtcompanyname'));
if edtCompanyName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtjobname'));
if edtJobName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtaccountcompanyname'));
if edtCompanyAccountName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtinvoiceto'));
if edtInvoiceTo.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('wcbshipto'));
if wdbcbShipTo.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('dtporderdate'));
if dtpOrderDate.Date = 0 then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtprice'));
if edtPrice.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtquantity'));
if edtQuantity.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('wcbqbitem'));
if wcbQBItem.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
end;
function TFOrderEntryCuttingDie.VerifyQBOrder: Boolean; function TFOrderEntryCuttingDie.VerifyQBOrder: Boolean;
var var
msg, SQL: string; msg, SQL: string;
......
...@@ -136,7 +136,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -136,7 +136,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
WidthStyle = ssAuto WidthStyle = ssAuto
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'NAME' DataField = 'NAME'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtCompanyAccountName: TWebDBEdit object edtCompanyAccountName: TWebDBEdit
Left = 24 Left = 24
...@@ -151,97 +151,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -151,97 +151,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'SHORT_NAME' DataField = 'SHORT_NAME'
DataSource = WebDataSource1 DataSource = wdsOrder
end
object edtInQuickBooks: TWebDBEdit
Left = 26
Top = 148
Width = 121
Height = 23
TabStop = False
AutoSize = True
ChildOrder = 79
ElementID = 'edtinquickbooks'
HeightPercent = 100.000000000000000000
ShowFocus = False
WidthPercent = 100.000000000000000000
DataField = 'inQuickBooks'
DataSource = WebDataSource1
end
object dtpOrderDate: TWebDateTimePicker
Left = 24
Top = 215
Width = 170
Height = 22
ElementID = 'dtporderdate'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end
object dtpProofDate: TWebDateTimePicker
Left = 22
Top = 250
Width = 170
Height = 22
ElementID = 'dtpproofdate'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end
object dtpShipDate: TWebDateTimePicker
Left = 22
Top = 282
Width = 170
Height = 22
ElementID = 'dtpshipdate'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end
object dtpArtDue: TWebDateTimePicker
Left = 24
Top = 544
Width = 170
Height = 22
ElementID = 'dtpartdue'
BorderStyle = bsSingle
ChildOrder = 17
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end
object dtpPlateDue: TWebDateTimePicker
Left = 24
Top = 568
Width = 170
Height = 22
ElementID = 'dtpplatedue'
BorderStyle = bsSingle
ChildOrder = 17
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end end
object edtShipVia: TWebDBEdit object edtShipVia: TWebDBEdit
Left = 24 Left = 24
...@@ -256,7 +166,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -256,7 +166,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'staff_fields_ship_via' DataField = 'staff_fields_ship_via'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtQuantity: TWebDBEdit object edtQuantity: TWebDBEdit
Left = 24 Left = 24
...@@ -271,7 +181,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -271,7 +181,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'staff_fields_quantity' DataField = 'staff_fields_quantity'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtPrice: TWebDBEdit object edtPrice: TWebDBEdit
Left = 26 Left = 26
...@@ -285,7 +195,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -285,7 +195,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'staff_fields_price' DataField = 'staff_fields_price'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtInvoiceTo: TWebDBEdit object edtInvoiceTo: TWebDBEdit
Left = 26 Left = 26
...@@ -300,7 +210,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -300,7 +210,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'staff_fields_invoice_to' DataField = 'staff_fields_invoice_to'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtPONumber: TWebDBEdit object edtPONumber: TWebDBEdit
Left = 26 Left = 26
...@@ -315,7 +225,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -315,7 +225,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'staff_fields_po_number' DataField = 'staff_fields_po_number'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtJobName: TWebDBEdit object edtJobName: TWebDBEdit
Left = 30 Left = 30
...@@ -329,10 +239,11 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -329,10 +239,11 @@ object FOrderEntryWeb: TFOrderEntryWeb
HeightPercent = 100.000000000000000000 HeightPercent = 100.000000000000000000
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnExit = edtJobNameExit
DataField = 'staff_fields_job_name' DataField = 'staff_fields_job_name'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object WebDBComboBox1: TWebDBComboBox object wdbcbShipTo: TWebDBComboBox
Left = 26 Left = 26
Top = 429 Top = 429
Width = 145 Width = 145
...@@ -344,7 +255,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -344,7 +255,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
ItemIndex = -1 ItemIndex = -1
DataField = 'staff_fields_ship_to' DataField = 'staff_fields_ship_to'
DataSource = WebDataSource1 DataSource = wdsOrder
ListField = 'ADDRESS' ListField = 'ADDRESS'
ListSource = wdsShipTo ListSource = wdsShipTo
end end
...@@ -361,7 +272,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -361,7 +272,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_b_w_or_co' DataField = 'supplied_by_customer_b_w_or_co'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtPlates: TWebDBEdit object edtPlates: TWebDBEdit
Left = 276 Left = 276
...@@ -376,7 +287,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -376,7 +287,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_plates' DataField = 'supplied_by_customer_plates'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtDimensionalLayout: TWebDBEdit object edtDimensionalLayout: TWebDBEdit
Left = 276 Left = 276
...@@ -391,7 +302,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -391,7 +302,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_dimension' DataField = 'supplied_by_customer_dimension'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtSample: TWebDBEdit object edtSample: TWebDBEdit
Left = 276 Left = 276
...@@ -406,7 +317,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -406,7 +317,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_sample' DataField = 'supplied_by_customer_sample'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtOther: TWebDBEdit object edtOther: TWebDBEdit
Left = 276 Left = 276
...@@ -421,7 +332,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -421,7 +332,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_other' DataField = 'supplied_by_customer_other'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtEmail: TWebDBEdit object edtEmail: TWebDBEdit
Left = 276 Left = 276
...@@ -436,7 +347,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -436,7 +347,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_e_mail' DataField = 'supplied_by_customer_e_mail'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtTotalInchesUsed: TWebDBEdit object edtTotalInchesUsed: TWebDBEdit
Left = 276 Left = 276
...@@ -451,7 +362,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -451,7 +362,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_total_inc' DataField = 'supplied_by_customer_total_inc'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtFTP: TWebDBEdit object edtFTP: TWebDBEdit
Left = 276 Left = 276
...@@ -466,7 +377,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -466,7 +377,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_ftp' DataField = 'supplied_by_customer_ftp'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtSheetsUsed: TWebDBEdit object edtSheetsUsed: TWebDBEdit
Left = 276 Left = 276
...@@ -481,7 +392,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -481,7 +392,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_sheets_us' DataField = 'supplied_by_customer_sheets_us'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtInitials: TWebDBEdit object edtInitials: TWebDBEdit
Left = 276 Left = 276
...@@ -496,7 +407,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -496,7 +407,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'supplied_by_customer_initials' DataField = 'supplied_by_customer_initials'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object cbPDF: TWebDBCheckBox object cbPDF: TWebDBCheckBox
Left = 444 Left = 444
...@@ -512,7 +423,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -512,7 +423,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_pdf' DataField = 'proofing_pdf'
DataSource = WebDataSource1 DataSource = wdsOrder
ValueChecked = 'T' ValueChecked = 'T'
end end
object edtPDFTo: TWebDBEdit object edtPDFTo: TWebDBEdit
...@@ -528,52 +439,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -528,52 +439,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_pdf_to' DataField = 'proofing_pdf_to'
DataSource = WebDataSource1 DataSource = wdsOrder
end
object dtpPDFDate1: TWebDateTimePicker
Left = 444
Top = 157
Width = 170
Height = 22
ElementID = 'dtppdfdate1'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end
object dtpPDFDate3: TWebDateTimePicker
Left = 444
Top = 206
Width = 170
Height = 22
ElementID = 'dtppdfdate3'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end
object dtpPDFDate2: TWebDateTimePicker
Left = 444
Top = 181
Width = 170
Height = 22
ElementID = 'dtppdfdate2'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end end
object cbInkJet: TWebDBCheckBox object cbInkJet: TWebDBCheckBox
Left = 444 Left = 444
...@@ -589,7 +455,9 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -589,7 +455,9 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_full_size_ink_jet_for' DataField = 'proofing_full_size_ink_jet_for'
DataSource = WebDataSource1 DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end end
object edtInkJetTo2: TWebDBEdit object edtInkJetTo2: TWebDBEdit
Left = 444 Left = 444
...@@ -604,7 +472,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -604,7 +472,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_ink_jet_to_2' DataField = 'proofing_ink_jet_to_2'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtInkJetTo1: TWebDBEdit object edtInkJetTo1: TWebDBEdit
Left = 444 Left = 444
...@@ -619,52 +487,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -619,52 +487,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_ink_jet_to' DataField = 'proofing_ink_jet_to'
DataSource = WebDataSource1 DataSource = wdsOrder
end
object dtpInkJetDate1: TWebDateTimePicker
Left = 444
Top = 329
Width = 170
Height = 22
ElementID = 'dtpinkjetdate1'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end
object dtpInkJetDate3: TWebDateTimePicker
Left = 444
Top = 378
Width = 170
Height = 22
ElementID = 'dtpinkjetdate3'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end
object dtpInkJetDate2: TWebDateTimePicker
Left = 444
Top = 353
Width = 170
Height = 22
ElementID = 'dtpinkjetdate2'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end end
object edtColorContrastTo: TWebDBEdit object edtColorContrastTo: TWebDBEdit
Left = 444 Left = 444
...@@ -679,37 +502,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -679,37 +502,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_color_contrac_to' DataField = 'proofing_color_contrac_to'
DataSource = WebDataSource1 DataSource = wdsOrder
end
object dtpColorContractDate1: TWebDateTimePicker
Left = 444
Top = 464
Width = 170
Height = 22
ElementID = 'dtpcolorcontrastdate1'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end
object dtpColorContractDate2: TWebDateTimePicker
Left = 444
Top = 488
Width = 170
Height = 22
ElementID = 'dtpcolorcontrastdate2'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end end
object edtDigitalColorTo: TWebDBEdit object edtDigitalColorTo: TWebDBEdit
Left = 444 Left = 444
...@@ -724,7 +517,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -724,7 +517,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_digital_color_to' DataField = 'proofing_digital_color_to'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtDigitalColorKey: TWebDBEdit object edtDigitalColorKey: TWebDBEdit
Left = 444 Left = 444
...@@ -739,22 +532,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -739,22 +532,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'proofing_digital_color_key' DataField = 'proofing_digital_color_key'
DataSource = WebDataSource1 DataSource = wdsOrder
end
object dtpDigitalColorDate: TWebDateTimePicker
Left = 444
Top = 578
Width = 170
Height = 22
ElementID = 'dtpdigitalcolordate'
BorderStyle = bsSingle
ChildOrder = 4
Color = clWhite
Date = 45638.529943136570000000
Role = ''
ShowFocus = False
TabStop = False
Text = ''
end end
object edtAniloxInfo: TWebDBEdit object edtAniloxInfo: TWebDBEdit
Left = 634 Left = 634
...@@ -769,7 +547,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -769,7 +547,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'quantity_and_colors_anilox_info' DataField = 'quantity_and_colors_anilox_info'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtPressName: TWebDBEdit object edtPressName: TWebDBEdit
Left = 634 Left = 634
...@@ -784,7 +562,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -784,7 +562,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'quantity_and_colors_press_name' DataField = 'quantity_and_colors_press_name'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object WebButton1: TWebButton object WebButton1: TWebButton
Left = 634 Left = 634
...@@ -812,7 +590,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -812,7 +590,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'plate_marks_microdots' DataField = 'plate_marks_microdots'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtMicrodotsComments: TWebDBEdit object edtMicrodotsComments: TWebDBEdit
Left = 634 Left = 634
...@@ -827,7 +605,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -827,7 +605,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'plate_marks_microdots_comments' DataField = 'plate_marks_microdots_comments'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtCrosshairsComments: TWebDBEdit object edtCrosshairsComments: TWebDBEdit
Left = 634 Left = 634
...@@ -842,7 +620,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -842,7 +620,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'plate_marks_crosshairs_comments' DataField = 'plate_marks_crosshairs_comments'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtCrosshairs: TWebDBEdit object edtCrosshairs: TWebDBEdit
Left = 634 Left = 634
...@@ -857,7 +635,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -857,7 +635,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'plate_marks_crosshairs' DataField = 'plate_marks_crosshairs'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtColorBarsComments: TWebDBEdit object edtColorBarsComments: TWebDBEdit
Left = 634 Left = 634
...@@ -872,7 +650,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -872,7 +650,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'plate_marks_color_bars_comments' DataField = 'plate_marks_color_bars_comments'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtColorBars: TWebDBEdit object edtColorBars: TWebDBEdit
Left = 634 Left = 634
...@@ -887,7 +665,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -887,7 +665,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'plate_marks_color_bars' DataField = 'plate_marks_color_bars'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtPlateOther: TWebDBEdit object edtPlateOther: TWebDBEdit
Left = 634 Left = 634
...@@ -902,7 +680,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -902,7 +680,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'plate_marks_other' DataField = 'plate_marks_other'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtPlateOtherComments: TWebDBEdit object edtPlateOtherComments: TWebDBEdit
Left = 634 Left = 634
...@@ -917,7 +695,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -917,7 +695,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'plate_marks_other_comments' DataField = 'plate_marks_other_comments'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtAround: TWebDBEdit object edtAround: TWebDBEdit
Left = 782 Left = 782
...@@ -932,7 +710,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -932,7 +710,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_around' DataField = 'layout_around'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtAccross: TWebDBEdit object edtAccross: TWebDBEdit
Left = 782 Left = 782
...@@ -947,7 +725,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -947,7 +725,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_accross' DataField = 'layout_accross'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtReversePrint: TWebDBEdit object edtReversePrint: TWebDBEdit
Left = 782 Left = 782
...@@ -962,7 +740,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -962,7 +740,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_reverse_print' DataField = 'layout_reverse_print'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtSurfacePrint: TWebDBEdit object edtSurfacePrint: TWebDBEdit
Left = 782 Left = 782
...@@ -977,7 +755,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -977,7 +755,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_surface_print' DataField = 'layout_surface_print'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtCutoffDimension: TWebDBEdit object edtCutoffDimension: TWebDBEdit
Left = 782 Left = 782
...@@ -992,7 +770,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -992,7 +770,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_cutoff_dimension' DataField = 'layout_cutoff_dimension'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtCylinderRepeat: TWebDBEdit object edtCylinderRepeat: TWebDBEdit
Left = 782 Left = 782
...@@ -1007,7 +785,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1007,7 +785,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_cylinder_repeat' DataField = 'layout_cylinder_repeat'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtPitch: TWebDBEdit object edtPitch: TWebDBEdit
Left = 782 Left = 782
...@@ -1022,7 +800,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1022,7 +800,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_pitch' DataField = 'layout_pitch'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtBleed: TWebDBEdit object edtBleed: TWebDBEdit
Left = 782 Left = 782
...@@ -1037,7 +815,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1037,7 +815,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_bleed' DataField = 'layout_bleed'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtTeeth: TWebDBEdit object edtTeeth: TWebDBEdit
Left = 782 Left = 782
...@@ -1052,7 +830,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1052,7 +830,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_teeth' DataField = 'layout_teeth'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtCutback: TWebDBEdit object edtCutback: TWebDBEdit
Left = 782 Left = 782
...@@ -1067,7 +845,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1067,7 +845,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_cutback' DataField = 'layout_cutback'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtMinimumTrapDim: TWebDBEdit object edtMinimumTrapDim: TWebDBEdit
Left = 782 Left = 782
...@@ -1082,7 +860,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1082,7 +860,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_minimum_trap_dim' DataField = 'layout_minimum_trap_dim'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtMaximumTrapDim: TWebDBEdit object edtMaximumTrapDim: TWebDBEdit
Left = 782 Left = 782
...@@ -1097,7 +875,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1097,7 +875,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'layout_maximum_trap_dim' DataField = 'layout_maximum_trap_dim'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtSize: TWebDBEdit object edtSize: TWebDBEdit
Left = 782 Left = 782
...@@ -1112,7 +890,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1112,7 +890,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'upc_size' DataField = 'upc_size'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtBarWidthReduction: TWebDBEdit object edtBarWidthReduction: TWebDBEdit
Left = 782 Left = 782
...@@ -1127,7 +905,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1127,7 +905,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'upc_bar_width_reduction' DataField = 'upc_bar_width_reduction'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtDistortionAmount: TWebDBEdit object edtDistortionAmount: TWebDBEdit
Left = 782 Left = 782
...@@ -1142,7 +920,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1142,7 +920,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'upc_distortion_amount' DataField = 'upc_distortion_amount'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtDistortionPercent: TWebDBEdit object edtDistortionPercent: TWebDBEdit
Left = 782 Left = 782
...@@ -1157,7 +935,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1157,7 +935,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'upc_distortion_percent' DataField = 'upc_distortion_percent'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object edtJobNumber: TWebDBEdit object edtJobNumber: TWebDBEdit
Left = 634 Left = 634
...@@ -1172,7 +950,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1172,7 +950,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'plates_job_number' DataField = 'plates_job_number'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object Comments: TWebDBEdit object Comments: TWebDBEdit
Left = 276 Left = 276
...@@ -1187,7 +965,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1187,7 +965,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
ShowFocus = False ShowFocus = False
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
DataField = 'general_comments' DataField = 'general_comments'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object btnSave: TWebButton object btnSave: TWebButton
Left = 649 Left = 649
...@@ -1228,22 +1006,6 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1228,22 +1006,6 @@ object FOrderEntryWeb: TFOrderEntryWeb
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = btnCancelClick OnClick = btnCancelClick
end end
object wcbQBItem: TWebDBComboBox
Left = 26
Top = 515
Width = 145
Height = 23
ElementID = 'wcbqbitem'
HeightPercent = 100.000000000000000000
ShowFocus = False
TabStop = False
WidthPercent = 100.000000000000000000
ItemIndex = -1
DataField = 'staff_fields_quickbooks_item'
DataSource = WebDataSource1
ListField = 'name'
ListSource = wdsQBItem
end
object WebDBComboBox2: TWebDBComboBox object WebDBComboBox2: TWebDBComboBox
Left = 631 Left = 631
Top = 487 Top = 487
...@@ -1259,7 +1021,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1259,7 +1021,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
'PhotoPolymer' 'PhotoPolymer'
'Rubber') 'Rubber')
DataField = 'plates_plate_material' DataField = 'plates_plate_material'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object WebDBComboBox3: TWebDBComboBox object WebDBComboBox3: TWebDBComboBox
Left = 631 Left = 631
...@@ -1279,7 +1041,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1279,7 +1041,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
'.067' '.067'
'.045') '.045')
DataField = 'plates_thickness' DataField = 'plates_thickness'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object wcbPrint: TWebDBComboBox object wcbPrint: TWebDBComboBox
Left = 621 Left = 621
...@@ -1296,7 +1058,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1296,7 +1058,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
'Portrait' 'Portrait'
'Landscape') 'Landscape')
DataField = 'print_orientation_print_orient' DataField = 'print_orientation_print_orient'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object WebDBComboBox4: TWebDBComboBox object WebDBComboBox4: TWebDBComboBox
Left = 444 Left = 444
...@@ -1313,7 +1075,7 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1313,7 +1075,7 @@ object FOrderEntryWeb: TFOrderEntryWeb
'Cromapro Ink Jet' 'Cromapro Ink Jet'
'Kodak Approval') 'Kodak Approval')
DataField = 'proofing_color_contract' DataField = 'proofing_color_contract'
DataSource = WebDataSource1 DataSource = wdsOrder
end end
object btnCopy: TWebButton object btnCopy: TWebButton
Left = 751 Left = 751
...@@ -1354,19 +1116,6 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1354,19 +1116,6 @@ object FOrderEntryWeb: TFOrderEntryWeb
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = btnCloseClick OnClick = btnCloseClick
end end
object edtOrderNum: TWebEdit
Left = 126
Top = 194
Width = 121
Height = 22
TabStop = False
ChildOrder = 81
ElementID = 'edtordernum'
Enabled = False
HeightPercent = 100.000000000000000000
ShowFocus = False
WidthPercent = 100.000000000000000000
end
object btnEdit: TWebButton object btnEdit: TWebButton
Left = 1165 Left = 1165
Top = 560 Top = 560
...@@ -1406,279 +1155,556 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1406,279 +1155,556 @@ object FOrderEntryWeb: TFOrderEntryWeb
WidthPercent = 100.000000000000000000 WidthPercent = 100.000000000000000000
OnClick = WebButton2Click OnClick = WebButton2Click
end end
object dtpOrderDate: TWebDBDateTimePicker
Left = 26
Top = 215
Width = 170
Height = 22
ElementID = 'dtporderdate'
BorderStyle = bsSingle
ChildOrder = 95
Color = clWhite
Date = 45867.392311898150000000
Role = ''
Text = ''
DataField = 'staff_fields_order_date'
DataSource = wdsOrder
end
object dtpProofDate: TWebDBDateTimePicker
Left = 26
Top = 249
Width = 170
Height = 22
ElementID = 'dtpproofdate'
BorderStyle = bsSingle
ChildOrder = 95
Color = clWhite
Date = 45867.392311898150000000
Role = ''
Text = ''
DataField = 'staff_fields_proof_date'
DataSource = wdsOrder
end
object dtpShipDate: TWebDBDateTimePicker
Left = 26
Top = 281
Width = 170
Height = 22
ElementID = 'dtpshipdate'
BorderStyle = bsSingle
ChildOrder = 95
Color = clWhite
Date = 45867.392311898150000000
Role = ''
Text = ''
DataField = 'staff_fields_ship_date'
DataSource = wdsOrder
end
object dtpPlateDue: TWebDBDateTimePicker
Left = 26
Top = 578
Width = 170
Height = 22
ElementID = 'dtpplatedue'
BorderStyle = bsSingle
ChildOrder = 95
Color = clWhite
Date = 45867.392311898150000000
Role = ''
Text = ''
DataField = 'staff_fields_plate_due'
DataSource = wdsOrder
end
object dtpPDFDate3: TWebDBDateTimePicker
Left = 436
Top = 207
Width = 170
Height = 22
ElementID = 'dtpartdue'
BorderStyle = bsSingle
ChildOrder = 95
Color = clWhite
Date = 45867.392311898150000000
Role = ''
Text = ''
DataField = 'staff_fields_art_due'
DataSource = wdsOrder
end
object dtpPDFDate2: TWebDBDateTimePicker
Left = 436
Top = 183
Width = 170
Height = 22
ElementID = 'dtppdfdate2'
BorderStyle = bsSingle
ChildOrder = 95
Color = clWhite
Date = 45867.392311898150000000
Role = ''
Text = ''
DataField = 'proofing_pdf_date_2'
DataSource = wdsOrder
end
object dtpPDFDate1: TWebDBDateTimePicker
Left = 436
Top = 155
Width = 170
Height = 22
ElementID = 'dtppdfdate1'
BorderStyle = bsSingle
ChildOrder = 95
Color = clWhite
Date = 45867.392311898150000000
Role = ''
Text = ''
DataField = 'proofing_pdf_date_1'
DataSource = wdsOrder
end
object dtpInkJetDate3: TWebDBDateTimePicker
Left = 438
Top = 380
Width = 170
Height = 22
ElementID = 'dtpinkjetdate3'
BorderStyle = bsSingle
ChildOrder = 95
Color = clWhite
Date = 45867.392311898150000000
Role = ''
Text = ''
DataField = 'proofing_ink_jet_date_3'
DataSource = wdsOrder
end
object dtpInkJetDate2: TWebDBDateTimePicker
Left = 438
Top = 352
Width = 170
Height = 22
ElementID = 'dtpinkjetdate2'
BorderStyle = bsSingle
ChildOrder = 95
Color = clWhite
Date = 45867.392311898150000000
Role = ''
Text = ''
DataField = 'proofing_ink_jet_date_2'
DataSource = wdsOrder
end
object dtpInkJetDate1: TWebDBDateTimePicker
Left = 440
Top = 324
Width = 170
Height = 22
ElementID = 'dtpinkjetdate1'
BorderStyle = bsSingle
ChildOrder = 95
Color = clWhite
Date = 45867.392311898150000000
Role = ''
Text = ''
DataField = 'proofing_ink_jet_date_1'
DataSource = wdsOrder
end
object dtpColorContractDate2: TWebDBDateTimePicker
Left = 440
Top = 492
Width = 170
Height = 22
ElementID = 'dtpcolorcontrastdate2'
BorderStyle = bsSingle
ChildOrder = 95
Color = clWhite
Date = 45867.392311898150000000
Role = ''
Text = ''
DataField = 'proofing_color_contrac_date_2'
DataSource = wdsOrder
end
object dtpColorContractDate1: TWebDBDateTimePicker
Left = 438
Top = 464
Width = 170
Height = 22
ElementID = 'dtpcolorcontrastdate1'
BorderStyle = bsSingle
ChildOrder = 95
Color = clWhite
Date = 45867.392311898150000000
Role = ''
Text = ''
DataField = 'proofing_color_contrac_date_1'
DataSource = wdsOrder
end
object dtpDigitalColorDate: TWebDBDateTimePicker
Left = 440
Top = 574
Width = 170
Height = 22
ElementID = 'dtpdigitalcolordate'
BorderStyle = bsSingle
ChildOrder = 95
Color = clWhite
Date = 45867.392311898150000000
Role = ''
Text = ''
DataField = 'proofing_digital_color_date_1'
DataSource = wdsOrder
end
object edtQBOrderNum: TWebDBEdit
Left = 153
Top = 151
Width = 121
Height = 23
AutoCompletion = acNope
AutoSize = True
ChildOrder = 79
ElementID = 'edtqbordernum'
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'QB_ORDER_NUM'
DataSource = wdsOrder
end
object wdbcbINQB: TWebDBCheckBox
Left = 28
Top = 151
Width = 113
Height = 22
Caption = 'In Quickbooks?'
ChildOrder = 29
ElementID = 'wdbcbinqb'
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'IN_QB'
DataSource = wdsOrder
ValueChecked = 'T'
ValueUnChecked = 'F'
end
object edtQBItemDescription: TWebEdit
Left = 28
Top = 550
Width = 121
Height = 22
ChildOrder = 31
ElementID = 'edtitemdescription'
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
end
object edtOrderNum: TWebDBEdit
Left = 103
Top = 185
Width = 121
Height = 22
ChildOrder = 30
ElementID = 'edtordernum'
Enabled = False
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
DataField = 'ORDER_ID'
DataSource = wdsOrder
end
object wcbQBItem: TWebDBComboBox
Left = 26
Top = 521
Width = 145
Height = 23
ElementID = 'wcbqbitem'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnChange = wcbQBItemChange
ItemIndex = -1
DataField = 'staff_fields_quickbooks_item'
DataSource = wdsOrder
ListField = 'name'
ListSource = wdsQBItem
end
object btnQB: TWebButton
Left = 930
Top = 520
Width = 96
Height = 25
Caption = 'Send To QB'
ChildOrder = 30
ElementID = 'btnsendtoqb'
HeightPercent = 100.000000000000000000
WidthPercent = 100.000000000000000000
OnClick = btnQBClick
end
object XDataWebClient1: TXDataWebClient object XDataWebClient1: TXDataWebClient
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 160 Left = 160
Top = 18 Top = 18
end end
object XDataWebDataSet1: TXDataWebDataSet object xdwdsOrder: TXDataWebDataSet
Connection = DMConnection.ApiConnection Connection = DMConnection.ApiConnection
Left = 434 Left = 434
Top = 4 Top = 4
object XDataWebDataSet1inQuickBooks: TStringField object xdwdsOrderORDER_ID: TIntegerField
FieldName = 'inQuickBooks'
end
object XDataWebDataSet1ORDER_ID: TIntegerField
FieldName = 'ORDER_ID' FieldName = 'ORDER_ID'
end end
object XDataWebDataSet1COMPANY_ID: TIntegerField object xdwdsOrderCOMPANY_ID: TIntegerField
FieldName = 'COMPANY_ID' FieldName = 'COMPANY_ID'
end end
object XDataWebDataSet1USER_ID: TIntegerField object xdwdsOrderUSER_ID: TIntegerField
FieldName = 'USER_ID' FieldName = 'USER_ID'
end end
object XDataWebDataSet1ORDER_DATE: TDateField object xdwdsOrderORDER_DATE: TDateField
FieldName = 'ORDER_DATE' FieldName = 'ORDER_DATE'
end end
object XDataWebDataSet1NAME: TStringField object xdwdsOrderNAME: TStringField
FieldName = 'NAME' FieldName = 'NAME'
end end
object XDataWebDataSet1SHORT_NAME: TStringField object xdwdsOrderSHORT_NAME: TStringField
FieldName = 'SHORT_NAME' FieldName = 'SHORT_NAME'
end end
object XDataWebDataSet1staff_fields_ship_via: TStringField object xdwdsOrderstaff_fields_ship_via: TStringField
FieldName = 'staff_fields_ship_via' FieldName = 'staff_fields_ship_via'
end end
object XDataWebDataSet1staff_fields_price: TStringField object xdwdsOrderstaff_fields_price: TStringField
FieldName = 'staff_fields_price' FieldName = 'staff_fields_price'
end end
object XDataWebDataSet1staff_fields_invoice_to: TStringField object xdwdsOrderstaff_fields_invoice_to: TStringField
FieldName = 'staff_fields_invoice_to' FieldName = 'staff_fields_invoice_to'
end end
object XDataWebDataSet1staff_fields_invoice_attention: TStringField object xdwdsOrderstaff_fields_invoice_attention: TStringField
FieldName = 'staff_fields_invoice_attention' FieldName = 'staff_fields_invoice_attention'
end end
object XDataWebDataSet1staff_fields_ship_to: TStringField object xdwdsOrderstaff_fields_ship_to: TStringField
FieldName = 'staff_fields_ship_to' FieldName = 'staff_fields_ship_to'
end end
object XDataWebDataSet1staff_fields_ship_attention: TStringField object xdwdsOrderstaff_fields_ship_attention: TStringField
FieldName = 'staff_fields_ship_attention' FieldName = 'staff_fields_ship_attention'
end end
object XDataWebDataSet1staff_fields_po_number: TStringField object xdwdsOrderstaff_fields_po_number: TStringField
FieldName = 'staff_fields_po_number' FieldName = 'staff_fields_po_number'
end end
object XDataWebDataSet1staff_fields_job_name: TStringField object xdwdsOrderstaff_fields_job_name: TStringField
FieldName = 'staff_fields_job_name' FieldName = 'staff_fields_job_name'
end end
object XDataWebDataSet1staff_fields_quickbooks_item: TStringField object xdwdsOrderstaff_fields_quickbooks_item: TStringField
FieldName = 'staff_fields_quickbooks_item' FieldName = 'staff_fields_quickbooks_item'
end end
object XDataWebDataSet1staff_fields_quantity: TStringField object xdwdsOrderstaff_fields_quantity: TStringField
FieldName = 'staff_fields_quantity' FieldName = 'staff_fields_quantity'
end end
object XDataWebDataSet1staff_fields_art_location: TStringField object xdwdsOrderstaff_fields_art_location: TStringField
FieldName = 'staff_fields_art_location' FieldName = 'staff_fields_art_location'
end end
object XDataWebDataSet1staff_fields_order_date: TStringField object xdwdsOrderstaff_fields_order_date: TStringField
FieldName = 'staff_fields_order_date' FieldName = 'staff_fields_order_date'
end end
object XDataWebDataSet1staff_fields_proof_date: TStringField object xdwdsOrderstaff_fields_proof_date: TStringField
FieldName = 'staff_fields_proof_date' FieldName = 'staff_fields_proof_date'
end end
object XDataWebDataSet1staff_fields_ship_date: TStringField object xdwdsOrderstaff_fields_ship_date: TStringField
FieldName = 'staff_fields_ship_date' FieldName = 'staff_fields_ship_date'
end end
object XDataWebDataSet1staff_fields_art_due: TStringField object xdwdsOrderstaff_fields_art_due: TStringField
FieldName = 'staff_fields_art_due' FieldName = 'staff_fields_art_due'
end end
object XDataWebDataSet1staff_fields_plate_due: TStringField object xdwdsOrderstaff_fields_plate_due: TStringField
FieldName = 'staff_fields_plate_due' FieldName = 'staff_fields_plate_due'
end end
object XDataWebDataSet1ADDRESS_LIST: TStringField object xdwdsOrderADDRESS_LIST: TStringField
FieldName = 'ADDRESS_LIST' FieldName = 'ADDRESS_LIST'
end end
object XDataWebDataSet1plates_job_number: TStringField object xdwdsOrderplates_job_number: TStringField
FieldName = 'plates_job_number' FieldName = 'plates_job_number'
end end
object XDataWebDataSet1supplied_by_customer_plates: TStringField object xdwdsOrdersupplied_by_customer_plates: TStringField
FieldName = 'supplied_by_customer_plates' FieldName = 'supplied_by_customer_plates'
end end
object XDataWebDataSet1supplied_by_customer_sample: TStringField object xdwdsOrdersupplied_by_customer_sample: TStringField
FieldName = 'supplied_by_customer_sample' FieldName = 'supplied_by_customer_sample'
end end
object XDataWebDataSet1supplied_by_customer_dimension: TStringField object xdwdsOrdersupplied_by_customer_dimension: TStringField
FieldName = 'supplied_by_customer_dimension' FieldName = 'supplied_by_customer_dimension'
end end
object XDataWebDataSet1supplied_by_customer_other: TStringField object xdwdsOrdersupplied_by_customer_other: TStringField
FieldName = 'supplied_by_customer_other' FieldName = 'supplied_by_customer_other'
end end
object XDataWebDataSet1supplied_by_customer_disk: TStringField object xdwdsOrdersupplied_by_customer_disk: TStringField
FieldName = 'supplied_by_customer_disk' FieldName = 'supplied_by_customer_disk'
end end
object XDataWebDataSet1supplied_by_customer_e_mail: TStringField object xdwdsOrdersupplied_by_customer_e_mail: TStringField
FieldName = 'supplied_by_customer_e_mail' FieldName = 'supplied_by_customer_e_mail'
end end
object XDataWebDataSet1supplied_by_customer_ftp: TStringField object xdwdsOrdersupplied_by_customer_ftp: TStringField
FieldName = 'supplied_by_customer_ftp' FieldName = 'supplied_by_customer_ftp'
end end
object XDataWebDataSet1plates_plate_material: TStringField object xdwdsOrderplates_plate_material: TStringField
FieldName = 'plates_plate_material' FieldName = 'plates_plate_material'
end end
object XDataWebDataSet1plates_thickness: TStringField object xdwdsOrderplates_thickness: TStringField
FieldName = 'plates_thickness' FieldName = 'plates_thickness'
end end
object XDataWebDataSet1supplied_by_customer_total_inc: TStringField object xdwdsOrdersupplied_by_customer_total_inc: TStringField
FieldName = 'supplied_by_customer_total_inc' FieldName = 'supplied_by_customer_total_inc'
end end
object XDataWebDataSet1supplied_by_customer_sheets_us: TStringField object xdwdsOrdersupplied_by_customer_sheets_us: TStringField
FieldName = 'supplied_by_customer_sheets_us' FieldName = 'supplied_by_customer_sheets_us'
end end
object XDataWebDataSet1supplied_by_customer_initials: TStringField object xdwdsOrdersupplied_by_customer_initials: TStringField
FieldName = 'supplied_by_customer_initials' FieldName = 'supplied_by_customer_initials'
end end
object XDataWebDataSet1proofing_pdf_to: TStringField object xdwdsOrderproofing_pdf_to: TStringField
FieldName = 'proofing_pdf_to' FieldName = 'proofing_pdf_to'
end end
object XDataWebDataSet1proofing_pdf_date_1: TStringField object xdwdsOrderproofing_pdf_date_1: TStringField
FieldName = 'proofing_pdf_date_1' FieldName = 'proofing_pdf_date_1'
end end
object XDataWebDataSet1proofing_pdf_date_2: TStringField object xdwdsOrderproofing_pdf_date_2: TStringField
FieldName = 'proofing_pdf_date_2' FieldName = 'proofing_pdf_date_2'
end end
object XDataWebDataSet1proofing_pdf_date_3: TStringField object xdwdsOrderproofing_pdf_date_3: TStringField
FieldName = 'proofing_pdf_date_3' FieldName = 'proofing_pdf_date_3'
end end
object XDataWebDataSet1proofing_ink_jet_to: TStringField object xdwdsOrderproofing_ink_jet_to: TStringField
FieldName = 'proofing_ink_jet_to' FieldName = 'proofing_ink_jet_to'
end end
object XDataWebDataSet1proofing_ink_jet_to_2: TStringField object xdwdsOrderproofing_ink_jet_to_2: TStringField
FieldName = 'proofing_ink_jet_to_2' FieldName = 'proofing_ink_jet_to_2'
end end
object XDataWebDataSet1proofing_ink_jet_date_1: TStringField object xdwdsOrderproofing_ink_jet_date_1: TStringField
FieldName = 'proofing_ink_jet_date_1' FieldName = 'proofing_ink_jet_date_1'
Size = 0 Size = 0
end end
object XDataWebDataSet1proofing_ink_jet_date_2: TStringField object xdwdsOrderproofing_ink_jet_date_2: TStringField
FieldName = 'proofing_ink_jet_date_2' FieldName = 'proofing_ink_jet_date_2'
end end
object XDataWebDataSet1proofing_ink_jet_date_3: TStringField object xdwdsOrderproofing_ink_jet_date_3: TStringField
FieldName = 'proofing_ink_jet_date_3' FieldName = 'proofing_ink_jet_date_3'
end end
object XDataWebDataSet1proofing_color_contract: TStringField object xdwdsOrderproofing_color_contract: TStringField
FieldName = 'proofing_color_contract' FieldName = 'proofing_color_contract'
end end
object XDataWebDataSet1proofing_color_contrac_to: TStringField object xdwdsOrderproofing_color_contrac_to: TStringField
FieldName = 'proofing_color_contrac_to' FieldName = 'proofing_color_contrac_to'
end end
object XDataWebDataSet1proofing_color_contrac_date_1: TStringField object xdwdsOrderproofing_color_contrac_date_1: TStringField
FieldName = 'proofing_color_contrac_date_1' FieldName = 'proofing_color_contrac_date_1'
end end
object XDataWebDataSet1proofing_color_contrac_date_2: TStringField object xdwdsOrderproofing_color_contrac_date_2: TStringField
FieldName = 'proofing_color_contrac_date_2' FieldName = 'proofing_color_contrac_date_2'
end end
object XDataWebDataSet1proofing_digital_color_key: TStringField object xdwdsOrderproofing_digital_color_key: TStringField
FieldName = 'proofing_digital_color_key' FieldName = 'proofing_digital_color_key'
end end
object XDataWebDataSet1proofing_digital_color_to: TStringField object xdwdsOrderproofing_digital_color_to: TStringField
FieldName = 'proofing_digital_color_to' FieldName = 'proofing_digital_color_to'
end end
object XDataWebDataSet1proofing_digital_color_date_1: TStringField object xdwdsOrderproofing_digital_color_date_1: TStringField
FieldName = 'proofing_digital_color_date_1' FieldName = 'proofing_digital_color_date_1'
Size = 0 Size = 0
end end
object XDataWebDataSet1quantity_and_colors_press_name: TStringField object xdwdsOrderquantity_and_colors_press_name: TStringField
FieldName = 'quantity_and_colors_press_name' FieldName = 'quantity_and_colors_press_name'
end end
object XDataWebDataSet1quantity_and_colors_anilox_info: TStringField object xdwdsOrderquantity_and_colors_anilox_info: TStringField
FieldName = 'quantity_and_colors_anilox_info' FieldName = 'quantity_and_colors_anilox_info'
end end
object XDataWebDataSet1plate_marks_microdots_comments: TStringField object xdwdsOrderplate_marks_microdots_comments: TStringField
FieldName = 'plate_marks_microdots_comments' FieldName = 'plate_marks_microdots_comments'
end end
object XDataWebDataSet1plate_marks_microdots: TStringField object xdwdsOrderplate_marks_microdots: TStringField
FieldName = 'plate_marks_microdots' FieldName = 'plate_marks_microdots'
end end
object XDataWebDataSet1plate_marks_crosshairs: TStringField object xdwdsOrderplate_marks_crosshairs: TStringField
FieldName = 'plate_marks_crosshairs' FieldName = 'plate_marks_crosshairs'
end end
object XDataWebDataSet1plate_marks_crosshairs_comments: TStringField object xdwdsOrderplate_marks_crosshairs_comments: TStringField
FieldName = 'plate_marks_crosshairs_comments' FieldName = 'plate_marks_crosshairs_comments'
end end
object XDataWebDataSet1plate_marks_color_bars: TStringField object xdwdsOrderplate_marks_color_bars: TStringField
FieldName = 'plate_marks_color_bars' FieldName = 'plate_marks_color_bars'
end end
object XDataWebDataSet1plate_marks_color_bars_comments: TStringField object xdwdsOrderplate_marks_color_bars_comments: TStringField
FieldName = 'plate_marks_color_bars_comments' FieldName = 'plate_marks_color_bars_comments'
end end
object XDataWebDataSet1plate_marks_other: TStringField object xdwdsOrderplate_marks_other: TStringField
FieldName = 'plate_marks_other' FieldName = 'plate_marks_other'
end end
object XDataWebDataSet1plate_marks_other_comments: TStringField object xdwdsOrderplate_marks_other_comments: TStringField
FieldName = 'plate_marks_other_comments' FieldName = 'plate_marks_other_comments'
end end
object XDataWebDataSet1print_orientation_print_orient: TStringField object xdwdsOrderprint_orientation_print_orient: TStringField
FieldName = 'print_orientation_print_orient' FieldName = 'print_orientation_print_orient'
end end
object XDataWebDataSet1layout_around: TStringField object xdwdsOrderlayout_around: TStringField
FieldName = 'layout_around' FieldName = 'layout_around'
end end
object XDataWebDataSet1layout_accross: TStringField object xdwdsOrderlayout_accross: TStringField
FieldName = 'layout_accross' FieldName = 'layout_accross'
end end
object XDataWebDataSet1layout_surface_print: TStringField object xdwdsOrderlayout_surface_print: TStringField
FieldName = 'layout_surface_print' FieldName = 'layout_surface_print'
end end
object XDataWebDataSet1layout_reverse_print: TStringField object xdwdsOrderlayout_reverse_print: TStringField
FieldName = 'layout_reverse_print' FieldName = 'layout_reverse_print'
end end
object XDataWebDataSet1layout_cylinder_repeat: TStringField object xdwdsOrderlayout_cylinder_repeat: TStringField
FieldName = 'layout_cylinder_repeat' FieldName = 'layout_cylinder_repeat'
end end
object XDataWebDataSet1layout_cutoff_dimension: TStringField object xdwdsOrderlayout_cutoff_dimension: TStringField
FieldName = 'layout_cutoff_dimension' FieldName = 'layout_cutoff_dimension'
end end
object XDataWebDataSet1layout_pitch: TStringField object xdwdsOrderlayout_pitch: TStringField
FieldName = 'layout_pitch' FieldName = 'layout_pitch'
end end
object XDataWebDataSet1layout_teeth: TStringField object xdwdsOrderlayout_teeth: TStringField
FieldName = 'layout_teeth' FieldName = 'layout_teeth'
end end
object XDataWebDataSet1layout_bleed: TStringField object xdwdsOrderlayout_bleed: TStringField
FieldName = 'layout_bleed' FieldName = 'layout_bleed'
end end
object XDataWebDataSet1layout_minimum_trap_dim: TStringField object xdwdsOrderlayout_minimum_trap_dim: TStringField
FieldName = 'layout_minimum_trap_dim' FieldName = 'layout_minimum_trap_dim'
end end
object XDataWebDataSet1layout_maximum_trap_dim: TStringField object xdwdsOrderlayout_maximum_trap_dim: TStringField
FieldName = 'layout_maximum_trap_dim' FieldName = 'layout_maximum_trap_dim'
end end
object XDataWebDataSet1upc_size: TStringField object xdwdsOrderupc_size: TStringField
FieldName = 'upc_size' FieldName = 'upc_size'
end end
object XDataWebDataSet1upc_bar_width_reduction: TStringField object xdwdsOrderupc_bar_width_reduction: TStringField
FieldName = 'upc_bar_width_reduction' FieldName = 'upc_bar_width_reduction'
end end
object XDataWebDataSet1general_comments: TStringField object xdwdsOrdergeneral_comments: TStringField
FieldName = 'general_comments' FieldName = 'general_comments'
end end
object XDataWebDataSet1upc_distortion_percent: TStringField object xdwdsOrderupc_distortion_percent: TStringField
FieldName = 'upc_distortion_percent' FieldName = 'upc_distortion_percent'
end end
object XDataWebDataSet1upc_distortion_amount: TStringField object xdwdsOrderupc_distortion_amount: TStringField
FieldName = 'upc_distortion_amount' FieldName = 'upc_distortion_amount'
end end
object XDataWebDataSet1layout_cutback: TStringField object xdwdsOrderlayout_cutback: TStringField
FieldName = 'layout_cutback' FieldName = 'layout_cutback'
end end
object XDataWebDataSet1proofing_full_size_ink_jet_for: TBooleanField object xdwdsOrderquantity_and_colors_qty_colors: TStringField
FieldName = 'quantity_and_colors_qty_colors'
end
object xdwdsOrdersupplied_by_customer_b_w_or_co: TStringField
FieldName = 'supplied_by_customer_b_w_or_co'
end
object xdwdsOrderproofing_full_size_ink_jet_for: TStringField
FieldName = 'proofing_full_size_ink_jet_for' FieldName = 'proofing_full_size_ink_jet_for'
end end
object XDataWebDataSet1proofing_pdf: TBooleanField object xdwdsOrderproofing_pdf: TStringField
FieldName = 'proofing_pdf' FieldName = 'proofing_pdf'
end end
object XDataWebDataSet1quantity_and_colors_qty_colors: TStringField object xdwdsOrderIN_QB: TStringField
FieldName = 'quantity_and_colors_qty_colors' FieldName = 'IN_QB'
end end
object XDataWebDataSet1supplied_by_customer_b_w_or_co: TStringField object xdwdsOrderQB_ORDER_NUM: TStringField
FieldName = 'supplied_by_customer_b_w_or_co' FieldName = 'QB_ORDER_NUM'
end
object XDataWebDataSet1InQuickbooks: TStringField
FieldName = 'InQuickbooks'
end end
end end
object WebDataSource1: TWebDataSource object wdsOrder: TWebDataSource
AutoEdit = False AutoEdit = False
DataSet = XDataWebDataSet1 DataSet = xdwdsOrder
Left = 398 Left = 398
Top = 56 Top = 56
end end
...@@ -1705,6 +1731,15 @@ object FOrderEntryWeb: TFOrderEntryWeb ...@@ -1705,6 +1731,15 @@ object FOrderEntryWeb: TFOrderEntryWeb
object xdwdsQBItemname: TStringField object xdwdsQBItemname: TStringField
FieldName = 'name' FieldName = 'name'
end end
object xdwdsQBItemQB_ID: TStringField
FieldName = 'QB_ID'
end
object xdwdsQBItemdescription: TStringField
FieldName = 'description'
end
object xdwdsQBItemID: TStringField
FieldName = 'ID'
end
end end
object tmrReturn: TWebTimer object tmrReturn: TWebTimer
Enabled = False Enabled = False
......
...@@ -21,14 +21,17 @@ ...@@ -21,14 +21,17 @@
<button id="btndelete" class="btn btn-danger btn-sm">Delete</button> <button id="btndelete" class="btn btn-danger btn-sm">Delete</button>
</li> </li>
<li class="nav-item pe-2"> <li class="nav-item pe-2">
<button id="btnpdf" class="btn btn-primary btn-sm">PDF</button>
</li>
<li class="nav-item pe-2">
<button id="btnconfirm" class="btn btn-success btn-sm">Save</button> <button id="btnconfirm" class="btn btn-success btn-sm">Save</button>
</li> </li>
<li class="nav-item pe-2"> <li class="nav-item pe-2">
<button id="btncancel" class="btn btn-danger btn-sm">Cancel</button> <button id="btncancel" class="btn btn-danger btn-sm">Cancel</button>
</li> </li>
<li class="nav-item pe-2">
<button id="btnpdf" class="btn btn-primary btn-sm">PDF</button>
</li>
<li class="nav-item pe-2">
<button id="btnsendtoqb" class="btn btn-primary btn-sm">Send To QB</button>
</li>
<li class="nav-item"> <li class="nav-item">
<button id="btnclose" class="btn btn-primary btn-sm">Close</button> <button id="btnclose" class="btn btn-primary btn-sm">Close</button>
</li> </li>
...@@ -54,9 +57,13 @@ ...@@ -54,9 +57,13 @@
Please Provide a Customer ID. Please Provide a Customer ID.
</div> </div>
</div> </div>
<div class="col-auto d-flex flex-column">
<label for="wdbcbinqb" class="form-label mt-2" style="font-weight: 700; font-size: 15px;">In QB?:</label>
<input id="wdbcbinqb" type="checkbox" class="form-check-input mt-1">
</div>
<div class="col-auto"> <div class="col-auto">
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">In Quickbooks?:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QB Order Number:</label>
<input id="edtinquickbooks"type="text" class="form-control" style="width: 150px"/> <input id="edtqbordernum"type="text" class="form-control" style="width: 150px"/>
</div> </div>
</div> </div>
<h4 class="custom-h4 mt-3">Staff Fields</h4> <h4 class="custom-h4 mt-3">Staff Fields</h4>
...@@ -86,12 +93,18 @@ ...@@ -86,12 +93,18 @@
<input id="edtshipvia" type="text" class="form-control"/> <input id="edtshipvia" type="text" class="form-control"/>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Quantity:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Quantity:</label>
<input id="edtquantity" class="form-control input-sm" style="width: 100px"/> <input id="edtquantity" class="form-control input-sm" style="width: 100px" type="number" min="1" required/>
<div class="invalid-feedback" style="font-size: 15px;" required>
Please Provide a Quantity.
</div>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Price:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Price:</label>
<input id="edtprice" class="form-control input-sm" style="width: 100px" type="number" min="0"/> <input id="edtprice" class="form-control input-sm" style="width: 100px" type="number" min="1" required/>
<div class="invalid-feedback" style="font-size: 15px;">
Please Provide a Price.
</div>
</div> </div>
<div> <div>
<label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Invoice To:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Invoice To:</label>
...@@ -115,12 +128,26 @@ ...@@ -115,12 +128,26 @@
<input id="edtponumber" class="form-control input-sm" width='50%'/> <input id="edtponumber" class="form-control input-sm" width='50%'/>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Job Name:</label> <label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QB Item:</label>
<input id="edtjobname" class="form-control input-sm" style="width: 300px"/> <select id="wcbqbitem" class='form-select' required></select>
<div class="invalid-feedback" style="font-size: 15px;">
Please Provide a QB Item.
</div>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">QuickBooks Item:</label> <label for="wdbe_first_name" style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Job Name:</label>
<select id="wcbqbitem" class='form-select'></select> <input id="edtjobname" class="form-control input-sm" style="width: 600px"/>
<div class="invalid-feedback" style="font-size: 15px;">
Please Provide a Job Name.
</div>
</div>
<div class="row">
<div class="col-12">
<label for="edtitemdescription" class="form-label mt-2" style="font-weight: 700; font-size: 15px;">
Item Description:
</label>
<input id="edtitemdescription" class="form-control" style="width: 100%;" />
</div>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Art Due:</label> <label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Art Due:</label>
...@@ -231,11 +258,11 @@ ...@@ -231,11 +258,11 @@
<input id="edtcolorcontrastto" class="form-control input-sm" width='50%'/> <input id="edtcolorcontrastto" class="form-control input-sm" width='50%'/>
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Color Contrast Date 1:</label> <label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Color Contract Date 1:</label>
<input class="form-control input-sm" id="dtpcolorcontrastdate1" type="date"> <input class="form-control input-sm" id="dtpcolorcontrastdate1" type="date">
</div> </div>
<div class="col-auto"> <div class="col-auto">
<label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Color Contrast Date 2:</label> <label style="font-weight: 700; font-size: 15px;" class="form-label mt-2">Color Contract Date 2:</label>
<input class="form-control input-sm" id="dtpcolorcontrastdate2" type="date"> <input class="form-control input-sm" id="dtpcolorcontrastdate2" type="date">
</div> </div>
<div class="col-auto"> <div class="col-auto">
......
...@@ -14,46 +14,40 @@ type ...@@ -14,46 +14,40 @@ type
WebLabel2: TWebLabel; WebLabel2: TWebLabel;
edtCompanyName: TWebDBEdit; edtCompanyName: TWebDBEdit;
edtCompanyAccountName: TWebDBEdit; edtCompanyAccountName: TWebDBEdit;
edtInQuickBooks: TWebDBEdit;
XDataWebClient1: TXDataWebClient; XDataWebClient1: TXDataWebClient;
XDataWebDataSet1: TXDataWebDataSet; xdwdsOrder: TXDataWebDataSet;
XDataWebDataSet1ORDER_ID: TIntegerField; xdwdsOrderORDER_ID: TIntegerField;
XDataWebDataSet1COMPANY_ID: TIntegerField; xdwdsOrderCOMPANY_ID: TIntegerField;
XDataWebDataSet1USER_ID: TIntegerField; xdwdsOrderUSER_ID: TIntegerField;
XDataWebDataSet1ORDER_DATE: TDateField; xdwdsOrderORDER_DATE: TDateField;
XDataWebDataSet1NAME: TStringField; xdwdsOrderNAME: TStringField;
XDataWebDataSet1SHORT_NAME: TStringField; xdwdsOrderSHORT_NAME: TStringField;
XDataWebDataSet1staff_fields_ship_via: TStringField; xdwdsOrderstaff_fields_ship_via: TStringField;
XDataWebDataSet1staff_fields_price: TStringField; xdwdsOrderstaff_fields_price: TStringField;
XDataWebDataSet1staff_fields_invoice_to: TStringField; xdwdsOrderstaff_fields_invoice_to: TStringField;
XDataWebDataSet1staff_fields_invoice_attention: TStringField; xdwdsOrderstaff_fields_invoice_attention: TStringField;
XDataWebDataSet1staff_fields_ship_to: TStringField; xdwdsOrderstaff_fields_ship_to: TStringField;
XDataWebDataSet1staff_fields_ship_attention: TStringField; xdwdsOrderstaff_fields_ship_attention: TStringField;
XDataWebDataSet1staff_fields_po_number: TStringField; xdwdsOrderstaff_fields_po_number: TStringField;
XDataWebDataSet1staff_fields_job_name: TStringField; xdwdsOrderstaff_fields_job_name: TStringField;
XDataWebDataSet1staff_fields_quickbooks_item: TStringField; xdwdsOrderstaff_fields_quickbooks_item: TStringField;
XDataWebDataSet1staff_fields_quantity: TStringField; xdwdsOrderstaff_fields_quantity: TStringField;
XDataWebDataSet1staff_fields_art_location: TStringField; xdwdsOrderstaff_fields_art_location: TStringField;
XDataWebDataSet1staff_fields_order_date: TStringField; xdwdsOrderstaff_fields_order_date: TStringField;
XDataWebDataSet1staff_fields_proof_date: TStringField; xdwdsOrderstaff_fields_proof_date: TStringField;
XDataWebDataSet1staff_fields_ship_date: TStringField; xdwdsOrderstaff_fields_ship_date: TStringField;
XDataWebDataSet1staff_fields_art_due: TStringField; xdwdsOrderstaff_fields_art_due: TStringField;
XDataWebDataSet1staff_fields_plate_due: TStringField; xdwdsOrderstaff_fields_plate_due: TStringField;
XDataWebDataSet1ADDRESS_LIST: TStringField; xdwdsOrderADDRESS_LIST: TStringField;
WebDataSource1: TWebDataSource; wdsOrder: TWebDataSource;
WebLabel1: TWebLabel; WebLabel1: TWebLabel;
dtpOrderDate: TWebDateTimePicker;
dtpProofDate: TWebDateTimePicker;
dtpShipDate: TWebDateTimePicker;
dtpArtDue: TWebDateTimePicker;
dtpPlateDue: TWebDateTimePicker;
edtShipVia: TWebDBEdit; edtShipVia: TWebDBEdit;
edtQuantity: TWebDBEdit; edtQuantity: TWebDBEdit;
edtPrice: TWebDBEdit; edtPrice: TWebDBEdit;
edtInvoiceTo: TWebDBEdit; edtInvoiceTo: TWebDBEdit;
edtPONumber: TWebDBEdit; edtPONumber: TWebDBEdit;
edtJobName: TWebDBEdit; edtJobName: TWebDBEdit;
WebDBComboBox1: TWebDBComboBox; wdbcbShipTo: TWebDBComboBox;
wdsShipTo: TWebDataSource; wdsShipTo: TWebDataSource;
xdwdsShipTo: TXDataWebDataSet; xdwdsShipTo: TXDataWebDataSet;
xdwdsShipToADDRESS: TStringField; xdwdsShipToADDRESS: TStringField;
...@@ -71,21 +65,12 @@ type ...@@ -71,21 +65,12 @@ type
WebLabel4: TWebLabel; WebLabel4: TWebLabel;
cbPDF: TWebDBCheckBox; cbPDF: TWebDBCheckBox;
edtPDFTo: TWebDBEdit; edtPDFTo: TWebDBEdit;
dtpPDFDate1: TWebDateTimePicker;
dtpPDFDate3: TWebDateTimePicker;
dtpPDFDate2: TWebDateTimePicker;
cbInkJet: TWebDBCheckBox; cbInkJet: TWebDBCheckBox;
edtInkJetTo2: TWebDBEdit; edtInkJetTo2: TWebDBEdit;
edtInkJetTo1: TWebDBEdit; edtInkJetTo1: TWebDBEdit;
dtpInkJetDate1: TWebDateTimePicker;
dtpInkJetDate3: TWebDateTimePicker;
dtpInkJetDate2: TWebDateTimePicker;
edtColorContrastTo: TWebDBEdit; edtColorContrastTo: TWebDBEdit;
dtpColorContractDate1: TWebDateTimePicker;
dtpColorContractDate2: TWebDateTimePicker;
edtDigitalColorTo: TWebDBEdit; edtDigitalColorTo: TWebDBEdit;
edtDigitalColorKey: TWebDBEdit; edtDigitalColorKey: TWebDBEdit;
dtpDigitalColorDate: TWebDateTimePicker;
WebLabel5: TWebLabel; WebLabel5: TWebLabel;
edtAniloxInfo: TWebDBEdit; edtAniloxInfo: TWebDBEdit;
edtPressName: TWebDBEdit; edtPressName: TWebDBEdit;
...@@ -125,68 +110,65 @@ type ...@@ -125,68 +110,65 @@ type
btnSave: TWebButton; btnSave: TWebButton;
btnPDF: TWebButton; btnPDF: TWebButton;
btnCancel: TWebButton; btnCancel: TWebButton;
XDataWebDataSet1plates_job_number: TStringField; xdwdsOrderplates_job_number: TStringField;
XDataWebDataSet1supplied_by_customer_plates: TStringField; xdwdsOrdersupplied_by_customer_plates: TStringField;
XDataWebDataSet1supplied_by_customer_sample: TStringField; xdwdsOrdersupplied_by_customer_sample: TStringField;
XDataWebDataSet1supplied_by_customer_dimension: TStringField; xdwdsOrdersupplied_by_customer_dimension: TStringField;
XDataWebDataSet1supplied_by_customer_other: TStringField; xdwdsOrdersupplied_by_customer_other: TStringField;
XDataWebDataSet1supplied_by_customer_disk: TStringField; xdwdsOrdersupplied_by_customer_disk: TStringField;
XDataWebDataSet1supplied_by_customer_e_mail: TStringField; xdwdsOrdersupplied_by_customer_e_mail: TStringField;
XDataWebDataSet1supplied_by_customer_ftp: TStringField; xdwdsOrdersupplied_by_customer_ftp: TStringField;
XDataWebDataSet1plates_plate_material: TStringField; xdwdsOrderplates_plate_material: TStringField;
XDataWebDataSet1plates_thickness: TStringField; xdwdsOrderplates_thickness: TStringField;
XDataWebDataSet1supplied_by_customer_total_inc: TStringField; xdwdsOrdersupplied_by_customer_total_inc: TStringField;
XDataWebDataSet1supplied_by_customer_sheets_us: TStringField; xdwdsOrdersupplied_by_customer_sheets_us: TStringField;
XDataWebDataSet1supplied_by_customer_initials: TStringField; xdwdsOrdersupplied_by_customer_initials: TStringField;
XDataWebDataSet1proofing_pdf_to: TStringField; xdwdsOrderproofing_pdf_to: TStringField;
XDataWebDataSet1proofing_pdf_date_1: TStringField; xdwdsOrderproofing_pdf_date_1: TStringField;
XDataWebDataSet1proofing_pdf_date_2: TStringField; xdwdsOrderproofing_pdf_date_2: TStringField;
XDataWebDataSet1proofing_pdf_date_3: TStringField; xdwdsOrderproofing_pdf_date_3: TStringField;
XDataWebDataSet1proofing_ink_jet_to: TStringField; xdwdsOrderproofing_ink_jet_to: TStringField;
XDataWebDataSet1proofing_ink_jet_to_2: TStringField; xdwdsOrderproofing_ink_jet_to_2: TStringField;
XDataWebDataSet1proofing_ink_jet_date_1: TStringField; xdwdsOrderproofing_ink_jet_date_1: TStringField;
XDataWebDataSet1proofing_ink_jet_date_2: TStringField; xdwdsOrderproofing_ink_jet_date_2: TStringField;
XDataWebDataSet1proofing_ink_jet_date_3: TStringField; xdwdsOrderproofing_ink_jet_date_3: TStringField;
XDataWebDataSet1proofing_color_contract: TStringField; xdwdsOrderproofing_color_contract: TStringField;
XDataWebDataSet1proofing_color_contrac_to: TStringField; xdwdsOrderproofing_color_contrac_to: TStringField;
XDataWebDataSet1proofing_color_contrac_date_1: TStringField; xdwdsOrderproofing_color_contrac_date_1: TStringField;
XDataWebDataSet1proofing_color_contrac_date_2: TStringField; xdwdsOrderproofing_color_contrac_date_2: TStringField;
XDataWebDataSet1proofing_digital_color_key: TStringField; xdwdsOrderproofing_digital_color_key: TStringField;
XDataWebDataSet1proofing_digital_color_to: TStringField; xdwdsOrderproofing_digital_color_to: TStringField;
XDataWebDataSet1proofing_digital_color_date_1: TStringField; xdwdsOrderproofing_digital_color_date_1: TStringField;
XDataWebDataSet1quantity_and_colors_press_name: TStringField; xdwdsOrderquantity_and_colors_press_name: TStringField;
XDataWebDataSet1quantity_and_colors_anilox_info: TStringField; xdwdsOrderquantity_and_colors_anilox_info: TStringField;
XDataWebDataSet1plate_marks_microdots_comments: TStringField; xdwdsOrderplate_marks_microdots_comments: TStringField;
XDataWebDataSet1plate_marks_microdots: TStringField; xdwdsOrderplate_marks_microdots: TStringField;
XDataWebDataSet1plate_marks_crosshairs: TStringField; xdwdsOrderplate_marks_crosshairs: TStringField;
XDataWebDataSet1plate_marks_crosshairs_comments: TStringField; xdwdsOrderplate_marks_crosshairs_comments: TStringField;
XDataWebDataSet1plate_marks_color_bars: TStringField; xdwdsOrderplate_marks_color_bars: TStringField;
XDataWebDataSet1plate_marks_color_bars_comments: TStringField; xdwdsOrderplate_marks_color_bars_comments: TStringField;
XDataWebDataSet1plate_marks_other: TStringField; xdwdsOrderplate_marks_other: TStringField;
XDataWebDataSet1plate_marks_other_comments: TStringField; xdwdsOrderplate_marks_other_comments: TStringField;
XDataWebDataSet1print_orientation_print_orient: TStringField; xdwdsOrderprint_orientation_print_orient: TStringField;
XDataWebDataSet1layout_around: TStringField; xdwdsOrderlayout_around: TStringField;
XDataWebDataSet1layout_accross: TStringField; xdwdsOrderlayout_accross: TStringField;
XDataWebDataSet1layout_surface_print: TStringField; xdwdsOrderlayout_surface_print: TStringField;
XDataWebDataSet1layout_reverse_print: TStringField; xdwdsOrderlayout_reverse_print: TStringField;
XDataWebDataSet1layout_cylinder_repeat: TStringField; xdwdsOrderlayout_cylinder_repeat: TStringField;
XDataWebDataSet1layout_cutoff_dimension: TStringField; xdwdsOrderlayout_cutoff_dimension: TStringField;
XDataWebDataSet1layout_pitch: TStringField; xdwdsOrderlayout_pitch: TStringField;
XDataWebDataSet1layout_teeth: TStringField; xdwdsOrderlayout_teeth: TStringField;
XDataWebDataSet1layout_bleed: TStringField; xdwdsOrderlayout_bleed: TStringField;
XDataWebDataSet1layout_minimum_trap_dim: TStringField; xdwdsOrderlayout_minimum_trap_dim: TStringField;
XDataWebDataSet1layout_maximum_trap_dim: TStringField; xdwdsOrderlayout_maximum_trap_dim: TStringField;
XDataWebDataSet1upc_size: TStringField; xdwdsOrderupc_size: TStringField;
XDataWebDataSet1upc_bar_width_reduction: TStringField; xdwdsOrderupc_bar_width_reduction: TStringField;
XDataWebDataSet1general_comments: TStringField; xdwdsOrdergeneral_comments: TStringField;
XDataWebDataSet1upc_distortion_percent: TStringField; xdwdsOrderupc_distortion_percent: TStringField;
XDataWebDataSet1upc_distortion_amount: TStringField; xdwdsOrderupc_distortion_amount: TStringField;
XDataWebDataSet1layout_cutback: TStringField; xdwdsOrderlayout_cutback: TStringField;
XDataWebDataSet1proofing_full_size_ink_jet_for: TBooleanField; xdwdsOrderquantity_and_colors_qty_colors: TStringField;
XDataWebDataSet1proofing_pdf: TBooleanField; xdwdsOrdersupplied_by_customer_b_w_or_co: TStringField;
XDataWebDataSet1quantity_and_colors_qty_colors: TStringField;
XDataWebDataSet1supplied_by_customer_b_w_or_co: TStringField;
wcbQBItem: TWebDBComboBox;
wdsQBItem: TWebDataSource; wdsQBItem: TWebDataSource;
xdwdsQBItem: TXDataWebDataSet; xdwdsQBItem: TXDataWebDataSet;
xdwdsQBItemname: TStringField; xdwdsQBItemname: TStringField;
...@@ -197,24 +179,47 @@ type ...@@ -197,24 +179,47 @@ type
btnCopy: TWebButton; btnCopy: TWebButton;
btnDelete: TWebButton; btnDelete: TWebButton;
btnClose: TWebButton; btnClose: TWebButton;
edtOrderNum: TWebEdit;
tmrReturn: TWebTimer; tmrReturn: TWebTimer;
btnEdit: TWebButton; btnEdit: TWebButton;
btnAdd: TWebButton; btnAdd: TWebButton;
WebButton2: TWebButton; WebButton2: TWebButton;
lblFormState: TWebLabel; lblFormState: TWebLabel;
XDataWebDataSet1InQuickbooks: TStringField; dtpOrderDate: TWebDBDateTimePicker;
dtpProofDate: TWebDBDateTimePicker;
dtpShipDate: TWebDBDateTimePicker;
dtpPlateDue: TWebDBDateTimePicker;
dtpPDFDate3: TWebDBDateTimePicker;
dtpPDFDate2: TWebDBDateTimePicker;
dtpPDFDate1: TWebDBDateTimePicker;
dtpInkJetDate3: TWebDBDateTimePicker;
dtpInkJetDate2: TWebDBDateTimePicker;
dtpInkJetDate1: TWebDBDateTimePicker;
dtpColorContractDate2: TWebDBDateTimePicker;
dtpColorContractDate1: TWebDBDateTimePicker;
dtpDigitalColorDate: TWebDBDateTimePicker;
xdwdsOrderproofing_full_size_ink_jet_for: TStringField;
xdwdsOrderproofing_pdf: TStringField;
edtQBOrderNum: TWebDBEdit;
wdbcbINQB: TWebDBCheckBox;
xdwdsOrderIN_QB: TStringField;
xdwdsOrderQB_ORDER_NUM: TStringField;
edtQBItemDescription: TWebEdit;
xdwdsQBItemQB_ID: TStringField;
xdwdsQBItemdescription: TStringField;
edtOrderNum: TWebDBEdit;
wcbQBItem: TWebDBComboBox;
xdwdsQBItemID: TStringField;
btnQB: TWebButton;
procedure WebFormCreate(Sender: TObject); procedure WebFormCreate(Sender: TObject);
[async] procedure getOrder(Order_ID: string); [async] procedure getOrder(Order_ID: string);
[async] procedure getCustomer(customerID: string); [async] procedure SetNewOrderInfo(customerID: string);
procedure WebButton1Click(Sender: TObject); procedure WebButton1Click(Sender: TObject);
procedure addColorRow(num, Color, LPI, Size: string); procedure addColorRow(num, Color, LPI, Size: string);
procedure btnSaveClick(Sender: TObject); procedure btnSaveClick(Sender: TObject);
[async] procedure AddWebOrder(orderJSON: TJSONObject); [async] procedure SendWebOrder();
procedure btnCancelClick(Sender: TObject); procedure btnCancelClick(Sender: TObject);
procedure btnPDFClick(Sender: TObject); procedure btnPDFClick(Sender: TObject);
[async] procedure GenerateReportPDF; [async] procedure GenerateReportPDF;
procedure SendOrderToServer;
procedure btnCopyClick(Sender: TObject); procedure btnCopyClick(Sender: TObject);
procedure btnCloseClick(Sender: TObject); procedure btnCloseClick(Sender: TObject);
procedure btnDeleteClick(Sender: TObject); procedure btnDeleteClick(Sender: TObject);
...@@ -228,6 +233,11 @@ type ...@@ -228,6 +233,11 @@ type
procedure WebButton2Click(Sender: TObject); procedure WebButton2Click(Sender: TObject);
procedure ShowAddAddressForm(); procedure ShowAddAddressForm();
[async] procedure SendAddressToServer(AddressJSON: TJSONObject); [async] procedure SendAddressToServer(AddressJSON: TJSONObject);
procedure wcbQBItemChange(Sender: TObject);
procedure edtJobNameExit(Sender: TObject);
procedure btnQBClick(Sender: TObject);
function VerifyQBOrder: Boolean;
[async] procedure AddEstimate(orderID: string);
private private
FModalAction: string; FModalAction: string;
FAgencyCode: string; FAgencyCode: string;
...@@ -237,6 +247,7 @@ type ...@@ -237,6 +247,7 @@ type
customerID: string; customerID: string;
mode: string; mode: string;
notification: string; notification: string;
customer_qb_id: string;
procedure RemoveColorRow(Sender: TObject); procedure RemoveColorRow(Sender: TObject);
[async] procedure InitializeForm; [async] procedure InitializeForm;
//FJSONProc1: TJSONProc1; //FJSONProc1: TJSONProc1;
...@@ -279,7 +290,7 @@ end; ...@@ -279,7 +290,7 @@ end;
begin begin
if mode = 'ADD' then if mode = 'ADD' then
begin begin
await(getCustomer(customerID)); await(SetNewOrderInfo(customerID));
EditMode; EditMode;
end end
else else
...@@ -365,85 +376,35 @@ procedure TFOrderEntryWeb.btnSaveClick(Sender: TObject); ...@@ -365,85 +376,35 @@ procedure TFOrderEntryWeb.btnSaveClick(Sender: TObject);
begin begin
if VerifyOrder() then if VerifyOrder() then
begin begin
sendOrderToServer(); sendWebOrder();
ViewMode(); ViewMode();
end; end;
window.scrollTo(0, 0); window.scrollTo(0, 0);
end; end;
function TFOrderEntryWeb.VerifyOrder: Boolean;
var
input: TJSHTMLInputElement;
begin
result := true;
input := TJSHTMLInputElement(document.getElementById('edtcompanyname'));
if edtCompanyName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtaccountcompanyname'));
if edtCompanyAccountName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtinvoiceto'));
if edtInvoiceTo.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('wcbshipto'));
if WebDBComboBox1.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('dtporderdate'));
if dtpOrderDate.Date = 0 then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
end;
procedure TFOrderEntryWeb.btnCopyClick(Sender: TObject); procedure TFOrderEntryWeb.btnCopyClick(Sender: TObject);
begin begin
mode := 'ADD'; mode := 'ADD';
dtpOrderDate.Date := 0; xdwdsOrder.Edit;
dtpProofDate.Date := 0; xdwdsOrder.FieldByName('staff_fields_order_date').AsDateTime := 0;
dtpArtDue.Date := 0; xdwdsOrder.FieldByName('staff_fields_proof_date').AsDateTime := 0;
dtpPlateDue.Date := 0; xdwdsOrder.FieldByName('staff_fields_art_due').AsDateTime := 0;
dtpShipDate.Date := 0; xdwdsOrder.FieldByName('staff_fields_plate_due').AsDateTime := 0;
dtpPDFDate1.Date := 0; xdwdsOrder.FieldByName('staff_fields_ship_date').AsDateTime := 0;
dtpPDFDate2.Date := 0; xdwdsOrder.FieldByName('proofing_pdf_date_1').AsDateTime := 0;
dtpPDFDate3.Date := 0; xdwdsOrder.FieldByName('proofing_pdf_date_2').AsDateTime := 0;
dtpInkJetDate1.Date := 0; xdwdsOrder.FieldByName('proofing_pdf_date_3').AsDateTime := 0;
dtpInkJetDate2.Date := 0; xdwdsOrder.FieldByName('proofing_ink_jet_date_1').AsDateTime := 0;
dtpInkJetDate3.Date := 0; xdwdsOrder.FieldByName('proofing_ink_jet_date_2').AsDateTime := 0;
dtpColorContractDate1.Date := 0; xdwdsOrder.FieldByName('proofing_ink_jet_date_3').AsDateTime := 0;
dtpColorContractDate2.Date := 0; xdwdsOrder.FieldByName('proofing_color_contrac_date_1').AsDateTime := 0;
dtpDigitalColorDate.Date := 0; xdwdsOrder.FieldByName('proofing_color_contrac_date_2').AsDateTime := 0;
edtOrderNum.Text := ''; xdwdsOrder.FieldByName('proofing_digital_color_date_1').AsDateTime := 0;
xdwdsOrder.FieldByName('IN_QB').AsString := 'F';
xdwdsOrder.FieldByName('QB_ORDER_NUM').AsString := '';
xdwdsOrder.FieldByName('ORDER_ID').AsString := '';
xdwdsOrder.Post;
EditMode(); EditMode();
ShowToast('Success: Order Successfully Copied'); ShowToast('Success: Order Successfully Copied');
window.scrollTo(0, 0); window.scrollTo(0, 0);
...@@ -481,8 +442,76 @@ begin ...@@ -481,8 +442,76 @@ begin
Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.DelOrder', [OrderID, 'web', JS.toString(AuthService.TokenPayload.Properties['user_id'])])); Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.DelOrder', [OrderID, 'web', JS.toString(AuthService.TokenPayload.Properties['user_id'])]));
end; end;
procedure TFOrderEntryWeb.SendOrderToServer(); procedure TFOrderEntryWeb.btnPDFClick(Sender: TObject);
// Converts all the information on the page into a JSON to then send to the server begin
GenerateReportPDF;
end;
procedure TFOrderEntryWeb.btnQBClick(Sender: TObject);
begin
if JS.toString(AuthService.TokenPayload.Properties['user_qb_id']) <> '' then
begin
if ( VerifyQBOrder() )then
begin
if wdbcbINQB.Checked = false then
begin
Utils.ShowSpinner('spinner');
addEstimate(xdwdsOrder.FieldByName('ORDER_ID').AsString);
end
else
ShowToast('Failure:Cannot submit orders already in QuickBooks', 'failure');
end;
end
else
ShowToast('Failure:User not authorized to add to QuickBooks', 'failure');
end;
procedure TFOrderEntryWeb.AddEstimate(orderID: string);
var
Response: TXDataClientResponse;
notification: TJSObject;
msg: string;
begin
try
Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.AddEstimate',
[orderID]));
notification := TJSObject(Response.Result);
msg := string(notification['status']);
Utils.HideSpinner('spinner');
getOrder(orderID);
ShowToast(msg);
except
on E: EXDataClientRequestException do
Utils.ShowErrorModal(E.ErrorResult.ErrorMessage);
end;
end;
procedure TFOrderEntryWeb.GenerateReportPDF;
// sends the search to the server which then sends back a pdf of the results
var
xdcResponse: TXDataClientResponse;
searchOptions, pdfURL: string;
jsObject: TJSObject;
begin
try
// Call the server method to generate the PDF
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GenerateOrderWebPDF', [orderID]));
jsObject := JS.TJSObject(xdcResponse.Result);
pdfURL := JS.toString(jsObject.Properties['value']);
// Open the PDF in a new browser tab without needing a different form
// This method is much faster too, even for large datasets
window.open(pdfURL, '_blank');
except
on E: EXDataClientRequestException do
Utils.ShowErrorModal(E.ErrorResult.ErrorMessage);
end;
end;
procedure TFOrderEntryWeb.SendWebOrder();
// sends the order JSON object to the server
var var
colorList: TJSONArray; colorList: TJSONArray;
container: TJSElement; container: TJSElement;
...@@ -495,6 +524,7 @@ var ...@@ -495,6 +524,7 @@ var
header, value, info: string; header, value, info: string;
Field: TField; Field: TField;
Response: TXDataClientResponse; Response: TXDataClientResponse;
jsObj: TJSObject;
begin begin
orderJSON := TJSONObject.Create; orderJSON := TJSONObject.Create;
colorList := TJSONArray.Create; colorList := TJSONArray.Create;
...@@ -514,31 +544,16 @@ begin ...@@ -514,31 +544,16 @@ begin
end; end;
colorListJSON := TJSONObject.Create; colorListJSON := TJSONObject.Create;
colorListJSON.AddPair('items', colorList); colorListJSON.AddPair('items', colorList);
XDataWebDataSet1.Edit; xdwdsOrder.Edit;
XDataWebDataSet1quantity_and_colors_qty_colors.Value := colorListJSON.ToString; xdwdsOrderquantity_and_colors_qty_colors.Value := colorListJSON.ToString;
xdwdsOrderUSER_ID.AsString := JS.toString(AuthService.TokenPayload.Properties['user_id']);
//Convert all dates to strings because I was having less issues with that data type.
XDataWebDataSet1staff_fields_proof_date.Value := DateTimeToStr(dtpProofDate.Date); xdwdsOrder.Post;
XDataWebDataSet1staff_fields_ship_date.Value := DateTimeToStr(dtpShipDate.Date); xdwdsOrder.First;
XDataWebDataSet1staff_fields_art_due.Value := DateTimeToStr(dtpArtDue.Date); while not xdwdsOrder.Eof do
XDataWebDataSet1staff_fields_plate_due.Value := DateTimeToStr(dtpPlateDue.Date); begin
XDataWebDataSet1staff_fields_order_date.Value := DateTimeToStr(dtpOrderDate.Date); for Field in xdwdsOrder.Fields do
XDataWebDataSet1proofing_pdf_date_1.Value := DateTimeToStr(dtpPDFDate1.Date);
XDataWebDataSet1proofing_pdf_date_2.Value := DateTimeToStr(dtpPDFDate2.Date);
XDataWebDataSet1proofing_pdf_date_3.Value := DateTimeToStr(dtpPDFDate3.Date);
XDataWebDataSet1proofing_ink_jet_date_1.Value := DateTimeToStr(dtpInkJetDate1.Date);
XDataWebDataSet1proofing_ink_jet_date_2.Value := DateTimeToStr(dtpInkJetDate2.Date);
XDataWebDataSet1proofing_ink_jet_date_3.Value := DateTimeToStr(dtpInkJetDate3.Date);
XDataWebDataSet1proofing_color_contrac_date_1.Value := DateTimeToStr(dtpColorContractDate1.Date);
XDataWebDataSet1proofing_color_contrac_date_2.Value := DateTimeToStr(dtpColorContractDate2.Date);
XDataWebDataSet1proofing_digital_color_date_1.Value := DateTimeToStr(dtpDigitalColorDate.Date);
XDataWebDataSet1.Post;
XDataWebDataSet1.First;
while not XDataWebDataSet1.Eof do
begin
for Field in XDataWebDataSet1.Fields do
begin begin
if Field is TStringField then if Field is TStringField then
begin begin
...@@ -553,66 +568,29 @@ begin ...@@ -553,66 +568,29 @@ begin
orderJSON.AddPair(Field.FieldName, 'T') orderJSON.AddPair(Field.FieldName, 'T')
else else
orderJSON.AddPair(Field.FieldName, ''); orderJSON.AddPair(Field.FieldName, '');
end
else if Field is TIntegerField then
orderJSON.AddPair(Field.FieldName, Field.AsInteger);
end; end;
xdwdsOrder.Next;
end; end;
XDataWebDataSet1.Next;
end;
orderJSON.AddPair('COMPANY_ID', customerID);
orderJSON.AddPair('USER_ID', JS.toString(AuthService.TokenPayload.Properties['user_id']));
orderJSON.AddPair('mode', mode); orderJSON.AddPair('mode', mode);
console.log(orderJSON);
if mode = 'EDIT' then
begin
orderJSON.AddPair('ORDER_ID', orderID);
info := 'Success:Order Successfully Edited';
end
else
info := 'Success:Order Successfully Added';
AddWebOrder(orderJSON);
ShowToast(info);
end;
procedure TFOrderEntryWeb.btnPDFClick(Sender: TObject); console.log(orderJSON);
begin
GenerateReportPDF;
end;
procedure TFOrderEntryWeb.GenerateReportPDF;
// sends the search to the server which then sends back a pdf of the results
var
xdcResponse: TXDataClientResponse;
searchOptions, pdfURL: string;
jsObject: TJSObject;
begin
try try
// Call the server method to generate the PDF Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.AddWebOrder', [orderJSON.ToString]));
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GenerateOrderWebPDF', [orderID]));
jsObject := JS.TJSObject(xdcResponse.Result);
pdfURL := JS.toString(jsObject.Properties['value']);
// Open the PDF in a new browser tab without needing a different form jsObj := JS.TJSObject(Response.Result);
// This method is much faster too, even for large datasets
window.open(pdfURL, '_blank');
except
on E: EXDataClientRequestException do
Utils.ShowErrorModal(E.ErrorResult.ErrorMessage);
end;
end;
console.log(jsObj);
xdwdsOrder.Close;
xdwdsOrder.SetJsonData(jsObj);
xdwdsOrder.Open;
procedure TFOrderEntryWeb.AddWebOrder(orderJSON: TJSONObject);
// sends the order JSON object to the server
var
Response: TXDataClientResponse;
jsObj: TJSObject;
begin
try
Response := await(XDataWebClient1.RawInvokeAsync('ILookupService.AddWebOrder', [orderJSON.ToString]));
jsObj := JS.TJSObject(Response.Result);
if mode = 'ADD' then
OrderID := String(jsObj.Properties['OrderID']);
edtOrderNum.Text := OrderID;
mode := 'EDIT'; mode := 'EDIT';
ShowToast(String(jsObj.Properties['status']));
except except
on E: EXDataClientRequestException do on E: EXDataClientRequestException do
Utils.ShowErrorModal(E.ErrorResult.ErrorMessage); Utils.ShowErrorModal(E.ErrorResult.ErrorMessage);
...@@ -794,13 +772,13 @@ begin ...@@ -794,13 +772,13 @@ begin
[Order_ID])); [Order_ID]));
order := TJSObject(xdcResponse.Result); order := TJSObject(xdcResponse.Result);
data := TJSArray(order['data']); data := TJSArray(order['data']);
XDataWebDataSet1.Close; xdwdsOrder.Close;
XDataWebDataSet1.SetJsonData(order); xdwdsOrder.SetJsonData(order);
XDataWebDataSet1.Open; xdwdsOrder.Open;
if XDataWebDataSet1quantity_and_colors_qty_colors.Value <> '' then if xdwdsOrderquantity_and_colors_qty_colors.Value <> '' then
begin begin
colorObject := TJSObject(TJSJSON.parse(XDataWebDataSet1quantity_and_colors_qty_colors.Value)); colorObject := TJSObject(TJSJSON.parse(xdwdsOrderquantity_and_colors_qty_colors.Value));
colorList := TJSArray(colorObject['items']); colorList := TJSArray(colorObject['items']);
for I := 0 to colorList.length -1 do for I := 0 to colorList.length -1 do
begin begin
...@@ -809,82 +787,28 @@ begin ...@@ -809,82 +787,28 @@ begin
end; end;
end; end;
// Dates need to be manually set
if not (XDataWebDataSet1staff_fields_order_date.AsString = '') then
dtpOrderDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_order_date.Value)
else
dtpOrderDate.Date := 0;
if not (XDataWebDataSet1staff_fields_proof_date.AsString = '') then
dtpProofDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_proof_date.AsString)
else
dtpProofDate.Date := 0;
if not (XDataWebDataSet1staff_fields_ship_date.AsString = '') then
dtpShipDate.Date := StrToDateTime(XDataWebDataSet1staff_fields_ship_date.AsString)
else
dtpShipDate.Date := 0;
if not (XDataWebDataSet1staff_fields_art_due.AsString = '') then
dtpArtDue.Date := StrToDateTime(XDataWebDataSet1staff_fields_art_due.AsString)
else
dtpArtDue.Date := 0;
if not (XDataWebDataSet1staff_fields_plate_due.AsString = '') then
dtpPlateDue.Date := StrToDateTime(XDataWebDataSet1staff_fields_plate_due.AsString)
else
dtpPlateDue.Date := 0;
if not (XDataWebDataSet1proofing_pdf_date_1.AsString = '') then
dtpPDFDate1.Date := StrToDateTime(XDataWebDataSet1proofing_pdf_date_1.Value)
else
dtpPDFDate1.Date := 0;
if not (XDataWebDataSet1proofing_pdf_date_2.AsString = '') then
dtpPDFDate2.Date := StrToDateTime(XDataWebDataSet1proofing_pdf_date_2.Value)
else
dtpPDFDate2.Date := 0;
if not (XDataWebDataSet1proofing_pdf_date_3.AsString = '') then
dtpPDFDate3.Date := StrToDateTime(XDataWebDataSet1proofing_pdf_date_3.Value)
else
dtpPDFDate3.Date := 0;
if not (XDataWebDataSet1proofing_ink_jet_date_1.AsString = '') then
dtpInkJetDate1.Date := StrToDateTime(XDataWebDataSet1proofing_ink_jet_date_1.Value)
else
dtpInkJetDate1.Date := 0;
if not (XDataWebDataSet1proofing_ink_jet_date_2.AsString = '') then
dtpInkJetDate2.Date := StrToDateTime(XDataWebDataSet1proofing_ink_jet_date_2.Value)
else
dtpInkJetDate2.Date := 0;
if not (XDataWebDataSet1proofing_ink_jet_date_3.AsString = '') then
dtpInkJetDate3.Date := StrToDateTime(XDataWebDataSet1proofing_ink_jet_date_3.Value)
else
dtpInkJetDate3.Date := 0;
if not (XDataWebDataSet1proofing_color_contrac_date_1.AsString = '') then
dtpColorContractDate1.Date := StrToDateTime(XDataWebDataSet1proofing_color_contrac_date_1.Value)
else
dtpColorContractDate1.Date := 0;
if not (XDataWebDataSet1proofing_color_contrac_date_2.AsString = '') then
dtpColorContractDate2.Date := StrToDateTime(XDataWebDataSet1proofing_color_contrac_date_2.Value)
else
dtpColorContractDate2.Date := 0;
if not (XDataWebDataSet1proofing_digital_color_date_1.AsString = '') then
dtpDigitalColorDate.Date := StrToDateTime(XDataWebDataSet1proofing_digital_color_date_1.Value)
else
dtpDigitalColorDate.Date := 0;
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetCustomer', xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetCustomer',
[XDataWebDataSet1.FieldByName('COMPANY_ID').AsString])); [xdwdsOrder.FieldByName('COMPANY_ID').AsString]));
customer := TJSObject(xdcResponse.Result); customer := TJSObject(xdcResponse.Result);
customer_qb_id := string(customer['QB_LIST_ID']);
xdwdsShipTo.Close; xdwdsShipTo.Close;
xdwdsShipTo.SetJSONData(customer['SHIPPING_ADDRESS_LIST']); xdwdsShipTo.SetJSONData(customer['SHIPPING_ADDRESS_LIST']);
xdwdsShipTo.Open; xdwdsShipTo.Open;
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetItems', xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetItems',
[])); []));
items := TJSObject(xdcResponse.Result); items := TJSObject(xdcResponse.Result);
console.log(items);
xdwdsQBItem.Close; xdwdsQBItem.Close;
xdwdsQBItem.SetJsonData(items['data']); xdwdsQBItem.SetJsonData(items['data']);
xdwdsQBITEM.Open; xdwdsQBITEM.Open;
xdwdsQBItem.Locate('name', wcbQBItem.Text , []);
wcbQBItem.Text := xdwdsQBItem.FieldByName('name').AsString;
edtQBItemDescription.text := xdwdsQBItem.FieldByName('description').AsString +
' - ' + xdwdsOrder.FieldByName('staff_fields_job_name').AsString;
except except
on E: EXDataClientRequestException do on E: EXDataClientRequestException do
Utils.ShowErrorModal(E.ErrorResult.ErrorMessage); Utils.ShowErrorModal(E.ErrorResult.ErrorMessage);
...@@ -894,7 +818,7 @@ end; ...@@ -894,7 +818,7 @@ end;
procedure TFOrderEntryWeb.getCustomer(customerID: string); procedure TFOrderEntryWeb.SetNewOrderInfo(customerID: string);
// gets a customer from the database then loads the appropiate fields // gets a customer from the database then loads the appropiate fields
var var
xdcResponse: TXDataClientResponse; xdcResponse: TXDataClientResponse;
...@@ -905,11 +829,17 @@ begin ...@@ -905,11 +829,17 @@ begin
xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetCustomer', xdcResponse := await(XDataWebClient1.RawInvokeAsync('ILookupService.GetCustomer',
[customerID])); [customerID]));
customer := TJSObject(xdcResponse.Result); customer := TJSObject(xdcResponse.Result);
XDataWebDataSet1.Close; customer_qb_id := string(customer['QB_LIST_ID']);
XDataWebDataSet1.SetJsonData(customer);
XDataWebDataSet1.Open;
xdwdsOrder.Close;
xdwdsOrder.Open;
xdwdsOrder.Append;
xdwdsOrder.FieldByName('NAME').AsString := string(customer['NAME']);
xdwdsOrder.FieldByName('SHORT_NAME').AsString := string(customer['SHORT_NAME']);
xdwdsOrder.FieldByName('staff_fields_invoice_to').AsString := string(customer['staff_fields_invoice_to']);
xdwdsOrder.FieldByName('COMPANY_ID').AsString := customerID;
xdwdsOrder.Post;
xdwdsShipTo.Close; xdwdsShipTo.Close;
xdwdsShipTo.SetJSONData(customer['SHIPPING_ADDRESS_LIST']); xdwdsShipTo.SetJSONData(customer['SHIPPING_ADDRESS_LIST']);
...@@ -922,21 +852,6 @@ begin ...@@ -922,21 +852,6 @@ begin
xdwdsQBItem.SetJsonData(items['data']); xdwdsQBItem.SetJsonData(items['data']);
xdwdsQBITEM.Open; xdwdsQBITEM.Open;
dtpOrderDate.Date := 0;
dtpProofDate.Date := 0;
dtpArtDue.Date := 0;
dtpPlateDue.Date := 0;
dtpShipDate.Date := 0;
dtpPDFDate1.Date := 0;
dtpPDFDate2.Date := 0;
dtpPDFDate3.Date := 0;
dtpInkJetDate1.Date := 0;
dtpInkJetDate2.Date := 0;
dtpInkJetDate3.Date := 0;
dtpColorContractDate1.Date := 0;
dtpColorContractDate2.Date := 0;
dtpDigitalColorDate.Date := 0;
end; end;
procedure TFOrderEntryWeb.tmrReturnTimer(Sender: TObject); procedure TFOrderEntryWeb.tmrReturnTimer(Sender: TObject);
...@@ -948,7 +863,7 @@ end; ...@@ -948,7 +863,7 @@ end;
procedure TFOrderEntryWeb.EditMode; procedure TFOrderEntryWeb.EditMode;
begin begin
XDataWebDataSet1.Edit; xdwdsOrder.Edit;
FViewMain.change := true; FViewMain.change := true;
btnCopy.Enabled := false; btnCopy.Enabled := false;
...@@ -968,6 +883,12 @@ begin ...@@ -968,6 +883,12 @@ begin
lblFormState.ElementHandle.classList.add('text-success'); lblFormState.ElementHandle.classList.add('text-success');
end; end;
procedure TFOrderEntryWeb.edtJobNameExit(Sender: TObject);
begin
edtQBItemDescription.text := xdwdsQBItem.FieldByName('description').AsString +
' - ' + xdwdsOrder.FieldByName('staff_fields_job_name').AsString;
end;
procedure TFOrderEntryWeb.ViewMode; procedure TFOrderEntryWeb.ViewMode;
begin begin
btnPDF.Enabled := true; btnPDF.Enabled := true;
...@@ -989,4 +910,187 @@ begin ...@@ -989,4 +910,187 @@ begin
end; end;
procedure TFOrderEntryWeb.wcbQBItemChange(Sender: TObject);
begin
xdwdsQBItem.Locate('name', wcbQBItem.Text , []);
wcbQBItem.Text := xdwdsQBItem.FieldByName('name').AsString;
edtQBItemDescription.text := xdwdsQBItem.FieldByName('description').AsString +
' - ' + xdwdsOrder.FieldByName('staff_fields_job_name').AsString;
end;
function TFOrderEntryWeb.VerifyOrder: Boolean;
var
input: TJSHTMLInputElement;
begin
result := true;
input := TJSHTMLInputElement(document.getElementById('edtcompanyname'));
if edtCompanyName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtjobname'));
if edtJobName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtaccountcompanyname'));
if edtCompanyAccountName.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtinvoiceto'));
if edtInvoiceTo.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('wcbshipto'));
if wdbcbShipTo.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('dtporderdate'));
if dtpOrderDate.Date = 0 then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtprice'));
if edtPrice.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('edtquantity'));
if edtQuantity.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
input := TJSHTMLInputElement(document.getElementById('wcbqbitem'));
if wcbQBItem.Text = '' then
begin
input.classList.add('is-invalid');
result := false;
end
else
input.classList.remove('is-invalid');
end;
function TFOrderEntryWeb.VerifyQBOrder: Boolean;
var
msg, SQL: string;
begin
Result := True;
msg := 'To add an order to QuickBooks, the following must be present:' + sLineBreak;
if edtCompanyName.Text = '' then
begin
msg := msg + '- Company Name cannot be empty' + sLineBreak;
Result := False;
end;
if edtCompanyAccountName.Text = '' then
begin
msg := msg + '- Company ID cannot be empty' + sLineBreak;
Result := False;
end;
if edtInvoiceTo.Text = '' then
begin
msg := msg + '- Invoice To cannot be empty' + sLineBreak;
Result := False;
end;
if wdbcbShipTo.Text = '' then
begin
msg := msg + '- Ship To cannot be empty' + sLineBreak;
Result := False;
end;
if dtpOrderDate.Date = 0 then
begin
msg := msg + '- Order Date cannot be empty' + sLineBreak;
Result := False;
end;
if edtPrice.Text = '' then
begin
msg := msg + '- Price cannot be empty' + sLineBreak;
Result := False;
end;
if edtQuantity.Text = '' then
begin
msg := msg + '- Quantity cannot be empty' + sLineBreak;
Result := False;
end;
if wcbQBItem.Text = '' then
begin
msg := msg + '- Item cannot be empty' + sLineBreak;
Result := False;
end;
if edtJobName.Text = '' then
begin
msg := msg + '- Job Name Cannot be empty' + sLineBreak;
Result := False;
end;
xdwdsQBItem.Locate('name', xdwdsOrder.FieldByName('staff_fields_quickbooks_item').AsString, []);
if xdwdsQBItem.FieldByName('QB_ID').AsString = '' then
begin
msg := msg + '- Item Must be Linked to QuickBooks' + sLineBreak;
Result := False;
end;
if customer_qb_id = '' then
begin
msg := msg + '- Customer Must be Linked to QuickBooks' + sLineBreak;
Result := False;
end;
if not result then
asm
alert(msg);
end;
end;
end. end.
\ No newline at end of file
...@@ -206,7 +206,6 @@ object FSelectCustomer: TFSelectCustomer ...@@ -206,7 +206,6 @@ object FSelectCustomer: TFSelectCustomer
ScrollMode = scmItemScrolling ScrollMode = scmItemScrolling
DesignTimeSampleData = True DesignTimeSampleData = True
OnCellClick = TMSFNCGrid1CellClick OnCellClick = TMSFNCGrid1CellClick
ExplicitTop = 163
end end
object btnCancel: TWebButton object btnCancel: TWebButton
Left = 556 Left = 556
......
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectGuid>{DB6F5DBF-7E4B-45DA-AFFA-6C8DF15BA740}</ProjectGuid> <ProjectGuid>{DB6F5DBF-7E4B-45DA-AFFA-6C8DF15BA740}</ProjectGuid>
<ProjectVersion>20.2</ProjectVersion> <ProjectVersion>20.2</ProjectVersion>
......
...@@ -108,14 +108,12 @@ begin ...@@ -108,14 +108,12 @@ begin
if( (Client = '') or (Secret = '') ) then if( (Client = '') or (Secret = '') ) then
begin begin
Logger.Log(1, 'Missing Client ID or Client Secret in INI File');
Exit(); Exit();
end; end;
EncodedAuth := Encoder.Encode(Client + ':' + Secret); EncodedAuth := Encoder.Encode(Client + ':' + Secret);
if RefreshToken = '' then if RefreshToken = '' then
begin begin
Logger.Log(3, 'Missing Refresh Token, Please Manually Get a New One and Store in INI File');
Exit(); Exit();
end; end;
...@@ -148,7 +146,6 @@ begin ...@@ -148,7 +146,6 @@ begin
AccessToken := JSObj.GetValue('access_token').ToString.Trim(['"']); AccessToken := JSObj.GetValue('access_token').ToString.Trim(['"']);
SaveTokens(AccessToken, RefreshToken); SaveTokens(AccessToken, RefreshToken);
Result := AccessToken; Result := AccessToken;
Logger.Log(1, 'qbAPI - Tokens Successfully Saved');
except except
on E: EIdHTTPProtocolException do on E: EIdHTTPProtocolException do
// Memo2.Lines.Add('Error: ' + E.Message + #13#10 + 'Response: ' + E.ErrorMessage); // Memo2.Lines.Add('Error: ' + E.Message + #13#10 + 'Response: ' + E.ErrorMessage);
...@@ -172,7 +169,6 @@ begin ...@@ -172,7 +169,6 @@ begin
try try
iniFile.WriteString('Quickbooks', 'RefreshToken', RefreshToken); iniFile.WriteString('Quickbooks', 'RefreshToken', RefreshToken);
LastRefresh := Now; LastRefresh := Now;
Logger.Log(1, 'Tokens Successfully Saved');
finally finally
IniFile.Free; IniFile.Free;
......
...@@ -125,14 +125,14 @@ uses ...@@ -125,14 +125,14 @@ uses
procedure TApiDatabase.DataModuleCreate(Sender: TObject); procedure TApiDatabase.DataModuleCreate(Sender: TObject);
begin begin
Logger.Log( 3, 'TApiDatabase.DataModuleCreate' ); Logger.Log( 1, 'TApiDatabase.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' ); LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try try
ucKG.Connect; ucKG.Connect;
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(3, '--TApiDatabase.DataModuleCreate -Error connecting to database: ' + E.Message); Logger.Log(2, '--TApiDatabase.DataModuleCreate -Error connecting to database: ' + E.Message);
end; end;
end; end;
end; end;
......
...@@ -39,14 +39,14 @@ uses ...@@ -39,14 +39,14 @@ uses
procedure TAuthDatabase.DataModuleCreate(Sender: TObject); procedure TAuthDatabase.DataModuleCreate(Sender: TObject);
begin begin
Logger.Log( 3, 'TAuthDatabase.DataModuleCreate' ); Logger.Log( 1, 'TAuthDatabase.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' ); LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try try
ucKG.Connect; ucKG.Connect;
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(3, '--TAuthDatabase.DataModuleCreate -Error connecting to database: ' + E.Message); Logger.Log(2, '--TAuthDatabase.DataModuleCreate -Error connecting to database: ' + E.Message);
end; end;
end; end;
end; end;
......
...@@ -104,7 +104,8 @@ var ...@@ -104,7 +104,8 @@ var
userState: Integer; userState: Integer;
JWT: TJWT; JWT: TJWT;
begin begin
Logger.Log(1, Format('AuthService.Login - User: "%s"', [User])); Logger.Log(3, Format( 'AuthService.Login - User: "%s"', [User]));
userState := CheckUser( user, password );
try try
userState := CheckUser(user, password); userState := CheckUser(user, password);
...@@ -117,11 +118,18 @@ begin ...@@ -117,11 +118,18 @@ begin
end; end;
if userState = 0 then if userState = 0 then
begin
raise EXDataHttpUnauthorized.Create('Invalid username or password'); raise EXDataHttpUnauthorized.Create('Invalid username or password');
if userState = 1 then logger.Log(2, 'Login Error: Invalid username or password');
end
else if userState = 1 then
begin
raise EXDataHttpUnauthorized.Create('User does not exist!'); raise EXDataHttpUnauthorized.Create('User does not exist!');
if userState = 2 then logger.Log(2, 'Login Error: User does not exist!');
end
else if userState = 2 then
raise EXDataHttpUnauthorized.Create('User not active!'); raise EXDataHttpUnauthorized.Create('User not active!');
logger.Log(2, 'Login Error: User not active!');
JWT := TJWT.Create; JWT := TJWT.Create;
try try
...@@ -148,12 +156,11 @@ function TAuthService.CheckUser(const user, password: string): Integer; ...@@ -148,12 +156,11 @@ function TAuthService.CheckUser(const user, password: string): Integer;
var var
userStr: string; userStr: string;
SQL: string; SQL: string;
date_created: string; name: string;
checkString: string; checkString: string;
begin begin
//authDB := TAuthDatabase.Create(nil);
Result := 0; Result := 0;
//Logger.Log( 3, Format('AuthService.CheckUser - User: "%s"', [user]) ); Logger.Log(1, Format('AuthService.CheckUser - User: "%s"', [user]) );
SQL := 'select * from users where USER_NAME = ' + QuotedStr(user); SQL := 'select * from users where USER_NAME = ' + QuotedStr(user);
DoQuery(authDB.uq, SQL); DoQuery(authDB.uq, SQL);
if authDB.uq.IsEmpty then if authDB.uq.IsEmpty then
...@@ -164,9 +171,9 @@ begin ...@@ -164,9 +171,9 @@ begin
Result := 2 // user is not active Result := 2 // user is not active
else else
begin begin
//date_created := authDB.uq.FieldByName('date_created').AsString; name := authDB.uq.FieldByName('NAME').AsString;
//checkString := THashSHA2.GetHashString(date_created + password, THashSHA2.TSHA2Version.SHA512).ToUpper; checkString := THashSHA2.GetHashString(name + password, THashSHA2.TSHA2Version.SHA512).ToUpper;
if password = authDB.uq.FieldByName('PASSWORD').AsString then if authDB.uq.FieldByName('PASSWORD').AsString = checkString then
begin begin
userName := user; userName := user;
userFullName:= authDB.uq.FieldByName('NAME').AsString;; userFullName:= authDB.uq.FieldByName('NAME').AsString;;
...@@ -177,8 +184,7 @@ begin ...@@ -177,8 +184,7 @@ begin
userQBID := authDB.uq.FieldByName('QB_ID').AsString; userQBID := authDB.uq.FieldByName('QB_ID').AsString;
userAccessType := authDB.uq.FieldByName('ACCESS_TYPE').AsString; userAccessType := authDB.uq.FieldByName('ACCESS_TYPE').AsString;
//Logger.Log( 3, Format('AuthDB.SetLoginAuditEntry: "%s"', [user]) ); Logger.Log(1, Format('AuthDB.SetLoginAuditEntry: "%s"', [user]) );
//AuthDB.SetLoginAuditEntry( userStr );
Result := 3; // Succcess Result := 3; // Succcess
end end
else else
......
...@@ -31,7 +31,7 @@ var ...@@ -31,7 +31,7 @@ var
implementation implementation
uses uses
Bcl.Json, System.SysUtils, System.IOUtils, Common.Logging; Bcl.Json, System.SysUtils, System.IOUtils, Common.Logging, System.StrUtils;
procedure LoadServerConfig; procedure LoadServerConfig;
var var
...@@ -58,11 +58,11 @@ begin ...@@ -58,11 +58,11 @@ begin
Logger.Log(1, '-- Config file not found.'); Logger.Log(1, '-- Config file not found.');
end; end;
Logger.Log(1, '-------------------------------------------------------------'); Logger.Log(1, '--- Server Config Values ---');
Logger.Log(1, '-- serverConfig.url: ' + serverConfig.url); Logger.Log(1, '-- url: ' + serverConfig.url + IfThen(serverConfig.url = defaultServerUrl, ' [default]', ' [from config]'));
Logger.Log(1, '-- serverConfig.adminPassword: ' + serverConfig.adminPassword); Logger.Log(1, '-- adminPassword: ' + serverConfig.adminPassword + IfThen(serverConfig.adminPassword = 'whatisthisusedfor', ' [default]', ' [from config]'));
Logger.Log(1, '-- serverConfig.jwtTokenSecret: ' + serverConfig.jwtTokenSecret); Logger.Log(1, '-- jwtTokenSecret: ' + serverConfig.jwtTokenSecret + IfThen(serverConfig.jwtTokenSecret = 'super_secret0123super_secret4567', ' [default]', ' [from config]'));
Logger.Log(1, '-- serverConfig.webAppFolder: ' + serverConfig.webAppFolder); Logger.Log(1, '-- webAppFolder: ' + serverConfig.webAppFolder + IfThen(serverConfig.webAppFolder = 'static', ' [default]', ' [from config]'));
Logger.Log(1, '-- serverConfig.reportsFolder: ' + serverConfig.reportsFolder); Logger.Log(1, '-- serverConfig.reportsFolder: ' + serverConfig.reportsFolder);
Logger.Log(1, '--LoadServerConfig - end'); Logger.Log(1, '--LoadServerConfig - end');
end; end;
......
...@@ -146,15 +146,15 @@ type ...@@ -146,15 +146,15 @@ type
data: TList<TCustomerItem>; data: TList<TCustomerItem>;
end; end;
TFullOrder = class //TODO change name to TCorrugatedOrder TCorrugatedOrder = class
Public Public
//Company //Company
ORDER_ID: integer;
COMPANY_ID: integer; COMPANY_ID: integer;
NAME: string; NAME: string;
SHORT_NAME: string; SHORT_NAME: string;
inQuickBooks: string; IN_QB: string;
ADDRESS_LIST: TList<TAddressItem>; QB_ORDER_NUM: string;
ITEMS: TItemList;
// Staff Fields: // Staff Fields:
staff_fields_order_date: string; staff_fields_order_date: string;
...@@ -174,12 +174,10 @@ type ...@@ -174,12 +174,10 @@ type
staff_fields_art_location: string; staff_fields_art_location: string;
// Supplied by Customer: // Supplied by Customer:
supplied_by_customer_b_w_copy: boolean; supplied_by_customer_color_copy: string;
supplied_by_customer_color_copy: boolean; supplied_by_customer_plates: string;
supplied_by_customer_plates: boolean; supplied_by_customer_sample_ca: string;
supplied_by_customer_sample_ca: boolean;
supplied_by_customer_dimension: string; supplied_by_customer_dimension: string;
supplied_by_customer_disk_or_cd: boolean;
supplied_by_customer_e_mail: string; supplied_by_customer_e_mail: string;
supplied_by_customer_ftp: string; supplied_by_customer_ftp: string;
supplied_by_customer_other: string; supplied_by_customer_other: string;
...@@ -198,13 +196,13 @@ type ...@@ -198,13 +196,13 @@ type
layout_accross_no: string; layout_accross_no: string;
layout_around_no: string; layout_around_no: string;
layout_cad_file: string; layout_cad_file: string;
layout_excalibur_die: boolean; layout_excalibur_die: string;
layout_rsc_style: string; layout_rsc_style: string;
// Mounting // Mounting
mounting_loose: string; mounting_loose: string;
mounting_sticky_bak: boolean; mounting_sticky_bak: string;
mounting_full_mount: boolean; mounting_full_mount: string;
mounting_strip_mount: string; mounting_strip_mount: string;
mounting_standard_setup: string; mounting_standard_setup: string;
mounting_custom_backing: string; mounting_custom_backing: string;
...@@ -223,12 +221,12 @@ type ...@@ -223,12 +221,12 @@ type
proofing_e_mail: string; proofing_e_mail: string;
proofing_e_mail_attn: string; proofing_e_mail_attn: string;
proofing_ship_to: string; proofing_ship_to: string;
proofing_full_size_panel: boolean; proofing_full_size_panel: string;
proofing_print_card: boolean; proofing_print_card: string;
proofing_wide_format: boolean; proofing_wide_format: string;
proofing_pdf_file: boolean; proofing_pdf_file: string;
proofing_other: string; proofing_other: string;
proofing_art_approved_as_is: boolean; proofing_art_approved_as_is: string;
proofing_approved_date: string; proofing_approved_date: string;
// Plates // Plates
...@@ -243,12 +241,12 @@ type ...@@ -243,12 +241,12 @@ type
TWebOrder = class TWebOrder = class
Public Public
//Company //Company
ORDER_ID: integer;
COMPANY_ID: integer; COMPANY_ID: integer;
NAME: string; NAME: string;
SHORT_NAME: string; SHORT_NAME: string;
inQuickBooks: string; IN_QB: string;
ADDRESS_LIST: TList<TAddressItem>; QB_ORDER_NUM: string;
ITEMS: TItemList;
// Staff Fields: // Staff Fields:
staff_fields_order_date: string; staff_fields_order_date: string;
...@@ -281,12 +279,12 @@ type ...@@ -281,12 +279,12 @@ type
supplied_by_customer_initials: string; supplied_by_customer_initials: string;
// Proofing // Proofing
proofing_pdf: boolean; proofing_pdf: string;
proofing_pdf_to: string; proofing_pdf_to: string;
proofing_pdf_date_1: string; proofing_pdf_date_1: string;
proofing_pdf_date_2: string; proofing_pdf_date_2: string;
proofing_pdf_date_3: string; proofing_pdf_date_3: string;
proofing_full_size_ink_jet_for: boolean; proofing_full_size_ink_jet_for: string;
proofing_ink_jet_to: string; proofing_ink_jet_to: string;
proofing_ink_jet_to_2: string; proofing_ink_jet_to_2: string;
proofing_ink_jet_date_1: string; proofing_ink_jet_date_1: string;
...@@ -479,7 +477,7 @@ type ...@@ -479,7 +477,7 @@ type
[HttpGet] function GetUsers(searchOptions: string): TUserList; [HttpGet] function GetUsers(searchOptions: string): TUserList;
[HttpGet] function GetItems(searchOptions: string): TItemList; [HttpGet] function GetItems(searchOptions: string): TItemList;
[HttpGet] function GetOrders(searchOptions: string): TOrderList; [HttpGet] function GetOrders(searchOptions: string): TOrderList;
[HttpGet] function GetOrder(orderInfo: string): TFullOrder; [HttpGet] function GetCorrugatedOrder(orderInfo: string): TCorrugatedOrder;
[HttpGet] function GetWebOrder(orderInfo: string): TWebOrder; [HttpGet] function GetWebOrder(orderInfo: string): TWebOrder;
[HttpGet] function GetCuttingDieOrder(orderInfo: string): TCuttingDie; [HttpGet] function GetCuttingDieOrder(orderInfo: string): TCuttingDie;
[HttpGet] function GetCustomers(customerInfo: string): TCustomerList; [HttpGet] function GetCustomers(customerInfo: string): TCustomerList;
......
...@@ -34,7 +34,7 @@ type ...@@ -34,7 +34,7 @@ type
function GetItems(searchOptions: string): TItemList; function GetItems(searchOptions: string): TItemList;
function GetUsers(searchOptions: string): TUserList; function GetUsers(searchOptions: string): TUserList;
function GetOrders(searchOptions: string): TOrderList; function GetOrders(searchOptions: string): TOrderList;
function GetOrder(orderInfo: string): TFullOrder; function GetCorrugatedOrder(orderInfo: string): TCorrugatedOrder;
function GetCustomers(customerInfo:string): TCustomerList; function GetCustomers(customerInfo:string): TCustomerList;
function GetCustomer(ID: string): TCustomerItem; function GetCustomer(ID: string): TCustomerItem;
function GetWebOrder(orderInfo: string): TWebOrder; function GetWebOrder(orderInfo: string): TWebOrder;
...@@ -145,7 +145,7 @@ begin ...@@ -145,7 +145,7 @@ begin
TaxCodeRef := TJSONObject.Create; TaxCodeRef := TJSONObject.Create;
TxnTaxCodeRef := TJSONObject.Create; TxnTaxCodeRef := TJSONObject.Create;
TxnTaxDetail := TJSONObject.Create; TxnTaxDetail := TJSONObject.Create;
Logger.Log(3, 'TLookupService.AddEstimate');
try try
try try
ORDER_ID := orderInfo; ORDER_ID := orderInfo;
...@@ -162,12 +162,9 @@ begin ...@@ -162,12 +162,9 @@ begin
else else
table := 'cutting_die_orders'; table := 'cutting_die_orders';
SQL := 'select * from ' + table + ' cpo join customers c on cpo.COMPANY_ID = c.CUSTOMER_ID join customers_ship cs on cpo.staff_fields_ship_to = cs.ship_block JOIN qb_items ON cpo.staff_fields_quickbooks_item = qb_items.qb_item_name where cpo.ORDER_ID = ' + ORDER_ID; SQL := 'select * from ' + table + ' cpo join customers c on cpo.COMPANY_ID = c.CUSTOMER_ID join customers_ship cs on cpo.staff_fields_ship_to = cs.ship_block JOIN qb_items ON cpo.staff_fields_quickbooks_item = qb_items.qb_item_name where cpo.ORDER_ID = ' + ORDER_ID;
doQuery(ordersDB.UniQuery1, SQL); doQuery(ordersDB.UniQuery1, SQL);
estimateJSON.AddPair('TxnDate', ordersDB.UniQuery1.FieldByName('staff_fields_order_date').AsString); estimateJSON.AddPair('TxnDate', ordersDB.UniQuery1.FieldByName('staff_fields_order_date').AsString);
CustomerRefJSON := TJSONObject.Create; CustomerRefJSON := TJSONObject.Create;
...@@ -358,6 +355,7 @@ var ...@@ -358,6 +355,7 @@ var
ADDRESS_LIST: TJSONArray; ADDRESS_LIST: TJSONArray;
ADDRESS: TJSONObject; ADDRESS: TJSONObject;
begin begin
logger.Log(3, 'TLookupService.DelShippingAddress');
SQL := 'DELETE FROM customers_ship WHERE customer_ship_id = ' + AddressID; SQL := 'DELETE FROM customers_ship WHERE customer_ship_id = ' + AddressID;
OrdersDB.UniQuery1.SQL.Text := SQL; OrdersDB.UniQuery1.SQL.Text := SQL;
OrdersDB.UniQuery1.ExecSQL; OrdersDB.UniQuery1.ExecSQL;
...@@ -395,6 +393,7 @@ var ...@@ -395,6 +393,7 @@ var
PageNum, PageSize: integer; PageNum, PageSize: integer;
offset,limit: string; offset,limit: string;
begin begin
logger.Log(3, 'TLookupService.GetCustomers');
params := TStringList.Create; params := TStringList.Create;
params.StrictDelimiter := true; params.StrictDelimiter := true;
params.Delimiter := '&'; params.Delimiter := '&';
...@@ -464,6 +463,7 @@ var ...@@ -464,6 +463,7 @@ var
ADDRESS: TAddressItem; ADDRESS: TAddressItem;
USER: TUserItem; USER: TUserItem;
begin begin
logger.Log(3, 'TLookupService.GetCustomer');
try try
if ID = '' then if ID = '' then
SQL := 'select * FROM customers c LEFT JOIN customers_ship s ON c.CUSTOMER_ID = s.customer_id WHERE c.CUSTOMER_ID = -1' SQL := 'select * FROM customers c LEFT JOIN customers_ship s ON c.CUSTOMER_ID = s.customer_id WHERE c.CUSTOMER_ID = -1'
...@@ -522,6 +522,7 @@ var ...@@ -522,6 +522,7 @@ var
USER: TUserItem; USER: TUserItem;
SQL: string; SQL: string;
begin begin
Logger.Log(3, 'TLookupService.GetRepUsers');
SQL := 'SELECT USER_ID, NAME from users where QB_ID IS NOT NULL AND QB_ID <> ' + quotedStr(''); SQL := 'SELECT USER_ID, NAME from users where QB_ID IS NOT NULL AND QB_ID <> ' + quotedStr('');
result := TList<TUserItem>.Create; result := TList<TUserItem>.Create;
doQuery(ordersDB.UniQuery1, SQL); doQuery(ordersDB.UniQuery1, SQL);
...@@ -545,6 +546,7 @@ var ...@@ -545,6 +546,7 @@ var
CompanyID, CompanyName: string; CompanyID, CompanyName: string;
params: TStringList; params: TStringList;
begin begin
logger.Log(3, 'TLookupService.GenerateOrderListPDF');
rptOrderList := TrptOrderList.Create(nil); rptOrderList := TrptOrderList.Create(nil);
try try
try try
...@@ -604,6 +606,7 @@ var ...@@ -604,6 +606,7 @@ var
JSONArray: TJSONArray; JSONArray: TJSONArray;
Item: TAddressItem; Item: TAddressItem;
begin begin
logger.Log(3, 'TLookupSerivce.AddShippingAddress');
result := TJSONObject.Create; result := TJSONObject.Create;
JSONData := TJSONObject.ParseJSONValue(AddressInfo) as TJSONObject; JSONData := TJSONObject.ParseJSONValue(AddressInfo) as TJSONObject;
if JSONData = nil then if JSONData = nil then
...@@ -696,6 +699,7 @@ var ...@@ -696,6 +699,7 @@ var
msg: string; msg: string;
unique: boolean; unique: boolean;
begin begin
logger.Log(3, 'TLookupService.AddCustomer');
DateFormat := TFormatSettings.Create; DateFormat := TFormatSettings.Create;
DateFormat.ShortDateFormat := 'yyyy-mm-dd'; DateFormat.ShortDateFormat := 'yyyy-mm-dd';
DateFormat.DateSeparator := '-'; DateFormat.DateSeparator := '-';
...@@ -802,6 +806,7 @@ var ...@@ -802,6 +806,7 @@ var
rptOrderCorrugated: TrptOrderCorrugated; // Local instance of the report rptOrderCorrugated: TrptOrderCorrugated; // Local instance of the report
begin begin
rptOrderCorrugated := TrptOrderCorrugated.Create(nil); rptOrderCorrugated := TrptOrderCorrugated.Create(nil);
logger.Log(3, 'TLookupService.GenerateOrderCorrugatedPDF');
try try
try try
// Generate SQL query for a single order // Generate SQL query for a single order
...@@ -815,7 +820,7 @@ begin ...@@ -815,7 +820,7 @@ begin
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(1, 'Error generating corrugated PDF: ' + E.Message); Logger.Log(2, 'Error generating corrugated PDF: ' + E.Message);
raise EXDataHttpException.Create(500, 'Error generating corrugated PDF: A KG Orders database issue has occurred!'); raise EXDataHttpException.Create(500, 'Error generating corrugated PDF: A KG Orders database issue has occurred!');
end; end;
end; end;
...@@ -829,6 +834,7 @@ var ...@@ -829,6 +834,7 @@ var
SQL: string; SQL: string;
rptOrderWeb: TrptOrderWeb; // Local instance of the report rptOrderWeb: TrptOrderWeb; // Local instance of the report
begin begin
logger.Log(3, 'TLookupService.GenerateOrderWebPDF');
rptOrderWeb := TrptOrderWeb.Create(nil); rptOrderWeb := TrptOrderWeb.Create(nil);
try try
try try
...@@ -844,7 +850,7 @@ begin ...@@ -844,7 +850,7 @@ begin
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(1, 'Error generating web PDF: ' + E.Message); Logger.Log(2, 'Error generating web PDF: ' + E.Message);
raise EXDataHttpException.Create(500, 'Error generating web PDF: A KG Orders database issue has occurred!'); raise EXDataHttpException.Create(500, 'Error generating web PDF: A KG Orders database issue has occurred!');
end; end;
end; end;
...@@ -859,6 +865,7 @@ var ...@@ -859,6 +865,7 @@ var
rptOrderCutting: TrptOrderCutting; // Local instance of the report rptOrderCutting: TrptOrderCutting; // Local instance of the report
begin begin
rptOrderCutting := TrptOrderCutting.Create(nil); rptOrderCutting := TrptOrderCutting.Create(nil);
logger.Log(3, 'TLookupService.GenerateOrderCuttingPDF');
try try
try try
// Generate SQL query for a single order // Generate SQL query for a single order
...@@ -872,7 +879,7 @@ begin ...@@ -872,7 +879,7 @@ begin
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(1, 'Error generating cutting die PDF: ' + E.Message); Logger.Log(2, 'Error generating cutting die PDF: ' + E.Message);
raise EXDataHttpException.Create(500, 'Error generating cutting die PDF: A KG Orders database issue has occurred!'); raise EXDataHttpException.Create(500, 'Error generating cutting die PDF: A KG Orders database issue has occurred!');
end; end;
end; end;
...@@ -1131,6 +1138,7 @@ var ...@@ -1131,6 +1138,7 @@ var
ColorType: string; ColorType: string;
SQLQuery: TSQLQuery; SQLQuery: TSQLQuery;
begin begin
logger.Log(3, 'TLookupService.GetOrders');
SQLQuery := generateOrdersSQL(searchOptions); SQLQuery := generateOrdersSQL(searchOptions);
TXDataOperationContext.Current.Handler.ManagedObjects.Add(SQLQuery); TXDataOperationContext.Current.Handler.ManagedObjects.Add(SQLQuery);
...@@ -1209,10 +1217,9 @@ begin ...@@ -1209,10 +1217,9 @@ begin
end; end;
function TLookupService.GetOrder(orderInfo: string): TFullOrder; function TLookupService.GetCorrugatedOrder(orderInfo: string): TCorrugatedOrder;
// Gets on singular order from the database for the order entry page. // Gets on singular order from the database for the order entry page.
// orderInfo: the ORDER_ID. // orderInfo: the ORDER_ID.
// TODO seperate this into GetCorrugatedOrder and GetWebOrder.
var var
orderType: string; orderType: string;
orderID: string; orderID: string;
...@@ -1220,25 +1227,21 @@ var ...@@ -1220,25 +1227,21 @@ var
table: string; table: string;
ADDRESS: TAddressItem; ADDRESS: TAddressItem;
begin begin
logger.Log(3,'TLookupService.GetCorrugatedOrder');
orderID := orderInfo; orderID := orderInfo;
try try
SQL := 'select ORDER_TYPE from orders where ORDER_ID = ' + quotedStr(orderID); SQL := 'select * from corrugated_plate_orders cpo JOIN customers c ON c.CUSTOMER_ID = cpo.COMPANY_ID join orders o on cpo.ORDER_ID = o.ORDER_ID where cpo.ORDER_ID = ' + quotedStr(orderID);
doQuery(ordersDB.UniQuery1, SQL);
orderType := ordersDB.UniQuery1.FieldByName('ORDER_TYPE').AsString;
if orderType = 'web_plate' then
table := 'web_plate_orders'
else
table := 'corrugated_plate_orders';
SQL := 'select * from ' + table + ' o JOIN customers c ON c.CUSTOMER_ID = o.COMPANY_ID where ORDER_ID = ' + quotedStr(orderID);
doQuery(ordersDB.UniQuery1, SQL); doQuery(ordersDB.UniQuery1, SQL);
result := TFullOrder.Create; result := TCorrugatedOrder.Create;
// Company // Company
result.ORDER_ID := ordersDB.UniQuery1.FieldByName('ORDER_ID').AsInteger;
result.COMPANY_ID := ordersDB.UniQuery1.FieldByName('COMPANY_ID').AsInteger; result.COMPANY_ID := ordersDB.UniQuery1.FieldByName('COMPANY_ID').AsInteger;
result.NAME := ordersDB.UniQuery1.FieldByName('NAME').AsString; result.NAME := ordersDB.UniQuery1.FieldByName('NAME').AsString;
result.SHORT_NAME := ordersDB.UniQuery1.FieldByName('SHORT_NAME').AsString; result.SHORT_NAME := ordersDB.UniQuery1.FieldByName('SHORT_NAME').AsString;
result.inQuickBooks := '?'; result.IN_QB := ordersDB.UniQuery1.FieldByName('IN_QB').AsString;
result.QB_ORDER_NUM := ordersDB.UniQuery1.FieldByName('QB_ORDER_NUM').AsString;
// Staff Fields // Staff Fields
result.staff_fields_order_date := ordersDB.UniQuery1.FieldByName('staff_fields_order_date').AsString; result.staff_fields_order_date := ordersDB.UniQuery1.FieldByName('staff_fields_order_date').AsString;
...@@ -1257,52 +1260,18 @@ begin ...@@ -1257,52 +1260,18 @@ begin
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;
// Supplied by Customer result.supplied_by_customer_color_copy := ordersDB.UniQuery1.FieldByName('supplied_by_customer_color_copy').AsString;
if ordersDB.UniQuery1.FieldByName('supplied_by_customer_b_w_copy').AsString = 'T' then result.supplied_by_customer_plates := ordersDB.UniQuery1.FieldByName('supplied_by_customer_plates').AsString;
result.supplied_by_customer_b_w_copy := true result.supplied_by_customer_sample_ca := ordersDB.UniQuery1.FieldByName('supplied_by_customer_sample_ca').AsString;
else
result.supplied_by_customer_b_w_copy := false;
if ordersDB.UniQuery1.FieldByName('supplied_by_customer_color_copy').AsString = 'T' then
result.supplied_by_customer_color_copy := true
else
result.supplied_by_customer_color_copy := false;
if ordersDB.UniQuery1.FieldByName('supplied_by_customer_plates').AsString = 'T' then
result.supplied_by_customer_plates := true
else
result.supplied_by_customer_plates := false;
if ordersDB.UniQuery1.FieldByName('supplied_by_customer_sample_ca').AsString = 'T' then
result.supplied_by_customer_sample_ca := true
else
result.supplied_by_customer_sample_ca := false;
result.supplied_by_customer_dimension := ordersDB.UniQuery1.FieldByName('supplied_by_customer_dimension').AsString; 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
result.diskOrCD := true
else
result.diskOrCD := false;}
end
else
begin
if ordersDB.UniQuery1.FieldByName('supplied_by_customer_disk_or_cd').AsString = 'T' then
result.supplied_by_customer_disk_or_cd := true
else
result.supplied_by_customer_disk_or_cd := false;
end;
result.supplied_by_customer_e_mail := ordersDB.UniQuery1.FieldByName('supplied_by_customer_e_mail').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_ftp := ordersDB.UniQuery1.FieldByName('supplied_by_customer_ftp').AsString;
result.supplied_by_customer_other := ordersDB.UniQuery1.FieldByName('supplied_by_customer_other').AsString; result.supplied_by_customer_other := ordersDB.UniQuery1.FieldByName('supplied_by_customer_other').AsString;
if orderType = 'corrugated_plate' then
begin
result.supplied_by_customer_existing_ := ordersDB.UniQuery1.FieldByName('supplied_by_customer_existing_').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_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; result.supplied_by_customer_ref_art_a := ordersDB.UniQuery1.FieldByName('supplied_by_customer_ref_art_a').AsString;
end;
// Layout // Layout
if orderType = 'corrugated_plate' then
begin
result.layout_rsc_l := ordersDB.UniQuery1.FieldByName('layout_rsc_l').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_w := ordersDB.UniQuery1.FieldByName('layout_rcs_w').AsString;
result.layout_rcs_d := ordersDB.UniQuery1.FieldByName('layout_rcs_d').AsString; result.layout_rcs_d := ordersDB.UniQuery1.FieldByName('layout_rcs_d').AsString;
...@@ -1310,30 +1279,14 @@ begin ...@@ -1310,30 +1279,14 @@ begin
result.layout_accross_no := ordersDB.UniQuery1.FieldByName('layout_accross_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_around_no := ordersDB.UniQuery1.FieldByName('layout_around_no').AsString;
result.layout_cad_file := ordersDB.UniQuery1.FieldByName('layout_cad_file').AsString; result.layout_cad_file := ordersDB.UniQuery1.FieldByName('layout_cad_file').AsString;
if ordersDB.UniQuery1.FieldByName('layout_excalibur_die').AsString = 'T' then result.layout_excalibur_die := ordersDB.UniQuery1.FieldByName('layout_excalibur_die').AsString;
result.layout_excalibur_die := true
else
result.layout_excalibur_die := false;
result.layout_rsc_style := ordersDB.UniQuery1.FieldByName('layout_rsc_style').AsString; 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;
end;
// Mounting & Colors & Proofing // Mounting & Colors & Proofing
if orderType = 'corrugated_plate' then
begin
result.mounting_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.mounting_sticky_bak := ordersDB.UniQuery1.FieldByName('mounting_sticky_bak').AsString;
result.mounting_sticky_bak := true result.mounting_full_mount := ordersDB.UniQuery1.FieldByName('mounting_full_mount').AsString;
else
result.mounting_sticky_bak := false;
if ordersDB.UniQuery1.FieldByName('mounting_full_mount').AsString = 'T' then
result.mounting_full_mount := true
else
result.mounting_full_mount := false;
result.mounting_strip_mount := ordersDB.UniQuery1.FieldByName('mounting_strip_mount').AsString; result.mounting_strip_mount := ordersDB.UniQuery1.FieldByName('mounting_strip_mount').AsString;
result.mounting_standard_setup := ordersDB.UniQuery1.FieldByName('mounting_standard_setup').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_backing := ordersDB.UniQuery1.FieldByName('mounting_custom_backing').AsString;
...@@ -1350,37 +1303,13 @@ begin ...@@ -1350,37 +1303,13 @@ begin
result.proofing_e_mail := ordersDB.UniQuery1.FieldByName('proofing_e_mail').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_e_mail_attn := ordersDB.UniQuery1.FieldByName('proofing_e_mail_attn').AsString;
result.proofing_ship_to := ordersDB.UniQuery1.FieldByName('proofing_ship_to').AsString; result.proofing_ship_to := ordersDB.UniQuery1.FieldByName('proofing_ship_to').AsString;
if ordersDB.UniQuery1.FieldByName('proofing_full_size_panel').AsString = 'T' then result.proofing_full_size_panel := ordersDB.UniQuery1.FieldByName('proofing_full_size_panel').AsString;
result.proofing_full_size_panel := true result.proofing_print_card := ordersDB.UniQuery1.FieldByName('proofing_print_card').AsString;
else result.proofing_wide_format := ordersDB.UniQuery1.FieldByName('proofing_wide_format').AsString;
result.proofing_full_size_panel := false; result.proofing_pdf_file := ordersDB.UniQuery1.FieldByName('proofing_pdf_file').AsString;
if ordersDB.UniQuery1.FieldByName('proofing_print_card').AsString = 'T'then
result.proofing_print_card := true
else
result.proofing_print_card := false;
if ordersDB.UniQuery1.FieldByName('proofing_wide_format').AsString = 'T'then
result.proofing_wide_format := true
else
result.proofing_wide_format := false;
if ordersDB.UniQuery1.FieldByName('proofing_pdf_file').AsString = 'T'then
result.proofing_pdf_file := true
else
result.proofing_pdf_file := false;
result.proofing_other := ordersDB.UniQuery1.FieldByName('proofing_other').AsString; result.proofing_other := ordersDB.UniQuery1.FieldByName('proofing_other').AsString;
if ordersDB.UniQuery1.FieldByName('proofing_art_approved_as_is').AsString = 'T'then result.proofing_art_approved_as_is := ordersDB.UniQuery1.FieldByName('proofing_art_approved_as_is').AsString;
result.proofing_art_approved_as_is := true
else
result.proofing_art_approved_as_is := false;
result.proofing_approved_date := ordersDB.UniQuery1.FieldByName('proofing_approved_date').AsString; 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;
if ordersDB.UniQuery1.FieldByName('proofing_pdf').AsString = 'T'then
result.pdfFile := true
else
result.pdfFile := false;}
end;
// Plates // Plates
result.plates_thickness := ordersDB.UniQuery1.FieldByName('plates_thickness').AsString; result.plates_thickness := ordersDB.UniQuery1.FieldByName('plates_thickness').AsString;
...@@ -1388,30 +1317,9 @@ begin ...@@ -1388,30 +1317,9 @@ begin
result.plates_job_number := ordersDB.UniQuery1.FieldByName('plates_job_number').AsString; result.plates_job_number := ordersDB.UniQuery1.FieldByName('plates_job_number').AsString;
// General // General
if orderType = 'corrugated_plate' then result.general_special_instructions := 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
ordersDB.UniQuery1.Close;
SQL := 'SELECT s.ship_block FROM customers c JOIN customers_ship s ON c.CUSTOMER_ID = s.customer_id WHERE c.CUSTOMER_ID = ' + IntToStr(result.COMPANY_ID);
doQuery(ordersDB.UniQuery1, SQL);
result.ADDRESS_LIST := TList<TAddressItem>.Create;
TXDataOperationContext.Current.Handler.ManagedObjects.Add( Result.ADDRESS_LIST );
while not ordersDB.UniQuery1.Eof do
begin
ADDRESS := TAddressItem.Create;
TXDataOperationContext.Current.Handler.ManagedObjects.Add( ADDRESS );
ADDRESS.ADDRESS := ordersDB.UniQuery1.FieldByName('ship_block').AsString;
result.ADDRESS_LIST.Add(ADDRESS);
ordersDB.UniQuery1.Next;
end;
ordersDB.UniQuery1.Close; ordersDB.UniQuery1.Close;
result.ITEMS := GetItems('');
except except
on E: Exception do on E: Exception do
begin begin
...@@ -1429,18 +1337,21 @@ var ...@@ -1429,18 +1337,21 @@ var
SQL: string; SQL: string;
ADDRESS: TAddressItem; ADDRESS: TAddressItem;
begin begin
logger.Log(3, 'TLookupService.GetWebOrder');
try try
orderID := orderInfo; orderID := orderInfo;
SQL := 'select * from web_plate_orders o JOIN customers c ON c.CUSTOMER_ID = o.COMPANY_ID where ORDER_ID = ' + quotedStr(orderID); SQL := 'select * from web_plate_orders wpo JOIN customers c ON c.CUSTOMER_ID = wpo.COMPANY_ID join orders o on wpo.ORDER_ID = o.ORDER_ID where wpo.ORDER_ID = ' + quotedStr(orderID);
doQuery(ordersDB.UniQuery1, SQL); doQuery(ordersDB.UniQuery1, SQL);
result := TWebOrder.Create; result := TWebOrder.Create;
// Company // Company
result.ORDER_ID := ordersDB.UniQuery1.FieldByName('ORDER_ID').AsInteger;
result.COMPANY_ID := ordersDB.UniQuery1.FieldByName('COMPANY_ID').AsInteger; result.COMPANY_ID := ordersDB.UniQuery1.FieldByName('COMPANY_ID').AsInteger;
result.NAME := ordersDB.UniQuery1.FieldByName('NAME').AsString; result.NAME := ordersDB.UniQuery1.FieldByName('NAME').AsString;
result.SHORT_NAME := ordersDB.UniQuery1.FieldByName('SHORT_NAME').AsString; result.SHORT_NAME := ordersDB.UniQuery1.FieldByName('SHORT_NAME').AsString;
result.inQuickBooks := '?'; result.IN_QB := ordersDB.UniQuery1.FieldByName('IN_QB').AsString;
result.QB_ORDER_NUM := ordersDB.UniQuery1.FieldByName('QB_ORDER_NUM').AsString;
// Staff Fields // Staff Fields
result.staff_fields_order_date := ordersDB.UniQuery1.FieldByName('staff_fields_order_date').AsString; result.staff_fields_order_date := ordersDB.UniQuery1.FieldByName('staff_fields_order_date').AsString;
...@@ -1472,12 +1383,12 @@ begin ...@@ -1472,12 +1383,12 @@ begin
result.supplied_by_customer_initials := ordersDB.UniQuery1.FieldByName('supplied_by_customer_initials').AsString; result.supplied_by_customer_initials := ordersDB.UniQuery1.FieldByName('supplied_by_customer_initials').AsString;
// Proofing // Proofing
result.proofing_pdf := ordersDB.UniQuery1.FieldByName('proofing_pdf').AsBoolean; result.proofing_pdf := ordersDB.UniQuery1.FieldByName('proofing_pdf').AsString;
result.proofing_pdf_to := ordersDB.UniQuery1.FieldByName('proofing_pdf_to').AsString; result.proofing_pdf_to := ordersDB.UniQuery1.FieldByName('proofing_pdf_to').AsString;
result.proofing_pdf_date_1 := ordersDB.UniQuery1.FieldByName('proofing_pdf_date_1').AsString; result.proofing_pdf_date_1 := ordersDB.UniQuery1.FieldByName('proofing_pdf_date_1').AsString;
result.proofing_pdf_date_2 := ordersDB.UniQuery1.FieldByName('proofing_pdf_date_2').AsString; result.proofing_pdf_date_2 := ordersDB.UniQuery1.FieldByName('proofing_pdf_date_2').AsString;
result.proofing_pdf_date_3 := ordersDB.UniQuery1.FieldByName('proofing_pdf_date_3').AsString; result.proofing_pdf_date_3 := ordersDB.UniQuery1.FieldByName('proofing_pdf_date_3').AsString;
result.proofing_full_size_ink_jet_for := ordersDB.UniQuery1.FieldByName('proofing_full_size_ink_jet_for').AsBoolean; result.proofing_full_size_ink_jet_for := ordersDB.UniQuery1.FieldByName('proofing_full_size_ink_jet_for').AsString;
result.proofing_ink_jet_to := ordersDB.UniQuery1.FieldByName('proofing_ink_jet_to').AsString; result.proofing_ink_jet_to := ordersDB.UniQuery1.FieldByName('proofing_ink_jet_to').AsString;
result.proofing_ink_jet_to_2 := ordersDB.UniQuery1.FieldByName('proofing_ink_jet_to').AsString; result.proofing_ink_jet_to_2 := ordersDB.UniQuery1.FieldByName('proofing_ink_jet_to').AsString;
result.proofing_ink_jet_date_1 := ordersDB.UniQuery1.FieldByName('proofing_ink_jet_date_1').AsString; result.proofing_ink_jet_date_1 := ordersDB.UniQuery1.FieldByName('proofing_ink_jet_date_1').AsString;
...@@ -1537,24 +1448,6 @@ begin ...@@ -1537,24 +1448,6 @@ begin
result.general_comments := ordersDB.UniQuery1.FieldByName('general_comments').AsString; result.general_comments := ordersDB.UniQuery1.FieldByName('general_comments').AsString;
ordersDB.UniQuery1.Close; ordersDB.UniQuery1.Close;
SQL := 'SELECT s.ship_block FROM customers c JOIN customers_ship s ON c.CUSTOMER_ID = s.customer_id WHERE c.CUSTOMER_ID = ' + IntToStr(result.COMPANY_ID);
doQuery(ordersDB.UniQuery1, SQL);
result.ADDRESS_LIST := TList<TAddressItem>.Create;
TXDataOperationContext.Current.Handler.ManagedObjects.Add( result.ADDRESS_LIST );
while not ordersDB.UniQuery1.Eof do
begin
ADDRESS := TAddressItem.Create;
TXDataOperationContext.Current.Handler.ManagedObjects.Add( ADDRESS );
ADDRESS.ADDRESS := ordersDB.UniQuery1.FieldByName('ship_block').AsString;
result.ADDRESS_LIST.Add(ADDRESS);
ordersDB.UniQuery1.Next;
end;
ordersDB.UniQuery1.Close;
result.ITEMS := GetItems('');
except except
on E: Exception do on E: Exception do
begin begin
...@@ -1572,6 +1465,7 @@ var ...@@ -1572,6 +1465,7 @@ var
SQL: string; SQL: string;
ADDRESS: TAddressItem; ADDRESS: TAddressItem;
begin begin
logger.Log(3, 'TLookupService.GetCuttingDieOrder');
try try
orderID := orderInfo; orderID := orderInfo;
SQL := 'select * from cutting_die_orders cdo JOIN customers c ON c.CUSTOMER_ID = cdo.COMPANY_ID join orders o on cdo.ORDER_ID = o.ORDER_ID where cdo.ORDER_ID = ' + quotedStr(orderID); SQL := 'select * from cutting_die_orders cdo JOIN customers c ON c.CUSTOMER_ID = cdo.COMPANY_ID join orders o on cdo.ORDER_ID = o.ORDER_ID where cdo.ORDER_ID = ' + quotedStr(orderID);
...@@ -1629,6 +1523,7 @@ var ...@@ -1629,6 +1523,7 @@ var
SQL: string; SQL: string;
item: TItemItem; item: TItemItem;
begin begin
logger.Log(3, 'TLookupService.GetItems');
try try
params := TStringList.Create; params := TStringList.Create;
params.StrictDelimiter := true; params.StrictDelimiter := true;
...@@ -1688,6 +1583,7 @@ function TLookupService.GetUsers(searchOptions: string): TUserList; ...@@ -1688,6 +1583,7 @@ function TLookupService.GetUsers(searchOptions: string): TUserList;
var var
user: TUserItem; user: TUserItem;
begin begin
logger.Log(3, 'TLookupService.GetUsers');
try try
// Prepare and open the query // Prepare and open the query
ordersDB.UniQuery1.Close; ordersDB.UniQuery1.Close;
...@@ -1769,8 +1665,8 @@ var ...@@ -1769,8 +1665,8 @@ var
hashString: string; hashString: string;
hashPW: string; hashPW: string;
begin begin
logger.log(3, 'TLookupService.EditUser');
params := TStringList.Create; params := TStringList.Create;
// parse the searchOptions
params.Delimiter := '&'; params.Delimiter := '&';
params.StrictDelimiter := true; params.StrictDelimiter := true;
params.DelimitedText := editOptions; params.DelimitedText := editOptions;
...@@ -1895,6 +1791,7 @@ var ...@@ -1895,6 +1791,7 @@ var
mode: string; mode: string;
msg: string; msg: string;
begin begin
logger.Log(3, 'TLookupService.AddCorrugatedOrder');
DateFormat := TFormatSettings.Create; DateFormat := TFormatSettings.Create;
DateFormat.ShortDateFormat := 'yyyy-mm-dd'; DateFormat.ShortDateFormat := 'yyyy-mm-dd';
DateFormat.DateSeparator := '-'; DateFormat.DateSeparator := '-';
...@@ -1944,9 +1841,8 @@ begin ...@@ -1944,9 +1841,8 @@ begin
end; end;
ordersDB.UniQuery1.FieldByName('ORDER_ID').AsInteger := ORDER_ID; ordersDB.UniQuery1.FieldByName('ORDER_ID').AsInteger := ORDER_ID;
// Post the record to the database
ordersDB.UniQuery1.Post; ordersDB.UniQuery1.Post;
if ( JSONData.GetValue<string>('staff_fields_proof_date') <> '' ) and ( JSONData.GetValue<string>('staff_fields_proof_date') <> '12/30/1899' ) then if ( JSONData.GetValue<string>('staff_fields_proof_date') <> '' ) and ( JSONData.GetValue<string>('staff_fields_proof_date') <> '12/30/1899' ) then
AddStatusSchedule('PROOF', JSONData, ORDER_ID); AddStatusSchedule('PROOF', JSONData, ORDER_ID);
if ( JSONData.GetValue<string>('staff_fields_ship_date') <> '' ) and ( JSONData.GetValue<string>('staff_fields_ship_date') <> '12/30/1899' ) then if ( JSONData.GetValue<string>('staff_fields_ship_date') <> '' ) and ( JSONData.GetValue<string>('staff_fields_ship_date') <> '12/30/1899' ) then
...@@ -1965,9 +1861,9 @@ begin ...@@ -1965,9 +1861,9 @@ begin
else else
msg := 'Success: Order Successfully Edited'; msg := 'Success: Order Successfully Edited';
Result := TJSONObject.Create.AddPair('status', msg); Result := JSONData;
Result.AddPair('OrderID', ORDER_ID); Result.AddPair('status', msg);
Result.AddPair('ORDER_ID', ORDER_ID);
TXDataOperationContext.Current.Handler.ManagedObjects.Add(Result); TXDataOperationContext.Current.Handler.ManagedObjects.Add(Result);
except except
on E: Exception do on E: Exception do
...@@ -1989,6 +1885,7 @@ var ...@@ -1989,6 +1885,7 @@ var
mode: string; mode: string;
change: boolean; change: boolean;
begin begin
logger.Log(3, 'TLookupService.AddStatusSchedule');
mode := order.GetValue<string>('mode'); mode := order.GetValue<string>('mode');
if mode = 'ADD' then if mode = 'ADD' then
begin begin
...@@ -2051,7 +1948,7 @@ var ...@@ -2051,7 +1948,7 @@ var
order: TJSONObject; order: TJSONObject;
begin begin
try try
logger.Log(1, 'Set Status Hit'); logger.Log(3, 'TLookupService.SetStatus');
StatusInfo := TJSONObject.ParseJSONValue(statusOptions) as TJSONObject; StatusInfo := TJSONObject.ParseJSONValue(statusOptions) as TJSONObject;
params := TStringList.Create; params := TStringList.Create;
// parse the statusOptions // parse the statusOptions
...@@ -2090,7 +1987,6 @@ begin ...@@ -2090,7 +1987,6 @@ begin
SQL := 'select * from orders_status where ORDER_ID = ' + IntToStr(ORDER_ID) + ' AND ' + SQL := 'select * from orders_status where ORDER_ID = ' + IntToStr(ORDER_ID) + ' AND ' +
'ORDER_STATUS = ' + quotedStr(Status); 'ORDER_STATUS = ' + quotedStr(Status);
logger.Log(1, 'Trying to Set Status');
doQuery(ordersDB.UniQuery1, SQL); doQuery(ordersDB.UniQuery1, SQL);
if ordersDB.UniQuery1.IsEmpty then if ordersDB.UniQuery1.IsEmpty then
...@@ -2163,7 +2059,7 @@ begin ...@@ -2163,7 +2059,7 @@ begin
result := 'success'; result := 'success';
except except
on E: Exception do on E: Exception do
logger.Log(5, 'An error occurred when setting status: ' + E.Message); logger.Log(2, 'An error occurred when setting status: ' + E.Message);
end; end;
end; end;
...@@ -2186,6 +2082,7 @@ var ...@@ -2186,6 +2082,7 @@ var
rightsInt: Integer; rightsInt: Integer;
params: TStringList; params: TStringList;
begin begin
logger.Log(3, 'TLookupService.AddUser');
try try
params := TStringList.Create; params := TStringList.Create;
params.StrictDelimiter := True; params.StrictDelimiter := True;
...@@ -2214,7 +2111,7 @@ begin ...@@ -2214,7 +2111,7 @@ begin
ordersDB.UniQuery1.Insert; ordersDB.UniQuery1.Insert;
ordersDB.UniQuery1.FieldByName('USER_NAME').AsString := user; ordersDB.UniQuery1.FieldByName('USER_NAME').AsString := user;
ordersDB.UniQuery1.FieldByName('PASSWORD').AsString := password; ordersDB.UniQuery1.FieldByName('PASSWORD').AsString := THashSHA2.GetHashString(full_name + password, THashSHA2.TSHA2Version.SHA512).ToUpper;
ordersDB.UniQuery1.FieldByName('NAME').AsString := full_name; ordersDB.UniQuery1.FieldByName('NAME').AsString := full_name;
if StrToBoolDef(status, False) then if StrToBoolDef(status, False) then
...@@ -2261,7 +2158,7 @@ var ...@@ -2261,7 +2158,7 @@ var
begin begin
try try
logger.Log(1, 'Add Item Hit'); logger.Log(3, 'TLookupService.AddItem');
result := TJSONObject.Create; result := TJSONObject.Create;
JSONData := TJSONObject.ParseJSONValue(itemInfo) as TJSONObject; JSONData := TJSONObject.ParseJSONValue(itemInfo) as TJSONObject;
if JSONData = nil then if JSONData = nil then
...@@ -2318,7 +2215,7 @@ begin ...@@ -2318,7 +2215,7 @@ begin
end; end;
except except
on E: Exception do on E: Exception do
logger.Log(5, 'An error occurred when adding an item: ' + E.Message); logger.Log(2, 'An error occurred when adding an item: ' + E.Message);
end; end;
end; end;
...@@ -2331,6 +2228,7 @@ var ...@@ -2331,6 +2228,7 @@ var
SQL: string; SQL: string;
params: TStringList; params: TStringList;
begin begin
logger.Log(3, 'TLookupService.DelUser');
SQL := 'select * from users where username = ' + QuotedStr(username.toLower); SQL := 'select * from users where username = ' + QuotedStr(username.toLower);
ordersDB.UniQuery1.Close; ordersDB.UniQuery1.Close;
ordersDB.UniQuery1.SQL.Text := SQL; ordersDB.UniQuery1.SQL.Text := SQL;
...@@ -2364,6 +2262,7 @@ var ...@@ -2364,6 +2262,7 @@ var
mode: string; mode: string;
msg: string; msg: string;
begin begin
logger.Log(3, 'TLookupService.AddWebOrder');
DateFormat := TFormatSettings.Create; DateFormat := TFormatSettings.Create;
DateFormat.ShortDateFormat := 'yyyy-mm-dd'; DateFormat.ShortDateFormat := 'yyyy-mm-dd';
DateFormat.DateSeparator := '-'; DateFormat.DateSeparator := '-';
...@@ -2434,8 +2333,9 @@ begin ...@@ -2434,8 +2333,9 @@ begin
else else
msg := 'Success: Order Successfully Edited'; msg := 'Success: Order Successfully Edited';
Result := TJSONObject.Create.AddPair('status', msg); Result := JSONData;
Result.AddPair('OrderID', ORDER_ID); Result.AddPair('status', msg);
Result.AddPair('ORDER_ID', ORDER_ID);
TXDataOperationContext.Current.Handler.ManagedObjects.Add(Result); TXDataOperationContext.Current.Handler.ManagedObjects.Add(Result);
except except
on E: Exception do on E: Exception do
...@@ -2461,6 +2361,7 @@ var ...@@ -2461,6 +2361,7 @@ var
temp: string; temp: string;
temp2: boolean; temp2: boolean;
begin begin
logger.Log(3, 'TLookupService.AddCuttingDieOrder');
DateFormat := TFormatSettings.Create; DateFormat := TFormatSettings.Create;
DateFormat.ShortDateFormat := 'yyyy-mm-dd'; DateFormat.ShortDateFormat := 'yyyy-mm-dd';
DateFormat.DateSeparator := '-'; DateFormat.DateSeparator := '-';
...@@ -2555,6 +2456,7 @@ var ...@@ -2555,6 +2456,7 @@ var
Field: TField; Field: TField;
RevisionID, rev_num, OrderIDInt: Integer; RevisionID, rev_num, OrderIDInt: Integer;
begin begin
logger.Log(3, 'TLookupService.delOrder');
try try
// Convert ORDER_ID to integer safely // Convert ORDER_ID to integer safely
OrderIDInt := StrToIntDef(OrderID, -1); OrderIDInt := StrToIntDef(OrderID, -1);
...@@ -2751,6 +2653,7 @@ var ...@@ -2751,6 +2653,7 @@ var
I: integer; I: integer;
SQL: string; SQL: string;
begin begin
logger.Log(3, 'TLookupService.GetQBCustomers');
Result := TJSONArray.Create; Result := TJSONArray.Create;
iniFile := TIniFile.Create(ExtractFilePath(Application.ExeName) + 'kgOrdersServer.ini'); iniFile := TIniFile.Create(ExtractFilePath(Application.ExeName) + 'kgOrdersServer.ini');
restClient := TRESTClient.Create(nil); restClient := TRESTClient.Create(nil);
...@@ -2894,6 +2797,7 @@ var ...@@ -2894,6 +2797,7 @@ var
LastRefresh: TDateTime; LastRefresh: TDateTime;
iniFile: TIniFile; iniFile: TIniFile;
begin begin
logger.Log(3, 'TLookupService.GetQBItems');
iniFile := nil; iniFile := nil;
restClient := nil; restClient := nil;
restRequest := nil; restRequest := nil;
...@@ -3011,7 +2915,7 @@ begin ...@@ -3011,7 +2915,7 @@ begin
if( (Client = '') or (Secret = '') ) then if( (Client = '') or (Secret = '') ) then
begin begin
Logger.Log(1, 'Missing Client ID or Client Secret in INI File'); Logger.Log(2, 'Missing Client ID or Client Secret in INI File');
Exit(); Exit();
end; end;
...@@ -3051,7 +2955,7 @@ begin ...@@ -3051,7 +2955,7 @@ begin
AccessToken := JSObj.GetValue('access_token').ToString.Trim(['"']); AccessToken := JSObj.GetValue('access_token').ToString.Trim(['"']);
SaveTokens(AccessToken, RefreshToken); SaveTokens(AccessToken, RefreshToken);
Result := AccessToken; Result := AccessToken;
Logger.Log(1, 'qbAPI - Tokens Successfully Saved'); Logger.Log(5, 'qbAPI - Tokens Successfully Saved');
except except
on E: EIdHTTPProtocolException do on E: EIdHTTPProtocolException do
// Memo2.Lines.Add('Error: ' + E.Message + #13#10 + 'Response: ' + E.ErrorMessage); // Memo2.Lines.Add('Error: ' + E.Message + #13#10 + 'Response: ' + E.ErrorMessage);
...@@ -3077,7 +2981,7 @@ begin ...@@ -3077,7 +2981,7 @@ begin
iniFile.WriteString('Quickbooks', 'RefreshToken', RefreshToken); iniFile.WriteString('Quickbooks', 'RefreshToken', RefreshToken);
iniFile.WriteString('Quickbooks', 'AccessToken', AccessToken); iniFile.WriteString('Quickbooks', 'AccessToken', AccessToken);
iniFile.WriteString('Quickbooks', 'LastRefresh', DateTimeToStr(Now)); iniFile.WriteString('Quickbooks', 'LastRefresh', DateTimeToStr(Now));
Logger.Log(1, 'Tokens Successfully Saved'); Logger.Log(5, 'Tokens Successfully Saved');
finally finally
IniFile.Free; IniFile.Free;
...@@ -3104,6 +3008,7 @@ var ...@@ -3104,6 +3008,7 @@ var
QB_LIST_ID: string; QB_LIST_ID: string;
unique: Boolean; unique: Boolean;
begin begin
logger.Log(3, 'TLookupService.ImportQBCustomer');
DateFormat := TFormatSettings.Create; DateFormat := TFormatSettings.Create;
DateFormat.ShortDateFormat := 'yyyy-mm-dd'; DateFormat.ShortDateFormat := 'yyyy-mm-dd';
DateFormat.DateSeparator := '-'; DateFormat.DateSeparator := '-';
......
...@@ -124,6 +124,7 @@ begin ...@@ -124,6 +124,7 @@ begin
Logger.Log( 1, 'iniFile: ' + ExtractFilePath(Application.ExeName) + 'kgOrdersServer.ini' ); Logger.Log( 1, 'iniFile: ' + ExtractFilePath(Application.ExeName) + 'kgOrdersServer.ini' );
Logger.Log( 1, 'LogLevels are displayed here. They were set in kgOrdersServer.dpr, it executes first' ); Logger.Log( 1, 'LogLevels are displayed here. They were set in kgOrdersServer.dpr, it executes first' );
Logger.Log(1, '--- Settings ---');
iniStr := iniFile.ReadString( 'Settings', 'MemoLogLevel', '' ); iniStr := iniFile.ReadString( 'Settings', 'MemoLogLevel', '' );
if iniStr.IsEmpty then if iniStr.IsEmpty then
Logger.Log( 1, '--Settings->memoLogLevel: Entry not found - default: 3' ) Logger.Log( 1, '--Settings->memoLogLevel: Entry not found - default: 3' )
...@@ -143,12 +144,13 @@ begin ...@@ -143,12 +144,13 @@ begin
else else
Logger.Log( 1, '--Settings->LogFileNum: ' + IntToStr(StrToInt(iniStr) - 1) ); Logger.Log( 1, '--Settings->LogFileNum: ' + IntToStr(StrToInt(iniStr) - 1) );
Logger.Log( 1, '' ); Logger.Log(1, '--- Database ---');
iniStr := IniFile.ReadString( 'Database', 'Server', '' ); iniStr := IniFile.ReadString( 'Database', 'Server', '' );
if iniStr.IsEmpty then if iniStr.IsEmpty then
Logger.Log( 1, '--Database->Server: Entry not found' ) Logger.Log( 1, '--Database->Server: Entry not found' )
else else
Logger.Log( 1, '--Database->Server: ' + iniStr ); Logger.Log( 1, '--Database->Server: ' + iniStr );
iniStr := iniFile.ReadString('Database', 'Database', ''); iniStr := iniFile.ReadString('Database', 'Database', '');
if iniStr.IsEmpty then if iniStr.IsEmpty then
Logger.Log( 1, '----Database->Database: Entry not found' ) Logger.Log( 1, '----Database->Database: Entry not found' )
...@@ -167,6 +169,43 @@ begin ...@@ -167,6 +169,43 @@ begin
else else
Logger.Log( 1, '----Database->Password: xxxxxxxx' ); Logger.Log( 1, '----Database->Password: xxxxxxxx' );
Logger.Log(1, '---Quickbooks---');
iniStr := IniFile.ReadString( 'Quickbooks', 'CompanyID', '' );
if iniStr.IsEmpty then
Logger.Log( 1, '--Quickbooks->CompanyID: Entry not found' )
else
Logger.Log( 1, '--Quickbooks->CompanyID: ' + 'Entry found' );
iniStr := IniFile.ReadString( 'Quickbooks', 'ClientID', '' );
if iniStr.IsEmpty then
Logger.Log( 1, '--Quickbooks->ClientID: Entry not found' )
else
Logger.Log( 1, '--Quickbooks->ClientID: ' + 'Entry found' );
iniStr := IniFile.ReadString( 'Quickbooks', 'ClientSecret', '' );
if iniStr.IsEmpty then
Logger.Log( 1, '--Quickbooks->ClientSecret: Entry not found' )
else
Logger.Log( 1, '--Quickbooks->ClientSecret: ' + 'Entry found' );
iniStr := IniFile.ReadString( 'Quickbooks', 'RefreshToken', '' );
if iniStr.IsEmpty then
Logger.Log( 1, '--Quickbooks->RefreshToken: Entry not found' )
else
Logger.Log( 1, '--Quickbooks->RefreshToken: ' + 'Entry found' );
iniStr := IniFile.ReadString( 'Quickbooks', 'AccessToken', '' );
if iniStr.IsEmpty then
Logger.Log( 1, '--Quickbooks->AccessToken: Entry not found' )
else
Logger.Log( 1, '--Quickbooks->AccessToken: ' + 'Entry found' );
iniStr := IniFile.ReadString( 'Quickbooks', 'LastRefresh', '' );
if iniStr.IsEmpty then
Logger.Log( 1, '--Quickbooks->LastRefresh: Entry not found' )
else
Logger.Log( 1, '--Quickbooks->LastRefresh: ' + iniStr );
Logger.Log( 1, '' ); Logger.Log( 1, '' );
finally finally
IniFile.Free; IniFile.Free;
......
...@@ -15,22 +15,33 @@ object fQB: TfQB ...@@ -15,22 +15,33 @@ object fQB: TfQB
TextHeight = 15 TextHeight = 15
object Splitter1: TSplitter object Splitter1: TSplitter
Left = 0 Left = 0
Top = 472 Top = 261
Width = 982 Width = 982
Height = 6 Height = 3
Cursor = crVSplit Cursor = crVSplit
Align = alBottom Align = alTop
ExplicitTop = 225
end end
object Splitter2: TSplitter object Splitter2: TSplitter
Left = 0 Left = 0
Top = 281 Top = 264
Width = 982 Width = 982
Height = 3 Height = 3
Cursor = crVSplit Cursor = crVSplit
Align = alBottom Align = alTop
ExplicitTop = 0 ExplicitTop = 0
ExplicitWidth = 284 ExplicitWidth = 284
end end
object Panel1: TPanel
Left = 0
Top = 0
Width = 982
Height = 63
Align = alTop
TabOrder = 0
ExplicitLeft = 4
ExplicitTop = 72
ExplicitWidth = 978
object Button2: TButton object Button2: TButton
Left = 4 Left = 4
Top = 32 Top = 32
...@@ -67,24 +78,13 @@ object fQB: TfQB ...@@ -67,24 +78,13 @@ object fQB: TfQB
TabOrder = 3 TabOrder = 3
OnClick = Button5Click OnClick = Button5Click
end end
object Memo1: TMemo
Left = 0
Top = 63
Width = 982
Height = 218
Align = alBottom
Lines.Strings = (
'')
ScrollBars = ssVertical
TabOrder = 4
end
object Button6: TButton object Button6: TButton
Left = 538 Left = 542
Top = 5 Top = 5
Width = 108 Width = 108
Height = 25 Height = 25
Caption = 'Match Customers' Caption = 'Match Customers'
TabOrder = 5 TabOrder = 4
OnClick = Button6Click OnClick = Button6Click
end end
object Button7: TButton object Button7: TButton
...@@ -93,7 +93,7 @@ object fQB: TfQB ...@@ -93,7 +93,7 @@ object fQB: TfQB
Width = 186 Width = 186
Height = 25 Height = 25
Caption = 'Show Customers without Orders' Caption = 'Show Customers without Orders'
TabOrder = 6 TabOrder = 5
OnClick = Button7Click OnClick = Button7Click
end end
object Button1: TButton object Button1: TButton
...@@ -102,23 +102,109 @@ object fQB: TfQB ...@@ -102,23 +102,109 @@ object fQB: TfQB
Width = 111 Width = 111
Height = 25 Height = 25
Caption = 'Get KG Customers' Caption = 'Get KG Customers'
TabOrder = 7 TabOrder = 6
OnClick = Button1Click OnClick = Button1Click
end end
object Panel1: TPanel object Button8: TButton
Left = 844
Top = 5
Width = 75
Height = 25
Caption = 'Get Items'
TabOrder = 7
OnClick = Button8Click
end
object Button9: TButton
Left = 121
Top = 32
Width = 95
Height = 25
Caption = 'Get Estimate'
TabOrder = 8
OnClick = Button9Click
end
object Button10: TButton
Left = 222
Top = 32
Width = 88
Height = 25
Caption = 'Update QB ID'
TabOrder = 9
OnClick = Button10Click
end
object Button11: TButton
Left = 316
Top = 32
Width = 113
Height = 25
Caption = 'update QB Items'
TabOrder = 10
OnClick = Button11Click
end
object Button12: TButton
Left = 435
Top = 32
Width = 190
Height = 25
Caption = 'Delete Customers without orders'
TabOrder = 11
OnClick = Button12Click
end
object Button15: TButton
Left = 646
Top = 32
Width = 137
Height = 25
Caption = 'Update All Passwords'
TabOrder = 12
OnClick = Button15Click
end
end
object AdvPanel2: TAdvPanel
Left = 0 Left = 0
Top = 478 Top = 490
Width = 982 Width = 982
Height = 183 Height = 171
Align = alBottom Align = alClient
Caption = 'Panel1' TabOrder = 1
TabOrder = 8 UseDockManager = True
OnResize = Panel1Resize Version = '2.7.0.2'
Caption.Color = clWhite
Caption.ColorTo = clNone
Caption.Font.Charset = DEFAULT_CHARSET
Caption.Font.Color = clNone
Caption.Font.Height = -11
Caption.Font.Name = 'Segoe UI'
Caption.Font.Style = []
Caption.GradientDirection = gdVertical
Caption.Indent = 0
Caption.ShadeLight = 255
Caption.Text = 'kgOrders Data'
Caption.Visible = True
CollapsColor = clNone
CollapsDelay = 0
DoubleBuffered = True
ShadowColor = clBlack
ShadowOffset = 0
StatusBar.BorderColor = clNone
StatusBar.BorderStyle = bsSingle
StatusBar.Font.Charset = DEFAULT_CHARSET
StatusBar.Font.Color = 4473924
StatusBar.Font.Height = -11
StatusBar.Font.Name = 'Segoe UI'
StatusBar.Font.Style = []
StatusBar.Color = clWhite
StatusBar.GradientDirection = gdVertical
Text = ''
ExplicitTop = 428
ExplicitHeight = 230
FullHeight = 200
object asgData2: TAdvStringGrid object asgData2: TAdvStringGrid
Left = 0 Left = 0
Top = 0 Top = 18
Width = 982 Width = 982
Height = 183 Height = 153
Align = alClient
DrawingStyle = gdsClassic DrawingStyle = gdsClassic
FixedColor = clWhite FixedColor = clWhite
TabOrder = 0 TabOrder = 0
...@@ -187,6 +273,7 @@ object fQB: TfQB ...@@ -187,6 +273,7 @@ object fQB: TfQB
'Smaller than' 'Smaller than'
'Clear') 'Clear')
FixedRowHeight = 22 FixedRowHeight = 22
FixedRowAlways = True
FixedFont.Charset = DEFAULT_CHARSET FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 3881787 FixedFont.Color = 3881787
FixedFont.Height = -11 FixedFont.Height = -11
...@@ -240,6 +327,9 @@ object fQB: TfQB ...@@ -240,6 +327,9 @@ object fQB: TfQB
SortSettings.HeaderMirrorColor = clWhite SortSettings.HeaderMirrorColor = clWhite
SortSettings.HeaderMirrorColorTo = clWhite SortSettings.HeaderMirrorColorTo = clWhite
Version = '9.1.4.5' Version = '9.1.4.5'
ExplicitLeft = -682
ExplicitTop = 0
ExplicitHeight = 183
ColWidths = ( ColWidths = (
64 64
64 64
...@@ -259,21 +349,613 @@ object fQB: TfQB ...@@ -259,21 +349,613 @@ object fQB: TfQB
22) 22)
end end
end end
object Panel2: TPanel object AdvOfficePager1: TAdvOfficePager
Left = 0 Left = 0
Top = 284 Top = 63
Width = 982 Width = 982
Height = 188 Height = 198
Align = alBottom Align = alTop
Caption = 'Panel2' ActivePage = AdvOfficePager12
TabOrder = 9 ButtonSettings.CloseButtonPicture.Data = {
OnResize = Panel2Resize 424DA20400000000000036040000280000000900000009000000010008000000
object asgData: TAdvStringGrid 00006C000000C30E0000C30E00000001000000010000427B8400DEEFEF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0001000001010100000100
0000000202000100020200000000000202020002020200000000010002020202
0200010000000101000202020001010000000100020202020200010000000002
0202000202020000000000020200010002020000000001000001010100000100
0000}
ButtonSettings.PageListButtonPicture.Data = {
424DA20400000000000036040000280000000900000009000000010008000000
00006C000000C30E0000C30E00000001000000010000427B8400DEEFEF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0001010101000101010100
0000010101000200010101000000010100020202000101000000010002020202
0200010000000002020200020202000000000002020001000202000000000100
0001010100000100000001010101010101010100000001010101010101010100
0000}
ButtonSettings.ScrollButtonPrevPicture.Data = {
424DA20400000000000036040000280000000900000009000000010008000000
00006C000000C30E0000C30E00000001000000010000427B8400DEEFEF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0001010101000001010100
0000010101000202000101000000010100020202000101000000010002020200
0101010000000002020200010101010000000100020202000101010000000101
0002020200010100000001010100020200010100000001010101000001010100
0000}
ButtonSettings.ScrollButtonNextPicture.Data = {
424DA20400000000000036040000280000000900000009000000010008000000
00006C000000C30E0000C30E00000001000000010000427B8400DEEFEF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0001010000010101010100
0000010002020001010101000000010002020200010101000000010100020202
0001010000000101010002020200010000000101000202020001010000000100
0202020001010100000001000202000101010100000001010000010101010100
0000}
ButtonSettings.ScrollButtonFirstPicture.Data = {
424DC60400000000000036040000280000001000000009000000010008000000
000000000000C40E0000C40E00000001000000010000427B84FFDEEFEFFFFFFF
FFFF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF01010101010000010101
0101000001010101010100020200010101000202000101010100020202000101
0002020200010101000202020001010002020200010101000202020001010002
0202000101010101000202020001010002020200010101010100020202000101
0002020200010101010100020200010101000202000101010101010000010101
010100000101}
ButtonSettings.ScrollButtonLastPicture.Data = {
424DC60400000000000036040000280000001000000009000000010008000000
000000000000C40E0000C40E00000001000000010000427B84FFDEEFEFFFFFFF
FFFF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
00FF000000FF000000FF000000FF000000FF000000FF01010000010101010100
0001010101010100020200010101000202000101010101000202020001010002
0202000101010101000202020001010002020200010101010100020202000101
0002020200010101000202020001010002020200010101000202020001010002
0202000101010100020200010101000202000101010101010000010101010100
000101010101}
ButtonSettings.ClosedListButtonPicture.Data = {
424DA20400000000000036040000280000000900000009000000010008000000
00006C000000C30E0000C30E00000001000000010000427B8400DEEFEF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0001010101000101010100
0000010101000200010101000000010100020202000101000000010002020202
0200010000000002020200020202000000000002020001000202000000000100
0001010100000100000001010101010101010100000001010101010101010100
0000}
ButtonSettings.CloseButtonHint = 'Close'
ButtonSettings.InsertButtonHint = 'Insert new page'
ButtonSettings.PageListButtonHint = 'Page List'
ButtonSettings.ScrollButtonNextHint = 'Next'
ButtonSettings.ScrollButtonPrevHint = 'Previous'
ButtonSettings.ScrollButtonFirstHint = 'First'
ButtonSettings.ScrollButtonLastHint = 'Last'
ButtonSettings.ClosedListButtonHint = 'Closed Pages'
ButtonSettings.ButtonSize = 13
ButtonSettings.FullHeight = True
DoubleBuffered = True
TabSettings.ButtonBorder = False
TabSettings.Rounding = 0
Text = ''
ShowShortCutHints = False
TabOrder = 2
UIStyle = tsOffice2019White
NextPictureChanged = False
PrevPictureChanged = False
TabFontHeight = -11
object AdvOfficePager11: TAdvOfficePage
Left = 1
Top = 26
Width = 980
Height = 170
Caption = 'Memo1'
DoubleBuffered = False
PageAppearance.BorderColor = clNone
PageAppearance.Color = clWhite
PageAppearance.ColorTo = clWhite
PageAppearance.ColorMirror = clWhite
PageAppearance.ColorMirrorTo = clWhite
PageAppearance.Gradient = ggVertical
PageAppearance.GradientMirror = ggVertical
Text = ''
TabAppearance.BorderColor = clWhite
TabAppearance.BorderColorHot = clNone
TabAppearance.BorderColorSelected = clNone
TabAppearance.BorderColorSelectedHot = clNone
TabAppearance.BorderColorDisabled = clNone
TabAppearance.BorderColorDown = clNone
TabAppearance.Color = clWhite
TabAppearance.ColorTo = clWhite
TabAppearance.ColorSelected = clWhite
TabAppearance.ColorSelectedTo = clWhite
TabAppearance.ColorDisabled = 15658734
TabAppearance.ColorDisabledTo = clNone
TabAppearance.ColorHot = 16316922
TabAppearance.ColorHotTo = 16316922
TabAppearance.ColorMirror = clWhite
TabAppearance.ColorMirrorTo = clWhite
TabAppearance.ColorMirrorHot = 16316922
TabAppearance.ColorMirrorHotTo = 16316922
TabAppearance.ColorMirrorSelected = clWhite
TabAppearance.ColorMirrorSelectedTo = clWhite
TabAppearance.ColorMirrorDisabled = 15658734
TabAppearance.ColorMirrorDisabledTo = clNone
TabAppearance.Font.Charset = DEFAULT_CHARSET
TabAppearance.Font.Color = clWindowText
TabAppearance.Font.Height = -11
TabAppearance.Font.Name = 'Segoe UI'
TabAppearance.Font.Style = []
TabAppearance.Gradient = ggVertical
TabAppearance.GradientMirror = ggVertical
TabAppearance.GradientHot = ggVertical
TabAppearance.GradientMirrorHot = ggVertical
TabAppearance.GradientSelected = ggVertical
TabAppearance.GradientMirrorSelected = ggVertical
TabAppearance.GradientDisabled = ggVertical
TabAppearance.GradientMirrorDisabled = ggVertical
TabAppearance.TextColor = 4474440
TabAppearance.TextColorHot = 14916384
TabAppearance.TextColorSelected = 4474440
TabAppearance.TextColorDisabled = 7303023
TabAppearance.ShadowColor = clNone
TabAppearance.HighLightColor = clNone
TabAppearance.HighLightColorHot = clNone
TabAppearance.HighLightColorSelected = clNone
TabAppearance.HighLightColorSelectedHot = clNone
TabAppearance.HighLightColorDown = clNone
TabAppearance.DrawLine = True
TabAppearance.TextSelectedBold = True
TabAppearance.BackGround.Color = clWhite
TabAppearance.BackGround.ColorTo = clWhite
TabAppearance.BackGround.Direction = gdHorizontal
object Memo1: TMemo
Left = 2
Top = 35
Width = 976
Height = 133
Align = alClient
Lines.Strings = (
'')
ScrollBars = ssVertical
TabOrder = 0
ExplicitTop = 54
ExplicitHeight = 72
end
object Panel2: TPanel
Left = 2
Top = 2
Width = 976
Height = 33
Align = alTop
TabOrder = 1
object Button13: TButton
Left = 46
Top = 4
Width = 87
Height = 25
Caption = 'Clear Memo'
TabOrder = 0
OnClick = Button13Click
end
end
end
object AdvOfficePager12: TAdvOfficePage
Left = 1 Left = 1
Top = 1 Top = 26
Width = 980 Width = 980
Height = 186 Height = 170
Align = alBottom Caption = 'QB API Memo'
DoubleBuffered = False
PageAppearance.BorderColor = clNone
PageAppearance.Color = clWhite
PageAppearance.ColorTo = clWhite
PageAppearance.ColorMirror = clWhite
PageAppearance.ColorMirrorTo = clWhite
PageAppearance.Gradient = ggVertical
PageAppearance.GradientMirror = ggVertical
Text = ''
TabAppearance.BorderColor = clWhite
TabAppearance.BorderColorHot = clNone
TabAppearance.BorderColorSelected = clNone
TabAppearance.BorderColorSelectedHot = clNone
TabAppearance.BorderColorDisabled = clNone
TabAppearance.BorderColorDown = clNone
TabAppearance.Color = clWhite
TabAppearance.ColorTo = clWhite
TabAppearance.ColorSelected = clWhite
TabAppearance.ColorSelectedTo = clWhite
TabAppearance.ColorDisabled = 15658734
TabAppearance.ColorDisabledTo = clNone
TabAppearance.ColorHot = 16316922
TabAppearance.ColorHotTo = 16316922
TabAppearance.ColorMirror = clWhite
TabAppearance.ColorMirrorTo = clWhite
TabAppearance.ColorMirrorHot = 16316922
TabAppearance.ColorMirrorHotTo = 16316922
TabAppearance.ColorMirrorSelected = clWhite
TabAppearance.ColorMirrorSelectedTo = clWhite
TabAppearance.ColorMirrorDisabled = 15658734
TabAppearance.ColorMirrorDisabledTo = clNone
TabAppearance.Font.Charset = DEFAULT_CHARSET
TabAppearance.Font.Color = clWindowText
TabAppearance.Font.Height = -11
TabAppearance.Font.Name = 'Segoe UI'
TabAppearance.Font.Style = []
TabAppearance.Gradient = ggVertical
TabAppearance.GradientMirror = ggVertical
TabAppearance.GradientHot = ggVertical
TabAppearance.GradientMirrorHot = ggVertical
TabAppearance.GradientSelected = ggVertical
TabAppearance.GradientMirrorSelected = ggVertical
TabAppearance.GradientDisabled = ggVertical
TabAppearance.GradientMirrorDisabled = ggVertical
TabAppearance.TextColor = 4474440
TabAppearance.TextColorHot = 14916384
TabAppearance.TextColorSelected = 4474440
TabAppearance.TextColorDisabled = 7303023
TabAppearance.ShadowColor = clNone
TabAppearance.HighLightColor = clNone
TabAppearance.HighLightColorHot = clNone
TabAppearance.HighLightColorSelected = clNone
TabAppearance.HighLightColorSelectedHot = clNone
TabAppearance.HighLightColorDown = clNone
TabAppearance.DrawLine = True
TabAppearance.TextSelectedBold = True
TabAppearance.BackGround.Color = clWhite
TabAppearance.BackGround.ColorTo = clWhite
TabAppearance.BackGround.Direction = gdHorizontal
object Memo2: TMemo
Left = 2
Top = 35
Width = 976
Height = 133
Align = alClient
Lines.Strings = (
'Memo2')
ScrollBars = ssVertical
TabOrder = 0
WordWrap = False
end
object Panel3: TPanel
Left = 2
Top = 2
Width = 976
Height = 33
Align = alTop
TabOrder = 1
ExplicitLeft = 4
ExplicitTop = 4
object Button14: TButton
Left = 46
Top = 4
Width = 87
Height = 25
Caption = 'Clear Memo'
TabOrder = 0
OnClick = Button14Click
end
end
end
object AdvOfficePager13: TAdvOfficePage
Left = 1
Top = 26
Width = 980
Height = 170
Caption = 'AdvOfficePager13'
DoubleBuffered = False
PageAppearance.BorderColor = clNone
PageAppearance.Color = clWhite
PageAppearance.ColorTo = clWhite
PageAppearance.ColorMirror = clWhite
PageAppearance.ColorMirrorTo = clWhite
PageAppearance.Gradient = ggVertical
PageAppearance.GradientMirror = ggVertical
Text = ''
TabAppearance.BorderColor = clWhite
TabAppearance.BorderColorHot = clNone
TabAppearance.BorderColorSelected = clNone
TabAppearance.BorderColorSelectedHot = clNone
TabAppearance.BorderColorDisabled = clNone
TabAppearance.BorderColorDown = clNone
TabAppearance.Color = clWhite
TabAppearance.ColorTo = clWhite
TabAppearance.ColorSelected = clWhite
TabAppearance.ColorSelectedTo = clWhite
TabAppearance.ColorDisabled = 15658734
TabAppearance.ColorDisabledTo = clNone
TabAppearance.ColorHot = 16316922
TabAppearance.ColorHotTo = 16316922
TabAppearance.ColorMirror = clWhite
TabAppearance.ColorMirrorTo = clWhite
TabAppearance.ColorMirrorHot = 16316922
TabAppearance.ColorMirrorHotTo = 16316922
TabAppearance.ColorMirrorSelected = clWhite
TabAppearance.ColorMirrorSelectedTo = clWhite
TabAppearance.ColorMirrorDisabled = 15658734
TabAppearance.ColorMirrorDisabledTo = clNone
TabAppearance.Font.Charset = DEFAULT_CHARSET
TabAppearance.Font.Color = clWindowText
TabAppearance.Font.Height = -11
TabAppearance.Font.Name = 'Segoe UI'
TabAppearance.Font.Style = []
TabAppearance.Gradient = ggVertical
TabAppearance.GradientMirror = ggVertical
TabAppearance.GradientHot = ggVertical
TabAppearance.GradientMirrorHot = ggVertical
TabAppearance.GradientSelected = ggVertical
TabAppearance.GradientMirrorSelected = ggVertical
TabAppearance.GradientDisabled = ggVertical
TabAppearance.GradientMirrorDisabled = ggVertical
TabAppearance.TextColor = 4474440
TabAppearance.TextColorHot = 14916384
TabAppearance.TextColorSelected = 4474440
TabAppearance.TextColorDisabled = 7303023
TabAppearance.ShadowColor = clNone
TabAppearance.HighLightColor = clNone
TabAppearance.HighLightColorHot = clNone
TabAppearance.HighLightColorSelected = clNone
TabAppearance.HighLightColorSelectedHot = clNone
TabAppearance.HighLightColorDown = clNone
TabAppearance.DrawLine = True
TabAppearance.TextSelectedBold = True
TabAppearance.BackGround.Color = clWhite
TabAppearance.BackGround.ColorTo = clWhite
TabAppearance.BackGround.Direction = gdHorizontal
end
end
object AdvPanel1: TAdvPanel
Left = 0
Top = 267
Width = 982
Height = 223
Align = alTop
Color = clWhite
TabOrder = 3
UseDockManager = True
Version = '2.7.0.2'
Caption.Color = clWhite
Caption.ColorTo = clNone
Caption.Font.Charset = DEFAULT_CHARSET
Caption.Font.Color = clNone
Caption.Font.Height = -11
Caption.Font.Name = 'Segoe UI'
Caption.Font.Style = []
Caption.GradientDirection = gdVertical
Caption.Indent = 0
Caption.ShadeLight = 255
Caption.Text = 'QuickBooks Data'
Caption.Visible = True
CollapsColor = clNone
CollapsDelay = 0
DoubleBuffered = True
ShadowColor = clBlack
ShadowOffset = 0
StatusBar.BorderColor = clNone
StatusBar.BorderStyle = bsSingle
StatusBar.Font.Charset = DEFAULT_CHARSET
StatusBar.Font.Color = 4473924
StatusBar.Font.Height = -11
StatusBar.Font.Name = 'Segoe UI'
StatusBar.Font.Style = []
StatusBar.Color = clWhite
StatusBar.GradientDirection = gdVertical
Text = ''
ExplicitTop = 264
FullHeight = 200
object asgData: TAdvStringGrid
Left = 0
Top = 18
Width = 982
Height = 205
Align = alClient
DrawingStyle = gdsClassic DrawingStyle = gdsClassic
FixedColor = clWhite FixedColor = clWhite
TabOrder = 0 TabOrder = 0
...@@ -342,6 +1024,7 @@ object fQB: TfQB ...@@ -342,6 +1024,7 @@ object fQB: TfQB
'Smaller than' 'Smaller than'
'Clear') 'Clear')
FixedRowHeight = 22 FixedRowHeight = 22
FixedRowAlways = True
FixedFont.Charset = DEFAULT_CHARSET FixedFont.Charset = DEFAULT_CHARSET
FixedFont.Color = 3881787 FixedFont.Color = 3881787
FixedFont.Height = -11 FixedFont.Height = -11
...@@ -414,51 +1097,6 @@ object fQB: TfQB ...@@ -414,51 +1097,6 @@ object fQB: TfQB
22) 22)
end end
end end
object Button8: TButton
Left = 844
Top = 5
Width = 75
Height = 25
Caption = 'Get Items'
TabOrder = 10
OnClick = Button8Click
end
object Button9: TButton
Left = 121
Top = 32
Width = 95
Height = 25
Caption = 'Get Estimate'
TabOrder = 11
OnClick = Button9Click
end
object Button10: TButton
Left = 222
Top = 32
Width = 75
Height = 25
Caption = 'Update QB ID'
TabOrder = 12
OnClick = Button10Click
end
object Button11: TButton
Left = 316
Top = 32
Width = 113
Height = 25
Caption = 'update QB Items'
TabOrder = 13
OnClick = Button11Click
end
object Button12: TButton
Left = 435
Top = 32
Width = 190
Height = 25
Caption = 'Delete Customers without orders'
TabOrder = 14
OnClick = Button12Click
end
object uq: TUniQuery object uq: TUniQuery
Connection = ApiDatabase.ucKG Connection = ApiDatabase.ucKG
SQL.Strings = ( SQL.Strings = (
......
...@@ -11,15 +11,12 @@ uses ...@@ -11,15 +11,12 @@ uses
System.Hash, Api.Database, Vcl.ExtCtrls, WEBLib.Forms, WEBLib.Controls, WEBLib.StdCtrls, System.Hash, Api.Database, Vcl.ExtCtrls, WEBLib.Forms, WEBLib.Controls, WEBLib.StdCtrls,
WEBLib.ExtCtrls, WEBLib.REST, WEBLib.WebTools,System.Net.HttpClient, WEBLib.ExtCtrls, WEBLib.REST, WEBLib.WebTools,System.Net.HttpClient,
System.Net.URLClient, System.Net.HttpClientComponent, System.netencoding, System.Net.URLClient, System.Net.HttpClientComponent, System.netencoding,
IdHTTP, IdSSLOpenSSL, IdSSLOpenSSLHeaders, System.DateUtils, System.IniFiles; IdHTTP, IdSSLOpenSSL, IdSSLOpenSSLHeaders, System.DateUtils, System.IniFiles,
AdvPanel, AdvOfficePager;
type type
TfQB = class(TForm) TfQB = class(TForm)
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
uq: TUniQuery; uq: TUniQuery;
uqORDER_ID: TIntegerField; uqORDER_ID: TIntegerField;
uqCOMPANY_ID: TIntegerField; uqCOMPANY_ID: TIntegerField;
...@@ -106,21 +103,36 @@ type ...@@ -106,21 +103,36 @@ type
uqupc_distortion_percent: TStringField; uqupc_distortion_percent: TStringField;
uqupc_distortion_amount: TStringField; uqupc_distortion_amount: TStringField;
uqstaff_fields_art_location: TStringField; uqstaff_fields_art_location: TStringField;
Memo1: TMemo; Splitter1: TSplitter;
Splitter2: TSplitter;
Panel1: TPanel;
Button2: TButton;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton; Button6: TButton;
Button7: TButton; Button7: TButton;
Button1: TButton; Button1: TButton;
Panel1: TPanel;
asgData2: TAdvStringGrid;
Panel2: TPanel;
Splitter1: TSplitter;
asgData: TAdvStringGrid;
Splitter2: TSplitter;
Button8: TButton; Button8: TButton;
Button9: TButton; Button9: TButton;
Button10: TButton; Button10: TButton;
Button11: TButton; Button11: TButton;
Button12: TButton; Button12: TButton;
AdvPanel2: TAdvPanel;
asgData2: TAdvStringGrid;
AdvOfficePager1: TAdvOfficePager;
AdvOfficePager11: TAdvOfficePage;
AdvOfficePager12: TAdvOfficePage;
AdvOfficePager13: TAdvOfficePage;
Memo1: TMemo;
Memo2: TMemo;
Panel2: TPanel;
Button13: TButton;
Panel3: TPanel;
Button14: TButton;
AdvPanel1: TAdvPanel;
asgData: TAdvStringGrid;
Button15: TButton;
procedure Button1Click(Sender: TObject); procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure Button2Click(Sender: TObject); procedure Button2Click(Sender: TObject);
...@@ -132,13 +144,14 @@ type ...@@ -132,13 +144,14 @@ type
procedure Button7Click(Sender: TObject); procedure Button7Click(Sender: TObject);
procedure asgData2ClickCell(Sender: TObject; ARow, ACol: Integer); procedure asgData2ClickCell(Sender: TObject; ARow, ACol: Integer);
procedure asgDataClickCell(Sender: TObject; ARow, ACol: Integer); procedure asgDataClickCell(Sender: TObject; ARow, ACol: Integer);
procedure Panel1Resize(Sender: TObject);
procedure Panel2Resize(Sender: TObject);
procedure Button8Click(Sender: TObject); procedure Button8Click(Sender: TObject);
procedure Button9Click(Sender: TObject); procedure Button9Click(Sender: TObject);
procedure Button10Click(Sender: TObject); procedure Button10Click(Sender: TObject);
procedure Button11Click(Sender: TObject); procedure Button11Click(Sender: TObject);
procedure Button12Click(Sender: TObject); procedure Button12Click(Sender: TObject);
procedure Button13Click(Sender: TObject);
procedure Button14Click(Sender: TObject);
procedure Button15Click(Sender: TObject);
private private
{ Private declarations } { Private declarations }
strict private strict private
...@@ -211,6 +224,8 @@ procedure TfQB.Button10Click(Sender: TObject); ...@@ -211,6 +224,8 @@ procedure TfQB.Button10Click(Sender: TObject);
var var
msg: string; msg: string;
begin begin
Memo1.Clear;
Memo1.Lines.Add('Linking QB IDs');
if( ( QB_ID = '' ) or ( ID = '' ) ) then if( ( QB_ID = '' ) or ( ID = '' ) ) then
begin begin
Memo1.Lines.Add('Please select a Quickbooks Customer and a KG Orders Customer'); Memo1.Lines.Add('Please select a Quickbooks Customer and a KG Orders Customer');
...@@ -271,7 +286,8 @@ var ...@@ -271,7 +286,8 @@ var
ShipAddr: TJSONObject; ShipAddr: TJSONObject;
sql: string; sql: string;
begin begin
Memo1.Clear;
Memo1.Lines.Add('Linking all QB Items to KG Orders');
restClient := TRESTClient.Create(nil); restClient := TRESTClient.Create(nil);
restClient.BaseURL := 'https://sandbox-quickbooks.api.intuit.com'; restClient.BaseURL := 'https://sandbox-quickbooks.api.intuit.com';
...@@ -329,7 +345,7 @@ begin ...@@ -329,7 +345,7 @@ begin
Memo1.lines.add('Done');
// Load customer info // Load customer info
restClient.Free; restClient.Free;
...@@ -362,6 +378,37 @@ begin ...@@ -362,6 +378,37 @@ begin
end; end;
procedure TfQB.Button13Click(Sender: TObject);
begin
Memo1.Clear;
end;
procedure TfQB.Button14Click(Sender: TObject);
begin
Memo2.Clear;
end;
procedure TfQB.Button15Click(Sender: TObject);
var
SQL, name, password, newPassword: string;
begin
Memo1.Clear;
Memo1.Lines.Add('Updating all passwords to know longer store passwords in plain text');
SQL := 'Select * from users';
doQuery(ordersDB.UniQuery1, SQL);
while (not ordersDB.UniQuery1.Eof) do
begin
ordersDB.UniQuery1.Edit;
name := ordersDB.UniQuery1.FieldByName('NAME').AsString;
password := ordersDB.UniQuery1.FieldByName('PASSWORD').AsString;
newPassword := THashSHA2.GetHashString(name + password, THashSHA2.TSHA2Version.SHA512).ToUpper;
ordersDB.UniQuery1.FieldByName('PASSWORD').AsString := newPassword;
ordersDB.UniQuery1.Post;
ordersDB.UniQuery1.Next;
end;
Memo1.Lines.Add('Finished updating passwords');
end;
procedure TfQB.DeleteCustomers(); procedure TfQB.DeleteCustomers();
var var
SQL: string; SQL: string;
...@@ -371,6 +418,7 @@ var ...@@ -371,6 +418,7 @@ var
I: integer; I: integer;
ship_count, cust_count: integer; ship_count, cust_count: integer;
begin begin
Memo1.Clear;
Memo1.Lines.Add('Beginning to Delete Customers'); Memo1.Lines.Add('Beginning to Delete Customers');
SQL := 'SELECT * FROM customers c ' + SQL := 'SELECT * FROM customers c ' +
'WHERE NOT EXISTS (SELECT 1 FROM corrugated_plate_orders cpo WHERE cpo.COMPANY_ID = c.CUSTOMER_ID) '+ 'WHERE NOT EXISTS (SELECT 1 FROM corrugated_plate_orders cpo WHERE cpo.COMPANY_ID = c.CUSTOMER_ID) '+
...@@ -414,6 +462,7 @@ end; ...@@ -414,6 +462,7 @@ end;
procedure TfQB.Button1Click(Sender: TObject); procedure TfQB.Button1Click(Sender: TObject);
begin begin
getCustomers(); getCustomers();
AdvPanel2.Text := 'kgOrders Customers'
end; end;
procedure TfQB.getCustomers(); procedure TfQB.getCustomers();
...@@ -424,6 +473,8 @@ var ...@@ -424,6 +473,8 @@ var
Customer, ParsedCustomer: TJSONObject; Customer, ParsedCustomer: TJSONObject;
I: integer; I: integer;
begin begin
Memo1.Clear;
Memo1.Lines.Add('Retrieving KG Orders Customers');
SQL := 'SELECT * FROM customers c'; SQL := 'SELECT * FROM customers c';
doQuery(ordersDB.UniQuery1, SQL); doQuery(ordersDB.UniQuery1, SQL);
ModifiedList := TJSONArray.Create; ModifiedList := TJSONArray.Create;
...@@ -470,17 +521,10 @@ begin ...@@ -470,17 +521,10 @@ begin
try try
iniFile.WriteString('Quickbooks', 'RefreshToken', RefreshToken); iniFile.WriteString('Quickbooks', 'RefreshToken', RefreshToken);
LastRefresh := Now; LastRefresh := Now;
Logger.Log(1, 'Tokens Successfully Saved');
finally finally
IniFile.Free; IniFile.Free;
end; end;
f := TStringList.Create;
// Save to file (overwrites existing file)
f.SaveToFile('QB.txt');
f.Free;
end; end;
procedure TfQB.Button2Click(Sender: TObject); procedure TfQB.Button2Click(Sender: TObject);
...@@ -501,6 +545,8 @@ var ...@@ -501,6 +545,8 @@ var
CustomerList: TJSONArray; CustomerList: TJSONArray;
pair: TJSONPair; pair: TJSONPair;
begin begin
Memo1.Clear;
Memo1.Lines.Add('Retrieving QB Customer Based on ID');
restClient := TRESTClient.Create(nil); restClient := TRESTClient.Create(nil);
restClient.BaseURL := 'https://sandbox-quickbooks.api.intuit.com'; restClient.BaseURL := 'https://sandbox-quickbooks.api.intuit.com';
...@@ -534,7 +580,8 @@ begin ...@@ -534,7 +580,8 @@ begin
jsValue := restResponse.JSONValue; jsValue := restResponse.JSONValue;
jsObj := TJSONObject(jsValue); jsObj := TJSONObject(jsValue);
Memo1.Lines.Add( jsObj.Format(2) ); Memo2.Clear;
Memo2.Lines.Add( jsObj.Format(2) );
// CustomerList := TJSONArray( TJSONObject( jsObj.GetValue('QueryResponse') ).GetValue('Customer')) ; // CustomerList := TJSONArray( TJSONObject( jsObj.GetValue('QueryResponse') ).GetValue('Customer')) ;
...@@ -594,6 +641,8 @@ var ...@@ -594,6 +641,8 @@ var
ShipMethodRef: TJSONObject; ShipMethodRef: TJSONObject;
unitPrice: double; unitPrice: double;
begin begin
Memo1.Clear;
Memo1.Lines.Add('Adding Order ' + orderInfo + ' to QB');
BillAddrJSON := TJSONObject.Create; BillAddrJSON := TJSONObject.Create;
ShipAddrJSON := TJSONObject.Create; ShipAddrJSON := TJSONObject.Create;
EstimateJSON := TJSONObject.Create; EstimateJSON := TJSONObject.Create;
...@@ -692,10 +741,7 @@ begin ...@@ -692,10 +741,7 @@ begin
LineObj.AddPair('Description', ordersDB.UniQuery1.FieldByName('item_desc').AsString + ' - ' + ordersDB.UniQuery1.FieldByName('general_special_instructions').AsString); LineObj.AddPair('Description', ordersDB.UniQuery1.FieldByName('item_desc').AsString + ' - ' + ordersDB.UniQuery1.FieldByName('general_special_instructions').AsString);
end; end;
memo1.Lines.Add(ordersDB.UniQuery1.FieldByName('staff_fields_price').AsString);
memo1.Lines.Add(ordersDB.UniQuery1.FieldByName('staff_fields_quantity').AsString);
LineObj.AddPair('Amount', TJSONNumber.Create(ordersDB.UniQuery1.FieldByName('staff_fields_price').AsFloat)); LineObj.AddPair('Amount', TJSONNumber.Create(ordersDB.UniQuery1.FieldByName('staff_fields_price').AsFloat));
memo1.Lines.Add(ordersDB.UniQuery1.FieldByName('staff_fields_price').AsString);
LineObj.AddPair('DetailType', 'SalesItemLineDetail'); LineObj.AddPair('DetailType', 'SalesItemLineDetail');
ItemRefObj.AddPair('value', ordersDB.UniQuery1.FieldByName('qb_items_qb_id').AsString); ItemRefObj.AddPair('value', ordersDB.UniQuery1.FieldByName('qb_items_qb_id').AsString);
...@@ -743,7 +789,8 @@ begin ...@@ -743,7 +789,8 @@ begin
param.Options := param.Options + [TRESTRequestParameterOption.poDoNotEncode]; param.Options := param.Options + [TRESTRequestParameterOption.poDoNotEncode];
param.Value := 'Bearer ' + AccessToken; param.Value := 'Bearer ' + AccessToken;
Memo1.Lines.Add( estimateJSON.Format(2) ); Memo2.Clear;
Memo2.Lines.Add( estimateJSON.Format(2) );
restRequest.AddBody(estimateJSON.ToJSON, TRESTContentType.ctAPPLICATION_JSON); restRequest.AddBody(estimateJSON.ToJSON, TRESTContentType.ctAPPLICATION_JSON);
...@@ -774,6 +821,8 @@ var ...@@ -774,6 +821,8 @@ var
Customer, ParsedCustomer: TJSONObject; Customer, ParsedCustomer: TJSONObject;
I: integer; I: integer;
begin begin
Memo1.Clear;
Memo1.Lines.Add('Showing all KG Orders Customers without Orders');
SQL := 'SELECT * FROM customers c ' + SQL := 'SELECT * FROM customers c ' +
'WHERE EXISTS (SELECT 1 FROM corrugated_plate_orders cpo WHERE cpo.COMPANY_ID = c.CUSTOMER_ID) '+ 'WHERE EXISTS (SELECT 1 FROM corrugated_plate_orders cpo WHERE cpo.COMPANY_ID = c.CUSTOMER_ID) '+
'OR EXISTS (SELECT 1 FROM web_plate_orders wpo WHERE wpo.COMPANY_ID = c.CUSTOMER_ID) ORDER BY c.SHORT_NAME'; 'OR EXISTS (SELECT 1 FROM web_plate_orders wpo WHERE wpo.COMPANY_ID = c.CUSTOMER_ID) ORDER BY c.SHORT_NAME';
...@@ -929,7 +978,7 @@ var ...@@ -929,7 +978,7 @@ var
restRequest: TRESTRequest; restRequest: TRESTRequest;
restResponse: TRESTResponse; restResponse: TRESTResponse;
param: TRESTRequestParameter; param: TRESTRequestParameter;
res: string; res, SQL: string;
jsValue: TJSONValue; jsValue: TJSONValue;
jsObj: TJSONObject; jsObj: TJSONObject;
CustomerList: TJSONArray; CustomerList: TJSONArray;
...@@ -939,7 +988,11 @@ var ...@@ -939,7 +988,11 @@ var
I: integer; I: integer;
BillAddr: TJSONObject; BillAddr: TJSONObject;
ShipAddr: TJSONObject; ShipAddr: TJSONObject;
ItemList: TJSONArray;
Item: TJSONObject;
begin begin
Memo1.Clear;
memo1.Lines.Add('Getting KG and QB Items');
restClient := TRESTClient.Create(nil); restClient := TRESTClient.Create(nil);
restClient.BaseURL := 'https://sandbox-quickbooks.api.intuit.com'; restClient.BaseURL := 'https://sandbox-quickbooks.api.intuit.com';
...@@ -976,11 +1029,13 @@ begin ...@@ -976,11 +1029,13 @@ begin
jsObj := TJSONObject(jsValue); jsObj := TJSONObject(jsValue);
//CustomerList := TJSONArray(restResponse.JSONValue); //CustomerList := TJSONArray(restResponse.JSONValue);
Memo1.Lines.Add( jsObj.Format(2) ); Memo2.Clear;
Memo2.Lines.Add( jsObj.Format(2) );
CustomerList := TJSONArray( TJSONObject( jsObj.GetValue('QueryResponse') ).GetValue('Item')); CustomerList := TJSONArray( TJSONObject( jsObj.GetValue('QueryResponse') ).GetValue('Item'));
loadJSONArray(CustomerList); loadJSONArray(CustomerList);
AdvPanel1.Text := 'QB Items';
// Load customer info // Load customer info
...@@ -988,7 +1043,26 @@ begin ...@@ -988,7 +1043,26 @@ begin
restRequest.Free; restRequest.Free;
restResponse.Free; restResponse.Free;
SQL := 'select * from qb_items order by qb_item_name asc';
doQuery(ordersDB.UniQuery1, SQL);
ItemList:= TJSONArray.Create;
while not ordersDB.UniQuery1.Eof do
begin
item := TJSONObject.Create;
item.AddPair('ID', ordersDB.UniQuery1.FieldByName('qb_items_id').AsString);
item.AddPair('name', ordersDB.UniQuery1.FieldByName('qb_item_name').AsString);
item.AddPair('description', ordersDB.UniQuery1.FieldByName('item_desc').AsString);
item.AddPair('status', ordersDB.UniQuery1.FieldByName('status').AsString);
item.AddPair('QB_ID', ordersDB.UniQuery1.FieldByName('qb_items_qb_id').AsString);
ItemList.Add(item);
ordersDB.UniQuery1.Next;
end;
LoadJSONArray2(ItemList);
AdvPanel2.Text := 'KG Orders Items';
ordersDB.UniQuery1.Close;
end; end;
procedure TfQB.Button9Click(Sender: TObject); procedure TfQB.Button9Click(Sender: TObject);
...@@ -1008,7 +1082,8 @@ var ...@@ -1008,7 +1082,8 @@ var
BillAddr: TJSONObject; BillAddr: TJSONObject;
ShipAddr: TJSONObject; ShipAddr: TJSONObject;
begin begin
Memo1.Clear;
Memo1.Lines.Add('Retrieving Estimate from QB');
restClient := TRESTClient.Create(nil); restClient := TRESTClient.Create(nil);
restClient.BaseURL := 'https://sandbox-quickbooks.api.intuit.com'; restClient.BaseURL := 'https://sandbox-quickbooks.api.intuit.com';
...@@ -1037,13 +1112,12 @@ begin ...@@ -1037,13 +1112,12 @@ begin
param.Value := 'Bearer ' + AccessToken; param.Value := 'Bearer ' + AccessToken;
restRequest.Execute; restRequest.Execute;
Memo2.Clear;
memo1.Lines.Add(restresponse.Content);
jsValue := restResponse.JSONValue; jsValue := restResponse.JSONValue;
jsObj := TJSONObject(jsValue); jsObj := TJSONObject(jsValue);
Memo1.Lines.Add( jsObj.Format(2) ); Memo2.Lines.Add( jsObj.Format(2) );
restClient.Free; restClient.Free;
...@@ -1069,7 +1143,8 @@ var ...@@ -1069,7 +1143,8 @@ var
BillAddr: TJSONObject; BillAddr: TJSONObject;
ShipAddr: TJSONObject; ShipAddr: TJSONObject;
begin begin
Memo1.Clear;
Memo1.Lines.Add('Getting QB Customers');
restClient := TRESTClient.Create(nil); restClient := TRESTClient.Create(nil);
restClient.BaseURL := 'https://sandbox-quickbooks.api.intuit.com'; restClient.BaseURL := 'https://sandbox-quickbooks.api.intuit.com';
...@@ -1106,7 +1181,8 @@ begin ...@@ -1106,7 +1181,8 @@ begin
jsObj := TJSONObject(jsValue); jsObj := TJSONObject(jsValue);
//CustomerList := TJSONArray(restResponse.JSONValue); //CustomerList := TJSONArray(restResponse.JSONValue);
Memo1.Lines.Add( jsObj.Format(2) ); Memo2.Clear;
Memo2.Lines.Add( jsObj.Format(2) );
CustomerList := TJSONArray( TJSONObject( jsObj.GetValue('QueryResponse') ).GetValue('Customer')) ; CustomerList := TJSONArray( TJSONObject( jsObj.GetValue('QueryResponse') ).GetValue('Customer')) ;
...@@ -1115,7 +1191,6 @@ begin ...@@ -1115,7 +1191,6 @@ begin
for I := 0 to CustomerList.Count - 1 do for I := 0 to CustomerList.Count - 1 do
begin begin
Customer := CustomerList.Items[I] as TJSONObject; Customer := CustomerList.Items[I] as TJSONObject;
Memo1.Lines.Add( Customer.Format(2) );
ParsedCustomer := TJSONObject.Create; ParsedCustomer := TJSONObject.Create;
//sql := 'select CUSTOMER_ID from customers where QB_LIST_ID = ' + Customer.GetValue<string>('Id'); //sql := 'select CUSTOMER_ID from customers where QB_LIST_ID = ' + Customer.GetValue<string>('Id');
...@@ -1173,6 +1248,7 @@ begin ...@@ -1173,6 +1248,7 @@ begin
end; end;
LoadJSONArray(ModifiedList); LoadJSONArray(ModifiedList);
AdvPanel1.Text := 'QB Customers';
restClient.Free; restClient.Free;
restRequest.Free; restRequest.Free;
...@@ -1242,7 +1318,6 @@ begin ...@@ -1242,7 +1318,6 @@ begin
if( (Client = '') or (Secret = '') ) then if( (Client = '') or (Secret = '') ) then
begin begin
Logger.Log(1, 'Missing Client ID or Client Secret in INI File');
Exit(); Exit();
end; end;
...@@ -1250,7 +1325,6 @@ begin ...@@ -1250,7 +1325,6 @@ begin
Memo1.Lines.Add(EncodedAuth); Memo1.Lines.Add(EncodedAuth);
if RefreshToken = '' then if RefreshToken = '' then
begin begin
Logger.Log(3, 'Missing Refresh Token, Please Manually Get a New One and Store in INI File');
Exit(); Exit();
end; end;
...@@ -1282,7 +1356,6 @@ begin ...@@ -1282,7 +1356,6 @@ begin
AccessToken := JSObj.GetValue('access_token').ToString.Trim(['"']); AccessToken := JSObj.GetValue('access_token').ToString.Trim(['"']);
SaveTokens(AccessToken, RefreshToken); SaveTokens(AccessToken, RefreshToken);
Result := AccessToken; Result := AccessToken;
Logger.Log(1, 'qbAPI - Tokens Successfully Saved');
Memo1.Lines.Add('Tokens Successfully Saved'); Memo1.Lines.Add('Tokens Successfully Saved');
except except
on E: EIdHTTPProtocolException do on E: EIdHTTPProtocolException do
...@@ -1350,6 +1423,7 @@ var ...@@ -1350,6 +1423,7 @@ var
i, j: integer; i, j: integer;
row: integer; row: integer;
begin begin
asgData.FixedRowAlways := true;
Memo1.Lines.Add( '---------------------------------------------------------------' ); Memo1.Lines.Add( '---------------------------------------------------------------' );
Memo1.Lines.Add( 'LoadJsonArray into asgData' ); Memo1.Lines.Add( 'LoadJsonArray into asgData' );
...@@ -1407,24 +1481,13 @@ begin ...@@ -1407,24 +1481,13 @@ begin
asgData2.AutoSizeColumns(true); asgData2.AutoSizeColumns(true);
end; end;
procedure TfQB.Panel1Resize(Sender: TObject);
begin
AsgData2.Width := Panel1.ClientWidth;
AsgData2.Height := Panel1.ClientHeight;
end;
procedure TfQB.Panel2Resize(Sender: TObject);
begin
AsgData.Width := Panel2.ClientWidth;
AsgData.Height := Panel2.ClientHeight;
end;
procedure tfQB.findMatches(CustomerList: TJSONArray; JSONfield, DBField: string); procedure tfQB.findMatches(CustomerList: TJSONArray; JSONfield, DBField: string);
var var
I: integer; I: integer;
Customer: TJSONObject; Customer: TJSONObject;
SQL: string; SQL: string;
begin begin
Memo1.Clear;
Memo1.Lines.Add('Matching ' + JSONfield + ' on ' + DBField); Memo1.Lines.Add('Matching ' + JSONfield + ' on ' + DBField);
for I := 0 to CustomerList.Count - 1 do for I := 0 to CustomerList.Count - 1 do
begin begin
......
...@@ -124,14 +124,14 @@ uses ...@@ -124,14 +124,14 @@ uses
procedure TrptOrderCorrugated.DataModuleCreate(Sender: TObject); procedure TrptOrderCorrugated.DataModuleCreate(Sender: TObject);
begin begin
Logger.Log( 3, 'TAuthDatabase.DataModuleCreate' ); Logger.Log( 1, 'TAuthDatabase.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' ); LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try try
ucKG.Connect; ucKG.Connect;
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(3, '--TrptOrderList.DataModuleCreate -Error connecting to database: ' + E.Message); Logger.Log(2, '--TrptOrderList.DataModuleCreate -Error connecting to database: ' + E.Message);
end; end;
end; end;
end; end;
...@@ -146,7 +146,7 @@ var ...@@ -146,7 +146,7 @@ var
i, rowIndex: Integer; i, rowIndex: Integer;
temp: TObject; temp: TObject;
begin begin
logger.Log(1, 'Adding Color Rows'); logger.Log(5, 'Adding Color Rows');
colorsString := uqOrderCorrugated.FieldByName('colors_colors').AsString; colorsString := uqOrderCorrugated.FieldByName('colors_colors').AsString;
colorsObject := TJSONObject.ParseJSONValue(colorsString) as TJSONObject; colorsObject := TJSONObject.ParseJSONValue(colorsString) as TJSONObject;
...@@ -183,7 +183,7 @@ var ...@@ -183,7 +183,7 @@ var
colorListJSON: TJSONArray; colorListJSON: TJSONArray;
items: TJSObject; items: TJSObject;
begin begin
Logger.Log(3, 'Generated SQL for Prepare Report: ' + SQL); Logger.Log(5, 'Generated SQL for Prepare Report: ' + SQL);
doQuery(uqOrderCorrugated, SQL); doQuery(uqOrderCorrugated, SQL);
if ( string( uqOrderCorrugated.FieldByName('colors_colors').AsString ) ) <> '' then if ( string( uqOrderCorrugated.FieldByName('colors_colors').AsString ) ) <> '' then
...@@ -195,7 +195,7 @@ begin ...@@ -195,7 +195,7 @@ begin
result := GeneratePDF; result := GeneratePDF;
Logger.Log(3, 'Report preparation complete.'); Logger.Log(5, 'Report preparation complete.');
end; end;
...@@ -209,7 +209,7 @@ begin ...@@ -209,7 +209,7 @@ begin
if not DirectoryExists(ReportDir) then if not DirectoryExists(ReportDir) then
begin begin
ForceDirectories(ReportDir); ForceDirectories(ReportDir);
Logger.Log(5, 'Reports directory created: ' + ReportDir); Logger.Log(1, 'Reports directory created: ' + ReportDir);
end; end;
reportURL := 'reports/' + FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf'; reportURL := 'reports/' + FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf';
......
...@@ -47,75 +47,6 @@ object rptOrderCutting: TrptOrderCutting ...@@ -47,75 +47,6 @@ object rptOrderCutting: TrptOrderCutting
DataSetOptions = [] DataSetOptions = []
Left = 444 Left = 444
Top = 206 Top = 206
FieldDefs = <
item
FieldName = 'ORDER_ID'
end
item
FieldName = 'COMPANY_ID'
end
item
FieldName = 'USER_ID'
end
item
FieldName = 'ORDER_DATE'
FieldType = fftDateTime
end
item
FieldName = 'staff_fields_order_date'
FieldType = fftDateTime
end
item
FieldName = 'staff_fields_proof_date'
FieldType = fftDateTime
end
item
FieldName = 'staff_fields_ship_date'
FieldType = fftDateTime
end
item
FieldName = 'staff_fields_ship_via'
FieldType = fftString
Size = 45
end
item
FieldName = 'staff_fields_quantity'
FieldType = fftString
end
item
FieldName = 'staff_fields_price'
FieldType = fftString
end
item
FieldName = 'staff_fields_invoice_to'
FieldType = fftString
Size = 128
end
item
FieldName = 'staff_fields_ship_to'
FieldType = fftString
Size = 128
end
item
FieldName = 'staff_fields_po_number'
FieldType = fftString
Size = 16
end
item
FieldName = 'staff_fields_job_name'
FieldType = fftString
Size = 45
end
item
FieldName = 'staff_fields_quickbooks_item'
FieldType = fftString
Size = 45
end
item
FieldName = 'general_special_instructions'
FieldType = fftString
Size = 2048
end>
end end
object frxOrderCutting: TfrxReport object frxOrderCutting: TfrxReport
Version = '2025.1.4' Version = '2025.1.4'
......
...@@ -54,14 +54,14 @@ uses ...@@ -54,14 +54,14 @@ uses
procedure TrptOrderCutting.DataModuleCreate(Sender: TObject); procedure TrptOrderCutting.DataModuleCreate(Sender: TObject);
begin begin
Logger.Log( 3, 'TAuthDatabase.DataModuleCreate' ); Logger.Log( 1, 'TAuthDatabase.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' ); LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try try
ucKG.Connect; ucKG.Connect;
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(3, '--TrptOrderList.DataModuleCreate -Error connecting to database: ' + E.Message); Logger.Log(2, '--TrptOrderList.DataModuleCreate -Error connecting to database: ' + E.Message);
end; end;
end; end;
end; end;
...@@ -91,7 +91,7 @@ begin ...@@ -91,7 +91,7 @@ begin
result := GeneratePDF; result := GeneratePDF;
Logger.Log(3, 'Report preparation complete.'); Logger.Log(5, 'Report preparation complete.');
end; end;
...@@ -105,7 +105,7 @@ begin ...@@ -105,7 +105,7 @@ begin
if not DirectoryExists(ReportDir) then if not DirectoryExists(ReportDir) then
begin begin
ForceDirectories(ReportDir); ForceDirectories(ReportDir);
Logger.Log(5, 'Reports directory created: ' + ReportDir); Logger.Log(1, 'Reports directory created: ' + ReportDir);
end; end;
reportURL := 'reports\' + FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf'; reportURL := 'reports\' + FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf';
......
...@@ -67,14 +67,14 @@ uses ...@@ -67,14 +67,14 @@ uses
procedure TrptOrderList.DataModuleCreate(Sender: TObject); procedure TrptOrderList.DataModuleCreate(Sender: TObject);
begin begin
Logger.Log( 3, 'TAuthDatabase.DataModuleCreate' ); Logger.Log( 1, 'TAuthDatabase.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' ); LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try try
ucKG.Connect; ucKG.Connect;
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(3, '--TrptOrderList.DataModuleCreate -Error connecting to database: ' + E.Message); Logger.Log(2, '--TrptOrderList.DataModuleCreate -Error connecting to database: ' + E.Message);
end; end;
end; end;
end; end;
...@@ -113,7 +113,7 @@ begin ...@@ -113,7 +113,7 @@ begin
result := GeneratePDF; result := GeneratePDF;
Logger.Log(3, 'Report preparation complete.'); Logger.Log(5, 'Report preparation complete.');
end; end;
...@@ -148,10 +148,6 @@ begin ...@@ -148,10 +148,6 @@ begin
uqColors.Close; // Ensure it is closed uqColors.Close; // Ensure it is closed
end; end;
//uqOrdersORD.AsDateTime := uqOrdersORDER_DATE.AsDateTime;
//logger.Log(3, uqOrders.FieldByName('ORDER_DATE').AsString);
if uqOrdersORDER_DATE.AsString <> '' then if uqOrdersORDER_DATE.AsString <> '' then
uqOrdersNEW_ORDER_DATE.AsString := FormatDateTime('m/d/yyyy HH:nn', uqOrdersORDER_DATE.AsDateTime) uqOrdersNEW_ORDER_DATE.AsString := FormatDateTime('m/d/yyyy HH:nn', uqOrdersORDER_DATE.AsDateTime)
else else
...@@ -213,7 +209,7 @@ begin ...@@ -213,7 +209,7 @@ begin
if not DirectoryExists(ReportDir) then if not DirectoryExists(ReportDir) then
begin begin
ForceDirectories(ReportDir); ForceDirectories(ReportDir);
Logger.Log(3, 'Reports directory created: ' + ReportDir); Logger.Log(1, 'Reports directory created: ' + ReportDir);
end; end;
reportURL := 'reports/' + FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf'; reportURL := 'reports/' + FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf';
...@@ -229,7 +225,7 @@ begin ...@@ -229,7 +225,7 @@ begin
frxOrderList.Clear; // Clears the report to avoid memory bloat frxOrderList.Clear; // Clears the report to avoid memory bloat
end; end;
Logger.Log(3, 'PDF saved to: ' + ReportFileName); Logger.Log(5, 'PDF saved to: ' + ReportFileName);
result := reportURL; result := reportURL;
end; end;
......
...@@ -124,14 +124,14 @@ uses ...@@ -124,14 +124,14 @@ uses
procedure TrptOrderWeb.DataModuleCreate(Sender: TObject); procedure TrptOrderWeb.DataModuleCreate(Sender: TObject);
begin begin
Logger.Log( 3, 'TAuthDatabase.DataModuleCreate' ); Logger.Log( 1, 'TAuthDatabase.DataModuleCreate' );
LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' ); LoadDatabaseSettings( ucKG, 'kgOrdersServer.ini' );
try try
ucKG.Connect; ucKG.Connect;
except except
on E: Exception do on E: Exception do
begin begin
Logger.Log(3, '--TrptOrderList.DataModuleCreate -Error connecting to database: ' + E.Message); Logger.Log(2, '--TrptOrderList.DataModuleCreate -Error connecting to database: ' + E.Message);
end; end;
end; end;
end; end;
...@@ -146,7 +146,7 @@ var ...@@ -146,7 +146,7 @@ var
i, rowIndex: Integer; i, rowIndex: Integer;
temp: TObject; temp: TObject;
begin begin
logger.Log(1, 'Adding Color Rows'); logger.Log(5, 'Adding Color Rows');
colorsString := uqOrderWeb.FieldByName('quantity_and_colors_qty_colors').AsString; colorsString := uqOrderWeb.FieldByName('quantity_and_colors_qty_colors').AsString;
colorsObject := TJSONObject.ParseJSONValue(colorsString) as TJSONObject; colorsObject := TJSONObject.ParseJSONValue(colorsString) as TJSONObject;
...@@ -210,7 +210,7 @@ begin ...@@ -210,7 +210,7 @@ begin
if not DirectoryExists(ReportDir) then if not DirectoryExists(ReportDir) then
begin begin
ForceDirectories(ReportDir); ForceDirectories(ReportDir);
Logger.Log(5, 'Reports directory created: ' + ReportDir); Logger.Log(1, 'Reports directory created: ' + ReportDir);
end; end;
reportURL := 'reports\' + FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf'; reportURL := 'reports\' + FormatDateTime('yyyymmdd_hhnnss', Now) + '.pdf';
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
MemoLogLevel=3 MemoLogLevel=3
FileLogLevel=5 FileLogLevel=5
webClientVersion=0.9.8 webClientVersion=0.9.8
LogFileNum=941 webClientVersion=0.9.7
LogFileNum=972
[Database] [Database]
--Server=192.168.159.155 Server=192.168.159.162
Server=192.168.102.130 --Server=192.168.102.130
--Server=192.168.75.133 --Server=192.168.75.133
Database=kg_order_entry Database=kg_order_entry
Username=root Username=root
...@@ -14,11 +15,9 @@ Password=emsys01 ...@@ -14,11 +15,9 @@ Password=emsys01
--Password=emsys!012 --Password=emsys!012
[Quickbooks] [Quickbooks]
CompanyID=9341454272655710 CompanyID=9341454336461805
ClientID=ABgO14uvjh8XqLud7spQ8lkb98AUpcdA7HbyMJfCAtl65sQ5yy ClientID=ABYqlDx1EsacZYXvHIJ7RDB7zmnQdwABU3fwQLIZPmBgU0VW1P
ClientSecret=bQ06TRemHeAGFzVHRaTUvUoBU9jpU9itK6MOMgqN ClientSecret=PM7OnvQWsgOqjWfDpZAnyRttDN9446Am6d85pDxr
RefreshToken=RT1-44-H0-1762010333a3v07cb5eb0luyn2rppm RefreshToken=RT1-103-H0-1763213066r9617yglhu5jm7fm11jh
AccessToken=eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..7T78YBCSmvuJPRsZ9lGwuQ.1VJssLuNBAPKI7RAJOPluhtlA8DYgNcmXebNkWSxrHJ1949vjY4SPt5JjruuLsNOV09i_xKrQ76w9Zhjom1MiQaSyNoZHU-CZLfOtWgr9r3-gLxizdTlrTs9cEZs__8ep4_oe2r3n2u34QlM0xdVdLWxQbKYjpCl0k_58XPbS5Z_Vo2Y5qqoAuGJIRxMaTueMOH1ut-bV4Em318Ca1jN2DFCh_NYjLwFQQenWxOrCRMBaj7ZgB2yjtS5mEUxhuxsB7FAeONYqBSJ0OAy1yzWE-Ycxzt4dcZBCTHxzUCTH0-P0Mb_M6ivfmiYyKctf2gsZD8Xw91MgnF9TPwG8yXdej05fWr94VWeC3tFp0V-RYYv3_XRuim6fCvxJjWzfVEZwv9jUiZ6WByNSzu1k1W5_rQuSG7_Hs8WiDC1sBChJLfDclLO8pMoznqpSrM8ZmiNoYm4aZPQrpO6rgY8NiTokZRyeTw2adtW1YgDJsZdoEw.i2MSpKztX0v6UN0vZz5gQg AccessToken=eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwieC5vcmciOiJIMCJ9..lXW-FVFOPPAtm-tzjyrE3Q.vWV5cCaLiP03iXblbK5VbosURDrUNsJT5uaKPzzv2S3Nujulxp57ss--nKRVmFBYuwIXxz6VDwh6SqxaECJrR5yysauOcKuz7m22qjOOTPJyaeEhm0u2FLvAODSUpaHN5NDQSgHqBd6_-E-B8gEJeHqDpO3UqxDi9yxy6Px3kyZWXs7InUWYEHtROsPOR_HeJ2vFMhXA5fkifbxCb5bkJOEABoAzrBoLm2QSD6VbV5ydfdrSwfuV--oZ0nvabPS88JurJSbaJyDKCUSmOEt2bnZadhEq88dHMNcOPfqELYSU0dKrzMs-TPYgqeg5wOx_MO0cKkRnSaACCevj-LCYo2YKgxXyYoiNgFIf6Gf4TfLO5is0nh3I0IT14112DBUc7lFwaBCS5m3d_4SCv6sH41rkr01wIPs2o45vGStSgUCuzHQos1UtrEvX96S2NDFt1sYQcNXpFexiTB5Z9WCJgmEH3xuUrkW_d6wzVCD-Src.ZmSj6RCCiDipsvEli9fdLg
LastRefresh=7/23/2025 11:18:54 AM LastRefresh=8/4/2025 9:27:46 AM
--RefreshToken=RT1-10-H0-1760618473k44t73jittvqlr4wynn6
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