Пример #1
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  Os $os
  * @return \Illuminate\Http\Response
  */
 public function edit(Os $os)
 {
     $this->authorize('gerente');
     $action = 'OsController@update';
     $necessarios = ceil($os->agenda->pecas / (300 * 6));
     $inventariantes = Funcionario::getAllByCargo('inventariante')->lists('nome', 'id');
     $coordenadores = Funcionario::getAllByCargo('coordenador')->lists('nome', 'id');
     return view('operacional.os.form', compact('necessarios', 'inventariantes', 'coordenadores', 'os', 'action'));
 }
Пример #2
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  Cliente $cliente
  * @return \Illuminate\Http\Response
  */
 public function edit(Cliente $cliente)
 {
     $action = 'ClientesController@update';
     $gerentes = Funcionario::getAllByCargo('gerente')->lists('nome', 'id');
     $vendedores = Funcionario::getAllByCargo('vendedor')->lists('nome', 'id');
     $cliente->pecaEsp = $cliente->especial['pecaEsp'];
     $cliente->valorEsp = $cliente->especial['valorEsp'];
     $cliente->excedente = $cliente->especial['excedente'];
     $precos = Preco::orderBy('nome', 'asc')->lists('nome', 'id');
     return view('comercial.clientes.form', compact('cliente', 'action', 'gerentes', 'vendedores', 'precos'));
 }