Fecha |
Hora |
Precio Servicios |
Precio Productos |
Precio Total |
@php
$t_productos=0;
$t_servicios=0;
$t_total=0;
@endphp
@foreach ($tickets as $ticket)
@php
$total_servicios = 0;
$total_productos = 0;
@endphp
@foreach ($ticket->articles as $article)
@if ($article->category->id == 1)
@php
$total_servicios += (int) $article->pivot->amount * (int) $article->pivot->price_unit;
@endphp
@endif
@if ($article->category->id == 2)
@php
$total_productos += (int) $article->pivot->amount * (int) $article->pivot->price_unit;
@endphp
@endif
@endforeach
{{ $ticket->created_at->format('d-m-Y') }} |
{{ $ticket->created_at->format('H:i:s') }} |
{{ $total_servicios }} |
{{ $total_productos }} |
{{ $ticket->price_total }} |
@php
$t_productos+=$total_productos;
$t_servicios+=$total_servicios;
$t_total+=$ticket->price_total;
@endphp
@endforeach
TOTALES |
- |
{{ $t_servicios }} |
{{ $t_productos }} |
{{ $t_total }} |