Example #1
0
 public function getWarehouseAll()
 {
     return View::make('goods.warehouse-all')->with('warehouse', Warehouse::all())->with('count', Warehouse::count());
 }
Example #2
0
 public function getPrint()
 {
     $warehouse = Warehouse::all();
     $users = User::where('grade', '10')->where('disable', '0')->get();
     $warehouse_name = '';
     $user_name = '';
     $prints = array();
     $count_prints = 0;
     $warehouse_id = Input::get('warehouse_id');
     $user_id = Input::get('user_id');
     if ($warehouse_id === '0' || $user_id === '0') {
         return Redirect::to('picking/print')->with('error', '仓库和业务员都需要选择!');
     }
     if ($warehouse_id && $user_id) {
         $warehouse_name = Warehouse::find($warehouse_id)->pluck('name');
         $user = User::find($user_id);
         $user_name = $user->username;
         $prints = Delivery::where('warehouse_id', $warehouse_id)->where('status', '2')->where('user_id', $user_id)->with('items', 'user')->get();
         $count_prints = count($prints);
     }
     return View::make('picking.print')->with(compact('warehouse'))->with(compact('users'))->with(compact('prints'))->with(compact('warehouse_name'))->with(compact('user_name'))->with(compact('count_prints'));
 }
Example #3
0
 public function getRecoverEmptyWarehouse($goodEmptyId)
 {
     $good_empty = GoodEmpty::find($goodEmptyId);
     $branch = Branch::find($good_empty->branch_id);
     $warehouse = Warehouse::all();
     return View::make('branch.recover-empty-warehouse')->with(compact('warehouse'))->with(compact('branch'))->with(compact('good_empty'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     $warehouses = Warehouse::all();
     return View::make('warehouse.warehouse', ['warehouses' => $warehouses]);
 }