function adcom_options($e = '')
{
    $options = array();
    $d = new Additional_compensation_m();
    $d->order_by('name');
    $rows = $d->get();
    //$options[''] = '---ALL---';
    foreach ($rows as $row) {
        $options[$row->id] = $row->code;
    }
    return $options;
}
Esempio n. 2
0
  <tr class="type-one-header">
    <th width="4%">ID</th>
    <th width="20%">Additional Compensation</th>
    <th width="9%">Start</th>
    <th width="10%">End</th>
    <th width="12%">Amount</th>
    <th width="27%">Actions</th>
  </tr>
  <?php 
foreach ($deductions as $deduction) {
    ?>
  		<?php 
    $bg = $this->Helps->set_line_colors();
    ?>
        <?php 
    $d = new Additional_compensation_m();
    $d->get_by_id($deduction->additional_compensation_id);
    ?>
      <tr bgcolor="<?php 
    echo $bg;
    ?>
" onmouseover="this.bgColor = '<?php 
    echo $this->config->item('mouseover_linecolor');
    ?>
';" 
    onmouseout ="this.bgColor = '<?php 
    echo $bg;
    ?>
';">
        <td><?php 
    echo $deduction->id;
Esempio n. 3
0
 function staff_entitlement_save($id = '', $employee_id = '')
 {
     $data['page_name'] = '<b>Save Staff Entitlement</b>';
     $data['msg'] = '';
     $di = new Staff_entitlement_m();
     $data['deduction'] = $di->get_by_id($id);
     $data['employee_id'] = $employee_id;
     if (Input::get('op')) {
         // Add employee id if insert only
         if ($id == 0) {
             $di->employee_id = $employee_id;
         }
         $di->additional_compensation_id = Input::get('additional_compensation_id');
         $di->effectivity_date = Input::get('effectivity_date');
         $di->ineffectivity_date = Input::get('ineffectivity_date');
         $di->amount = Input::get('amount');
         $di->save();
         return Redirect::to('payroll/adcom/staff_entitlement/' . $employee_id, 'refresh');
     }
     $d = new Additional_compensation_m();
     $d->order_by('name');
     //$d->where('type', 'loan');
     $data['informations'] = $d->get();
     //echo $this->db->last_query();
     $data['main_content'] = 'adcom/staff/staff_entitlement_save';
     return View::make('includes/template', $data);
 }