@extends('layouts.app') @section('content')

Orden de Compra {{ $orden->folio }}

@if($orden->estatus === 'borrador') @can('ordenes-editar') Editar
@csrf @method('PUT')
@endcan @endif @if(in_array($orden->estatus, ['enviada', 'recibida_parcial'])) @can('ordenes-editar') Recibir Mercancía @endcan @endif PDF
@foreach($orden->detalles as $detalle) @endforeach
Producto Cantidad Recibida P. Unitario Total Descripción
{{ $detalle->producto->alias ?? '-' }} {{ number_format($detalle->cantidad, 2) }} {{ number_format($detalle->cantidad_recibida, 2) }} ${{ number_format($detalle->precio_unitario, 2) }} ${{ number_format($detalle->precio_total, 2) }} {{ $detalle->descripcion ?? '-' }}
Subtotal: ${{ number_format($orden->subtotal, 2) }}
IVA (16%): ${{ number_format($orden->iva, 2) }}
Total: ${{ number_format($orden->total, 2) }}
Información de la Orden

Folio: {{ $orden->folio }}

Estatus: {!! $orden->estatus_badge !!}

Proveedor: {{ $orden->proveedor->alias }}

Fecha Orden: {{ \Carbon\Carbon::parse($orden->fecha_orden)->format('d/m/Y') }}

@if($orden->fecha_entrega_estimada)

Entrega Estimada: {{ \Carbon\Carbon::parse($orden->fecha_entrega_estimada)->format('d/m/Y') }}

@endif

Creado por: {{ $orden->user->name ?? '-' }}

Creado: {{ $orden->created_at->format('d/m/Y H:i') }}

@if($orden->comentario)

Notas:

{{ $orden->comentario }}

@endif
@endsection