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>{{$cuota->pago->identificador}}</td>
<td class="right aligned">{{$format->pesos($cuota->pago->valor)}}</td> <td class="right aligned">{{$format->pesos($cuota->pago->valor)}}</td>
<td class="right aligned"> <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())}} {{$format->ufs($cuota->pago->valor())}}
@endif @endif
</td> </td>

View File

@ -28,4 +28,13 @@
<td class="right aligned">{{$format->pesos($pie->pagado('pesos'))}}</td> <td class="right aligned">{{$format->pesos($pie->pagado('pesos'))}}</td>
<td colspan="2"></td> <td colspan="2"></td>
</tr> </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 @endif

View File

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