public function reports_search(Request $request) { // dd($request); $fee_element_id = $request->fee_element_id; $search_by = $request->search_by; $data['title'] = 'Reports'; $data['accounts_menu'] = 1; $data['coa_elements'] = ChartOfAccount::where(['id_parent' => 52])->lists('item_title', 'account_code'); $data['search_dates'] = ['0' => 'Select Search Date', '1' => 'Last Week', '2' => 'Last Month', '3' => '3 Months Ago', '4' => '6 Months Ago', '5' => '1 Year Ago']; $data['result'] = 1; $data['total'] = Helper::reports_total_on_item($fee_element_id, $search_by); $data['search_item'] = FeeElement::find($fee_element_id)->first()->name; return view('accounts.reports.index', $data); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function deactivate($id) { $fee_element = FeeElement::find($id); $fee_element->status_id = 2; $fee_element->save(); return redirect('billing/fee_elements'); }