@foreach ($accounts as $item) @endforeach @php $accounts = $accounts->where('status', '<>', 'Cancelado') @endphp
# @if ($type == 'receipts') Receber de @else Pagar a @endif Documento Celular Centro de Custo Forma Pgto Parcela Vencimento Descrição @if ($type == 'receipts') Valor a Receber @else Valor a Pagar @endif Data do Pagamento @if ($type == 'receipts') Valor Recebido @else Valor Pago @endif Total curso
{{ $loop->iteration }} {{ $item->person->full_name }} {{ $item->person->document ? $item->person->document_with_mask : '' }} {{ $item->person->cell_phone }} {{ $item->cost_center ? $item->cost_center->name : '' }} {{ $item->payment_mode->name }} {{ $item->parcel . '/' . $item->total_installments }} {{ date('d/m/Y', strtotime($item->due_date)) }} {{ $item->description }} @if ($item->status !== 'Cancelado') @if ($type == 'receipts') {{ number_format($item->value_to_receivable, 2, ',', '.') }} @else {{ number_format($item->value_to_pay, 2, ',', '.') }} @endif @else 0,00 @endif {{ $item->payment_date ? date('d/m/Y', strtotime($item->payment_date)) : '' }} @if ($item->status !== 'Cancelado') @if ($type == 'receipts') {{ number_format($item->value_received, 2, ',', '.') }} @else {{ number_format($item->value_paid, 2, ',', '.') }} @endif @else 0,00 @endif {{ number_format($item->price, 2, ',', '.') }}
Total do período: @if ($type == 'receipts') {{ number_format($accounts->sum('value_to_receivable'), 2, ',', '.') }} @else {{ number_format($accounts->sum('value_to_pay'), 2, ',', '.') }} @endif @if ($item->status !== 'Cancelado') @if ($type == 'receipts') {{ number_format($accounts->sum('value_received'), 2, ',', '.') }} @else {{ number_format($accounts->sum('value_paid'), 2, ',', '.') }} @endif @else 0,00 @endif {{ number_format($accounts->sum('price'), 2, ',', '.') }}