@extends('adminlte::page') @section('title', 'Editar Venta') @section('content_header')

Editar Venta

@stop @section('content') @if (session('error')) @endif
Volver
@csrf @method('PUT') @if($errors->any())
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
Cotización Asociada
Cliente: {{ $venta->cotizacion->cliente->user->name ?? 'N/A' }}
Estado Cotización: {{ ucfirst($venta->cotizacion->estado) }}
Monto total de la venta
Se calcula automáticamente
Gastos de la Venta
@foreach($venta->gastos as $index => $gasto)
descripcion) }}" placeholder="Ej: Transporte, Embalaje, Seguro..." required>
monto) }}" placeholder="0.00" required>
fecha ? $gasto->fecha->format('Y-m-d') : date('Y-m-d')) }}">
@endforeach
Total de Gastos: S/ {{ number_format($venta->total_gastos, 2) }}
Código único para rastrear la venta
Información de Entrega
Margen Bruto: S/ {{ number_format($venta->margen_bruto_con_transporte ?? 0, 2) }}
Monto Vendido - (Costo Productos + Total Gastos)
Margen Neto: S/ {{ number_format($venta->margen_neto ?? 0, 2) }}
Margen Bruto - Total Gastos

Se recalcularán automáticamente al guardar
Cancelar
@stop @section('js') @stop