@extends('layouts.app') @section('content')

Detalhes do Funcionário: {{ $funcionario->nome }}

Informações do Funcionário
@if($funcionario->funcoes) @endif
Nome: {{ $funcionario->nome }}
Login: {{ $funcionario->login }}
Celular: {{ $funcionario->celular ?? '-' }}
Porcentagem de Comissão: {{ number_format($funcionario->porcentagem_vendas, 2, ',', '.') }}%
Status: @if($funcionario->status) Ativo @else Inativo @endif
Funções Habilitadas: @foreach($funcionario->funcoes_array as $funcao) {{ $funcao }} @endforeach
Estatísticas de Vendas
Total de Vendas: {{ $totalVendas }}
Total Faturado: R$ {{ number_format($totalFaturado, 2, ',', '.') }}
Total de Comissões: R$ {{ number_format($totalComissao, 2, ',', '.') }}
Últimas Vendas
@if($vendas->count() > 0)
@foreach($vendas as $venda) @endforeach
ID Data Cliente Total Comissão Ações
#{{ $venda->id }} {{ $venda->data_venda->format('d/m/Y H:i') }} {{ $venda->cliente->nome ?? 'Cliente não informado' }} R$ {{ number_format($venda->total, 2, ',', '.') }} R$ {{ number_format($venda->comissao, 2, ',', '.') }}
@else
Nenhuma venda encontrada para este funcionário.
@endif
@endsection