Update metodos.js
This commit is contained in:
parent
9226ce7597
commit
dc5fd960eb
29
metodos.js
29
metodos.js
@ -649,10 +649,37 @@ async function Fun_ConsultarClavesCatastrales(agent, req, res, _cedula = null, n
|
||||
let legion = await funcion.ConsultaClaves(_cedula, nuevo);
|
||||
if (legion['ok'] == true) {
|
||||
let printzeus = '';
|
||||
|
||||
legion['data']['data'].forEach((elem_ares, index) => {
|
||||
printzeus += '\n*' + elem_ares.name + (elem_ares.value != null ? ': $' + elem_ares.value : '');
|
||||
});
|
||||
});
|
||||
|
||||
$t_int = 0;
|
||||
$t_pag = 0;
|
||||
$d_tt = 0;
|
||||
if (legion['data']['data_add'].length > 0) {
|
||||
printzeus += '\n\n Ud cuenta con rubros que aplican a la remisión intereses:';
|
||||
legion['data']['data_add'].forEach((elem_ares, index) => {
|
||||
$d_tt += elem_ares.deuda_total;
|
||||
$t_int += elem_ares.ahorro;
|
||||
$t_pag += elem_ares.total_remision;
|
||||
printzeus +='\n*'+elem_ares.rubro + ' - Desde: '+elem_ares.anio_min + ' Hasta: '+elem_ares.anio_max;
|
||||
printzeus +='\nDeuda a la fecha: '+elem_ares.deuda_total;
|
||||
printzeus +='\nCapital: '+elem_ares.deuda_total;
|
||||
printzeus +='\nInterés exonerado por remisión: '+elem_ares.ahorro;
|
||||
printzeus +='\nValor a pagar: '+elem_ares.total_remision + '\n\n';
|
||||
});
|
||||
|
||||
printzeus += '\n\n Deuda total: '+$t_pag;
|
||||
printzeus += '\n Total de interés exonerado por remisión: '+$t_int;
|
||||
printzeus += '\n Valor a pagar: '+$d_tt;
|
||||
}
|
||||
|
||||
|
||||
agent.add(printzeus);
|
||||
|
||||
|
||||
|
||||
return Fun_RetornarAlinicio(agent, req, res, funcion.conver_name(data_context.name));
|
||||
} else {
|
||||
agent.add(funcion.conver_name(data_context.name) + ', ' + legion['msg']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user