@extends('layouts.app', ['page' => 'estimates']) @section('title', __('messages.estimate_details')) @section('page_header')

{{ __('messages.estimate_details') }}

@if(($estimate->estatus) === "COTIZADO" && ($estimate->customer->email))
@endif
@endsection @section('content')
@if($estimate->idyappy && ($estimate->estatus) === "PAGO WEB")
@endif

#COT-{{ $estimate->id }}

{{ $estimate->customer->display_name ?? '' }}
cloud_download {{ __('messages.download') }} @if(($estimate->estatus) !== "CONVERTIDO") send {{ __('messages.send_email') }} transform {{ __('messages.convert_to_invoice') }} edit {{ __('messages.edit') }} @endif

@php // Buscar si existe una orden en la base de datos que referencie esta cotización $converted_invoice = \DB::table('invoices') ->where('reference_number', 'COT-' . $estimate->id) ->orWhere('reference_number', (string)$estimate->id) ->first(); @endphp
@if($converted_invoice)
@endif @if(($estimate->status) === "DRAFT" && ($estimate->customer->email))
@endif @if($estimate->status == 'DRAFT')
@elseif($estimate->status == 'ACCEPTED')
@elseif($estimate->status == 'SENT')
@elseif($estimate->status == 'REJECTED')
@elseif($estimate->status == 'PRIMER RECORDATORIO')
@elseif($estimate->status == 'SEGUNDO RECORDATORIO')
@endif

Servicios

@if($estimate->tax_per_item) @endif @if($estimate->discount_per_item) @endif @foreach ($estimate->items as $item) @if($estimate->tax_per_item) @endif @if($estimate->discount_per_item) @endif @endforeach
Servicio Cantidad PrecioImpuestoDescuentoTotal
{{ preg_replace('/\((.*?)\)/i', '', $item->product->name) }}
{!! nl2br(htmlspecialchars($item->product->description)) !!}
{{ $item->quantity }} {!! money($item->price, $estimate->currency_code)->format() !!} @foreach ($item->getTotalPercentageOfTaxesWithNames() as $key => $value) {{ $key }}
@endforeach
{{ $item->discount_val }}%{!! money($item->total, $estimate->currency_code)->format() !!}

@if($estimate->abonominimo)
Abono Mínimo
${{ $estimate->abonominimo }}
@endif
Total Estimado
{!! money($estimate->total, $estimate->currency_code)->format() !!}
Documento PDF
Resumen de la Cotización
@if($estimate->record_uno) @endif @if($estimate->record_dos) @endif @if($estimate->abonominimo) @endif
Cliente: {{ $estimate->customer->display_name ?? '' }}
Correo: {{ $estimate->customer->email ?? '' }}
Estatus: {{ $estimate->estatus }}
Status base: {{ $estimate->status }}
Recordatorio 1: {{ $estimate->record_uno }}
Recordatorio 2: {{ $estimate->record_dos }}
Abono mínimo: ${{ $estimate->abonominimo }}
Total: {!! money($estimate->total, $estimate->currency_code)->format() !!}
Detalles Adicionales
Cliente: {{ $estimate->customer->display_name ?? '' }}
Correo: {{ $estimate->customer->email ?? '' }}
Teléfono: {{ $estimate->customer->phone ?? '' }}
Sucursal: {{ $estimate->sucursal2 ?? '' }}
Tienda: {{ $estimate->web ?? '' }}
Cantidad de productos: {{ $estimate->cantidad ?? '' }}
Precio Total del Producto: {{ $estimate->precio_total ?? '' }}
Servicio de Compra (SIN ITBMS): {{ $estimate->servi_compra ?? '' }}
Libras Estimadas: {{ $estimate->librasest ?? '' }}
Flete de Compra: {{ $estimate->flete_compra ?? '' }}
Productos: {{ $estimate->productos ?? '' }}
Link de Producto: {{ $estimate->links ?? '' }}
Detalles: {{ $estimate->detalles ?? '' }}
@endsection