employee_invoicer_check(); $approver=$queue_approval->employee_approver_check('false'); $client_managers = new time_sheets_client_managers(); echo "
"; if (isset($_GET['menu'])) { if ($_GET['menu']=='New Client') { $this->add_client(); } if ($_GET['menu']=='Edit Client') { $this->add_client_users(); } if ($_GET['menu']=='Recurring Billing') { $this->setup_monthlies(); } if ($_GET['menu']=='New Project') { $this->NewProject(); } if ($_GET['menu']=='Edit Project') { $this->EditProject(); } if ($_GET['menu']=='view_timesheets_for_project') { $this->view_timesheets_for_project(); } } } function view_timesheets_for_project(){ $db = new time_sheets_db(); global $wpdb; $user = wp_get_current_user(); $user_id = $user->ID; $sql = "select t.timesheet_id, t.start_date, t.total_hours, invoiced, approved, EmbargoPendingProjectClose, u.display_name from {$wpdb->prefix}timesheet t join {$wpdb->users} u on t.user_id = u.ID where ProjectId = %d order by start_date, display_name"; $parms = array(intval($_GET['ProjectId'])); $timesheets = $db->get_results($sql, $parms); if ($timesheets) { echo "| Timesheet ID | Week Starting | Employee | Hours Invoiced | Is Approved | Is Invoiced | Is Embargoed |
| {$timesheet->timesheet_id} | {$start_date} | {$timesheet->display_name} | {$timesheet->total_hours} |
Client Updated.
Client Added.
Client Removed.
Client Updated.
Client Added.
Client already exists.
Access granted to client.