/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $tags = Sys_tag::lists('text', 'id'); $crm = null; $disable = null; return view('crm.create', compact('tags', 'crm', 'disable')); }
/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $account = ['' => 'Choose an Account'] + Bankncash::DefaultApartment()->lists('account', 'id')->toArray(); $payment = ['0' => 'Select Payment Method'] + PMethod::lists('name', 'id')->toArray(); $category = Sys_cat::where('type', '=', 'Income')->lists('name', 'id')->toArray(); $tag = Sys_tag::where('type', '=', 'Income')->lists('text', 'id'); $disable = null; return view('transfer.create', compact('account', 'payment', 'category', 'tag', 'disable')); }
/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $date_created = Carbon::now(); $date_expiry = Carbon::now()->addMonth(1); $crm = ['' => 'Select Contact'] + Crm_account::lists('account', 'id')->toArray(); $stage = ['Draft' => 'Draft', 'Delivered' => 'Delivered', 'Accepted' => 'Accepted', 'Lost' => 'Lost', 'Dead' => 'Dead']; $tax = ['' => 'None'] + SysTax::lists('name', 'id')->toArray(); $tags = Sys_tag::lists('text', 'id'); $disable = null; return view('invoice.create', compact('disable', 'crm', 'stage', 'tax', 'tags', 'date_created', 'date_expiry')); }
/** * Show the form for editing the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function edit($id) { try { $list = Transaction::find($id); $account = ['' => 'Choose an Account'] + Bankncash::DefaultApartment()->lists('account', 'id')->toArray(); $payeeid = ['0' => 'Select Payee'] + Crm_account::lists('account', 'id')->toArray(); $payment = ['0' => 'Select Payment Method'] + PMethod::lists('name', 'id')->toArray(); $category = Sys_cat::where('type', '=', 'Income')->lists('name', 'id')->toArray(); $tag = Sys_tag::where('type', '=', 'Income')->lists('text', 'id'); $disable = 1; } catch (Exception $e) { return redirect()->back()->withMessage('Error Editing Expense, Possibly it is already Deleted')->withStatus('error'); } return view('expense.edit', compact('list', 'account', 'payeeid', 'payment', 'category', 'tag', 'disable')); }