@foreach($empresa AS $value)

REPORTE DE PRODUCTO POR FECHA
{{ \Carbon\Carbon::parse($fInicio)->format('d M Y')}} - {{ \Carbon\Carbon::parse($fTermino)->format('d M Y')}}

@php $today = Carbon\Carbon::now(); @endphp

Impreso por: {{ Auth::user()->name }}
El {{ \Carbon\Carbon::parse($today)->format('d M Y h:m:s a')}}

{{ $value->direccion }}
{{ $value->ciudad }}, {{ $value->provincia }}, República Dominicana.

@endforeach
CONTEO INICIAL
@foreach($producto AS $value) @endforeach
Codigo Producto Cuando fue creado Disponible P. Compra P. Venta 1 P. Venta 2 P. Venta 3
{{ $value->codigo }} {{ $value->nombre }} {{ \Carbon\Carbon::parse($value->created_at)->format('d M Y h:m:s a')}} {{ $value->stock }} RD${{ number_format($value->precio_compra, 2) }} RD${{ number_format($value->precio_venta1, 2) }} RD${{ number_format($value->precio_venta2, 2) }} RD${{ number_format($value->precio_venta3, 2) }}


COMPRAS DEL PRODUCTO
@php $num = 0; @endphp @foreach($compras AS $value) @endforeach
# Orden Proveedor Fecha Cod. Producto Producto Cantidad P. Compra Total
{{ $num = $num + 1 }} {{ sprintf("CM-%'.06d", $value->id) }} {{ $value->proveedor }} {{ \Carbon\Carbon::parse($value->fecha)->format('d M Y')}} {{ $value->articulo_codigo }} {{ $value->articulo }} {{ $value->articulo_cantidad }} RD${{ number_format($value->precio, 2) }} RD${{ number_format($value->articulo_subtotal, 2) }}


VENTAS DEL PRODUCTO
@php $num = 0; $cant = 0; $totalcomp = 0; $totalvent = 0; @endphp @foreach($ventas AS $val) @php $total = $val->articulo_cantidad * $val->articulo_precio; @endphp @php $cant = $cant + $val->articulo_cantidad; $totalcomp = $totalcomp + $val->articulo_precio; $totalvent = $totalvent + $total; @endphp @endforeach
# No. Orden Cliente Fecha Cod. Producto Producto Cantidad P. Unidad Total
{{ $num = $num + 1 }} {{ $val->numero_orden }} {{ $val->cliente }} {{ \Carbon\Carbon::parse($val->fecha)->format('d M Y')}} {{ $val->articulo_codigo }} {{ $val->articulo }} {{ $val->articulo_cantidad }} RD${{ number_format($val->articulo_precio, 2) }}RD${{ number_format($total, 2) }}
{{ $cant }} RD${{ number_format($totalcomp, 2) }} RD${{ number_format($totalvent, 2) }}