@extends('relatorios.v2.base') @section('report_name', 'Relatório de Contas a Pagar') @section('report_name_subtitle') Período: {{$data_inicial}} - {{$data_final}} @endsection @section('main_container', 'container-fluid') @section('content')
@foreach($contas as $conta) @endforeach
FORNECEDOR REFERÊNCIA CATEGORIA DATA DE REGISTRO DATA DE VENCIMENTO VALOR TOTAL VALOR PAGO STATUS
{{ $conta->compra->fornecedor->razao_social ?? '--' }} {{ $conta->referencia }} {{ $conta->categoria->nome ?? '--' }} {{ $conta->dataRegistro }} {{ $conta->dataVencimentoFormatado }} R$ {{ number_format($conta->valor_integral, 2, ',', '.') }} R$ {{ number_format($conta->valor_pago, 2, ',', '.') }} {{ $conta->status ? 'PAGO' : 'PENDENTE' }}

VALOR A PAGAR: R$ {{ number_format($contas->where('status', false)->sum('valor_integral'), 2, ',', '.') }}

VALOR PAGO: R$ {{ number_format($contas->sum('valor_pago'), 2, ',', '.') }}

@endsection