예제 #1
0
 /**
  * Approve/ decline adjustment
  */
 public function update()
 {
     $this->load->model('employeedisputes');
     $this->load->library('disputes');
     $this->load->helper(array('my_payday_helper'));
     $empdisputes = new Employeedisputes();
     if ($this->input->post('btndeclineadj')) {
         $this->employeedisputes->Status = 3;
     } else {
         $this->employeedisputes->Status = 2;
         $this->employeedisputes->AdjustmentAmt = $this->input->post('amount');
         $this->employeedisputes->PeriodStart = cut_off_from($this->input->post('paydays'));
         $this->employeedisputes->PeriodEnd = cut_off_to($this->input->post('paydays'));
     }
     $this->employeedisputes->Remarks = $this->db->escape($this->input->post('remarks'));
     $this->employeedisputes->AuditUser = $this->session->userdata('employeenumber');
     $this->employeedisputes->AuditDate = date('Y-m-d H:i:s');
     $this->employeedisputes->update($this->input->post('id'));
     if ($this->input->post('btnapproveadj')) {
         if ($this->input->post('adjustments') != 3) {
             $this->disputes->copy_to_adjustment($this->input->post('id'));
             if ($this->input->post('taxableamount') != 0) {
                 $this->disputes->copy_to_representation($this->input->post('id'));
             }
         } else {
             $this->disputes->copy_to_representation($this->input->post('id'));
         }
     }
     redirect('/adjustmentfinance');
 }
예제 #2
0
 /**
  * Update adjustment
  */
 public function update()
 {
     $this->load->model('employeedisputes');
     $this->load->helper('my_payday_helper');
     $this->employeedisputes->Type = $this->input->post('adjustments');
     $this->employeedisputes->DateOccurred = $this->input->post('dateoccurred');
     $this->employeedisputes->Type = $this->input->post('adjustments');
     $this->employeedisputes->PeriodStart = cut_off_from($this->input->post('paydays'));
     $this->employeedisputes->PeriodEnd = cut_off_to($this->input->post('paydays'));
     $this->employeedisputes->Remarks = $this->input->post('remarks');
     $this->employeedisputes->AuditUser = $this->session->userdata('employeenumber');
     $this->employeedisputes->AuditDate = date('Y-m-d H:i:s');
     $this->employeedisputes->update($this->input->post('id'));
     redirect('/adjustments');
 }