{{-- New-Unity ERP | Modules/Sales/Resources/Views/quotes/edit.blade.php | v1.4 | 26/06/2026 --}} {{-- v1.4 — Read Only mode cuando status = approved. --}} {{-- v1.1 — Vencimiento readonly (hoy+10 dias politica empresa); Condicion pago automatica. --}} {{-- v1.0 — Edicion de cotizacion: misma estructura que create con datos precargados. --}} @extends('layouts.vertical') @section('content') @php $readonly = $quote->status === 'approved'; @endphp
{{-- Read Only Banner --}} @if($readonly)
{{ __('quotes.read_only') }} — {{ __('quotes.readonly_prefix') }} {{ __('quotes.approved') }} {{ __('quotes.readonly_middle') }} {{ $quote->salesOrder?->folDisplay() }} . {{ __('quotes.readonly_suffix') }}
@endif {{-- Page Header --}}

{{ __('quotes.quote_hash') }}{{ $quote->fol }}

{{ __('quotes.form_subtitle') }}  ·  {{ strtoupper($quote->status) }}

{{-- Breadcrumbs --}} {{-- Main Card --}}
{{ __('quotes.edit_quote_hash') }}{{ $quote->fol }}
@csrf @method('PUT') {{-- Errores de validación --}} @if ($errors->any()) @endif @if(session('success'))
{{ session('success') }}
@endif {{-- ════════ General Information ════════ --}}
{{ __('quotes.general_information') }}

{{-- Fila 1: Cliente + campos cortos --}}
{{-- Fila 2: Dirección y datos del cliente --}}
{{-- Fila 3: Contacto + Orden de Compra + Tipo de Cambio --}}
{{-- ════════ Section: Products ════════ --}}
{{ __('quotes.products') }}

multiple_products)>
{{-- Alert producto agregado --}}
{{ __('quotes.product_added') }}
{{-- Products table --}}
@foreach($products as $nKey => $product) @endforeach
{{ __('quotes.code') }} {{ __('quotes.qty') }} {{ __('quotes.unit_label') }} {{ __('quotes.description') }} {{ __('quotes.unit_price') }} {{ __('quotes.disc_pct') }} {{ __('quotes.total') }}
{{ $product->sku ?: $product->product_id }} {{ $product->unity ?? 'H87' }} {{ $product->product_name }} {{ number_format($product->amount, 2, '.', ',') }}
{{-- ════════ Footer: Condiciones + Totales ════════ --}}
{{-- Izquierda: condiciones y notas --}}
@php $deliveryVal = old('delivery_time', $quote->delivery_time ?? ''); $isCustom = $deliveryVal && !in_array($deliveryVal, $deliveryTerms->toArray()); @endphp
{{-- Derecha: Totales — Orden: Descuento → Subtotal → IVA → Total --}}
{{-- Descuento --}}
{{ __('quotes.discount') }} 0.0%
-$
{{-- Subtotal (ya con descuento) --}}
{{ __('quotes.subtotal_label') }}
$
{{-- IVA --}}
{{ __('quotes.vat') }}
%
$
{{-- Total --}}
{{ __('quotes.total') }}
$
{{-- Form actions --}}
{{ __('quotes.cancel') }} PDF @if(!$readonly) @endif
{{-- Modal: buscador de productos (lo inyecta el JS) --}}
{{-- Modal clientes --}} @include('sales::quotes.partials.create.modal_customers')
@endsection @section('scripts') @endsection