FIX: Pie cuotas vigentes
This commit is contained in:
@ -23,7 +23,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="cuotas">
|
||||
@for ($i = count($pie->cuotas()); $i < $pie->cuotas - count($pie->cuotas(vigentes: true)); $i ++)
|
||||
@for ($i = count($pie->cuotas(vigentes: true)); $i < $pie->cuotas; $i ++)
|
||||
<tr>
|
||||
<td>{{$i + 1}}</td>
|
||||
<td>
|
||||
@ -112,7 +112,7 @@
|
||||
const index = $(event.currentTarget).data('index')
|
||||
const calendar = $(".fecha.calendar[data-index='" + index + "']")
|
||||
const fecha = calendar.calendar('get date')
|
||||
for (let i = index + 1; i < {{$pie->cuotas - count($pie->cuotas())}}; i ++) {
|
||||
for (let i = index + 1; i < {{$pie->cuotas}}; i ++) {
|
||||
setDate(i - index, $(".fecha.calendar[data-index='" + i + "']"), fecha)
|
||||
}
|
||||
})
|
||||
@ -120,7 +120,7 @@
|
||||
$('.copy.banco').click(event => {
|
||||
const index = $(event.currentTarget).data('index')
|
||||
const banco = $(".banco.dropdown[data-index='" + index + "']").dropdown('get value')
|
||||
for (let i = index + 1; i < {{$pie->cuotas - count($pie->cuotas())}}; i ++) {
|
||||
for (let i = index + 1; i < {{$pie->cuotas}}; i ++) {
|
||||
$(".banco.dropdown[data-index='" + i + "']").dropdown('set selected', banco)
|
||||
}
|
||||
})
|
||||
@ -133,7 +133,7 @@
|
||||
$('.copy.valor').click(event => {
|
||||
const index = $(event.currentTarget).data('index')
|
||||
const valor = $("[name='valor" + index + "']").val()
|
||||
for (let i = index + 1; i < {{$pie->cuotas - count($pie->cuotas())}}; i ++) {
|
||||
for (let i = index + 1; i < {{$pie->cuotas}}; i ++) {
|
||||
$("[name='valor" + i + "']").val(valor)
|
||||
}
|
||||
})
|
||||
|
@ -14,7 +14,7 @@
|
||||
<td class="right aligned">Cuotas</td>
|
||||
<td>
|
||||
<a href="{{$urls->base}}/venta/{{$venta->id}}/pie/cuotas">
|
||||
{{count($pie->cuotas(true))}}/{{$pie->cuotas}}
|
||||
<span data-tooltip="Pagadas">{{count($pie->cuotas(true))}}</span>/{{$pie->cuotas}}
|
||||
</a>
|
||||
@if (count($pie->cuotas()) < $pie->cuotas)
|
||||
<a href="{{$urls->base}}/ventas/pie/{{$pie->id}}/cuotas/add">
|
||||
|
Reference in New Issue
Block a user