コード例 #1
0
ファイル: report.php プロジェクト: billyriantono/ihrmis
 function headings_save($id = '')
 {
     $data['page_name'] = '<b>Save Heading</b>';
     $data['msg'] = '';
     $data['row'] = PayrollHeading::blankRecord();
     if (Input::get('op')) {
         $info = array('type' => Input::get('type'), 'line' => Input::get('line'), 'additional_compensation_id' => Input::get('additional_compensation_id'), 'deduction_id' => Input::get('deduction_id'), 'caption' => Input::get('caption'));
         $data['row'] = $row = PayrollHeading::find($id);
         if ($row === NULL) {
             PayrollHeading::insert($info);
         } else {
             PayrollHeading::where('id', '=', $id)->update($info);
         }
         return Redirect::to('payroll/report/headings');
     }
     $data['compensations'] = AdditionalCompensation::listBox($id);
     $data['deductions'] = DeductionInformation::listBox($id);
     $data['main_content'] = 'report/headings_save';
     return View::make('includes/template', $data);
 }