@extends('layouts.master') @section('content') @if($orders->count() == 0)
No se han realizado pedidos todavĂ­a.
@else {{Form::open([ 'method' => 'GET', ])}}
{{Form::label('ccosto','CCOSTOS')}} {{Form::number('ccosto', Input::get('ccosto'), ['class' => 'form-control', 'placeholder' => 'CCOSTOS'])}}
{{Form::label('gerencia','GERENCIA')}} {{Form::select('gerencia', [NULL => 'Todas las gerencias'] + $gerencias, Input::get('gerencia'), ['class' => 'form-control'])}}
{{Form::label('divisional_id','DIVISIONAL')}} {{Form::select('divisional_id', [NULL => 'Todas las divisionales'] + Divisional::orderBy('id')->lists('name','id'), Input::get('divisional_id'), ['class' => 'form-control'])}}
{{Form::label('until','DESDE')}} {{Form::text('since',\Carbon\Carbon::now('America/Mexico_City')->subMonths(1)->format('Y-m-d'), ['class' => 'form-control datepicker','id' => 'since' ])}}
{{Form::label('to','HASTA')}} {{Form::text('to',\Carbon\Carbon::now('America/Mexico_City')->addDay(1)->format('Y-m-d'), ['class' => 'form-control datepicker','id' => 'to' ])}}

EXCEL
{{Form::close()}}
@foreach($orders as $order) @endforeach
Gerencia Centro de costos No. pedido Comentarios Fecha de pedido Estatus Domicilio Acciones
{{$order->user->gerencia}} {{$order->user->ccosto}} {{link_to_action('AdminOrdersController@show', $order->order_id, [$order->order_id])}} {{$order->comments}} {{$order->order_date}} @if($order->status == 0) Pendiente @elseif($order->status==1) Recibido @elseif($order->status==2) Recibido incompleto. @if($complain = $order->order_complain) {{$complain->complain}} @endif @endif {{$order->user->address ? $order->user->address->domicilio : "N/A"}} @if($order->user->address ? ($order->user->address->posible_cambio != null) : false ) @endif {{Form::open(array('action' =>['AdminOrdersController@destroy',$order->order_id], 'method' => 'delete'))}} {{Form::close()}}
{{$orders->appends(Request::except('page'))->links()}}
@endif @include('admin::address.partials.change_address') {{Form::close()}} @stop @section('script') @endsection