@php
$somaTotal = 0;
$somaCredito = 0;
@endphp
@foreach($trocas as $t)
| {{$t->id}}
|
{{ $t->cliente ? $t->cliente->razao_social : 'Consumidor final' }}
|
{{ \Carbon\Carbon::parse($t->created_at)->format('d/m/Y H:i:s')}}
|
@if($t->venda())
@if($t->venda()->tipo_pagamento == '99')
@else
{{$t->venda()->getTipoPagamento($t->venda()->tipo_pagamento)}}
@endif
@endif
|
{{ $t->status ? 'Finalizado' : 'Pendente' }}
|
{{ $t->usuario->nome }}
|
{{ number_format($t->valor_total, $casasDecimais, ',', '.') }}
|
{{ number_format($t->valor_credito, 2, ',', '.') }}
|
|
@endforeach