예제 #1
0
 /**
  * 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'));
 }
예제 #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @param Request $request
  * @return Response
  */
 public function destroy($id, Request $request)
 {
     $list = SysTax::find($id);
     $list->delete();
     return redirect()->route('tax.index', compact('list'))->withMessage('Tax Rate has been Deleted')->withStatus('success');
 }