do_timesheet_payroll(); } if ($_GET['page'] == "invoice_timesheet") { $entry->do_timesheet_invoicing(); } if ($_GET['page'] == "approve_timesheet") { $this->do_timesheet_approval_processing(); } } elseif ($_GET['action'] == "split2") { if ($_GET['page'] == "approve_timesheet") { $this->do_timesheet_split(); } } else { if ($_GET['page'] == "payroll_timesheet") { $entry->do_timesheet_rejectpayroll(); } if ($_GET['page'] == "invoice_timesheet") { $entry->do_timesheet_rejectinvoicing(); } } } } function do_timesheet_approval_processing() { global $wpdb; $db = new time_sheets_db(); $user_id = get_current_user_id(); $timesheets = $this->return_approval_list(); if ($timesheets) { foreach ($timesheets as $timesheet) { $objname = "sheet_{$timesheet->timesheet_id}"; $value = $_GET[$objname]; if ($value == "approve") { $this->do_timesheet_approval($timesheet->timesheet_id); } if ($value == "reject") { $this->do_timesheet_rejectapproval($timesheet->timesheet_id); } } } echo "
Timesheet(s) updated.
Email to {$to} queued.
Timesheet has been split.
| "; $this->show_approval_list(); echo " | "; $this->show_clients_on_retainer(); echo " |
| "; $this->show_invoicing_list(); echo " | "; $this->show_clients_on_retainer(); echo " |
| "; $this->show_payroll_list(); echo " |
| Client Name | Number of Hours | Hourly Rate on Retainer | Notes |
| {$client->ClientName} | {$client->MonthlyHours} | $ {$client->HourlyRate} | {$this->remove_br($client->Notes)} |
| Client Name | Notes |
| {$client->ClientName} | {$this->remove_br($client->Notes)} |
| Client Name | Project Name | Notes |
| {$client->ClientName} | {$client->ProjectName} | {$this->remove_br($client->notes)} |
Timesheet has been rejected.
Timesheet has been rejected.
Timesheets have been updated.
Timesheet(s) have been updated.
This project has run over on hours. Please inform management that a new SOW may be required.
The week start date is required.
The client name is required.
Hours for each day are required.
No Project Was Selected. A project must be selected. If no projects are available contact your lead.
Timesheet updated.
Timesheet saved.
Client may be over their retainer hours for this month. Please ensure that client approves of hours over their monthly retainer of {$client->MonthlyHours} hours if they do not have an active SOW in place.
| Time Sheet | Approved | Week Completed | Start Date | Client Name | Project Name |
| {$timesheet->timesheet_id} | ";
if ($timesheet->approved==1) {
echo " | ";
if ($timesheet->marked_complete_by) {
echo " | "; echo date("Y-m-d", strtotime($timesheet->start_date)); echo " | {$timesheet->client_name} | {$timesheet->ProjectName}"; } echo " |