@extends('layouts.app') @section('title', 'Relatório de Veículos - Sistema de Gestão') @section('page-title', 'Relatório de Veículos') @section('content')

Relatório de Veículos

Análise completa do seu estoque

{{ $summary['total_cars'] }}

Total de Veículos

{{ $summary['cars_sold'] }}

Vendidos
R$ {{ number_format($summary['total_invested'], 0, ',', '.') }}
Investido
R$ {{ number_format($summary['total_expenses'], 0, ',', '.') }}
Despesas
R$ {{ number_format($summary['total_profit'], 0, ',', '.') }}
Lucros
R$ {{ number_format($summary['total_loss'], 0, ',', '.') }}
Prejuízos
Detalhamento por Veículo
@foreach($cars as $car) @endforeach
Veículo Ano Placa Compra Venda Despesas Resultado Status
{{ $car->brand }} {{ $car->model }} @if($car->color)
{{ $car->color }} @endif
{{ $car->year ?? '-' }} {{ $car->plate ?? '-' }} @if($car->purchase_price) R$ {{ number_format($car->purchase_price, 2, ',', '.') }} @if($car->purchase_date)
{{ $car->purchase_date->format('d/m/Y') }} @endif @else - @endif
@if($car->sale_price) R$ {{ number_format($car->sale_price, 2, ',', '.') }} @if($car->sale_date)
{{ $car->sale_date->format('d/m/Y') }} @endif @else - @endif
R$ {{ number_format($car->total_expenses, 2, ',', '.') }} @if($car->profit_loss != 0) @if($car->profit_loss > 0) +R$ {{ number_format($car->profit_loss, 2, ',', '.') }} @else -R$ {{ number_format(abs($car->profit_loss), 2, ',', '.') }} @endif @else - @endif @switch($car->status) @case('owned') Em Estoque @break @case('sold') Vendido @break @case('maintenance') Manutenção @break @endswitch
@endsection