@extends('default.layout',['title' => 'Pedidos']) @section('content')
@if(sizeof($mesasFechadas) > 0)
Mesas com pedido de fechamento:
@foreach($mesasFechadas as $m) Ver {{$m->mesa->nome}} @endforeach
@endif @if(sizeof($mesasParaAtivar) > 0)

Mesas a serem ativadas:

@foreach($mesasParaAtivar as $m) Ativar {{$m->mesa->nome}} @endforeach
@endif


@if(count($pedidos) > 0)
Comandas em verde já finalizadas
@foreach($pedidos as $p)
COMANDA: @if($p->comanda == '') Atribuir comanda


@else {{$p->comanda}} @endif
Total: R$ {{ __moeda($p->somaItems())}}
Horário Abertura: {{ \Carbon\Carbon::parse($p->data_registro)->format('H:i')}}
Total de itens: {{ count($p->itens) }}
Itens Pendentes: {{ $p->itensPendentes() }}
Mesa: @if($p->mesa != null) {{$p->mesa->nome}} @else AVULSA setar @endif
Cliente: @if($p->cliente != null) {{$p->cliente->razao_social}} {{$p->cliente->cpf_cnpj}} @else -- @endif
@if($p->referencia_cliete != '')
Mesa QrCode
@else

@endif
@endforeach
@else

Nenhuma comanda aberta!

{{-- Abrir Comanda --}} @endif
@section('js') @endsection @include('modals._abrir_comanda', ['not_submit' => true]) @include('modals._clientePedido', ['not_submit' => true]) @include('modals._setar_mesa', ['not_submit' => true]) @endsection