@extends('adminlte.app') @section('content')

Faturas

@if ($message = Session::get('success'))

{{ $message }}

@endif @if ($message = Session::get('danger'))

{{ $message }}

@endif
Faturas Cadastradas
@if($permissao->importar_faturas) @endif
@csrf
Filtros
@if($permissao->exibir_todas_faturas)
@endif
{{--
--}}
{{ $clientes->onEachSide(5)->links() }}

{{--
{{ $grupo->onEachSide(5)->links() }}
--}}
{{-- --}} @if($permissao->exibir_todas_faturas) @endif @foreach($clientes as $key => $cliente) @if (is_array($cliente)) @if($permissao->exibir_todas_faturas) @endif @foreach ($cliente as $k => $cli) @if($k != 'total' && $k != 'id') @if($permissao->exibir_todas_faturas) @endif @endif @endforeach @else @if(!$cliente->grupo_cliente_id) @if($permissao->exibir_todas_faturas) @endif @endif @endif @endforeach
Ações
Nome Cliente
ValorMvalorVencidoGestor
{{ $key }} {{ number_format($cliente['total'], 2, ',','.') }}
@if($cli->email_cliente) {{--
@csrf
--}} @endif
@if($cli->nome_cliente=="") Cliente Não encontrado @else {{ $cli->nome_cliente }} @endif {{ number_format($cli->total, 2, ',', '.') }} {{ $cli->vencido }}
{{-- --}} @if($permissao->exibir_todas_faturas) @endif {{-- @foreach ($faturas->sortByDesc('dt_vencimento') as $item) --}} @foreach ($cli->faturas->sortBy('dt_vencimento') as $item) @if($item->origem == "IM" and isset($item->cliente_im->nome)) @elseif($item->origem =="TFUEL" and isset($item->cliente_tfuel->nome)) @else @endif {{----}} @if ( $item->status!="PPago" && $item->status!="Pagas") @if($item->dt_vencimento < \Carbon\Carbon::now()) @else @endif @else @endif @if ($cli->sinistro == "Sim") @else @endif @if($permissao->exibir_todas_faturas) @if($item->origem == "IM" and isset($item->cliente_im->gestor_user->name)) @elseif($item->origem =="TFUEL" and isset($item->cliente_tfuel->gestor_user->name)) @else @endif @endif @endforeach
Ações Canal
Nome Cliente
Fatura ValorMvalorEmissão Vencimento Idade Vencido Atraso StatusGestorComprovativo Promessa de Pagamento Anexo Promessa Fase Sinistrado
@if($item->status != "Paga") @endif {{ $item->canal->nome_canal }}{{ $item->cliente_im->nome }}{{ $item->cliente_tfuel->nome }}Cliente Não encontrado{{ $item->num_documento }} {{ number_format($item->valor_total, 2, ',', '.') }} Perguntar o que é mvalor, se é calculado {{ date('d/m/Y', strtotime($item->dt_emissao)) }} {{ date('d/m/Y', strtotime($item->dt_vencimento)) }} {{ \Carbon\Carbon::now()->diffInDays($item->dt_emissao) }} Sim Não @if ( $item->status!="PPago" && $item->status!="Pagas") @if(\Carbon\Carbon::parse($item->dt_vencimento)->diffInDays(null, false) < 1) @elseif(\Carbon\Carbon::parse($item->dt_vencimento)->diffInDays(null, false) < 30) @else @endif {{ \Carbon\Carbon::parse($item->dt_vencimento)->diffInDays(null, false) }} {{-- @if(\Carbon\Carbon::now()->diffInDays($item->dt_vencimento) < 1) --}} {{-- {{ \Carbon\Carbon::now()->diffInDays($item->dt_vencimento) }} --}} @else @endif Sinistrado status == "Paga") class="bg-success" @elseif ($item->status == "PPago") style="background-color: #ffc000;" @elseif($item->status == "Promessa de PagamentoV") class="bg-danger" @endif> {{ $item->status }} {{ $item->cliente_im->gestor_user->name }}{{ $item->cliente_tfuel->gestor_user->name }}
@if($item->comprovante_pagamento and $item->comprovante_pagamento != "noimage.png" ) @endif @if($item->comprovante_extra1 and $item->comprovante_extra1 != "noimage.png" ) @endif @if($item->comprovante_extra2 and $item->comprovante_extra2 != "noimage.png" ) @endif @if($item->comprovante_extra3 and $item->comprovante_extra3 != "noimage.png" ) @endif
{{ date('d/m/Y', strtotime($item->data_promessa_pagamento)) }} {{ $item->cheque_transferencia }} {{ $cli->fase_sinistrado }}
@if($cliente->email_cliente) {{--
@csrf
--}} @endif
@if($cliente->nome_cliente=="") Cliente Não encontrado @else {{ $cliente->nome_cliente }} @endif {{ number_format($cliente->faturas->sum('valor_total'), 2, ',', '.') }} {{ $cliente->vencido }}
{{-- --}} @if($permissao->exibir_todas_faturas) @endif @foreach ($cliente->faturas as $item) @if($item->origem == "IM" and isset($item->cliente_im->nome)) @elseif($item->origem =="TFUEL" and isset($item->cliente_tfuel->nome)) @else @endif {{----}} @if ( $item->status!="PPago" && $item->status!="Pagas") @if($item->dt_vencimento < \Carbon\Carbon::now()) @else @endif @else @endif @if ($cliente->sinistro == "Sim") @else @endif @if($permissao->exibir_todas_faturas) @if($item->origem == "IM" and isset($item->cliente_im->gestor_user->name)) @elseif($item->origem =="TFUEL" and isset($item->cliente_tfuel->gestor_user->name)) @else @endif @endif @endforeach
Ações Canal
Nome Cliente
Fatura ValorMvalorEmissão Vencimento Idade Vencido Atraso StatusGestorComprovativo Promessa de Pagamento Anexo Promessa Fase Sinistrado
@if($item->status != "Paga") @endif {{ $item->canal->nome_canal }}{{ $item->cliente_im->nome }}{{ $item->cliente_tfuel->nome }}Cliente Não encontrado{{ $item->num_documento }} {{ number_format($item->valor_total, 2, ',', '.') }} Perguntar o que é mvalor, se é calculado {{ date('d/m/Y', strtotime($item->dt_emissao)) }} {{ date('d/m/Y', strtotime($item->dt_vencimento)) }} {{ \Carbon\Carbon::now()->diffInDays($item->dt_emissao) }} Sim Não @if ( $item->status!="PPago" && $item->status!="Pagas") @if(\Carbon\Carbon::parse($item->dt_vencimento)->diffInDays(null, false) < 1) @elseif(\Carbon\Carbon::parse($item->dt_vencimento)->diffInDays(null, false) < 30) @else @endif {{ \Carbon\Carbon::parse($item->dt_vencimento)->diffInDays(null, false) }} {{-- @if(\Carbon\Carbon::now()->diffInDays($item->dt_vencimento) < 1) --}} {{-- {{ \Carbon\Carbon::now()->diffInDays($item->dt_vencimento) }} --}} @else @endif Sinistrado status == "Paga") class="bg-success" @elseif ($item->status == "PPago") style="background-color: #ffc000;" @elseif($item->status == "Promessa de PagamentoV") class="bg-danger" @endif> {{ $item->status }} {{ $item->cliente_im->gestor_user->name }}{{ $item->cliente_tfuel->gestor_user->name }}
@if($item->comprovante_pagamento and $item->comprovante_pagamento != "noimage.png" ) @endif @if($item->comprovante_extra1 and $item->comprovante_extra1 != "noimage.png" ) @endif @if($item->comprovante_extra2 and $item->comprovante_extra2 != "noimage.png" ) @endif @if($item->comprovante_extra3 and $item->comprovante_extra3 != "noimage.png" ) @endif
@if($item->data_promessa_pagamento) {{ date('d/m/Y', strtotime($item->data_promessa_pagamento)) }} @endif {{ $item->cheque_transferencia }} {{ $cliente->fase_sinistrado }}
{{--
{{ $grupo->onEachSide(5)->links() }}
--}}
{{ $clientes->onEachSide(5)->links() }}
{{-- fim modal --}} @endsection