manejo de usuarios
This commit is contained in:
@@ -119,6 +119,7 @@
|
||||
<select class="form-control" v-model="newItem.tipo">
|
||||
<option>Cuota</option>
|
||||
<option>Abono Capital</option>
|
||||
<option>Intereses</option>
|
||||
</select>
|
||||
</base-input>
|
||||
<base-button
|
||||
@@ -134,13 +135,16 @@
|
||||
|
||||
<card>
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<div class="col-3">
|
||||
<b>Total Cuotas: </b> {{ formatMoneda(totalCuotas) }}
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-3">
|
||||
<b>Total Abonos a Capital:</b> <span>{{ formatMoneda(totalAbonos) }} </span>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="col-3">
|
||||
<b>Total Intereses:</b> <span>{{ formatMoneda(totalIntereses) }} </span>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<b
|
||||
>Total:<span :class="[total < 0 ? 'text-danger' : 'text-success']">
|
||||
{{ formatMoneda(total) }}</span
|
||||
@@ -189,6 +193,7 @@ export default {
|
||||
Creditos: [],
|
||||
totalCuotas: 0,
|
||||
totalAbonos: 0,
|
||||
totalIntereses: 0,
|
||||
total: 0,
|
||||
};
|
||||
},
|
||||
@@ -283,7 +288,11 @@ export default {
|
||||
(acc, x) => (x.tipo === "Abono Capital" ? acc + Number(x.valor) : acc),
|
||||
0
|
||||
);
|
||||
this.total = this.totalCuotas + this.totalAbonos;
|
||||
this.totalIntereses = this.selectedCredito.datos.reduce(
|
||||
(acc, x) => (x.tipo === "Intereses" ? acc + Number(x.valor) : acc),
|
||||
0
|
||||
);
|
||||
this.total = this.totalCuotas + this.totalAbonos + this.totalIntereses;
|
||||
},
|
||||
formatMoneda(dato) {
|
||||
var num = dato;
|
||||
|
||||
Reference in New Issue
Block a user