@extends('relatorios.v2.base') @if(isset($data_final)) @section('report_name', 'Relatório de Vendas') @section('report_name_subtitle') Período: de {{$data_inicial}} à {{$data_final}} @endsection @else @section('report_name') Relátorio de Venda {{$data_inicial}} @endsection @endif @section('style') @endsection @section('main_container', 'container-fluid') @section('content')
@foreach($vendas as $venda) @endforeach
VENDA NÚMERO DATA CLIENTE ORIGEM VENDA NF-e/NFC-e ITENS Tipo Pagamento DESCONTO ACRÉSCIMO TOTAL ESTADO
{{ $venda->id }} {{ $venda->dataRegistroFormatada }} {{ $venda->cliente->razao_social ?? 'CLIENTE NÃO IDENTIFICADO' }} {{ class_basename($venda) === 'VendaCaixa' ? 'PDV' : 'VENDAS' }} {{ $venda->nfeOrNfce }}
    @foreach($venda->itens as $item)
  1. Produto: {{ $item->produto->nome ?? '-' }}

    Quantidade: {{ $item->quantidade ?? '-' }}

    Valor Unitário: R$ {{ number_format($item->valor, 2, ',', '.') }}

  2. @if(!$loop->last)
    @endif @endforeach
{{ $venda->getTipoPagamento($venda->tipo_pagamento) }} R$ {{number_format($venda->desconto, 2, ',', '.')}} R$ {{number_format($venda->acrescimo ?? 0, 2, ',', '.')}} R$ {{number_format(($venda->valorTotalCalculado), 2, ',', '.')}} {{ $venda->estado }}
@endsection