/**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $input = Input::all();
     $products = Products::filter($input, 25);
     $types = Types::dropdownList();
     return View::make('sales.create', compact('products', 'types', 'input'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @return Response
  */
 public function edit($id)
 {
     if (!$id) {
         return Redirect::route('products.index')->with('error', 'Please Provide product id');
     }
     $product = Products::find($id);
     if (empty($product)) {
         return Redirect::route('products.index')->with('error', 'Product not found');
     }
     $types = Types::dropdownList();
     $units = Units::dropdownList();
     return View::make('products.edit', compact('product', 'types', 'units'));
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $distribution = Distributions::find($id);
     $input = Input::all();
     $products = Products::filter($input, 25);
     $types = Types::dropdownList();
     $outlets = SalesOutlets::dropdownList();
     return View::make('distributions.edit', compact('products', 'types', 'input', 'outlets'));
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $suppliers = Suppliers::dropdownList();
     $types = Types::dropdownList();
     return View::make('stocks.create', compact('suppliers', 'types'));
 }