Esempio n. 1
0
 public function update($id)
 {
     $total = Input::get('total');
     $total = str_replace(",", ".", $total);
     $total = str_replace(".", "", $total);
     $total = substr($total, 0, -2);
     $spending = Spending::find($id);
     $spending->project_id = Auth::user()->curr_project_id;
     $spending->location_id = Auth::user()->location_id;
     $spending->employee_id = Input::get('employee_id');
     $spending->spend_date = Input::get('spend_date');
     $spending->total = $total;
     $spending->comments = Input::get('comments');
     $spending->save();
     Session::flash('message', 'Sukses mengupdate informasi Pengeluaran');
 }