public function getEdit($orden_compra_proveedor_id)
 {
     $orden_compra_proveedor = OrdenCompraProveedor::find($orden_compra_proveedor_id);
     $vendedores = Vendedor::whereStatus('Activo')->orderBy('rut')->lists('rut', 'id');
     $proveedores = Proveedor::whereStatus('Activo')->orderBy('rut')->lists('rut', 'id');
     return View::make('sgrm.ordenes_compra_empresa.edit')->with('vendedores', $vendedores)->with('proveedores', $proveedores)->with('orden_compra_proveedor', $orden_compra_proveedor);
 }
 public function getEdit($nota_venta_id)
 {
     $nota_venta = NotaVenta::find($nota_venta_id);
     $vendedores = Vendedor::whereStatus('Activo')->orderBy('rut')->lists('rut', 'id');
     $clientes = Cliente::whereStatus('Activo')->orderBy('rut')->lists('rut', 'id');
     return View::make('sgrm.notas_venta.edit')->with('vendedores', $vendedores)->with('clientes', $clientes)->with('nota_venta', $nota_venta);
 }
 public function getEdit($orden_compra_cliente_id)
 {
     $orden_compra_cliente = OrdenCompraCliente::find($orden_compra_cliente_id);
     $vendedores = Vendedor::whereStatus('Activo')->orderBy('rut')->lists('rut', 'id');
     $clientes = Cliente::whereStatus('Activo')->orderBy('rut')->lists('rut', 'id');
     return View::make('sgrm.ordenes_compra_cliente.edit')->with('vendedores', $vendedores)->with('clientes', $clientes)->with('orden_compra_cliente', $orden_compra_cliente);
 }
 public function getEdit($factura_compra_id)
 {
     $factura_compra = FacturaCompra::find($factura_compra_id);
     $estados = Estado::whereStatus('Activo')->orderBy('id', 'DESC')->lists('nombre', 'id');
     $vendedores = Vendedor::whereStatus('Activo')->orderBy('rut')->lists('rut', 'id');
     $proveedores = Cliente::whereStatus('Activo')->orderBy('rut')->lists('rut', 'id');
     return View::make('sgrm.facturas_compra.edit')->with('estados', $estados)->with('vendedores', $vendedores)->with('proveedores', $proveedores)->with('factura_compra', $factura_compra);
 }
 public function getIndex()
 {
     $vendedores_act = Vendedor::whereStatus('Activo')->orderBy('nombre')->get();
     $vendedores_inact = Vendedor::whereStatus('Inactivo')->orderBy('nombre')->get();
     return View::make('sgrm.vendedores.index')->with('vendedores_act', $vendedores_act)->with('vendedores_inact', $vendedores_inact);
 }