@extends('template') @section('title', 'Detalle Pedido') @section('content') @if (Auth::guest()) @endif
Bienvenido, {{ Auth::user()->name }} {{ Auth::user()->last_name }}
Detalle pedido
@php $compras = DB::select(DB::raw("SELECT *,c.id as id_compra from users u,compras c where u.id = c.user_id and u.id =". Auth::user()->id)); @endphp @foreach ($detalle as $item) @php if($item->porcentoffsale > 0){ $precio = $item->price - (($item->price * $item->porcentoffsale) / 100); }else{ $precio = $item->price; } @endphp @endforeach
Nombre Precio Cantidad Des% Total
{{$item->name}} ${{number_format($item->price,0,',','.')}} {{$item->cantidad}} {{$item->porcentoffsale}}% ${{number_format($precio * $item->cantidad,0,',','.')}}
@stop @section('scripts') @stop