Example #1
0
 function jo()
 {
     $data['pop_up'] = 0;
     $data['page_name'] = '<b>Daily Wage Payroll - Job Order</b>';
     $data['msg'] = '';
     $data['error_msg'] = '';
     // Use for office listbox
     $data['options'] = $this->options->office_options();
     $data['selected'] = $this->office_id;
     // Months
     $data['month_options'] = $this->options->month_options();
     $data['month_selected'] = Input::get('month') ? Input::get('month') : date('m');
     // Period from
     $data['days_options'] = $this->options->days_options();
     $data['period_from_selected'] = Input::get('period_from') ? Input::get('period_from') : '01';
     // Period to
     $data['days_options'] = $this->options->days_options();
     $data['days_selected'] = Input::get('period_to') ? Input::get('period_to') : '15';
     $data['year_options'] = $this->options->year_options(2009, 2020);
     //2010 - 2020
     $data['year_selected'] = date('Y');
     $this->Employee->fields = array('id', 'employee_id', 'office_id', 'lname', 'fname', 'mname', 'tax_status', 'dependents');
     $this->Employee->employment_type = 4;
     $data['rows'] = array();
     $data['pop_up_office_id'] = $this->office_id;
     $data['pop_up_period'] = 1;
     if (Input::get('op')) {
         $data['rows'] = $this->Employee->get_employee_list($this->office_id, '');
         $data['period'] = $this->period;
         $data['count_working_days'] = $this->count_working_days;
         if (Input::get('print')) {
             $data['pop_up'] = 1;
             $data['pop_up_office_id'] = $this->office_id;
             $data['pop_up_period'] = $this->period;
         }
         $j = new Jo_days();
         $j->populate($data['rows'], $this->count_working_days, $this->period);
     }
     $data['main_content'] = 'cos/jo';
     return View::make('includes/template', $data);
 }