@extends('layouts.default') @section('title', 'Valores Viagens do Mês') @section('content')

Cobranças de {{ $associado->nome . ' ' . $associado->sobrenome }} referente a {{ str_pad($mes , 2 , '0' , STR_PAD_LEFT).'/'.$ano}}

@if($isAdmin) @else @endif
@if($isAdmin) @else @endif
@if (!$isAdmin) @endif {!! Form::open(['route'=> 'viagem_juletur.detalhamento']) !!}
{!! Form::hidden('id', \Crypt::encrypt($associado->id)) !!}
{!! Form::label('mes', 'Mês:') !!} {!! Form::number('mes', $mes, ['min'=>'1', 'max'=>'12', 'class'=>'form-control']) !!}
{!! Form::label('ano', 'Ano:') !!} {!! Form::number('ano', $ano, ['min'=>'2021', 'max'=>'2190', 'class'=>'form-control']) !!}
{!! Form::submit('Buscar', ['class'=>'btn btn-primary']) !!}
{!! Form::close() !!} @if(!empty($dataReturn)) @foreach($dataReturn as $item) @endforeach @endif
Data Tipo Sentido Turno Rota Valor
{{ \Carbon\Carbon::parse($item['data'])->format('d/m/Y') }} {{ $item['tipo'] }} {{ $sentidos[$item['sentido']] ?? $item['sentido'] }} {{ $turnos[$item['turno']] ?? $item['turno'] }} {{ $item['rota'] }} {{ in_array($item['tipo'], ['Descontado do Saldo', 'Dívida Rolada Para o Mês Seguinte']) ? '' : '-' }}{{ $item['valor'] }} @if($item['tipo'] === 'Descontado do Saldo' && $isAdmin) @endif
TOTAL DEVIDO: R$ {{ $valorDevidoTotal >= 0 ? $valorDevidoTotal : '-'.$valorDevidoTotal }}
TOTAL EM CRÉDITO: R$ {{ ($associado['credito'] ?? 0) >= 0 ? $associado['credito'] : '-'.($associado['credito'] ?? 0) }}
@if($valorDevidoTotal > 0 && $isAdmin)
@endif
@if(($associado['credito'] ?? 0) > 0 && $valorDevidoTotal > 0 && $isAdmin)
@endif
@if ($isAdmin) @endif @stop @section('table-delete') "" @stop