Files
oficial/app/resources/views/ventas/show/forma_pago/credito.blade.php
2025-04-03 13:49:00 -03:00

43 lines
1.8 KiB
PHP

<tr>
<td>
Crédito
@if ($credito !== null)
<sub>
<a href="{{$urls->base}}/venta/{{$venta->id}}/credito">
<i class="edit icon"></i>
</a>
</sub>
@else
<a href="{{$urls->base}}/venta/{{$venta->id}}/credito/add">
<i class="plus icon"></i>
</a>
@endif
</td>
@if ($credito !== null)
<td>{{ $format->percent($credito->pago->valor() / $venta->valor, 2, true) }}</td>
<td class="right aligned">
{{$format->ufs($credito->pago->valor())}}
</td>
<td class="right aligned">
{{$format->pesos($credito->pago->valor)}}
</td>
<td id="credito_pago" class="{{$credito->pago->currentEstado->tipoEstadoPago->descripcion === 'no pagado' ? 'warning' : ($credito->pago->currentEstado->tipoEstadoPago->descripcion === 'depositado' ? 'positive' : '')}}">
<span class="text">{{$credito->pago->currentEstado->fecha->format('d-m-Y')}}</span>
@if ($credito->pago->currentEstado->tipoEstadoPago->descripcion === 'no pagado')
<a href="javascript: depositar({row_id: '#credito_pago', pago_id: {{$credito->pago->id}}});" title="Depositar">
<i class="dollar sign icon"></i>
</a>
@elseif($credito->pago->currentEstado->tipoEstadoPago->descripcion === 'depositado')
<a href="javascript: abonar({row_id: '#credito_pago', pago_id: {{$credito->pago->id}}});" title="Abonar">
<i class="piggy bank icon"></i>
</a>
@endif
</td>
<td>
Banco: {{$credito->pago->banco?->nombre}}
</td>
@else
<td colspan="5"></td>
@endif
</tr>