Dim wp as WEBUtilities
Set wp = New WEBUtilities
Function DisplayBulkApprove(FormName, EmpList, CreatorEmpNo, Errors) _
As String
'Returns bulk Timecard approval page
Dim s As String
Dim RowCells As String 'number of cells in row
Dim TheList As String
RowCells = "18"
RoadMap = ""
Call wp.FormStart(FormName, "BulkReview") 'start the form
Call wp.TableStart("1", "0", "0", "100%", wp.Color("", Color_Manila))
'start table of Timecards
Call wp.RowStart
s = "Bulk Timecard Approval Screen. <FONT color=red " + _
"face=Arial>No Timecard changes may be made from this " + _
"screen; only approvals and rejections."
Call wp.Cell("center", 1, RowCells, "", "", wp.Font(2, "Arial", "", _
wp.Stroke("strong", s)))
Call wp.RowEnd
Call DisplayBulkApprove_Buttons(RowCells) 'do pushbuttons
Call wp.RowStart
s = "Use the checkboxes at the right for specific line actions. " + _
"Click on an appropriate button to process everything that " + _
"is marked. Please click the "All Done ..." button " + _
"when finished so we can close this session gracefully."
Call wp.Cell("center", 1, RowCells, "", "", wp.Font(2, "Arial", "", _
wp.Stroke("strong", s)))
Call wp.RowEnd
Call DisplayBulkApprove_Header 'top of the card
TheList = EmpList
While TheList <> ""
'build timecard display for each entry in emplist
Call DisplayBulkApprove_Card(CSV.StringFrom(TheList), Invalids, _
CreatorEmpNo, RowCells)
Wend
Call wp.RowStart
Call wp.Cell("", 1, RowCells, "", "", wp.Font(2, "", "", _
wp.Stroke("strong", "Reject Reason" + _
wp.TBox(80, "Reason", "", "Enter your reason for " + _
"rejecting charges; 80 characters. This reason " + _
"will be applied to all rejected lines"))))
Call wp.RowEnd
Call wp.TableEnd
Call wp.FormEnd 'complete the form
DisplayBulkApprove = wp.WebPage 'send back the completed page
End Function
Private Sub DisplayBulkApprove_Buttons(RowCells)
'Creates HTML for Bulk Approve buttons
Dim s As String
s = wp.Button("Process", "Process Inputs", _
"Click to process Approvals/Rejections you have " + _
"marked") + vbCrLf + _
wp.Button("ApproveAll", "Approve All", _
"Click to approve all Timecard entries in this " + _
"display") + vbCrLf + _
wp.Button("UnApproveAll", "Unapprove All", _
"Click to unapprove/retract your approval of this " + _
"entire list of Timecard entries") + vbCrLf + _
wp.Button("RejectAll", "Reject All", _
"Click to reject all Timecard enties in this " + _
"display. The reason you supply below will be " + _
"applied to all entries.") + vbCrLf + _
wp.Button("Return", "Back To Selections", "Click to go back " + _
"to make a new selection of timecards/employees") + _
vbCrLf + _
wp.Button("Done", "All Done for Now", "Click to end this session")
Call wp.RowStart
Call wp.Cell("center", 1, RowCells, "", "", s)
Call wp.RowEnd
End Sub
Private Sub DisplayBulkApprove_Card(EmpNo, Invalids, CreatorEmpNo, _
RowCells)
'Creates HTML to display one timecard for Bulk Approve display
Dim Row As Integer
Call tc.LoadEmployee(Unit, EmpNo, True) 'load employee data
dbRecs = tc.LoadTimecard 'Get charge records from database
If dbRecs > 0 Then
For Row = 1 To dbRecs
Call tc.GetRow(ChargeRow, Row) 'get a row of data
Call ChargeRowToCharges(Row) 'store into array of charges
Call wp.RowStart
Call DisplayBulkApprove_Row(Row, Invalids, RowCells) 'display row
Call wp.RowEnd
Next 'Row
Call DisplayBulkApprove_Totals 'do the totals
End If
End Sub
Private Sub DisplayBulkApprove_Header()
'Create HTML for Bulk Approve Header
Const st = "strong"
Const ct = "center"
Call wp.RowStart
Call wp.Cell(ct, 1, 1, "", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "Emp No")))
Call wp.Cell(ct, 1, 1, "20%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "Employee Name")))
Call wp.Cell(ct, 1, 1, "2%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "OK?")))
Call wp.Cell(ct, 1, 1, "7%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "MJO Pool")))
Call wp.Cell(ct, 1, 1, "7%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "ProjSact")))
Call wp.Cell(ct, 1, 1, "6%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "Task")))
Call wp.Cell(ct, 1, 1, "3%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "EOC")))
Call wp.Cell(ct, 1, 1, "7%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "BillCD Org")))
Call wp.Cell(ct, 1, 1, "7%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "Sat")))
Call wp.Cell(ct, 1, 1, "7%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "Sun")))
Call wp.Cell(ct, 1, 1, "7%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "Mon")))
Call wp.Cell(ct, 1, 1, "7%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "Tue")))
Call wp.Cell(ct, 1, 1, "7%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "Wed")))
Call wp.Cell(ct, 1, 1, "7%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "Thu")))
Call wp.Cell(ct, 1, 1, "7%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "Fri")))
Call wp.Cell(ct, 1, 1, "8%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "Total")))
Call wp.Cell(ct, 1, 1, "2%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "OT")))
Call wp.Cell(ct, 1, 1, "2%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "SFT")))
Call wp.Cell(ct, 1, 1, "2%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "Rej")))
Call wp.Cell(ct, 1, 1, "2%", "", wp.Font(2, "Arial", "", _
wp.Stroke(st, "App")))
Call wp.RowEnd
End Sub
|