@if($appLogo) @php $path = storage_path('app/public/' . $appLogo); $type = pathinfo($path, PATHINFO_EXTENSION); if(file_exists($path)) { $data = file_get_contents($path); $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data); echo ''; } @endphp @else
{{ $companyName }}
@endif

Cotización Para:

{{ $quote->customer_name }}
@if($quote->customer_document)
NIT/CC: {{ $quote->customer_document }}
@endif @if($quote->customer_address)
{{ $quote->customer_address }}
@endif @if($quote->customer_phone)
Tel: {{ $quote->customer_phone }}
@endif @if($quote->customer_email)
Email: {{ $quote->customer_email }}
@endif
@php $statusColors = [ 'Borrador' => ['bg' => '#f3f4f6', 'color' => '#6b7280'], 'Enviada' => ['bg' => '#e0f2fe', 'color' => '#0284c7'], 'Aceptada' => ['bg' => '#dcfce7', 'color' => '#16a34a'], 'Rechazada' => ['bg' => '#fee2e2', 'color' => '#dc2626'], ]; $badgeColor = $statusColors[$quote->status] ?? $statusColors['Borrador']; $isExpired = $quote->valid_until && $quote->valid_until->isPast() && $quote->status !== 'Aceptada'; @endphp ESTADO: {{ $quote->status }} @if($isExpired)
VENCIDA
@endif

Cotización

# {{ $quote->quote_number }}
Fecha: {{ $quote->created_at->format('d/m/Y') }}
@if($quote->valid_until) Válido hasta: {{ $quote->valid_until->format('d/m/Y') }} @endif
@foreach($quote->items as $item) @endforeach
Descripción Cant. Precio Unit. Total
{{ $item->description }} {{ $item->quantity }} ${{ number_format($item->unit_price, 0) }} ${{ number_format($item->total_price, 0) }}
@if($quote->terms_and_conditions)
Términos y Condiciones
{!! nl2br(e($quote->terms_and_conditions)) !!}
@endif @if($quote->show_all_bank_accounts && \App\Models\BankAccount::count() > 0) @php $bankCount = \App\Models\BankAccount::count(); @endphp @foreach(\App\Models\BankAccount::orderBy('sort_order')->get() as $index => $bank) @endforeach
@if($bank->logo_path) @php $path = storage_path('app/public/' . $bank->logo_path); $type = pathinfo($path, PATHINFO_EXTENSION); if(file_exists($path)) { $data = file_get_contents($path); $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data); echo ''; } @endphp @else
{{ $bank->bank_name }}
@endif
{{ $bank->account_type ? $bank->account_type : 'Cta.' }} No. {{ $bank->account_number }}. @if($bank->owner_name) A Nombre de {{ $bank->owner_name }}. @endif @if($bank->owner_document) NIT/CC: {{ $bank->owner_document }}. @endif
@elseif($quote->bankAccount) @php $bank = $quote->bankAccount; @endphp
@if($bank->logo_path) @php $path = storage_path('app/public/' . $bank->logo_path); $type = pathinfo($path, PATHINFO_EXTENSION); if(file_exists($path)) { $data = file_get_contents($path); $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data); echo ''; } @endphp @else
{{ $bank->bank_name }}
@endif
{{ $bank->account_type ? $bank->account_type : 'Cta.' }} No. {{ $bank->account_number }}. @if($bank->owner_name) A Nombre de {{ $bank->owner_name }}. @endif @if($bank->owner_document) NIT/CC: {{ $bank->owner_document }}. @endif
@endif
@if($quote->tax_amount > 0) @endif
Subtotal: ${{ number_format($quote->subtotal, 0) }}
Impuestos: ${{ number_format($quote->tax_amount, 0) }}
Total: ${{ number_format($quote->total, 0) }}
@if($quote->signature_path) @php $path = storage_path('app/public/' . $quote->signature_path); $type = pathinfo($path, PATHINFO_EXTENSION); if(file_exists($path)) { $data = file_get_contents($path); $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data); echo ''; } @endphp @endif
Firma Autorizada
{{ $quote->creator->name }}
@if($quote->client_signature_path) @php $path = storage_path('app/public/' . $quote->client_signature_path); $type = pathinfo($path, PATHINFO_EXTENSION); if(file_exists($path)) { $data = file_get_contents($path); $base64 = 'data:image/' . $type . ';base64,' . base64_encode($data); echo ''; } @endphp @endif
Firma de Aceptación
Cliente / Representante