@extends("layout.base") @section("styles") ARB | Reporte Gastos @endsection @section("header")
Reportes
Gastos @endsection @section("content")

Reporte de gastos

Rango fechas
@php $totalGastoConvertidoDolares=0; @endphp @foreach($categorias as $categoria) @endforeach
Categoría Total colones Total dolares Convertido a dolares
{{ $categoria->gasto_categoria }} @php $totalColones = 0; $totalColonesADolar = 0; foreach($gastos as $gasto) { if ($gasto->id_gasto_categoria == $categoria->id_gasto_categoria && $gasto->id_moneda == 2) { $totalColones += $gasto->monto; $compra_dolar=($gasto->compra_dolar)?$gasto->compra_dolar:1; $totalColonesADolar += ($gasto->monto/$compra_dolar); } } echo '₡' . number_format($totalColones, 2); @endphp @php $totalDolares = 0; foreach($gastos as $gasto) { if ($gasto->id_gasto_categoria == $categoria->id_gasto_categoria && $gasto->id_moneda == 1) { $totalDolares += $gasto->monto; } } echo '$' . number_format($totalDolares, 2); @endphp @php $totalDolares = 0; foreach($gastos as $gasto) { if ($gasto->id_gasto_categoria == $categoria->id_gasto_categoria && $gasto->id_moneda == 1) { $totalDolares += $gasto->monto; } } $totalGastoConvertidoDolares+=$totalColonesADolar+$totalDolares; echo '$' . number_format($totalColonesADolar+$totalDolares, 2); @endphp
Total gastos convertido
{{date("d/m/Y",strtotime($fechaInicio))}} al {{date("d/m/Y",strtotime($fechaFin))}}

$

Cantidad de gastos
{{date("d/m/Y",strtotime($fechaInicio))}} al {{date("d/m/Y",strtotime($fechaFin))}}

{{--
--}} {{--
--}} {{--
--}} {{--
--}} {{--
--}}
@endsection @section("scripts") @endsection