This commit is contained in:
2023-11-28 21:38:24 -03:00
parent fada4f80a2
commit bcdca32075
3 changed files with 14 additions and 3 deletions

View File

@ -36,7 +36,7 @@
<td>{{$cuota->pago->identificador}}</td>
<td class="right aligned">{{$format->pesos($cuota->pago->valor)}}</td>
<td class="right aligned">
@if ($cuota->pago->currentEstado->fecha <= $now)
@if ($cuota->pago->currentEstado->tipoEstadoPago->descripcion === 'abonado' and $cuota->pago->currentEstado->fecha <= $now)
{{$format->ufs($cuota->pago->valor())}}
@endif
</td>

View File

@ -28,4 +28,13 @@
<td class="right aligned">{{$format->pesos($pie->pagado('pesos'))}}</td>
<td colspan="2"></td>
</tr>
@if ($pie->reajuste)
<tr>
<td>Reajuste</td>
<td></td>
<td class="right aligned">{{$format->ufs($pie->reajuste->valor())}}</td>
<td class="right aligned">{{$format->pesos($pie->reajuste->valor)}}</td>
<td colspan="2"></td>
</tr>
@endif
@endif

View File

@ -123,8 +123,10 @@ class Pago
{
$pago->estados = $this->estadoPagoRepository->fetchByPago($pago->id);
$pago->currentEstado = $this->estadoPagoRepository->fetchCurrentByPago($pago->id);
if (($pago->uf === null or $pago->uf === 0.0) and $pago->fecha < new DateTimeImmutable()) {
$pago->uf = $this->moneyService->getUF($pago->fecha);
if (($pago->uf === null or $pago->uf === 0.0)
and $pago->currentEstado->tipoEstadoPago->descripcion === 'abonado'
and $pago->currentEstado->fecha <= new DateTimeImmutable()) {
$pago->uf = $this->moneyService->getUF($pago->currentEstado->fecha);
if ($pago->uf !== 0.0) {
$this->pagoRepository->edit($pago, ['uf' => $pago->uf]);
}