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

detalles del pedido

{{$pedido->estatus}}
@include('adminlte-templates::common.errors')
@if($pedido->estatus == 'Pendiente') Editar @else Descargar PDF @endif Volver
@if($pedido->estatus == 'Pendiente')
@method('DELETE') @csrf
@endif

Productos

@if($pedido->pedidoProductos->where('producto_id', '!=', null)->count() > 0) @php $total = 0; @endphp @foreach($pedido->pedidoProductos->where('producto_id', '!=', null) as $pedidoProducto)
@if($pedidoProducto->producto && $pedidoProducto->producto->imagen) @else @endif

{{ $pedidoProducto->producto->nombre ?? 'N/A' }}

{{ $pedidoProducto->cantidad }}

@if($pedidoProducto->cantidad_recibida !== null)

{{ $pedidoProducto->cantidad_recibida }}

@endif @if($pedidoProducto->precio_unitario !== null)

{{ $pedidoProducto->precio_unitario }}

@php $subtotal = $pedidoProducto->cantidad_recibida * $pedidoProducto->precio_unitario; $total += $subtotal; @endphp {{ number_format($subtotal, 2) }}

@endif
@endforeach @if($total > 0)
Total Productos: ${{ number_format($total, 2) }}
@endif @else

No hay productos en este pedido.

@endif

Consumibles

@if($pedido->pedidoProductos->where('consumible_id', '!=', null)->count() > 0) @php $total = 0; @endphp @foreach($pedido->pedidoProductos->where('consumible_id', '!=', null) as $pedidoProducto)
@if($pedidoProducto->consumible && $pedidoProducto->consumible->imagen) @else @endif

{{ $pedidoProducto->consumible->nombre ?? 'N/A' }}

{{ $pedidoProducto->cantidad }}

@if($pedidoProducto->cantidad_recibida !== null)

{{ $pedidoProducto->cantidad_recibida }}

@endif @if($pedidoProducto->precio_unitario !== null)

{{ $pedidoProducto->precio_unitario }}

@php $subtotal = $pedidoProducto->cantidad_recibida * $pedidoProducto->precio_unitario; $total += $subtotal; @endphp {{ number_format($subtotal, 2) }}

@endif
@endforeach @if($total > 0)
Total Consumibles: ${{ number_format($total, 2) }}
@endif @else

No hay consumibles en este pedido.

@endif
@endsection @section('scripts') @endsection