@php $title = __('orcamento.list_title'); $categoriasServicoListagem = isset($categoriasServico) ? $categoriasServico : collect(); $moedaSelecionada = request('moeda'); $labelTodosTiposServico = __('orcamento.label_all_service_types'); $isInternational = in_array(strtoupper((string) $moedaSelecionada), ['USD', 'EUR'], true); if (method_exists($categoriasServicoListagem, 'isEmpty') && $categoriasServicoListagem->isEmpty() && isset($tiposServico)) { $categoriasServicoListagem = $tiposServico ->map(function ($tipoServico) { return $tipoServico->categoriaServico; }) ->filter() ->unique('id') ->values(); } @endphp

{{ __('orcamento.menu') }}

{{ __('orcamento.subtitle_list') }}
{{ __('orcamento.label_service_category') }}

{{ __('orcamento.subtitle_list') }}

@php $categoriaSelecionada = request('categoria_servico_id'); if (!$categoriaSelecionada && isset($tiposServico) && request('tipo_servico_id')) { $tipoSelecionado = $tiposServico->firstWhere('id', (int) request('tipo_servico_id')); $categoriaSelecionada = $tipoSelecionado ? $tipoSelecionado->categoria_servico_id : ''; } @endphp @if(isset($categoriasServicoListagem)) @foreach($categoriasServicoListagem as $index => $categoriaServico) @php $labelCategoriaServico = $categoriaServico->nome; if ($isInternational) { $chaveCategoria = 'orcamento.service_categories_by_id.' . $categoriaServico->id; $traducaoCategoria = __($chaveCategoria); if (is_string($traducaoCategoria) && $traducaoCategoria !== $chaveCategoria) { $labelCategoriaServico = $traducaoCategoria; } } @endphp
id ? 'checked' : ($index === 0 && !$categoriaSelecionada ? 'checked' : '') }}>
@endforeach @endif
{{ __('orcamento.label_currency') }}

{{ __('orcamento.label_currency') }}

@foreach($moedas as $codigoMoeda => $labelMoeda)
@endforeach
@if(isset($orcamentos) && $orcamentos->count() > 0) @foreach($orcamentos as $orcamento) @endforeach @else @endif
{{ __('orcamento.label_code') }} {{ __('orcamento.label_emission_date') }} {{ __('orcamento.label_client') }} {{ __('orcamento.label_service_type') }} {{ __('orcamento.label_currency') }} {{ __('orcamento.label_total') }} {{ __('orcamento.label_validity_date') }} {{ __('orcamento.label_status') }} {{ __('orcamento.label_actions') }}
{{ $orcamento->codigo }} {{ $orcamento->data_emissao ? $orcamento->data_emissao->format('d/m/Y') : '-' }} {{ $orcamento->cliente ? $orcamento->cliente->nome_fantasia : '-' }} {{ $orcamento->tipoServico ? $orcamento->tipoServico->nome : '-' }} {{ $orcamento->moeda ?? '-' }} {{ \App\Helpers\MoneyHelper::formatarPorMoeda($orcamento->total, $orcamento->moeda ?? 'BRL') }} {{ $orcamento->data_validade ? $orcamento->data_validade->format('d/m/Y') : '-' }} @if($orcamento->status == 'Aguardando Cliente') {{ $orcamento->status }} @elseif($orcamento->status == 'Aprovado pelo Cliente') {{ $orcamento->status }} @elseif($orcamento->status == 'Convertido em Venda') {{ $orcamento->status }} @elseif($orcamento->status == 'Cancelado pelo Cliente') {{ $orcamento->status }} @else {{ $orcamento->status }} @endif @if($orcamento->status !== 'Convertido em Venda') @elseif($orcamento->status === 'Convertido em Venda' && $orcamento->vendas && $orcamento->vendas->count() > 0) @php $venda = $orcamento->vendas->first(); @endphp @if($venda->status === \App\Enum\StatusVenda::PENDENTE->value) @endif @endif @if($orcamento->status == 'Aguardando Cliente') @elseif($orcamento->status == 'Convertido em Venda') @if($orcamento->vendas && $orcamento->vendas->count() > 0) @php $venda = $orcamento->vendas->first(); @endphp @endif @endif @if($orcamento->status !== 'Convertido em Venda') @endif
@if(isset($error)) {{ $error }} @else

{{ __('orcamento.empty_budgets') }}

{{ request('busca') || request('cliente_id') || request('tipo_servico_id') || request('status') || request('moeda') ? 'Try adjusting the filters to find records.' : 'Start by creating your first quote' }}

@endif