Files
open-insight/LSL2/OIEVENT/CLICK/ATTENDANCE_SRPT1.BUTTON_1.json
2024-03-25 15:12:53 -07:00

11 lines
1.8 KiB
JSON

{
"header": {
"version": 1,
"type": "record"
},
"body": {
"record1": {
"<1>": "declare subroutine btree.extract, update_index, rlist, end_dialog\r\ndeclare subroutine activate_save_select\r\ndeclare subroutine end_dialog\r\ndeclare function msg, key_sort, utility\r\n$insert lsl_users_equ\r\n$insert msg_equates\r\n\r\nopen 'DICT.ATTENDANCE' to DictATTENDANCETable else\r\n Void = msg( '', 'Unable to open DICT.ATTENDANCE...' )\r\n return 0\r\nend\r\nATTENDANCEDateFrom = .attendance_date_from->text\r\nATTENDANCEDateThru = .attendance_date_thru->text\r\nEmployeeIds = .employee_info->array<1>\r\nSupervisorIds = .supervisor_info->array<1>\r\nShifts = .shift->text\r\n\r\n* need to convert field to value markers as the text property will \r\n* be field mark delimited if more than one is choosen\r\nconvert @fm to @vm in Shifts\r\n\r\nswap @vm:@vm with '' in EmployeeIds\r\nif EmployeeIds[-1,1] = @vm then EmployeeIds[-1,1] = ''\r\nswap @vm:@vm with '' in SupervisorIds\r\nif SupervisorIds [-1,1] = @vm then SupervisorIds [-1,1] = ''\r\n\r\nif ATTENDANCEDateFrom = '' Or ATTENDANCEDateThru = '' then\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'You must enter a date from and thru...'\r\n MsgInfo<micon$> = '!'\r\n Void = msg( '', MsgInfo )\r\n return 0\r\nend\r\n\r\nBegDteNum = Iconv(ATTENDANCEDateFrom,'D')\r\nEndDteNum = Iconv(ATTENDANCEDateThru,'D')\r\nDteDifNum = EndDteNum - BegDteNum\r\nIf DteDifNum < 0 Then\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'Date From can not be greater than Date Thru...'\r\n MsgInfo<micon$> = '!'\r\n Void = msg( '', MsgInfo )\r\n return 0\r\nend\r\n\r\nend_dialog( @window, ATTENDANCEDateFrom:'*':ATTENDANCEDateThru:'*':EmployeeIds:'*':SupervisorIds:'*':Shifts )\r\n\r\nreturn 0\r\n"
}
}
}