Esempio n. 1
0
    <th width="7%">Loan Gross</th>
    <th width="9%">Months to Pay</th>
    <th width="9%">Monthly Due</th>
    <th width="9%">Start</th>
    <th width="10%">End</th>
    <th width="12%">Status</th>
    <th width="27%">Actions</th>
  </tr>
  <?php 
foreach ($deductions as $deduction) {
    ?>
  		<?php 
    $bg = $this->Helps->set_line_colors();
    ?>
        <?php 
    $d = new Deduction_information();
    $d->get_by_id($deduction->deduction_information_id);
    // Get agency
    $agency = new Deduction_agency();
    $agency->get_by_id($d->deduction_agency_id);
    //var_dump( $d->deduction_agency_id);
    ?>
      <tr bgcolor="<?php 
    echo $bg;
    ?>
" onmouseover="this.bgColor = '<?php 
    echo $this->config->item('mouseover_linecolor');
    ?>
';" 
    onmouseout ="this.bgColor = '<?php 
    echo $bg;
Esempio n. 2
0
 function loan_save($id = '', $employee_id = '')
 {
     $data['page_name'] = '<b>Save Loan Schedule</b>';
     $data['employee_id'] = $employee_id;
     $data['msg'] = '';
     $di = new Deduction_loan();
     $data['deduction'] = $di->get_by_id($id);
     if (Input::get('op')) {
         // Add employee id if insert only
         if ($id == 0) {
             $di->employee_id = $employee_id;
         }
         $di->deduction_information_id = Input::get('deduction_information_id');
         $di->date_loan = Input::get('date_loan');
         $di->loan_gross = Input::get('loan_gross');
         $di->months_pay = Input::get('months_pay');
         $di->monthly_pay = Input::get('monthly_pay');
         $di->date_from = Input::get('date_from');
         $di->date_to = Input::get('date_to');
         $di->status = Input::get('status') ? Input::get('status') : 'inactive';
         $di->save();
         return Redirect::to('payroll/deduction/loan/' . $employee_id, 'refresh');
     }
     $d = new Deduction_information();
     $d->order_by('desc');
     $d->where('type', 'loan');
     $data['informations'] = $d->get();
     $data['main_content'] = 'deduction/loan/loan_save';
     return View::make('includes/template', $data);
 }
Esempio n. 3
0
?>
  <tr>
    <td></td>
    <td></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
   <?php 
foreach ($agencies as $agency) {
    ?>
		<?php 
    // Lets count info per agency
    $d = new Deduction_information();
    $infos = $d->get_by_deduction_agency_id($agency->id);
    ?>
        
        <?php 
    foreach ($infos as $info) {
        ?>
        	<td></td>
        <?php 
    }
    ?>
        
        <?php 
    if (!$infos->exists()) {
        ?>
        <td></td>
Esempio n. 4
0
 function get_deduction()
 {
     $this->amount = 0;
     $d = new Deduction_information();
     $d->get_by_id($this->deduction_id);
     if ($d->type == 'tax') {
         $this->amount = $this->get_tax();
     } else {
         if ($d->type == 'premiums') {
             if ($d->reference_table != '') {
                 $CI =& get_instance();
                 if ($d->er_share == 'yes') {
                     $this->share = 'employer_share';
                 } else {
                     $this->share = 'employee_share';
                 }
                 // Phil Health
                 if ($d->reference_table == 'philhealth') {
                     // Lets check if Employer Share or not
                     $this->amount = $this->phil_health_deductions();
                 }
                 // Pagibig
                 if ($d->reference_table == 'pagibig') {
                     $this->amount = $this->pagibig_gsis_deductions($d->amount);
                 }
                 // GSIS
                 if ($d->reference_table == 'gsis') {
                     $this->amount = $this->pagibig_gsis_deductions($d->amount, 'gsis');
                 }
             }
         } else {
             if ($d->type == 'loan') {
                 $this->amount = $this->loan_deductions();
             }
         }
     }
 }