Example #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function edit($id)
 {
     $receipt = Receipt::find($id);
     $suppliers = Supplier::all()->lists('name', 'id');
     $commodities = Commodity::all()->lists('name', 'id');
     return view('receipt.edit')->with('receipt', $receipt)->with('commodities', $commodities)->with('suppliers', $suppliers);
 }
Example #2
0
 private function firstRun()
 {
     $suppliers = Supplier::all();
     foreach ($suppliers as $supplier) {
         $new = Supplier::find($supplier->id);
         $new->id = Supplier::get_uid();
         $new->save();
     }
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     if (Session::get('level') == '1' || Session::get('level') == '2' && Session::get('fingerprint') == md5($_SERVER['HTTP_USER_AGENT'] . $_SERVER['REMOTE_ADDR'])) {
         $data = Supplier::all();
         $type = DB::table('sp_type')->select(DB::raw('type_code, type_name'))->get();
         $type_name = [];
         foreach ($type as $key => $value) {
             $type_name[$value->type_code] = $value->type_name;
         }
         $unit = DB::table('sp_unit')->select(DB::raw('id, unit_name'))->get();
         $unit_name = [];
         foreach ($unit as $key => $value) {
             $unit_name[$value->id] = $value->unit_name;
         }
         return View::make('supplier.create', array('data' => $data, 'type' => $type_name, 'unit' => $unit_name));
     } else {
         return Redirect::to('/');
     }
 }
 /**
  * Show view to create a new consumable minimum level
  *
  * @return $this
  */
 public function create()
 {
     $this->authorize('edit_consumable_minimum_levels');
     return view('warehouse.consumables_minimum_levels.create')->with(['suppliers' => Supplier::all()->sortBy('supplier_company_name')]);
 }
 public function save(Request $request)
 {
     $supplier = Supplier::create($request->all());
     $suppliers = Supplier::all();
     return view('pages.suppliers', ['suppliers' => $suppliers]);
 }
 /**
  * Goto Edit Inventory page
  * GET /inventory/(id)/edit
  *
  * @return View
  */
 public function edit(Inventory $item)
 {
     $suppliers = Supplier::all();
     // Create Navigation for Next and Previous Tool
     $navigate = $item->getNextPrev();
     return view('inventory.edit', compact('item', 'suppliers', 'navigate'));
 }
 public function index()
 {
     $suppliers = Supplier::all();
     return view('data.suppliers', compact('suppliers'));
 }
 /**
  * O método precisa informar uma lista de estoques
  * @return {view}
  */
 public function create()
 {
     $supplier = Supplier::all();
     return view('pages.new_product', ['suppliers' => $supplier]);
 }
 public function add()
 {
     $supplierList = Supplier::all();
     $atkList = Atk::all();
     return view('pengadaan.add', ['supplierList' => $supplierList, 'atkList' => $atkList]);
 }
 /**
  * Show edit for for the specified group
  *
  * @param Material $material
  * @return $this
  */
 public function edit(Material $material)
 {
     $this->authorize('view_material');
     return view('raw_material.material.edit')->with(['material' => $material, 'suppliers' => Supplier::all()->sortBy('supplier_company_name'), 'grades' => MaterialGrade::all()->sortBy('mat_grade'), 'logistics' => Logistics::all()->sortBy('logistic_destination')]);
 }
 public function index()
 {
     $allSupplier = Supplier::all();
     return view('supplier.index', ['supplierList' => $allSupplier]);
 }
 public function index()
 {
     return ['status' => 'success', 'suppliers' => Supplier::all()];
 }
Example #13
0
 /**
  * Show edit for for the specified ink
  *
  * @param Ink $ink
  * @return $this
  */
 public function edit(Ink $ink)
 {
     $this->authorize('view_ink');
     return view('raw_material.ink.edit')->with(['ink' => $ink, 'suppliers' => Supplier::all()->sortBy('supplier_company_name')]);
 }