Recovered Darv's VB6 source for the Valley Wide Plastering Orders application from the D: backup drive (label "Backup", 8 TB, 5.3 TB used). This is the first time we've had the actual source — prior session only had a single frmPayroll.frm from the AD server. Three project variants identified across two snapshots: - Full-Project/ (2,129 files, 124 MB) — D:\Office-Estimates\Darv\Full\Project\ - Kingston-Project/ (2,189 files, 130 MB) — D:\Office-Estimates\Darv\Kingston\Project\ - Source/ (170 files, 559 MB) — D:\Office-Estimates\Darv\Source\ wholesale - SOURCE-HOLD/ (3 files, 1 MB) — D:\Office-Estimates\Darv\SOURCE HOLD\ Latest ORDERS_C.vbp date is 2020-06-09 (Kingston snapshot). Production Orders_10A.exe was live as of April 2024 — open question whether newer source exists on other backup drives Mike will scan next. Also includes per-category and per-keyword analysis CSVs from a WizTree file-list export, plus the analyzer script that produced them (re-runnable for the next drive's CSV). VMs (VWIN7-DW.vdi 8.3 GB + XP-for-ORDERS_copy.vdi 2.8 GB), the live VWP.mdb, and the 393 MB raw WizTree CSV stay on disk only — gitignored. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2256 lines
73 KiB
Plaintext
2256 lines
73 KiB
Plaintext
VERSION 5.00
|
|
Object = "{8DDE6232-1BB0-11D0-81C3-0080C7A2EF7D}#3.0#0"; "Flp32a30.ocx"
|
|
Begin VB.Form frmPayInput
|
|
Caption = "Lot Payroll information"
|
|
ClientHeight = 5025
|
|
ClientLeft = 60
|
|
ClientTop = 345
|
|
ClientWidth = 11910
|
|
KeyPreview = -1 'True
|
|
LinkTopic = "Form1"
|
|
ScaleHeight = 5025
|
|
ScaleWidth = 11910
|
|
StartUpPosition = 3 'Windows Default
|
|
Begin VB.TextBox txtEPO
|
|
Height = 285
|
|
Left = 1170
|
|
TabIndex = 21
|
|
Top = 3870
|
|
Width = 1155
|
|
End
|
|
Begin VB.TextBox txtStartTime
|
|
Height = 285
|
|
Left = 900
|
|
TabIndex = 24
|
|
Top = 4695
|
|
Width = 700
|
|
End
|
|
Begin VB.TextBox txtWrkDate
|
|
Height = 285
|
|
Left = 7815
|
|
TabIndex = 27
|
|
Top = 4695
|
|
Width = 1080
|
|
End
|
|
Begin VB.TextBox txtLunch
|
|
Height = 285
|
|
Left = 2835
|
|
TabIndex = 25
|
|
Top = 4695
|
|
Width = 700
|
|
End
|
|
Begin VB.TextBox txtEndTime
|
|
Height = 285
|
|
Left = 4365
|
|
TabIndex = 26
|
|
Top = 4695
|
|
Width = 700
|
|
End
|
|
Begin VB.CheckBox chkAdd
|
|
Caption = "AddInfo"
|
|
Height = 270
|
|
Left = 90
|
|
TabIndex = 68
|
|
Top = 2865
|
|
Visible = 0 'False
|
|
Width = 900
|
|
End
|
|
Begin VB.TextBox txtPaint
|
|
BackColor = &H00C0FFFF&
|
|
Enabled = 0 'False
|
|
Height = 285
|
|
Left = 5475
|
|
TabIndex = 67
|
|
Top = 735
|
|
Width = 855
|
|
End
|
|
Begin VB.CheckBox chkLook
|
|
Caption = "Lookup"
|
|
Height = 315
|
|
Left = 5985
|
|
TabIndex = 65
|
|
Top = 4200
|
|
Visible = 0 'False
|
|
Width = 975
|
|
End
|
|
Begin VB.CommandButton cmdGetPaySheet
|
|
Caption = "Get Pay Sheet"
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 8.25
|
|
Charset = 0
|
|
Weight = 700
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 555
|
|
Left = 7800
|
|
TabIndex = 64
|
|
Top = 1200
|
|
Width = 975
|
|
End
|
|
Begin VB.CommandButton cmdScaffold
|
|
Caption = "Get Scaffold"
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 8.25
|
|
Charset = 0
|
|
Weight = 700
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 555
|
|
Left = 8820
|
|
TabIndex = 63
|
|
Top = 1200
|
|
Width = 975
|
|
End
|
|
Begin VB.TextBox txtStone
|
|
BackColor = &H00C0FFFF&
|
|
Enabled = 0 'False
|
|
Height = 285
|
|
Left = 5475
|
|
TabIndex = 57
|
|
Top = 420
|
|
Width = 855
|
|
End
|
|
Begin VB.TextBox txtLotNotes
|
|
Height = 795
|
|
Left = 7380
|
|
MultiLine = -1 'True
|
|
ScrollBars = 2 'Vertical
|
|
TabIndex = 54
|
|
Top = 1980
|
|
Width = 4395
|
|
End
|
|
Begin VB.TextBox txtOffice
|
|
Height = 975
|
|
Left = 6960
|
|
MultiLine = -1 'True
|
|
ScrollBars = 2 'Vertical
|
|
TabIndex = 34
|
|
Top = 3660
|
|
Width = 4815
|
|
End
|
|
Begin VB.TextBox txtFinish
|
|
BackColor = &H00C0FFFF&
|
|
Enabled = 0 'False
|
|
Height = 285
|
|
Left = 765
|
|
TabIndex = 52
|
|
TabStop = 0 'False
|
|
Top = 420
|
|
Width = 1995
|
|
End
|
|
Begin VB.TextBox txtStuccoYds
|
|
Alignment = 1 'Right Justify
|
|
BackColor = &H00C0FFFF&
|
|
Enabled = 0 'False
|
|
Height = 285
|
|
Left = 3690
|
|
TabIndex = 50
|
|
TabStop = 0 'False
|
|
Top = 420
|
|
Width = 855
|
|
End
|
|
Begin VB.TextBox txtMetalRate
|
|
Alignment = 1 'Right Justify
|
|
Height = 285
|
|
Left = 4785
|
|
MaxLength = 7
|
|
TabIndex = 29
|
|
Top = 3495
|
|
Width = 1155
|
|
End
|
|
Begin VB.TextBox txtPONum
|
|
Alignment = 1 'Right Justify
|
|
Height = 285
|
|
Left = 4785
|
|
MaxLength = 7
|
|
TabIndex = 32
|
|
Top = 4395
|
|
Width = 1155
|
|
End
|
|
Begin VB.TextBox txtFin2Rate
|
|
Alignment = 1 'Right Justify
|
|
Height = 285
|
|
Left = 4785
|
|
MaxLength = 7
|
|
TabIndex = 30
|
|
Top = 3795
|
|
Width = 1155
|
|
End
|
|
Begin VB.TextBox txtPrimRate
|
|
Alignment = 1 'Right Justify
|
|
Height = 285
|
|
Left = 4785
|
|
MaxLength = 7
|
|
TabIndex = 28
|
|
Top = 3195
|
|
Width = 1155
|
|
End
|
|
Begin VB.CheckBox chkBC
|
|
Caption = "Back Charge:"
|
|
Height = 315
|
|
Left = 2340
|
|
TabIndex = 22
|
|
Top = 3855
|
|
Width = 1455
|
|
End
|
|
Begin VB.TextBox txtFin2
|
|
Alignment = 1 'Right Justify
|
|
BackColor = &H00C0FFFF&
|
|
BeginProperty DataFormat
|
|
Type = 1
|
|
Format = "0"
|
|
HaveTrueFalseNull= 0
|
|
FirstDayOfWeek = 0
|
|
FirstWeekOfYear = 0
|
|
LCID = 1033
|
|
SubFormatType = 1
|
|
EndProperty
|
|
Height = 315
|
|
Left = 10920
|
|
TabIndex = 40
|
|
Top = 60
|
|
Width = 855
|
|
End
|
|
Begin VB.CommandButton cmdExit
|
|
Caption = "&Exit"
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 8.25
|
|
Charset = 0
|
|
Weight = 700
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 555
|
|
Left = 10860
|
|
TabIndex = 38
|
|
TabStop = 0 'False
|
|
Top = 1200
|
|
Width = 975
|
|
End
|
|
Begin VB.TextBox txtVerify
|
|
BackColor = &H00C0FFFF&
|
|
Enabled = 0 'False
|
|
Height = 315
|
|
Left = 2325
|
|
TabIndex = 37
|
|
TabStop = 0 'False
|
|
Top = 4155
|
|
Width = 1095
|
|
End
|
|
Begin VB.CommandButton cmdSavePay
|
|
Caption = "&Save Payroll"
|
|
Enabled = 0 'False
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 8.25
|
|
Charset = 0
|
|
Weight = 700
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 555
|
|
Left = 9840
|
|
TabIndex = 35
|
|
Top = 1200
|
|
Width = 975
|
|
End
|
|
Begin VB.TextBox txtNotes
|
|
Height = 795
|
|
Left = 6960
|
|
MaxLength = 255
|
|
MultiLine = -1 'True
|
|
ScrollBars = 2 'Vertical
|
|
TabIndex = 33
|
|
Top = 2820
|
|
Width = 4815
|
|
End
|
|
Begin VB.ComboBox cboCrewType
|
|
Enabled = 0 'False
|
|
Height = 315
|
|
ItemData = "frmPayInput.frx":0000
|
|
Left = 1635
|
|
List = "frmPayInput.frx":001C
|
|
Style = 2 'Dropdown List
|
|
TabIndex = 19
|
|
TabStop = 0 'False
|
|
Top = 3165
|
|
Width = 1815
|
|
End
|
|
Begin VB.TextBox txtPayAmt
|
|
Alignment = 1 'Right Justify
|
|
Height = 285
|
|
Left = 4785
|
|
MaxLength = 10
|
|
TabIndex = 31
|
|
Top = 4095
|
|
Width = 1155
|
|
End
|
|
Begin VB.TextBox txtCrewName
|
|
BackColor = &H00C0FFFF&
|
|
Enabled = 0 'False
|
|
Height = 315
|
|
Left = 2445
|
|
TabIndex = 18
|
|
Top = 2835
|
|
Width = 3495
|
|
End
|
|
Begin VB.TextBox txtCrewNo
|
|
Alignment = 1 'Right Justify
|
|
BackColor = &H00C0FFFF&
|
|
Enabled = 0 'False
|
|
Height = 315
|
|
Left = 1620
|
|
MaxLength = 4
|
|
TabIndex = 36
|
|
Top = 2820
|
|
Width = 675
|
|
End
|
|
Begin VB.TextBox txtPercentDone
|
|
Alignment = 1 'Right Justify
|
|
Height = 315
|
|
Left = 1605
|
|
MaxLength = 3
|
|
TabIndex = 23
|
|
Top = 4155
|
|
Width = 675
|
|
End
|
|
Begin VB.TextBox txtMatYds
|
|
Alignment = 1 'Right Justify
|
|
BackColor = &H00C0FFFF&
|
|
Enabled = 0 'False
|
|
Height = 315
|
|
Left = 9300
|
|
TabIndex = 17
|
|
Top = 60
|
|
Width = 855
|
|
End
|
|
Begin VB.TextBox txtCMUYds
|
|
Alignment = 1 'Right Justify
|
|
BackColor = &H00C0FFFF&
|
|
Enabled = 0 'False
|
|
Height = 315
|
|
Left = 7380
|
|
TabIndex = 16
|
|
Top = 60
|
|
Width = 855
|
|
End
|
|
Begin VB.TextBox txtMetalFt
|
|
Alignment = 1 'Right Justify
|
|
BackColor = &H00C0FFFF&
|
|
Enabled = 0 'False
|
|
Height = 285
|
|
Left = 5700
|
|
TabIndex = 15
|
|
Top = 60
|
|
Width = 855
|
|
End
|
|
Begin VB.TextBox txtLathYds
|
|
Alignment = 1 'Right Justify
|
|
BackColor = &H00C0FFFF&
|
|
Enabled = 0 'False
|
|
Height = 285
|
|
Left = 4080
|
|
TabIndex = 14
|
|
Top = 60
|
|
Width = 855
|
|
End
|
|
Begin VB.TextBox txtModel
|
|
BackColor = &H00C0FFFF&
|
|
Enabled = 0 'False
|
|
Height = 285
|
|
Left = 2400
|
|
TabIndex = 13
|
|
Top = 60
|
|
Width = 855
|
|
End
|
|
Begin VB.TextBox txtProjLot
|
|
BackColor = &H00C0FFFF&
|
|
Enabled = 0 'False
|
|
Height = 285
|
|
Left = 600
|
|
TabIndex = 12
|
|
Top = 60
|
|
Width = 1695
|
|
End
|
|
Begin VB.ListBox lstPayInfo
|
|
Height = 1425
|
|
Left = 120
|
|
Sorted = -1 'True
|
|
TabIndex = 0
|
|
TabStop = 0 'False
|
|
Top = 1245
|
|
Width = 7155
|
|
End
|
|
Begin LpLib.fpCombo cboWorkType
|
|
Height = 315
|
|
Left = 1620
|
|
TabIndex = 20
|
|
Top = 3525
|
|
Width = 2310
|
|
_Version = 196608
|
|
_ExtentX = 4075
|
|
_ExtentY = 556
|
|
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
|
|
Name = "MS Sans Serif"
|
|
Size = 8.25
|
|
Charset = 0
|
|
Weight = 400
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Enabled = -1 'True
|
|
MousePointer = 0
|
|
Object.TabStop = -1 'True
|
|
BackColor = -2147483643
|
|
ForeColor = -2147483640
|
|
Text = ""
|
|
Columns = 5
|
|
Sorted = 1
|
|
SelDrawFocusRect= -1 'True
|
|
ColumnSeparatorChar= 9
|
|
ColumnSearch = 1
|
|
ColumnWidthScale= 2
|
|
RowHeight = -1
|
|
WrapList = 0 'False
|
|
WrapWidth = 0
|
|
AutoSearch = 2
|
|
SearchMethod = 1
|
|
VirtualMode = 0 'False
|
|
VRowCount = 0
|
|
DataSync = 3
|
|
ThreeDInsideStyle= 1
|
|
ThreeDInsideHighlightColor= -2147483633
|
|
ThreeDInsideShadowColor= -2147483627
|
|
ThreeDInsideWidth= 1
|
|
ThreeDOutsideStyle= 1
|
|
ThreeDOutsideHighlightColor= -2147483628
|
|
ThreeDOutsideShadowColor= -2147483632
|
|
ThreeDOutsideWidth= 1
|
|
ThreeDFrameWidth= 0
|
|
BorderStyle = 0
|
|
BorderColor = -2147483642
|
|
BorderWidth = 1
|
|
ThreeDOnFocusInvert= 0 'False
|
|
ThreeDFrameColor= -2147483633
|
|
Appearance = 2
|
|
BorderDropShadow= 0
|
|
BorderDropShadowColor= -2147483632
|
|
BorderDropShadowWidth= 3
|
|
ScrollHScale = 2
|
|
ScrollHInc = 0
|
|
ColsFrozen = 0
|
|
ScrollBarV = 1
|
|
NoIntegralHeight= 0 'False
|
|
HighestPrecedence= 0
|
|
AllowColResize = 0
|
|
AllowColDragDrop= 0
|
|
ReadOnly = 0 'False
|
|
VScrollSpecial = 0 'False
|
|
VScrollSpecialType= 0
|
|
EnableKeyEvents = -1 'True
|
|
EnableTopChangeEvent= -1 'True
|
|
DataAutoHeadings= -1 'True
|
|
DataAutoSizeCols= 2
|
|
SearchIgnoreCase= -1 'True
|
|
ScrollBarH = 1
|
|
DataFieldList = ""
|
|
ColumnEdit = -1
|
|
ColumnBound = -1
|
|
Style = 2
|
|
MaxDrop = 10
|
|
ListWidth = -1
|
|
EditHeight = -1
|
|
GrayAreaColor = -2147483633
|
|
ListLeftOffset = 0
|
|
ComboGap = -2
|
|
MaxEditLen = 150
|
|
VirtualPageSize = 0
|
|
VirtualPagesAhead= 0
|
|
ExtendCol = 0
|
|
ColumnLevels = 1
|
|
ListGrayAreaColor= -2147483637
|
|
GroupHeaderHeight= -1
|
|
GroupHeaderShow = 0 'False
|
|
AllowGrpResize = 0
|
|
AllowGrpDragDrop= 0
|
|
MergeAdjustView = 0 'False
|
|
ColumnHeaderShow= 0 'False
|
|
ColumnHeaderHeight= -1
|
|
GrpsFrozen = 0
|
|
BorderGrayAreaColor= -2147483637
|
|
ExtendRow = 0
|
|
EnableClickEvent= -1 'True
|
|
ListPosition = 0
|
|
ButtonThreeDAppearance= 0
|
|
OLEDragMode = 0
|
|
OLEDropMode = 0
|
|
Redraw = -1 'True
|
|
AutoSearchFill = 0 'False
|
|
AutoSearchFillDelay= 500
|
|
EditMarginLeft = 1
|
|
EditMarginTop = 1
|
|
EditMarginRight = 0
|
|
EditMarginBottom= 3
|
|
ResizeRowToFont = 0 'False
|
|
TextTipMultiLine= 0
|
|
AutoMenu = -1 'True
|
|
EditAlignH = 0
|
|
EditAlignV = 0
|
|
ColDesigner = "frmPayInput.frx":0067
|
|
End
|
|
Begin VB.Label lblEPO
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "EPO: "
|
|
Height = 195
|
|
Left = 720
|
|
TabIndex = 77
|
|
Top = 3915
|
|
Width = 420
|
|
End
|
|
Begin VB.Label lblNoCalc
|
|
Alignment = 2 'Center
|
|
BackColor = &H00FFFF80&
|
|
Caption = "No Calc"
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 12
|
|
Charset = 0
|
|
Weight = 700
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 315
|
|
Left = 2805
|
|
TabIndex = 76
|
|
Top = 750
|
|
Visible = 0 'False
|
|
Width = 1215
|
|
End
|
|
Begin VB.Label lblCertPR
|
|
Alignment = 2 'Center
|
|
BackColor = &H0080FFFF&
|
|
Caption = "CERTIFIED PAYROLL"
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 13.5
|
|
Charset = 0
|
|
Weight = 700
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
ForeColor = &H000000FF&
|
|
Height = 330
|
|
Left = 765
|
|
TabIndex = 75
|
|
Top = 735
|
|
Visible = 0 'False
|
|
Width = 1995
|
|
End
|
|
Begin VB.Label lblStart
|
|
AutoSize = -1 'True
|
|
Caption = "Start Time:"
|
|
Height = 195
|
|
Left = 90
|
|
TabIndex = 74
|
|
Top = 4740
|
|
Width = 765
|
|
End
|
|
Begin VB.Label lblNetTime
|
|
Alignment = 2 'Center
|
|
BorderStyle = 1 'Fixed Single
|
|
Height = 285
|
|
Left = 6150
|
|
TabIndex = 73
|
|
Top = 4695
|
|
Width = 705
|
|
End
|
|
Begin VB.Label lblWrkDate
|
|
AutoSize = -1 'True
|
|
Caption = "Work Date:"
|
|
Height = 195
|
|
Left = 6930
|
|
TabIndex = 72
|
|
Top = 4740
|
|
Width = 825
|
|
End
|
|
Begin VB.Label lblPayTime
|
|
AutoSize = -1 'True
|
|
Caption = "Payable Time:"
|
|
Height = 195
|
|
Left = 5115
|
|
TabIndex = 71
|
|
Top = 4740
|
|
Width = 1005
|
|
End
|
|
Begin VB.Label lblEnd
|
|
AutoSize = -1 'True
|
|
Caption = "End Time:"
|
|
Height = 195
|
|
Left = 3615
|
|
TabIndex = 70
|
|
Top = 4740
|
|
Width = 720
|
|
End
|
|
Begin VB.Label lblLunch
|
|
AutoSize = -1 'True
|
|
Caption = "Lunch Length"
|
|
Height = 195
|
|
Left = 1740
|
|
TabIndex = 69
|
|
Top = 4740
|
|
Width = 990
|
|
End
|
|
Begin VB.Label lblPaint
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Paint SqFt:"
|
|
Height = 195
|
|
Left = 4650
|
|
TabIndex = 66
|
|
Top = 825
|
|
Width = 780
|
|
End
|
|
Begin VB.Label lblD108
|
|
BackColor = &H00C0FFFF&
|
|
BorderStyle = 1 'Fixed Single
|
|
Height = 315
|
|
Left = 10500
|
|
TabIndex = 62
|
|
Top = 720
|
|
Width = 1035
|
|
End
|
|
Begin VB.Label lbl108
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "10'8"" :"
|
|
Height = 195
|
|
Left = 9960
|
|
TabIndex = 61
|
|
Top = 780
|
|
Width = 465
|
|
End
|
|
Begin VB.Label lblD68
|
|
BackColor = &H00C0FFFF&
|
|
BorderStyle = 1 'Fixed Single
|
|
Height = 315
|
|
Left = 8880
|
|
TabIndex = 60
|
|
Top = 720
|
|
Width = 1035
|
|
End
|
|
Begin VB.Label lbl68
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "6'8"" :"
|
|
Height = 195
|
|
Left = 8460
|
|
TabIndex = 59
|
|
Top = 780
|
|
Width = 375
|
|
End
|
|
Begin VB.Label lblScaf
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Scaffolding Frames:"
|
|
Height = 195
|
|
Left = 6960
|
|
TabIndex = 58
|
|
Top = 780
|
|
Width = 1395
|
|
End
|
|
Begin VB.Label lblStone
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Stone SqFt:"
|
|
Height = 195
|
|
Left = 4590
|
|
TabIndex = 56
|
|
Top = 480
|
|
Width = 840
|
|
End
|
|
Begin VB.Label lblLotNotes
|
|
AutoSize = -1 'True
|
|
Caption = "Lot Notes:"
|
|
Height = 195
|
|
Left = 7440
|
|
TabIndex = 55
|
|
Top = 1740
|
|
Width = 735
|
|
End
|
|
Begin VB.Label lblOffice
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Office Notes:"
|
|
Height = 195
|
|
Left = 6000
|
|
TabIndex = 53
|
|
Top = 3660
|
|
Width = 930
|
|
End
|
|
Begin VB.Label lblFinish
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Texture:"
|
|
Height = 195
|
|
Left = 120
|
|
TabIndex = 51
|
|
Top = 480
|
|
Width = 585
|
|
End
|
|
Begin VB.Label lblStuccoYds
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Stucco Yds:"
|
|
Height = 195
|
|
Left = 2805
|
|
TabIndex = 49
|
|
Top = 480
|
|
Width = 870
|
|
End
|
|
Begin VB.Label lblStucco
|
|
BorderStyle = 1 'Fixed Single
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 8.25
|
|
Charset = 0
|
|
Weight = 700
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 285
|
|
Left = 7860
|
|
TabIndex = 48
|
|
Top = 420
|
|
Width = 1275
|
|
End
|
|
Begin VB.Label lblBillLath
|
|
BorderStyle = 1 'Fixed Single
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 8.25
|
|
Charset = 0
|
|
Weight = 700
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 285
|
|
Left = 10500
|
|
TabIndex = 47
|
|
Top = 420
|
|
Width = 1275
|
|
End
|
|
Begin VB.Label lblStuccoBill
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Stucco Billing Date:"
|
|
Height = 195
|
|
Left = 6420
|
|
TabIndex = 46
|
|
Top = 480
|
|
Width = 1395
|
|
End
|
|
Begin VB.Label lblLathBill
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Lath Billing Date:"
|
|
Height = 195
|
|
Left = 9240
|
|
TabIndex = 45
|
|
Top = 480
|
|
Width = 1200
|
|
End
|
|
Begin VB.Label lblPO
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "P.O. Number:"
|
|
Height = 195
|
|
Left = 3795
|
|
TabIndex = 44
|
|
Top = 4440
|
|
Width = 960
|
|
End
|
|
Begin VB.Label lblFin2Rate
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Finish 2 Rate:"
|
|
Height = 195
|
|
Left = 3780
|
|
TabIndex = 43
|
|
Top = 3840
|
|
Width = 975
|
|
End
|
|
Begin VB.Label lblMtlRate
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Metal Rate:"
|
|
Height = 195
|
|
Left = 3930
|
|
TabIndex = 42
|
|
Top = 3540
|
|
Width = 825
|
|
End
|
|
Begin VB.Label lblYDRate
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Yardage Rate:"
|
|
Height = 195
|
|
Left = 3720
|
|
TabIndex = 41
|
|
Top = 3270
|
|
Width = 1035
|
|
End
|
|
Begin VB.Label lblFin2
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Finish 2:"
|
|
Height = 195
|
|
Left = 10260
|
|
TabIndex = 39
|
|
Top = 120
|
|
Width = 585
|
|
End
|
|
Begin VB.Line Line1
|
|
BorderWidth = 2
|
|
X1 = 60
|
|
X2 = 11880
|
|
Y1 = 1140
|
|
Y2 = 1140
|
|
End
|
|
Begin VB.Label lblMaterial
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Material Yds:"
|
|
Height = 195
|
|
Left = 8340
|
|
TabIndex = 11
|
|
Top = 120
|
|
Width = 915
|
|
End
|
|
Begin VB.Label lblCMU
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "CMU Yds:"
|
|
Height = 195
|
|
Left = 6600
|
|
TabIndex = 10
|
|
Top = 120
|
|
Width = 720
|
|
End
|
|
Begin VB.Label lblMetal
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Metal Ft:"
|
|
Height = 195
|
|
Left = 4980
|
|
TabIndex = 9
|
|
Top = 120
|
|
Width = 615
|
|
End
|
|
Begin VB.Label lblLath
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Lath Yds:"
|
|
Height = 195
|
|
Left = 3300
|
|
TabIndex = 8
|
|
Top = 120
|
|
Width = 675
|
|
End
|
|
Begin VB.Label lblLotNo
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Lot #:"
|
|
Height = 195
|
|
Left = 120
|
|
TabIndex = 7
|
|
Top = 120
|
|
Width = 420
|
|
End
|
|
Begin VB.Label lblNotes
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "PR Notes:"
|
|
Height = 195
|
|
Left = 6195
|
|
TabIndex = 6
|
|
Top = 2820
|
|
Width = 735
|
|
End
|
|
Begin VB.Label lblPayAmt
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Labor Amt:"
|
|
Height = 195
|
|
Left = 3990
|
|
TabIndex = 5
|
|
Top = 4140
|
|
Width = 765
|
|
End
|
|
Begin VB.Label lblCrew
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Crew:"
|
|
Height = 195
|
|
Left = 1125
|
|
TabIndex = 4
|
|
Top = 2880
|
|
Width = 405
|
|
End
|
|
Begin VB.Label lblPercent
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Percentage Done:"
|
|
Height = 195
|
|
Left = 210
|
|
TabIndex = 3
|
|
Top = 4215
|
|
Width = 1305
|
|
End
|
|
Begin VB.Label lblWorkType
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Type of Work Done:"
|
|
Height = 195
|
|
Left = 75
|
|
TabIndex = 2
|
|
Top = 3600
|
|
Width = 1455
|
|
End
|
|
Begin VB.Label lblCrewType
|
|
Alignment = 1 'Right Justify
|
|
AutoSize = -1 'True
|
|
Caption = "Crew Type:"
|
|
Height = 195
|
|
Left = 720
|
|
TabIndex = 1
|
|
Top = 3240
|
|
Width = 810
|
|
End
|
|
End
|
|
Attribute VB_Name = "frmPayInput"
|
|
Attribute VB_GlobalNameSpace = False
|
|
Attribute VB_Creatable = False
|
|
Attribute VB_PredeclaredId = True
|
|
Attribute VB_Exposed = False
|
|
Option Explicit
|
|
Dim moRS As Recordset
|
|
Dim moRSTIME As Recordset
|
|
Dim moRSProj As Recordset
|
|
Dim moRSCREW As Recordset
|
|
Dim moRSMemo As Recordset
|
|
|
|
Dim mboolSHOW As Boolean, mboolEXIT As Boolean, mboolSCAF As Boolean
|
|
Dim mboolAdding As Boolean, mboolLOOK As Boolean
|
|
Dim mstrType As String, mstrCREW As String, mstrPROJLOT As String
|
|
Dim mlngFind As Long, mdblGROSS As Double
|
|
Dim mlngTIME As Long, mlngSCAFID As Long
|
|
Dim mintCREW As Integer, mboolCERTIFIED As Boolean
|
|
Dim mstrWTYPE As String, mstrWDone As String
|
|
Dim mboolNOCALC As Boolean
|
|
'Need to get the time being formated correctly and shown on the screen correctly
|
|
'Also need to make sure that it is saving in the tblTIME correctly
|
|
'Will also need to get a calculation routine setup to calc the net time.
|
|
'May need to look at saving the time as a string in the 24 hour format and then changing
|
|
'to AM/PM when displaying on the screen
|
|
|
|
Private Sub CMUFix()
|
|
Dim intResponse As Integer
|
|
|
|
intResponse = InputBox("Enter The Correct Square Yardage Of The CMU", "Correct CMU Yardage", 0)
|
|
moRS!CMU = Integer2Field(intResponse)
|
|
moRS.Update
|
|
Call FormShow
|
|
|
|
End Sub
|
|
|
|
Private Sub StoneFix()
|
|
Dim intResponse As Integer
|
|
|
|
intResponse = InputBox("Enter The Correct Square Footage Of The Stone Veneer", "Correct Stone", 0)
|
|
moRS!ST_SQFT = Integer2Field(intResponse)
|
|
moRS.Update
|
|
Call FormShow
|
|
|
|
End Sub
|
|
|
|
Private Sub PaintFix()
|
|
Dim intResponse As Integer
|
|
|
|
intResponse = InputBox("Enter The Correct Square Footage For The Paint", "Correct Paint", 0)
|
|
moRS!PNT_SQFT = Integer2Field(intResponse)
|
|
moRS!PNT_FLG = vbChecked
|
|
moRS.Update
|
|
Call FormShow
|
|
|
|
End Sub
|
|
|
|
Private Sub WTLoad()
|
|
Dim oRS As Recordset, strSQL As String
|
|
Dim strID As String, strWT As String, strWTYPE As String
|
|
|
|
cboWorkType.Clear
|
|
strSQL = "SELECT * FROM tblCBOWorkType"
|
|
Set oRS = New Recordset
|
|
oRS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
|
|
If Not oRS.EOF Then
|
|
Do Until oRS.EOF
|
|
strID = (oRS!WTID)
|
|
strWT = (oRS!WTCode)
|
|
strWTYPE = (oRS!worktype)
|
|
cboWorkType.AddItem strID & vbTab & strWT & vbTab & strWTYPE & vbTab & oRS!Rate & vbTab & oRS!Type
|
|
|
|
oRS.MoveNext
|
|
Loop
|
|
|
|
End If
|
|
|
|
If cboWorkType.ListCount Then
|
|
cboWorkType.ListIndex = 0
|
|
Else
|
|
cboWorkType.ListIndex = -1
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub cmdFindCrew_Click()
|
|
Dim oRS As Recordset
|
|
Dim strSQL As String, lngFind As Long
|
|
|
|
strSQL = "SELECT * from tblcrew WHERE crew_id = " & Field2Integer(txtCrewNo) & " and type = '" & Left(Str2Field(cboCrewType.Text), 1) & "'"
|
|
Set oRS = New Recordset
|
|
oRS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
|
|
If Not oRS.EOF Then
|
|
mstrCREW = oRS!Crew_Boss
|
|
txtCrewName = mstrCREW
|
|
Else
|
|
Call CrewLoad
|
|
End If
|
|
|
|
oRS.Close
|
|
|
|
End Sub
|
|
|
|
Private Sub cboWorkType_LostFocus()
|
|
Dim strWTYPE As String, intLEN As Integer
|
|
' mboolEXIT = False
|
|
' If Left(Field2Str(cboWorkType), 1) = "B" Or Left(Field2Str(cboWorkType), 1) = "S" _
|
|
' Or Left(Field2Str(cboWorkType), 1) = "T" Or Left(Field2Str(cboWorkType), 1) = "C" _
|
|
' Or Left(Field2Str(cboWorkType), 1) = "P" Then
|
|
' Call CheckPay
|
|
' End If
|
|
If cboWorkType.ListIndex <> -1 Then
|
|
cboWorkType.col = 1
|
|
strWTYPE = cboWorkType.ColText
|
|
intLEN = Len(strWTYPE)
|
|
If intLEN > 1 Then
|
|
cboWorkType.col = 3
|
|
txtPrimRate = Format(Field2Str2(cboWorkType.ColText), "#0.00")
|
|
|
|
End If
|
|
End If
|
|
' If mboolEXIT Then
|
|
' cboWorkType.SetFocus
|
|
' End If
|
|
|
|
End Sub
|
|
|
|
Private Sub cmdGetPaySheet_Click()
|
|
Dim strPAYID As String
|
|
strPAYID = gintPAYID
|
|
Load frmGetPaySheet
|
|
frmGetPaySheet.txtCrewId = txtCrewNo
|
|
frmGetPaySheet.txtCrewType = Left(Str2Field(cboCrewType.Text), 1)
|
|
frmGetPaySheet.Show 1
|
|
mboolSCAF = True
|
|
mboolEXIT = True
|
|
Call PayLoad
|
|
mboolAdding = False
|
|
cmdSavePay.Enabled = False
|
|
Call cmdExit_Click
|
|
End Sub
|
|
|
|
Private Sub cmdScaffold_Click()
|
|
Load frmScafPay
|
|
frmScafPay.txtCrewNo = txtCrewNo
|
|
frmScafPay.Show 1
|
|
mboolSCAF = True
|
|
mboolEXIT = True
|
|
Call PayLoad
|
|
mboolAdding = False
|
|
cmdSavePay.Enabled = False
|
|
Call cmdExit_Click
|
|
End Sub
|
|
|
|
Private Sub Form_Activate()
|
|
lblNoCalc.Visible = False
|
|
If chkLOOK = vbChecked Then
|
|
mboolLOOK = True
|
|
End If
|
|
Call FormShow
|
|
If mboolLOOK Then
|
|
cmdGetPaySheet.Enabled = False
|
|
cmdSavePay.Enabled = False
|
|
cmdScaffold.Enabled = False
|
|
cboCrewType.Enabled = False
|
|
cboWorkType.Enabled = False
|
|
txtPercentDone.Enabled = False
|
|
txtPrimRate.Enabled = False
|
|
txtMetalRate.Enabled = False
|
|
txtFin2Rate.Enabled = False
|
|
txtPayAmt.Enabled = False
|
|
txtPONum.Enabled = False
|
|
chkBC.Enabled = False
|
|
txtLotNotes.Enabled = False
|
|
txtNotes.Enabled = False
|
|
txtOffice.Enabled = False
|
|
txtEPO.Enabled = False
|
|
txtWrkDate.Enabled = False
|
|
lblNetTime.Enabled = False
|
|
txtEndTime.Enabled = False
|
|
txtLunch.Enabled = False
|
|
txtStartTime.Enabled = False
|
|
Else
|
|
If Not mboolSCAF Then
|
|
Call cmdAddPay_Click
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
|
|
Dim ShiftDown, AltDown, CtrlDown
|
|
|
|
If Shift = 4 Then
|
|
Exit Sub
|
|
End If
|
|
mstrPROJLOT = mstrPROJLOT
|
|
ShiftDown = (Shift And vbShiftMask) > 0
|
|
AltDown = (Shift And vbAltMask) > 0
|
|
CtrlDown = (Shift And vbCtrlMask) > 0
|
|
If KeyCode = vbKeyU Then ' Display key combinations.
|
|
If CtrlDown Then
|
|
Call CMUFix
|
|
End If
|
|
Exit Sub
|
|
End If
|
|
If KeyCode = vbKeyV Then ' Display key combinations.
|
|
If CtrlDown Then
|
|
Call StoneFix
|
|
End If
|
|
Exit Sub
|
|
End If
|
|
If KeyCode = vbKeyX Then ' Display key combinations.
|
|
If CtrlDown Then
|
|
Call PaintFix
|
|
End If
|
|
Exit Sub
|
|
End If
|
|
|
|
If KeyCode = vbKeyL Then ' Setup NoCalc Flag
|
|
If CtrlDown Then
|
|
If mboolNOCALC Then
|
|
mboolNOCALC = False
|
|
' moRSTIME!NoCalc = vbFalse
|
|
lblNoCalc.Visible = False
|
|
Else
|
|
mboolNOCALC = True
|
|
' moRSTIME!NoCalc = vbTrue
|
|
lblNoCalc.Visible = True
|
|
End If
|
|
End If
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub Form_KeyPress(KeyAscii As Integer)
|
|
If KeyAscii = 13 Then
|
|
SendKeys "{TAB}"
|
|
KeyAscii = 0
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
|
|
Dim intResponse As Integer, strMSG As String
|
|
On Error GoTo Error_EH
|
|
|
|
If moRS.State = adStateOpen Then
|
|
moRS.Close
|
|
End If
|
|
If moRSTIME.State = adStateOpen Then
|
|
moRSTIME.Close
|
|
End If
|
|
Exit Sub
|
|
|
|
Error_EH:
|
|
If Err = 3219 Then
|
|
Resume Next
|
|
End If
|
|
End Sub
|
|
Private Sub Form_Load()
|
|
Set moRS = New Recordset
|
|
Set moRSProj = New Recordset
|
|
Set moRSCREW = New Recordset
|
|
Set moRSMemo = New Recordset
|
|
|
|
mboolSCAF = False
|
|
|
|
Call ProjLoad
|
|
Call LotLoad
|
|
Call PayLoad
|
|
Call CrewLoad
|
|
Call WTLoad
|
|
If moRS!hold_stucco Then
|
|
MsgBox "This Lot Is On Hold - No Payments Allowed Until Paperwork is Corrected", vbOKOnly, "Stucco Hold"
|
|
Unload Me
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub ProjLoad()
|
|
Dim strSQL As String
|
|
strSQL = "SELECT * FROM tblProject where proj_id = " & gintPROJID
|
|
moRSProj.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
If moRSProj!certpr Then
|
|
mboolCERTIFIED = True
|
|
Else
|
|
mboolCERTIFIED = False
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub LotLoad()
|
|
Dim strSQL As String, strSql2 As String
|
|
|
|
strSQL = "SELECT * FROM tblLotInfo where lot_id = " & gintLOTID
|
|
moRS.Open strSQL, goConn, adOpenKeyset, adLockOptimistic
|
|
mstrPROJLOT = moRSProj!Proj_Code & " " & moRSProj!Proj_Desc & " " & moRS!lot_no
|
|
|
|
strSql2 = "SELECT * FROM tblYardMemo WHERE lot_id = " & gintLOTID
|
|
Set moRSMemo = New Recordset
|
|
moRSMemo.Open strSql2, goConn, adOpenKeyset, adLockOptimistic
|
|
End Sub
|
|
|
|
Private Sub FormShow()
|
|
Dim strMType As String, strMTDesc As String, sglPRate As Single, strCrewType As String
|
|
|
|
mboolSHOW = True
|
|
txtProjLot = Trim$(moRSProj!Proj_Code) & " " & moRS!lot_no
|
|
txtLathYds = Field2Integer(moRS!l_yds)
|
|
txtCMUYds = Field2Integer(moRS!CMU)
|
|
txtMatYds = Field2Integer(moRS!sq_yd)
|
|
txtMetalFt = Field2Double(moRS!METAL)
|
|
txtFin2 = Field2Integer(moRS!fin2)
|
|
txtModel = Field2Str(moRS!model)
|
|
txtStuccoYds = Field2Str2(moRS!s_yds)
|
|
txtStone = Field2Str(moRS!ST_SQFT)
|
|
txtPaint = Field2Str2(moRS!PNT_SQFT)
|
|
lblD68 = Field2Str2(moRS!Scaf6)
|
|
lblD108 = Field2Str2(moRS!scaf10)
|
|
lblStucco.Caption = Field2Str(moRS!billdt_S)
|
|
lblBillLath.Caption = Field2Str(moRS!billdt_L)
|
|
txtLotNotes = Field2Str(moRSMemo!payroll)
|
|
' txtStartTime = Format(Field2Str(moRS!StrtTm), "hh:mm")
|
|
' txtEndTime = Format(Field2Str(moRS!EndTm), "hh:mm")
|
|
' txtLunch = Field2Str2(moRS!Lunch)
|
|
' lblNetTime = Field2Str(moRS!NetTime)
|
|
' txtWrkDate = Field2Str(moRS!WorkDate)
|
|
If Field2Str(moRSCREW!Type) = "L" Then
|
|
txtPrimRate = Field2Str2(moRSCREW!lath_skip)
|
|
txtMetalRate = Field2Str2(moRSCREW!METAL)
|
|
txtFin2Rate = 0
|
|
cboCrewType = "LATH"
|
|
End If
|
|
If mboolCERTIFIED Then
|
|
lblCertPR.Visible = True
|
|
Else
|
|
lblCertPR.Visible = False
|
|
End If
|
|
If Field2Str(moRSCREW!Type) = "V" Then
|
|
txtPrimRate = Field2Str2(moRSCREW!lath_skip)
|
|
txtMetalRate = 0
|
|
txtMetalRate.Visible = False
|
|
txtFin2Rate = 0
|
|
txtFin2Rate.Visible = False
|
|
cboCrewType = "V_STONE"
|
|
End If
|
|
If Field2Str(moRSCREW!Type) = "C" Then
|
|
txtPrimRate = Field2Str2(moRSCREW!lath_skip)
|
|
txtMetalRate = 0
|
|
lblMtlRate.Visible = False
|
|
txtMetalRate.Visible = False
|
|
txtFin2Rate = Field2Str2(moRSCREW!sand)
|
|
' txtFin2Rate = 0
|
|
cboCrewType = "C_SCAFFOLD"
|
|
' cboWorkType = "Y_UP"
|
|
cmdScaffold.SetFocus
|
|
' chkBC.Enabled = False
|
|
End If
|
|
If Field2Str(moRSCREW!Type) = "S" Then
|
|
If Field2Str(moRS!texture) = "SK" Then
|
|
txtPrimRate = Field2Str2(moRSCREW!lath_skip)
|
|
txtFinish = "SKIP"
|
|
txtMetalRate = 0
|
|
txtMetalRate.Visible = False
|
|
txtFin2Rate = 0
|
|
ElseIf Field2Str(moRS!texture) = "SM" Then
|
|
txtPrimRate = Field2Str2(moRSCREW!lath_skip)
|
|
txtFinish = "SMOOTH"
|
|
txtMetalRate = 0
|
|
txtMetalRate.Visible = False
|
|
txtFin2Rate = 0
|
|
ElseIf Field2Str(moRS!texture) = "SA" Then
|
|
txtPrimRate = Field2Str2(moRSCREW!sand)
|
|
txtFinish = "SAND"
|
|
txtMetalRate = 0
|
|
txtMetalRate.Visible = False
|
|
txtFin2Rate = 0
|
|
ElseIf Field2Str(moRS!texture) = "S2" Then
|
|
txtPrimRate = Field2Str2(moRSCREW!sand)
|
|
txtFinish = "SAND"
|
|
txtMetalRate = 0
|
|
txtMetalRate.Visible = False
|
|
txtFin2Rate = 0
|
|
ElseIf Field2Str(moRS!texture) = "S3" Then
|
|
txtPrimRate = Field2Str2(moRSCREW!sand)
|
|
txtFinish = "SAND"
|
|
txtMetalRate = 0
|
|
txtMetalRate.Visible = False
|
|
txtFin2Rate = 0
|
|
ElseIf Field2Str(moRS!texture) = "SB" Then
|
|
txtPrimRate = Field2Str2(moRSCREW!syn)
|
|
txtFinish = "SYNTHETIC"
|
|
txtMetalRate = 0
|
|
txtMetalRate.Visible = False
|
|
txtFin2Rate = 0
|
|
ElseIf Field2Str(moRS!texture) = "QU" Then
|
|
txtPrimRate = Field2Str2(moRSCREW!qu)
|
|
txtFinish = "QUERNAVACA"
|
|
txtMetalRate = 0
|
|
txtMetalRate.Visible = False
|
|
txtFin2Rate = 0
|
|
ElseIf Field2Str(moRS!texture) = "MN" Then
|
|
txtPrimRate = Field2Str2(moRSCREW!mn)
|
|
txtFinish = "MONTERREY"
|
|
txtMetalRate = 0
|
|
txtMetalRate.Visible = False
|
|
txtFin2Rate = 0
|
|
ElseIf Field2Str(moRS!texture) = "DA" Then
|
|
txtPrimRate = Field2Str2(moRSCREW!dash)
|
|
txtFinish = "DASH"
|
|
txtMetalRate = 0
|
|
txtMetalRate.Visible = False
|
|
txtFin2Rate = 0
|
|
ElseIf Field2Str(moRS!texture) = "DF" Then
|
|
txtPrimRate = Field2Str2(moRSCREW!lath_skip)
|
|
txtFinish = "SKIP AND SAND"
|
|
txtMetalRate = 0
|
|
txtMetalRate.Visible = False
|
|
txtFin2Rate = Field2Str2(moRSCREW!sand)
|
|
End If
|
|
cboCrewType = "STUCCO"
|
|
End If
|
|
If Field2Str(moRSCREW!Type) = "X" Then
|
|
cboCrewType = "X_PAINT"
|
|
cboWorkType.col = 1
|
|
strMType = Field2Str(cboWorkType.ColText)
|
|
cboWorkType.col = 2
|
|
strMTDesc = Field2Str(cboWorkType.ColText)
|
|
cboWorkType.col = 3
|
|
sglPRate = Format(CDbl(Field2Str2(cboWorkType.ColText)), "#0.00")
|
|
cboWorkType.col = 4
|
|
strCrewType = Field2Str(cboWorkType.ColText)
|
|
txtMetalRate = 0
|
|
txtFin2Rate = 0
|
|
lblMtlRate.Visible = False
|
|
txtFin2Rate.Visible = False
|
|
lblFin2Rate.Visible = False
|
|
txtMetalRate.Visible = False
|
|
txtPrimRate = sglPRate
|
|
lblYdRate = "Paint SqFt:"
|
|
End If
|
|
mboolSHOW = False
|
|
End Sub
|
|
|
|
Private Sub cmdAddPay_Click()
|
|
Call FormClear
|
|
txtVerify = Date
|
|
cmdSavePay.Enabled = True
|
|
' mboolAdding = True
|
|
cboWorkType.SetFocus
|
|
End Sub
|
|
Private Sub cmdSavePay_Click()
|
|
cmdSavePay.Enabled = False
|
|
Call FormSave
|
|
Unload Me
|
|
|
|
End Sub
|
|
|
|
Private Sub FormSave()
|
|
Dim strSQL As String
|
|
|
|
On Error GoTo Error_EH
|
|
If chkADD Then
|
|
' If mboolAdding Then
|
|
strSQL = "SELECT * FROM tblTIME" ' ORDER By IDNum"
|
|
Set moRSTIME = New Recordset
|
|
moRSTIME.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
moRSTIME.AddNew
|
|
Else
|
|
' mlngTIME = lstPayInfo.ItemData(lstPayInfo.ListIndex)
|
|
' Call FormFind
|
|
End If
|
|
' If mboolAdding Then
|
|
' moRSTIME.AddNew
|
|
' End If
|
|
|
|
' Store the controls to the recordset
|
|
Call FieldsSave
|
|
|
|
mboolNOCALC = False
|
|
|
|
moRSMemo!payroll = Str2Field(txtLotNotes)
|
|
moRSMemo.Update
|
|
|
|
Exit Sub
|
|
|
|
Error_EH:
|
|
Call ErrorHandler(moRSTIME.ActiveConnection)
|
|
Exit Sub
|
|
End Sub
|
|
Private Function FormFind() As Boolean
|
|
Dim strSQL As String, strPlan As String
|
|
|
|
strSQL = "SELECT * "
|
|
strSQL = strSQL & "FROM tblTIME " ' ORDER By IDNum "
|
|
strSQL = strSQL & "WHERE IDNUM = " & mlngTIME
|
|
Set moRSTIME = New Recordset
|
|
moRSTIME.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
|
|
If moRSTIME.EOF Then
|
|
FormFind = False
|
|
Else
|
|
FormFind = True
|
|
If moRSTIME!NoCalc Then
|
|
mboolNOCALC = True
|
|
lblNoCalc.Visible = True
|
|
Else
|
|
mboolNOCALC = False
|
|
lblNoCalc.Visible = False
|
|
End If
|
|
End If
|
|
End Function
|
|
Private Sub cmdExit_Click()
|
|
Unload Me
|
|
End Sub
|
|
Private Sub FieldsSave()
|
|
Dim strSQL As String
|
|
On Error GoTo Error_EH
|
|
|
|
If moRSTIME.State = adStateOpen Then
|
|
' moRSTIME.Close
|
|
Else
|
|
strSQL = "SELECT * FROM tblTIME" ' ORDER By IDNum" ' WHERE idnum = 10"
|
|
' strSQL = "SELECT * FROM tblTIME WHERE idnum = 10"
|
|
Set moRSTIME = New Recordset
|
|
moRSTIME.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
' moRSTIME.AddNew
|
|
End If
|
|
|
|
|
|
With moRSTIME
|
|
' If chkAdd Then 'And Not mboolAdding Then
|
|
' If chkAdd And Not mboolAdding Then
|
|
' .AddNew
|
|
' End If
|
|
!Proj_ID = gintPROJID
|
|
!Lot_id = gintLOTID
|
|
!lot_no = Str2Field(moRS!lot_no)
|
|
!paydt = Date
|
|
!C_USER = gstrLOGIN
|
|
!pct_done = Integer2Field(txtPercentDone)
|
|
!pay_id = gintPAYID
|
|
!proj_lot = Str2Field(txtProjLot)
|
|
!yd_rate = Double2Field(txtPrimRate)
|
|
!fin2_Rate = Double2Field(txtFin2Rate)
|
|
!mtl_Rate = Double2Field(txtMetalRate)
|
|
!ponum = Str2Field(txtPONum)
|
|
!bc = chkBC
|
|
!crew = Integer2Field(txtCrewNo)
|
|
!pay_amt = Str2Field(txtPayAmt)
|
|
!notes = Str2Field(txtNotes)
|
|
!pay_type = Left(Str2Field(cboCrewType.Text), 1)
|
|
cboWorkType.col = 1
|
|
!workdone = cboWorkType.ColText
|
|
' !workdone = Left(Str2Field(cboWorkType.Text), 1)
|
|
!office = Str2Field(txtOffice)
|
|
!certpr = moRSProj!certpr
|
|
!U_USER = gstrLOGIN
|
|
!EPONum = Field2Str(txtEPO)
|
|
!Update = Date
|
|
If mboolNOCALC Then
|
|
!NoCalc = vbTrue
|
|
Else
|
|
!NoCalc = vbFalse
|
|
End If
|
|
!StrtTM = Field2Str2(txtStartTime)
|
|
!Lunch = Format(Field2Str2(txtLunch), "##.00")
|
|
!EndTM = Field2Str2(txtEndTime)
|
|
!NetTime = Field2Str(lblNetTime)
|
|
If txtWrkDate = "" Then
|
|
!WorkDay = 0
|
|
Else
|
|
!WorkDay = Field2Str2(txtWrkDate)
|
|
End If
|
|
End With
|
|
moRSTIME.Update
|
|
If mboolAdding Then
|
|
mboolAdding = False
|
|
End If
|
|
Exit Sub
|
|
|
|
Error_EH:
|
|
gstrMODULE = "Form PayInput - Module FieldsSave"
|
|
Call ErrorHandler2
|
|
gstrMODULE = ""
|
|
Exit Sub
|
|
|
|
End Sub
|
|
Private Sub FormClear()
|
|
txtPercentDone = "0"
|
|
txtVerify = ""
|
|
txtPayAmt = "0"
|
|
txtNotes = ""
|
|
txtOffice = ""
|
|
' txtLotNotes = ""
|
|
cboWorkType.ListIndex = -1
|
|
|
|
End Sub
|
|
|
|
Private Sub ScaffoldLoad()
|
|
Dim oRS As Recordset
|
|
Dim strSQL As String
|
|
Dim strLine As String
|
|
|
|
strSQL = "SELECT * from tblTime WHERE lot_id =" & gintLOTID
|
|
Set oRS = New Recordset
|
|
oRS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
|
|
lstPayInfo.Clear
|
|
|
|
Do Until oRS.EOF
|
|
With lstPayInfo
|
|
mintCREW = Field2Integer(oRS!crew)
|
|
Call GetCrew
|
|
strLine = oRS!pay_type & vbTab & oRS!workdone & vbTab & oRS!pct_done
|
|
strLine = strLine & vbTab & oRS!prdate
|
|
strLine = strLine & vbTab & oRS!crew & vbTab & mstrCREW
|
|
.AddItem strLine
|
|
.ItemData(.NewIndex) = Field2Long(oRS!idnum)
|
|
End With
|
|
|
|
oRS.MoveNext
|
|
Loop
|
|
oRS.Close
|
|
|
|
End Sub
|
|
|
|
Private Sub PayLoad()
|
|
Dim oRS As Recordset
|
|
Dim strSQL As String
|
|
Dim strLine As String
|
|
|
|
strSQL = "SELECT * from tblTime WHERE lot_id =" & gintLOTID
|
|
Set oRS = New Recordset
|
|
oRS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
lstPayInfo.Clear
|
|
|
|
Do Until oRS.EOF
|
|
With lstPayInfo
|
|
mintCREW = Field2Integer(oRS!crew)
|
|
Call GetCrew
|
|
strLine = oRS!pay_type & vbTab & oRS!workdone & vbTab & oRS!pct_done
|
|
strLine = strLine & vbTab & oRS!prdate
|
|
strLine = strLine & vbTab & oRS!crew & vbTab & mstrCREW
|
|
.AddItem strLine
|
|
.ItemData(.NewIndex) = Field2Long(oRS!idnum)
|
|
End With
|
|
|
|
oRS.MoveNext
|
|
Loop
|
|
oRS.Close
|
|
|
|
End Sub
|
|
Private Sub CheckPay()
|
|
Dim oRS As Recordset, oRSS As Recordset, strPAINTTYPE As String
|
|
Dim strSQL As String, intSUM As Integer, intLEN As Integer, intWSUM As Integer
|
|
Dim strLine As String, strWDONE As String, strWTYPE As String, strTYPE As String
|
|
Dim intPSUM As Integer, boolPARTIAL As Boolean, intCSUM As Integer, boolCOMPLETE As Boolean
|
|
Dim intDIFF As Integer, strMSG As String, strEPONum As String, boolWORDER As Boolean
|
|
|
|
boolCOMPLETE = False
|
|
boolPARTIAL = False
|
|
boolWORDER = False
|
|
strEPONum = ""
|
|
|
|
cboWorkType.col = 1
|
|
strWTYPE = cboWorkType.ColText
|
|
intLEN = Len(strWTYPE)
|
|
If intLEN = 0 Then
|
|
Stop
|
|
End If
|
|
|
|
If Left(Field2Str(cboCrewType), 1) = "C" Then
|
|
If strWTYPE = "R" Or strWTYPE = "W" Or strWTYPE = "Z" Or strWTYPE = "Y" _
|
|
Or strWTYPE = "YHR" Or strWTYPE = "ZHR" Then
|
|
Exit Sub
|
|
Else
|
|
MsgBox "You Have Selected an Invalid Work Type for Scaffolding - Reenter", vbOKOnly, "Invalid WOrkType"
|
|
mboolEXIT = True
|
|
Exit Sub
|
|
End If
|
|
End If
|
|
cboWorkType.col = 1
|
|
strTYPE = cboWorkType.ColText
|
|
|
|
If strTYPE = "B" Or strTYPE = "S" _
|
|
Or strTYPE = "T" Then
|
|
' If Left(Field2Str(cboWorkType), 1) = "B" Or Left(Field2Str(cboWorkType), 1) = "S" _
|
|
' Or Left(Field2Str(cboWorkType), 1) = "T" Then
|
|
If Left(Field2Str(cboCrewType), 1) = "L" Or Left(Field2Str(cboCrewType), 1) = "V" Or Left(Field2Str(cboCrewType), 1) = "C" Or Left(Field2Str(cboCrewType), 1) = "X" Then
|
|
strLine = "Invalid Work Type For Lath, Stone Veneer, Paint or Scaffolding" & vbCrLf & vbCrLf
|
|
strLine = strLine & "Select A Valid Work Type For Lath, Stone Veneer, Paint or Scaffolding And Continue"
|
|
MsgBox strLine, vbOKOnly, "Invalid WorkType"
|
|
mboolEXIT = True
|
|
Exit Sub
|
|
End If
|
|
End If
|
|
'****************Need to move the strWTYPE ="W" outside of this logic.
|
|
'****************It is causing the Complete Booleen to be triggered to soon.
|
|
|
|
If strWTYPE = "C" Or strWTYPE = "P" Then
|
|
' If strWTYPE = "C" Or strWTYPE = "P" Or strWTYPE = "W" Then
|
|
strSQL = "SELECT * from tblTime WHERE lot_id = " & gintLOTID
|
|
strSQL = strSQL & " and pay_type = '" & Left(Field2Str(cboCrewType), 1) & "'"
|
|
strSQL = strSQL & " and workdone = 'C'"
|
|
Set oRS = New Recordset
|
|
oRS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
|
|
If Not oRS.EOF Then
|
|
boolCOMPLETE = True
|
|
strSQL = "SELECT SUM(pct_done) as SUMWork FROM tblTIME WHERE Lot_id = " & gintLOTID & " and pay_type = '" & Left(Field2Str(cboCrewType), 1) & "'" & " and workdone = 'C'"
|
|
Set oRSS = New Recordset
|
|
oRSS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
intCSUM = Integer2Field(oRSS!sumwork) ' + Integer2Field(txtPercentDone)
|
|
End If
|
|
|
|
strSQL = "SELECT * from tblTime WHERE lot_id = " & gintLOTID
|
|
strSQL = strSQL & " and pay_type = '" & Left(Field2Str(cboCrewType), 1) & "'"
|
|
strSQL = strSQL & " and workdone = 'P'"
|
|
Set oRS = New Recordset
|
|
oRS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
If Not oRS.EOF Then
|
|
boolPARTIAL = True
|
|
strSQL = "SELECT SUM(pct_done) as SUMWork FROM tblTIME WHERE Lot_id = " & gintLOTID & " and pay_type = '" & Left(Field2Str(cboCrewType), 1) & "'" & " and workdone = 'P'"
|
|
Set oRSS = New Recordset
|
|
oRSS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
intPSUM = Integer2Field(oRSS!sumwork) ' + Integer2Field(txtPercentDone)
|
|
End If
|
|
End If
|
|
|
|
If strWTYPE = "W" Then
|
|
strSQL = "SELECT * from tblTime WHERE lot_id = " & gintLOTID
|
|
strSQL = strSQL & " and pay_type = '" & Left(Field2Str(cboCrewType), 1) & "'"
|
|
strSQL = strSQL & " and workdone = 'W'"
|
|
Set oRS = New Recordset
|
|
oRS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
If Not oRS.EOF Then
|
|
strEPONum = Field2Str(txtEPO)
|
|
boolWORDER = True
|
|
strSQL = "SELECT SUM(pct_done) as SUMWork FROM tblTIME WHERE Lot_id = " & gintLOTID & " and pay_type = '" & Left(Field2Str(cboCrewType), 1) & "'" & " and workdone = 'W'" & " and EPONum = '" & Field2Str(strEPONum) & "'"
|
|
Set oRSS = New Recordset
|
|
oRSS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
intWSUM = Integer2Field(oRSS!sumwork) '+ Integer2Field(txtPercentDone)
|
|
End If
|
|
|
|
End If
|
|
|
|
' If strWTYPE = "P" Then
|
|
' strSQL = "SELECT * from tblTime WHERE lot_id = " & gintLOTID
|
|
' strSQL = strSQL & " and pay_type = '" & Left(Field2Str(cboCrewType), 1) & "'"
|
|
' strSQL = strSQL & " and workdone = 'P'"
|
|
' Set oRS = New Recordset
|
|
' oRS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
' If Not oRS.EOF Then
|
|
' boolCOMPLETE = True
|
|
' strSQL = "SELECT SUM(pct_done) as SUMWork FROM tblTIME WHERE Lot_id = " & gintLOTID & " and pay_type = '" & Left(Field2Str(cboCrewType), 1) & "'" & " and workdone = 'P'"
|
|
' Set oRSS = New Recordset
|
|
' oRSS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
' intPSUM = Integer2Field(oRSS!sumwork) ' + Integer2Field(txtPercentDone)
|
|
' End If
|
|
'
|
|
' End If
|
|
|
|
strSQL = "SELECT * from tblTime WHERE lot_id = " & gintLOTID
|
|
strSQL = strSQL & " and pay_type = '" & Left(Field2Str(cboCrewType), 1) & "'"
|
|
' cboWorkType.col = 1
|
|
strSQL = strSQL & " and workdone = '" & strWTYPE & "'"
|
|
Set oRS = New Recordset
|
|
oRS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
|
|
'*******
|
|
If strWTYPE = "W" Then
|
|
intDIFF = intWSUM + Integer2Field(txtPercentDone)
|
|
If (boolWORDER) And intDIFF > 100 Then
|
|
strMSG = "You Can Only Have A Total Of 100% Combined. You " & vbCrLf & vbCrLf
|
|
strMSG = strMSG & "Already Have " & CStr(intWSUM) & "% Used For PO " & txtEPO & ". ReEnter"
|
|
MsgBox strMSG, vbOKOnly, "ReEnter"
|
|
' MsgBox "You have already done " & CStr(intCSUM) & "for COMPLETE, Only " & intDIFF & " More Than Can Be Done", vbOKOnly, "ReEnter"
|
|
mboolEXIT = True
|
|
Exit Sub
|
|
End If
|
|
End If
|
|
|
|
If oRS.EOF And Not (boolCOMPLETE Or boolPARTIAL Or boolWORDER) Then
|
|
Else
|
|
If strWTYPE = "P" Or strWTYPE = "B" _
|
|
Or strWTYPE = "C" Or strWTYPE = "S" Or strWTYPE = "T" Then
|
|
' Or strWTYPE = "C" Or strWTYPE = "S" Or strWTYPE = "T" Or strWTYPE = "W" Then
|
|
strSQL = "SELECT SUM(pct_done) as SUMWork FROM tblTIME WHERE Lot_id = " & gintLOTID & " and workdone = '" & strWTYPE & "'" & " and pay_type = '" & Left(Field2Str(cboCrewType), 1) & "'"
|
|
Set oRSS = New Recordset
|
|
oRSS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
intSUM = Integer2Field(oRSS!sumwork) + Integer2Field(txtPercentDone)
|
|
|
|
intDIFF = intCSUM + intPSUM + Integer2Field(txtPercentDone)
|
|
If (boolCOMPLETE And Not boolPARTIAL) And intDIFF > 100 Then
|
|
strMSG = "You Can Only Have A Total Of 100% Combined. You Already Have "
|
|
strMSG = strMSG & CStr(intCSUM) & " Used For COMPLETE. ReEnter"
|
|
MsgBox strMSG, vbOKOnly, "ReEnter"
|
|
' MsgBox "You have already done " & CStr(intCSUM) & "for COMPLETE, Only " & intDIFF & " More Than Can Be Done", vbOKOnly, "ReEnter"
|
|
mboolEXIT = True
|
|
Exit Sub
|
|
End If
|
|
|
|
' intDIFF = intSUM + intCSUM + intPSUM ' - Integer2Field(txtPercentDone)
|
|
If (boolPARTIAL And Not boolCOMPLETE) And intDIFF > 100 Then
|
|
strMSG = "You Can Only Have A Total Of 100% Combined. You Already Have "
|
|
strMSG = strMSG & CStr(intPSUM) & " Used For PARTIAL. ReEnter"
|
|
MsgBox strMSG, vbOKOnly, "ReEnter"
|
|
' MsgBox "You have already done " & CStr(intCSUM) & "for PARTIAL, Only " & intDIFF & " More Than Can Be Done", vbOKOnly, "ReEnter"
|
|
mboolEXIT = True
|
|
Exit Sub
|
|
End If
|
|
|
|
' intDIFF = intSUM + intCSUM + intPSUM ' - Integer2Field(txtPercentDone)
|
|
If (boolPARTIAL And boolCOMPLETE) And intDIFF > 100 Then
|
|
strMSG = "You Can Only Have A Total Of 100% Combined PARTIAL And COMPLETE. You Already Have "
|
|
strMSG = strMSG & CStr(intDIFF) & " Used For Both Types. ReEnter"
|
|
MsgBox strMSG, vbOKOnly, "ReEnter"
|
|
' MsgBox "You have already done " & CStr(intCSUM) & "for PARTIAL, Only " & intDIFF & " More Than Can Be Done", vbOKOnly, "ReEnter"
|
|
mboolEXIT = True
|
|
Exit Sub
|
|
End If
|
|
'***********Need to take the mbookWORDER out of this logic and put it in its own
|
|
'***********Make sure the message being displayed is OK
|
|
|
|
' intDIFF = intWSUM + Integer2Field(txtPercentDone)
|
|
' If (boolWORDER) And intDIFF > 100 Then
|
|
' strMSG = "You Can Only Have A Total Of 100% Combined. You Already Have "
|
|
' strMSG = strMSG & CStr(intCSUM) & " Used For PO " & txtEPO & ". ReEnter"
|
|
' MsgBox strMSG, vbOKOnly, "ReEnter"
|
|
'' MsgBox "You have already done " & CStr(intCSUM) & "for COMPLETE, Only " & intDIFF & " More Than Can Be Done", vbOKOnly, "ReEnter"
|
|
' mboolEXIT = True
|
|
' Exit Sub
|
|
' End If
|
|
|
|
If intSUM > 100 Then
|
|
cboWorkType.col = 2
|
|
MsgBox "You have already done 100% for " & cboWorkType.ColText, vbOKOnly, "ReEnter"
|
|
mboolEXIT = True
|
|
Exit Sub
|
|
End If
|
|
End If
|
|
|
|
|
|
If Left(Field2Str(cboCrewType), 1) = "S" And intLEN > 1 Then
|
|
strSQL = "SELECT SUM(pct_done) as SUMWork FROM tblTIME WHERE Lot_id = " & gintLOTID & " and workdone = '" & strWTYPE & "'"
|
|
Set oRSS = New Recordset
|
|
oRSS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
intSUM = Integer2Field(oRSS!sumwork) + Integer2Field(txtPercentDone)
|
|
If intSUM > 100 Then
|
|
cboWorkType.col = 2
|
|
MsgBox "You have already done 100% for " & cboWorkType.ColText, vbOKOnly, "ReEnter"
|
|
mboolEXIT = True
|
|
Exit Sub
|
|
End If
|
|
End If
|
|
|
|
|
|
If Left(Field2Str(cboCrewType), 1) = "X" And intLEN = 1 Then
|
|
|
|
cboWorkType.col = 2
|
|
strLine = "'" & cboWorkType.ColText & "WorkType Is Not Valid For Paint " & vbCrLf & vbCrLf
|
|
' strLine = "You Have Already Used This Work Type " & vbCrLf & vbCrLf
|
|
strLine = strLine & "Correct The Work Type And Continue"
|
|
MsgBox strLine, vbOKOnly, "Invalid WorkType"
|
|
mboolEXIT = True
|
|
End If
|
|
|
|
If Left(Field2Str(cboCrewType), 1) = "X" And intLEN > 1 And strWTYPE <> "CS" Then '10/10/2018 changed to allow multiple jobs
|
|
strSQL = "SELECT SUM(pct_done) as SUMWork FROM tblTIME WHERE Lot_id = " & gintLOTID & " and workdone = '" & strWTYPE & "'"
|
|
Set oRSS = New Recordset
|
|
oRSS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
intSUM = Integer2Field(oRSS!sumwork) + Integer2Field(txtPercentDone)
|
|
If intSUM > 100 Then
|
|
cboWorkType.col = 2
|
|
MsgBox "You have already done 100% for " & cboWorkType.ColText, vbOKOnly, "ReEnter"
|
|
mboolEXIT = True
|
|
Exit Sub
|
|
End If
|
|
' cboWorkType.col = 2
|
|
' strLine = "'" & cboWorkType.ColText & "WorkType Is Not Valid For Paint " & vbCrLf & vbCrLf
|
|
' strLine = "You Have Already Used This Work Type " & vbCrLf & vbCrLf
|
|
' strLine = strLine & "Correct The Work Type And Continue"
|
|
' MsgBox strLine, vbOKOnly, "Invalid WorkType"
|
|
' mboolEXIT = True
|
|
End If
|
|
|
|
If Left(Field2Str(cboCrewType), 1) = "A" Then
|
|
strLine = "You Have Already Used This Work Type " & vbCrLf & vbCrLf
|
|
strLine = strLine & "Correct The Work Type And Continue"
|
|
MsgBox strLine, vbOKOnly, "Invalid WorkType"
|
|
mboolEXIT = True
|
|
End If
|
|
If Left(Field2Str(cboCrewType), 1) = "C" Then
|
|
strLine = "You Have Already Used This Work Type " & vbCrLf & vbCrLf
|
|
strLine = strLine & "Correct The Work Type And Continue"
|
|
MsgBox strLine, vbOKOnly, "Invalid WorkType"
|
|
mboolEXIT = True
|
|
End If
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub CrewLoad()
|
|
Dim strSQL As String
|
|
|
|
strSQL = "SELECT * from tblcrew WHERE crew_id = " & gintCREWID
|
|
Set moRSCREW = New Recordset
|
|
moRSCREW.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
|
|
End Sub
|
|
|
|
Private Sub lstPayInfo_Click2()
|
|
If lstPayInfo.ListIndex <> -1 Then
|
|
mlngTIME = lstPayInfo.ItemData(lstPayInfo.ListIndex)
|
|
If FormFind() Then
|
|
Call FormShow
|
|
Else
|
|
txtPercentDone = "0"
|
|
txtVerify = ""
|
|
txtCrewNo = "0"
|
|
txtCrewName = ""
|
|
txtPayAmt = "0"
|
|
txtNotes = ""
|
|
cboCrewType.ListIndex = -1
|
|
cboWorkType.ListIndex = -1
|
|
End If
|
|
End If
|
|
|
|
End Sub
|
|
Private Sub GetCrew()
|
|
|
|
Dim oRS As Recordset
|
|
Dim strSQL As String, lngFind As Long
|
|
|
|
strSQL = "SELECT * from tblcrew WHERE crew_id = " & mintCREW
|
|
Set oRS = New Recordset
|
|
oRS.Open strSQL, goConn, adOpenDynamic, adLockOptimistic
|
|
|
|
If Not oRS.EOF Then
|
|
mstrCREW = oRS!Crew_Boss
|
|
End If
|
|
|
|
oRS.Close
|
|
|
|
End Sub
|
|
|
|
|
|
Private Sub lstPayInfo_DblClick()
|
|
If Not mboolAdding Then
|
|
mlngTIME = lstPayInfo.ItemData(lstPayInfo.ListIndex)
|
|
Call FormFind
|
|
Call FormShowPay
|
|
End If
|
|
If Not mboolLOOK Then
|
|
cmdSavePay.Enabled = True
|
|
End If
|
|
' If FormFind() Then
|
|
' If Not mboolAdding And Field2Str(moRSCREW!Type) = "C" Then
|
|
' Call CBFindString1(cboWorkType, Field2Str(moRSTIME!workdone))
|
|
' txtPayAmt = Field2Str2(moRSTIME!pay_amt)
|
|
' txtPercentDone = Field2Str2(moRSTIME!pct_done)
|
|
' End If
|
|
' End If
|
|
|
|
' cmdFindCrew.Visible = True
|
|
End Sub
|
|
|
|
Private Sub txtEndTime_LostFocus()
|
|
Dim intHR As Integer, intSTART As Integer, intEND As Integer, intLUNCH As Integer, intNET As Integer, strNET As String
|
|
If Len(txtEndTime) = 2 Then
|
|
intHR = (Field2Str2(txtEndTime))
|
|
ElseIf Len(txtEndTime) = 4 Then
|
|
intHR = Format(Mid(txtEndTime, 1, 2), "00")
|
|
End If
|
|
If intHR > 24 Then
|
|
MsgBox "Invalid Time, ReEnter in 24-Hour (hhmm) Format Where hh I Less Than 25", vbOKOnly, "Invalid - ReEnter"
|
|
txtEndTime.SetFocus
|
|
Else
|
|
txtEndTime = TimeFormat(txtEndTime, "END")
|
|
End If
|
|
intSTART = MinuteCalc(txtStartTime)
|
|
intEND = MinuteCalc(txtEndTime)
|
|
intLUNCH = txtLunch * 60
|
|
intNET = (intEND - intSTART - intLUNCH) ' / 60
|
|
strNET = (intEND - intSTART - intLUNCH) / 60
|
|
strNET = Format(strNET, "#0.00")
|
|
lblNetTime = strNET
|
|
End Sub
|
|
|
|
Private Sub txtFin2Rate_GotFocus()
|
|
Call FieldSelect(txtFin2Rate)
|
|
End Sub
|
|
|
|
Private Sub txtFin2Rate_LostFocus()
|
|
Call CalcPay
|
|
End Sub
|
|
|
|
Private Sub txtLunch_GotFocus()
|
|
txtLunch.SelStart = 0
|
|
txtLunch.SelLength = 7
|
|
End Sub
|
|
|
|
Private Sub txtLunch_LostFocus()
|
|
If txtLunch = "" Then
|
|
txtLunch = 0
|
|
End If
|
|
txtLunch = Format(txtLunch, "##.00")
|
|
End Sub
|
|
|
|
Private Sub txtMetalRate_GotFocus()
|
|
Call FieldSelect(txtMetalRate)
|
|
End Sub
|
|
|
|
Private Sub txtNotes_GotFocus()
|
|
Call FieldSelect(txtNotes)
|
|
End Sub
|
|
|
|
Private Sub txtNotes_LostFocus()
|
|
txtNotes = UCase(txtNotes)
|
|
End Sub
|
|
|
|
Private Sub txtPayAmt_GotFocus()
|
|
Call FieldSelect(txtPayAmt)
|
|
End Sub
|
|
|
|
Private Sub txtPayAmt_LostFocus()
|
|
If Field2Str2(txtPayAmt) <> 0 Then
|
|
Call CalcPay
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub CalcPay()
|
|
Dim dblPAYAMT As Double, strWTYPE As String, intLEN As Integer
|
|
|
|
cboWorkType.col = 1
|
|
strWTYPE = cboWorkType.ColText
|
|
intLEN = Len(strWTYPE)
|
|
|
|
If moRSCREW!Type = "L" Then
|
|
' If Not (Left(Str2Field(cboWorkType), 1) = "W" Or Left(Str2Field(cboWorkType), 1) = "R" Or chkBC = 1) Then
|
|
If mboolNOCALC Then
|
|
Else
|
|
If Not (strWTYPE = "W" Or strWTYPE = "R" Or chkBC = 1) Then
|
|
dblPAYAMT = (((Field2Str2(txtPrimRate) * Field2Str2(txtLathYds)) * Field2Str(txtPercentDone)) / 100)
|
|
dblPAYAMT = dblPAYAMT + (((Field2Str2(txtMetalRate) * Field2Str2(txtMetalFt)) * Field2Str(txtPercentDone)) / 100)
|
|
' dblPayAmt = dblPayAmt + (Field2Str2(txtFin2Rate) * Field2Str2(txtFin2))
|
|
txtPayAmt = Format(dblPAYAMT, "##,##0.00")
|
|
End If
|
|
End If
|
|
End If
|
|
|
|
If moRSCREW!Type = "V" Then
|
|
' If Not (Left(Str2Field(cboWorkType), 1) = "W" Or Left(Str2Field(cboWorkType), 1) = "R" Or chkBC = 1) Then
|
|
If mboolNOCALC Then
|
|
Else
|
|
|
|
If strWTYPE = "WH" Then
|
|
dblPAYAMT = (((Field2Str2(txtPrimRate) * 1) * Field2Str(txtPercentDone)) / 100)
|
|
txtPayAmt = Format(dblPAYAMT, "##,##0.00")
|
|
Exit Sub
|
|
End If
|
|
' End If
|
|
|
|
If Not (strWTYPE = "W" Or strWTYPE = "R" Or chkBC = 1) Then
|
|
dblPAYAMT = (((Field2Str2(txtPrimRate) * Field2Str2(txtStone)) * Field2Str(txtPercentDone)) / 100)
|
|
' dblPayAmt = dblPayAmt + (((Field2Str2(txtMetalRate) * Field2Str2(txtMetalFt)) * Field2Str(txtPercentDone)) / 100)
|
|
' dblPayAmt = dblPayAmt + (Field2Str2(txtFin2Rate) * Field2Str2(txtFin2))
|
|
txtPayAmt = Format(dblPAYAMT, "##,##0.00")
|
|
End If
|
|
End If
|
|
End If
|
|
|
|
If moRSCREW!Type = "C" Then
|
|
' If Not (Left(Str2Field(cboWorkType), 1) = "W" Or Left(Str2Field(cboWorkType), 1) = "R" Or chkBC = 1) Then
|
|
If (strWTYPE = "YHR" Or strWTYPE = "ZHR") Then
|
|
txtPayAmt = Format(Field2Str2(txtPayAmt), "##,##0.00")
|
|
ElseIf Not (strWTYPE = "W" Or strWTYPE = "R" Or chkBC = 1) Then
|
|
dblPAYAMT = (((Field2Str2(txtPrimRate) * Field2Str2(txtStone)) * Field2Str(txtPercentDone)) / 100)
|
|
' dblPayAmt = dblPayAmt + (((Field2Str2(txtMetalRate) * Field2Str2(txtMetalFt)) * Field2Str(txtPercentDone)) / 100)
|
|
' dblPayAmt = dblPayAmt + (Field2Str2(txtFin2Rate) * Field2Str2(txtFin2))
|
|
txtPayAmt = Format(dblPAYAMT, "##,##0.00")
|
|
End If
|
|
End If
|
|
|
|
If moRSCREW!Type = "S" Then
|
|
' If Left(Str2Field(cboWorkType.Text), 1) = "U" Then
|
|
If mboolNOCALC Then
|
|
Else
|
|
If strWTYPE = "EFSH" Or strWTYPE = "EFOA" Or strWTYPE = "ERAS" Or strWTYPE = "ENET" _
|
|
Or strWTYPE = "EFIN" Or strWTYPE = "EHIM" Or strWTYPE = "ESEN" Or strWTYPE = "EMPL" Or strWTYPE = "ESFL" Then
|
|
Exit Sub
|
|
End If
|
|
|
|
If strWTYPE = "WH" Then
|
|
dblPAYAMT = (((Field2Str2(txtPrimRate) * 1) * Field2Str(txtPercentDone)) / 100)
|
|
txtPayAmt = Format(dblPAYAMT, "##,##0.00")
|
|
Exit Sub
|
|
End If
|
|
|
|
If strWTYPE = "U" Then
|
|
txtPayAmt = Format((((Field2Str2(txtPrimRate) * (Field2Str2(txtCMUYds)) * Field2Str(txtPercentDone)) / 100)), "##,##0.00")
|
|
' ElseIf Not (Left(Str2Field(cboWorkType), 1) = "W" Or chkBC = 1 Or Left(Str2Field(cboWorkType), 1) = "F") Then
|
|
ElseIf Not (strWTYPE = "W" Or chkBC = 1 Or strWTYPE = "F") Then
|
|
If Field2Str(moRS!texture) = "DF" Then
|
|
dblPAYAMT = (((Field2Str2(txtPrimRate) * (Field2Str2(txtStuccoYds) - Field2Str2(txtFin2))) * Field2Str(txtPercentDone)) / 100)
|
|
dblPAYAMT = dblPAYAMT + (((Field2Str2(txtFin2Rate) * Field2Str2(txtFin2)) * Field2Str(txtPercentDone)) / 100)
|
|
txtPayAmt = Format(dblPAYAMT, "##,##0.00")
|
|
Else
|
|
dblPAYAMT = (((Field2Str2(txtPrimRate) * Field2Str2(txtStuccoYds)) * Field2Str(txtPercentDone)) / 100)
|
|
txtPayAmt = Format(dblPAYAMT, "##,##0.00")
|
|
End If
|
|
End If
|
|
End If
|
|
End If
|
|
|
|
If moRSCREW!Type = "X" Then
|
|
If mboolNOCALC Then
|
|
Else
|
|
If Not (intLEN = 1 Or chkBC = 1) Then
|
|
If strWTYPE = "SP" Or strWTYPE = "OH" Or strWTYPE = "FG1" Or strWTYPE = "FG2" Or strWTYPE = "WH" _
|
|
Or strWTYPE = "RF1" Or strWTYPE = "RF2" Or strWTYPE = "AS1" Or strWTYPE = "AS2" Or strWTYPE = "ST" Then
|
|
dblPAYAMT = (((Field2Str2(txtPrimRate) * 1) * Field2Str(txtPercentDone)) / 100)
|
|
txtPayAmt = Format(dblPAYAMT, "##,##0.00")
|
|
ElseIf strWTYPE = "BT1" Or strWTYPE = "BT2" Or strWTYPE = "FO" Or strWTYPE = "PO" Or strWTYPE = "CS" Then
|
|
txtPayAmt = txtPrimRate
|
|
Else
|
|
dblPAYAMT = (((Field2Str2(txtPrimRate) * Field2Str2(txtPaint)) * Field2Str(txtPercentDone)) / 100)
|
|
txtPayAmt = Format(dblPAYAMT, "##,##0.00")
|
|
End If
|
|
End If
|
|
End If
|
|
End If
|
|
|
|
End Sub
|
|
Private Sub txtPercentDone_GotFocus()
|
|
Call FieldSelect(txtPercentDone)
|
|
End Sub
|
|
|
|
Private Sub txtPercentDone_LostFocus()
|
|
Dim strSQL As String, strWTYPE As String
|
|
|
|
mboolEXIT = False
|
|
If cboWorkType.ListIndex = -1 Then
|
|
Exit Sub
|
|
End If
|
|
|
|
cboWorkType.col = 1
|
|
strWTYPE = cboWorkType.ColText
|
|
If Left(Field2Str(cboCrewType), 1) = "C" Then
|
|
Call CheckPay
|
|
End If
|
|
|
|
If strWTYPE = "B" Or strWTYPE = "S" _
|
|
Or strWTYPE = "T" Or strWTYPE = "C" _
|
|
Or strWTYPE = "P" Or strWTYPE = "A" Or strWTYPE = "W" Then
|
|
' If Left(Field2Str(cboWorkType), 1) = "B" Or Left(Field2Str(cboWorkType), 1) = "S" _
|
|
' Or Left(Field2Str(cboWorkType), 1) = "T" Or Left(Field2Str(cboWorkType), 1) = "C" _
|
|
' Or Left(Field2Str(cboWorkType), 1) = "P" Or Left(Field2Str(cboWorkType), 1) = "A" Then
|
|
Call CheckPay
|
|
End If
|
|
|
|
If Left(Field2Str(cboCrewType), 1) = "X" Then
|
|
Call CheckPay
|
|
End If
|
|
|
|
If strWTYPE = "EFSH" Or strWTYPE = "EFOA" Or strWTYPE = "ERAS" Or strWTYPE = "ENET" Then
|
|
Call CheckPay
|
|
End If
|
|
|
|
If strWTYPE = "EHIM" Or strWTYPE = "EFIN" Or strWTYPE = "ESEN" Or strWTYPE = "EMPL" Then
|
|
Call CheckPay
|
|
End If
|
|
|
|
If mboolEXIT Then
|
|
cboWorkType.SetFocus
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Private Sub txtPONum_GotFocus()
|
|
Call FieldSelect(txtPONum)
|
|
End Sub
|
|
|
|
Private Sub txtPrimRate_GotFocus()
|
|
Call FieldSelect(txtPrimRate)
|
|
End Sub
|
|
|
|
Private Sub FormShowPay()
|
|
Dim strWTYPE As String
|
|
Dim intLoop As Integer, strSTR As String, intLEN As Integer
|
|
|
|
mboolSHOW = True
|
|
|
|
With moRSTIME
|
|
If mboolLOOK Then
|
|
txtPrimRate = Field2Str(!yd_rate)
|
|
txtMetalRate = Field2Str(!mtl_Rate)
|
|
txtFin2Rate = Field2Str(!fin2_Rate)
|
|
End If
|
|
txtPercentDone = Field2Str(!pct_done)
|
|
txtVerify = IIf(Field2Str(!paydt) = "12:00:00 AM", "", Field2Str(!paydt))
|
|
txtCrewNo = Field2Integer(!crew)
|
|
mintCREW = Field2Integer(!crew)
|
|
Call GetCrew
|
|
txtCrewName = mstrCREW
|
|
' txtPayDate = IIf(Field2Str(!prdate) = "12:00:00 AM", "", Field2Str(!prdate))
|
|
' txtCheckNo = Field2Str(!prcheck)
|
|
txtPayAmt = Format(Field2Str(!pay_amt), "##,###.00")
|
|
txtNotes = Field2Str(!notes)
|
|
txtOffice = Field2Str(!office)
|
|
|
|
If !pay_type = "L" Then
|
|
cboCrewType.Text = "LATH"
|
|
ElseIf !pay_type = "S" Then
|
|
cboCrewType.Text = "STUCCO"
|
|
ElseIf !pay_type = "R" Then
|
|
cboCrewType.Text = "Repair/PO"
|
|
ElseIf !pay_type = "V" Then
|
|
cboCrewType.Text = "V_Stone"
|
|
ElseIf !pay_type = "C" Then
|
|
cboCrewType.Text = "C_SCAFFOLD"
|
|
ElseIf !pay_type = "X" Then
|
|
cboCrewType.Text = "X_PAINT"
|
|
ElseIf !pay_type = "W" Then
|
|
cboCrewType.Text = "WRAP"
|
|
ElseIf !pay_type = "Q" Then
|
|
cboCrewType.Text = "Q_MISC"
|
|
End If
|
|
|
|
strWTYPE = Field2Str(!workdone)
|
|
intLEN = Len(strWTYPE)
|
|
|
|
For intLoop = 0 To cboWorkType.ListCount - 1
|
|
cboWorkType.ListIndex = (intLoop)
|
|
cboWorkType.col = 1
|
|
strSTR = cboWorkType.ColText
|
|
|
|
If Trim(UCase$(strSTR)) = Trim(UCase$(strWTYPE)) Then
|
|
cboWorkType.ListIndex = intLoop
|
|
intLoop = cboWorkType.ListCount
|
|
|
|
Else
|
|
cboWorkType.ListIndex = -1
|
|
End If
|
|
Next intLoop
|
|
|
|
End With
|
|
txtLotNotes = Field2Str(moRSMemo!payroll)
|
|
|
|
' If chkLook Then
|
|
mboolSHOW = False
|
|
End Sub
|
|
|
|
Private Sub txtPrimRate_LostFocus()
|
|
If moRSCREW!Type = "S" And Field2Str2(txtFin2) > 0 Then
|
|
txtFin2Rate = txtPrimRate
|
|
End If
|
|
If moRSCREW!Type = "X" Or moRSCREW!Type = "V" Then
|
|
Call CalcPay
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub txtStartTime_GotFocus()
|
|
' FieldSelect (txtStartTime)
|
|
txtStartTime.SelStart = 0
|
|
txtStartTime.SelLength = 10
|
|
|
|
End Sub
|
|
|
|
Private Sub txtStartTime_LostFocus()
|
|
Dim intHR As Integer
|
|
If Len(txtStartTime) = 2 Then
|
|
intHR = (Field2Str2(txtStartTime))
|
|
ElseIf Len(txtStartTime) = 4 Then
|
|
intHR = Format(Mid(txtStartTime, 1, 2), "00")
|
|
End If
|
|
If intHR > 24 Then
|
|
MsgBox "Invalid Time, ReEnter in 24-Hour (hhmm) Format Where hh I Less Than 25", vbOKOnly, "Invalid - ReEnter"
|
|
txtStartTime.SetFocus
|
|
Else
|
|
txtStartTime = TimeFormat(txtStartTime, "START")
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub txtWrkDate_GotFocus()
|
|
txtWrkDate.SelStart = 0
|
|
txtWrkDate.SelLength = 10
|
|
End Sub
|
|
|
|
Private Sub txtWrkDate_LostFocus()
|
|
Dim lngPOS As Long
|
|
|
|
lngPOS = InStr(1, txtWrkDate, "/", 1)
|
|
If Not IsDate(txtWrkDate) Then
|
|
If lngPOS = 0 Then
|
|
If Len(txtWrkDate) > 0 Then
|
|
txtWrkDate = Format(txtWrkDate, "00/00/####")
|
|
If Not IsDate(txtWrkDate) Then
|
|
MsgBox "The Date You Entered is not Valid - ReEnter"
|
|
txtWrkDate.SetFocus
|
|
End If
|
|
End If
|
|
Else
|
|
MsgBox "Invalid Date Format, Enter as 12312009", , "Invalid Date - ReEnter"
|
|
txtWrkDate.SetFocus
|
|
End If
|
|
End If
|
|
|
|
End Sub
|