@extends('plantillas.app') @section('titulo') {{-- {{ $datoCuenta->cuenta }} - {{ $datoCuenta->descripcion }} / {{ $datoCuentaSecundaria->cuenta }} - {{ $datoCuentaSecundaria->descripcion }} --}} @endsection @section('breadcrumbs') {!! Breadcrumbs::render('inicio.costo_cuatro_digitos_gasto',$cuentaOrigen,$datoCuenta,$datoCuentaSecundaria) !!} @endsection @section('contenido')

Reporte costos

@foreach($costos as $costo) @foreach($gastos->groupBy('cuenta_detalle') as $index=>$gasto) @if(substr($index,0,4)==$costo->cuenta) @foreach($gasto->groupBy('cuenta_cuatro') as $prueba) @endforeach @endif @endforeach @endforeach
Costo Ene Feb Mar Abr May Jun Jul Ago Set Oct Nov Dic Total
{{ $costo->cuenta }} - {{ $costo->descripcion }} {{ number_format($gastos->where('mes',1)->where('cuenta_detalle',$costo->cuenta)->sum('total'),2) }} {{ number_format($gastos->where('mes',2)->where('cuenta_detalle',$costo->cuenta)->sum('total'),2) }} {{ number_format($gastos->where('mes',3)->where('cuenta_detalle',$costo->cuenta)->sum('total'),2) }} {{ number_format($gastos->where('mes',4)->where('cuenta_detalle',$costo->cuenta)->sum('total'),2) }} {{ number_format($gastos->where('mes',5)->where('cuenta_detalle',$costo->cuenta)->sum('total'),2) }} {{ number_format($gastos->where('mes',6)->where('cuenta_detalle',$costo->cuenta)->sum('total'),2) }} {{ number_format($gastos->where('mes',7)->where('cuenta_detalle',$costo->cuenta)->sum('total'),2) }} {{ number_format($gastos->where('mes',8)->where('cuenta_detalle',$costo->cuenta)->sum('total'),2) }} {{ number_format($gastos->where('mes',9)->where('cuenta_detalle',$costo->cuenta)->sum('total'),2) }} {{ number_format($gastos->where('mes',10)->where('cuenta_detalle',$costo->cuenta)->sum('total'),2) }} {{ number_format($gastos->where('mes',11)->where('cuenta_detalle',$costo->cuenta)->sum('total'),2) }} {{ number_format($gastos->where('mes',12)->where('cuenta_detalle',$costo->cuenta)->sum('total'),2) }} {{ number_format($gastos->where('cuenta_detalle',$costo->cuenta)->sum('total'),2) }}
{{ $prueba->first()->cuenta_cuatro }} {{ $prueba->first()->descripcion_cuenta_cuatro }} {{ number_format($prueba->where('mes',1)->sum('total'),2) }} {{ number_format($prueba->where('mes',2)->sum('total'),2) }} {{ number_format($prueba->where('mes',3)->sum('total'),2) }} {{ number_format($prueba->where('mes',4)->sum('total'),2) }} {{ number_format($prueba->where('mes',5)->sum('total'),2) }} {{ number_format($prueba->where('mes',6)->sum('total'),2) }} {{ number_format($prueba->where('mes',7)->sum('total'),2) }} {{ number_format($prueba->where('mes',8)->sum('total'),2) }} {{ number_format($prueba->where('mes',9)->sum('total'),2) }} {{ number_format($prueba->where('mes',10)->sum('total'),2) }} {{ number_format($prueba->where('mes',11)->sum('total'),2) }} {{ number_format($prueba->where('mes',12)->sum('total'),2) }} {{ number_format($prueba->sum('total'),2) }}
@endsection