FIX: tesoreria no cargaba datos

This commit is contained in:
Juan Pablo Vial
2024-07-25 12:52:48 -04:00
parent 081187e3d3
commit 43bb7a83c8
2 changed files with 32 additions and 27 deletions

View File

@ -2,7 +2,7 @@
@push('page_styles') @push('page_styles')
<style> <style>
tr.bold>th { tr.bold > th {
font-weight: bold !important; font-weight: bold !important;
} }
</style> </style>
@ -14,9 +14,10 @@
<h4 class="ui centered sub header">{{$fecha->format('d M Y')}}</h4> <h4 class="ui centered sub header">{{$fecha->format('d M Y')}}</h4>
<div class="ui grid"> <div class="ui grid">
<div class="three wide column"> <div class="three wide column">
<a href="/contabilidad/informes/xlsx/tesoreria/{{$fecha->format('Y-m-d')}}" target="_blank" style="color: inherit;"> <a href="/contabilidad/informes/xlsx/tesoreria/{{$fecha->format('Y-m-d')}}" target="_blank"
style="color: inherit;">
<div class="ui inverted green center aligned segment"> <div class="ui inverted green center aligned segment">
Descargar en Excel <i class="file excel icon"></i> Descargar en Excel <i class="file excel icon"></i>
</div> </div>
</a> </a>
</div> </div>
@ -83,27 +84,31 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@foreach ($informes['inmobiliarias'] as $inmobiliaria_rut => $informe) @foreach ($informes['sociedades'] as $sociedad_rut => $informe)
@foreach ($informe->cuentas as $i => $cuenta) @foreach ($informe->cuentas as $i => $cuenta)
<tr> <tr>
@if ($i === 0) @if ($i === 0)
<td rowspan="{{count($informe->cuentas)}}">{{$informe->inmobiliaria->razon}}</td> <td rowspan="{{count($informe->cuentas)}}">{{$informe->sociedad->razon}}</td>
@endif @endif
<td>{{$cuenta->banco}}</td> <td>{{$cuenta->banco}}</td>
<td>{{$cuenta->numero}}</td> <td>{{$cuenta->numero}}</td>
<td class="right aligned">{{$format->pesos($cuenta->anterior)}}</td> <td class="right aligned">{{$format->pesos($cuenta->anterior)}}</td>
<td class="right aligned">{{$format->pesos($cuenta->actual)}}</td> <td class="right aligned">{{$format->pesos($cuenta->actual)}}</td>
<td class="right aligned">{{$format->pesos($cuenta->diferencia())}}</td> <td class="right aligned">{{$format->pesos($cuenta->diferencia())}}</td>
<td class="right aligned">{{$format->pesos($cuenta->ffmm)}}</td> <td class="right aligned">{{$format->pesos($cuenta->ffmm)}}</td>
<td class="right aligned">{{$format->pesos($cuenta->deposito)}}</td> <td class="right aligned">{{$format->pesos($cuenta->deposito)}}</td>
<td class="right aligned">{{$format->pesos($cuenta->saldo())}}</td> <td class="right aligned">{{$format->pesos($cuenta->saldo())}}</td>
@if ($i === 0) @if ($i === 0)
<td class="right aligned" rowspan="{{count($informe->cuentas)}}">{{$format->pesos($informe->total())}}</td> <td class="right aligned"
<td class="right aligned" rowspan="{{count($informe->cuentas)}}">{{$format->pesos($informe->ffmm())}}</td> rowspan="{{count($informe->cuentas)}}">{{$format->pesos($informe->total())}}</td>
<td class="right aligned" rowspan="{{count($informe->cuentas)}}">{{$format->pesos($informe->deposito())}}</td> <td class="right aligned"
<td class="right aligned" rowspan="{{count($informe->cuentas)}}">{{$format->pesos($informe->caja())}}</td> rowspan="{{count($informe->cuentas)}}">{{$format->pesos($informe->ffmm())}}</td>
@endif <td class="right aligned"
</tr> rowspan="{{count($informe->cuentas)}}">{{$format->pesos($informe->deposito())}}</td>
<td class="right aligned"
rowspan="{{count($informe->cuentas)}}">{{$format->pesos($informe->caja())}}</td>
@endif
</tr>
@endforeach @endforeach
@endforeach @endforeach
</tbody> </tbody>
@ -146,7 +151,7 @@
@foreach ($movimientos as $ms) @foreach ($movimientos as $ms)
@foreach ($ms as $movimiento) @foreach ($ms as $movimiento)
<tr> <tr>
<td >{{$movimiento->cuenta->inmobiliaria->razon}}</td> <td>{{$movimiento->cuenta->inmobiliaria->razon}}</td>
<td class="right aligned">{{$format->pesos($movimiento->abono)}}</td> <td class="right aligned">{{$format->pesos($movimiento->abono)}}</td>
<td class="right aligned">{{$format->pesos($movimiento->cargo)}}</td> <td class="right aligned">{{$format->pesos($movimiento->cargo)}}</td>
<td>{{$movimiento->fecha->format('d/m/Y')}}</td> <td>{{$movimiento->fecha->format('d/m/Y')}}</td>
@ -165,7 +170,7 @@
</tr> </tr>
@foreach ($movimientos as $movimiento) @foreach ($movimientos as $movimiento)
<tr> <tr>
<td >{{$movimiento->cuenta->inmobiliaria->razon}}</td> <td>{{$movimiento->cuenta->inmobiliaria->razon}}</td>
<td class="right aligned">{{$format->pesos($movimiento->abono)}}</td> <td class="right aligned">{{$format->pesos($movimiento->abono)}}</td>
<td class="red right aligned">{{$format->pesos($movimiento->cargo)}}</td> <td class="red right aligned">{{$format->pesos($movimiento->cargo)}}</td>
<td>{{$movimiento->fecha->format('d/m/Y')}}</td> <td>{{$movimiento->fecha->format('d/m/Y')}}</td>

View File

@ -3,14 +3,14 @@ namespace Incoviba\Controller;
use DateInterval; use DateInterval;
use DateTimeImmutable; use DateTimeImmutable;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Incoviba\Common\Alias\View; use Incoviba\Common\Alias\View;
use Incoviba\Common\Ideal\Controller; use Incoviba\Common\Ideal\Controller;
use Incoviba\Common\Implement\Exception\{EmptyRedis, EmptyResult}; use Incoviba\Common\Implement\Exception\{EmptyRedis, EmptyResult};
use Incoviba\Model; use Incoviba\Model;
use Incoviba\Repository; use Incoviba\Repository;
use Incoviba\Service; use Incoviba\Service;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
class Contabilidad extends Controller class Contabilidad extends Controller
{ {