예제 #1
0
  <table width="100%" border="0" class="type-one" id="offices.table">
	<tr class="type-one-header">
	  <th width="2%" bgcolor="#D6D6D6">&nbsp;</th>
	  <th width="19%" bgcolor="#D6D6D6">Name</th>
	  <th width="27%" bgcolor="#D6D6D6">Position Title</th>
	  <th width="12%" bgcolor="#D6D6D6">Effectivity Date</th>
	  <th width="12%" bgcolor="#D6D6D6"><strong>Ineffectivity Date</strong></th>
	  <th width="9%" bgcolor="#D6D6D6">Amount</th>
	  <th width="12%" bgcolor="#D6D6D6">&nbsp;</th>
	  <th width="7%" bgcolor="#D6D6D6">&nbsp;</th>
	</tr>
	<?php 
$i = 0;
?>
	<?php 
$s = new Staff_entitlement_m();
?>
	<?php 
foreach ($rows as $row) {
    ?>
	<?php 
    $s->where('employee_id', $row->id);
    $s->where('additional_compensation_id', $additional_compensation_id);
    $s->get();
    if ($s->exists()) {
        $id = $s->id;
        //echo 'hehe';
    } else {
        $s->employee_id = $row->id;
        $s->additional_compensation_id = $additional_compensation_id;
        $s->effectivity_date = '';
예제 #2
0
 function get_compensation()
 {
     $s = new Staff_entitlement_m();
     $this->add_com_amount = $s->get_add_com($this->employee_id, $this->additional_compensation_id, $date = '');
     $this->total_adcom += $this->add_com_amount;
     $this->amount = $this->add_com_amount;
     $this->save_deductions_adcom($this->add_com_amount);
 }
예제 #3
0
 function edit_place($mode = '')
 {
     if ($mode == 'adcom') {
         $s = new Staff_entitlement_m();
         $s->where('id', Input::get('rowid'));
         $s->get();
         if (Input::get('colid') == 'effectivity_date') {
             $s->effectivity_date = Input::get('new');
         }
         if (Input::get('colid') == 'ineffectivity_date') {
             $s->ineffectivity_date = Input::get('new');
         }
         if (Input::get('colid') == 'amount') {
             $s->amount = Input::get('new');
         }
         $s->save();
         exit;
     }
 }
 function staff_entitlement_delete($id = '', $employee_id = '')
 {
     $di = new Staff_entitlement_m();
     $di->get_by_id($id);
     $di->delete();
     return Redirect::to('payroll/additional_compensation/staff_entitlement/' . $employee_id, 'refresh');
 }