Exemplo n.º 1
0
            $retval = $ts->generateTimesheetRows($emp, $startStamp, $numberOfDays, null, 0, false, true);
            $output .= $retval[1];
            if ($ts->determineIfItemIsInLockRangeByDateStamp($startStamp, $emp)) {
                $output .= $ts->generateTableFooter(true, $retval[2], $retval[3], $retval[4], $retval[5], $ts->determineIfItemIsInLockRangeByDateStamp($startStamp, $emp));
            } else {
                $output .= $ts->generateTableFooter(false, $retval[2], $retval[3], $retval[4], $retval[5], $ts->determineIfItemIsInLockRangeByDateStamp($startStamp, $emp));
            }
            $output .= $ts->generateTotalRowCount($retval[0]);
        }
        $T->set_var('approval_rows', $output);
        $T->set_var('approval_all_table_style', 'display:none');
        $T->set_var('approved_by', $_USER['uid']);
        $T->set_var('userinformation_table_style', '');
        //using $emp, we generate the top information table
        $T->set_var('emp_sup', $ts->getUserFullName($ts->getSupervisorUID($emp)));
        $T->set_var('emp_number', $ts->getEmployeeNumber($emp));
        $T->set_var('emp_name', $ts->getUserFullName($emp));
    } else {
        //show as line items
        $output = $ts->generateApprovalTimesheetRows($uid, $emp, false, $hideapproved);
        $T->set_var('approval_rows', $output[1]);
        $T->set_var('approval_all_table_style', '');
        $T->set_var('userinformation_table_style', 'display:none;');
    }
} else {
    //all timesheets that this user can see
    if ($sup > 0) {
        $output = $ts->generateApprovalTimesheetRows($sup, 0, false, $hideapproved, true);
    } else {
        $output = $ts->generateApprovalTimesheetRows($uid, 0, false, $hideapproved, false);
    }