@extends('adminlte::page') @section('title', $title ?? '') @section('content_header')

{{ $title ?? '' }}

@stop @section('content')
Sucursal: {{ $saleProduct->branch->name }}
@if (isset($message) && $message != '')
{{ $message ?? '' }}
@endif @foreach ($saleProduct->saleProductDetails as $detail) @if ($detail->type != 'service') @else @endif @endforeach
N Producto/Servicio Precio Cantidad Total
{{ $loop->iteration }}{{ $detail->product->trade_name }}{{ $detail->service_name }}{{ $detail->sale_price }} {{ number_format($detail->quantity, 0) }} {{ $detail->total }}
Subtotal {{ $saleProduct->subtotal }}
Consulta {{ $saleProduct->query }}
Descuento {{ $saleProduct->discount }}
Total {{ $saleProduct->total }}
Cancelado {{ $saleProduct->cancelled }}
Cambio {{ $saleProduct->change }}
@if ($permission['new_sale']) Nueva Venta @endif
@if ($saleProduct->status == 1)
@if ($permission['delete_sale']) Eliminar la Venta @endif
@if ($permission['new_medical_record']) Registro Médico @endif
@else
La venta ya fue eliminada
@endif
Cliente {{ $saleProduct->customer->name }}
Carnet {{ $saleProduct->customer->identity_document }}
Celular {{ $saleProduct->customer->cellphone }}
Correo {{ $saleProduct->customer->email }}
Ventas Anteriores - Últimas {{ $amountOfSales }} ventas
@php $total = 0; @endphp @foreach ($saleProductHistory as $item) @php $total += $item->total; @endphp {{-- --}} @endforeach
Fecha Total
{{$item->id_sale_product}} {{ $item->created_at->format('d/m/Y H:i:s') }} @if ($item->id_sale_product == $saleProduct->id_sale_product) Venta Actual @endif {{ $item->total }}

Cantidad total de Ventas {{ numberFormat($getTotalByConsumer['total_sales'], 0) }}
Total Cancelado {{ numberFormat($getTotalByConsumer['total']) }}
@stop @section('css') @stop @section('js') @stop