Update metodos.js
This commit is contained in:
parent
020669ea74
commit
ef71971679
40
metodos.js
40
metodos.js
@ -682,42 +682,32 @@ async function Fun_ConsultarClavesCatastrales(agent, req, res, _cedula = null, n
|
|||||||
_cedula = data_context.cedula;
|
_cedula = data_context.cedula;
|
||||||
}
|
}
|
||||||
const regex = /^[0-9]*$/;
|
const regex = /^[0-9]*$/;
|
||||||
|
let printzeus = '';
|
||||||
// _cedula = _cedula.replace(/-/g, "");
|
// _cedula = _cedula.replace(/-/g, "");
|
||||||
if (regex.test(_cedula)) {
|
if (regex.test(_cedula)) {
|
||||||
|
|
||||||
|
// let basure = await funcion.ConsultaTasaRecoleccion(_cedula, 1);
|
||||||
|
// if (basure['ok'] == true) {
|
||||||
|
// if (basure['data'].documento != undefined) {
|
||||||
|
// let suma = 0;
|
||||||
|
// let meses_arr = ['Enero 2026', 'Feberero 2026', 'Marzo 2026'];
|
||||||
|
// meses_arr.forEach(element => {
|
||||||
|
// suma += Number(basure['data'].promedio);
|
||||||
|
// });
|
||||||
|
// printzeus = printzeus + '\n💵 *Tasa de recoleccion de basura: $' + suma.toFixed(2) + '*';
|
||||||
|
// agent.add(printzeus);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
let legion = await funcion.ConsultaClaves(_cedula, nuevo);
|
let legion = await funcion.ConsultaClaves(_cedula, nuevo);
|
||||||
if (legion['ok'] == true) {
|
if (legion['ok'] == true) {
|
||||||
let printzeus = '';
|
|
||||||
|
|
||||||
legion['data']['data'].forEach((elem_ares, index) => {
|
legion['data']['data'].forEach((elem_ares, index) => {
|
||||||
printzeus += '\n*' + elem_ares.name + (elem_ares.value != null ? ': $' + elem_ares.value : '');
|
printzeus += '\n*' + elem_ares.name + (elem_ares.value != null ? ': $' + elem_ares.value : '');
|
||||||
});
|
});
|
||||||
|
|
||||||
$t_int = 0;
|
$t_int = 0;
|
||||||
$t_pag = 0;
|
$t_pag = 0;
|
||||||
$d_tt = 0;
|
$d_tt = 0;
|
||||||
if (legion['data']['data_add'].length > 0) {
|
|
||||||
printzeus += '\n\nUd 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 += '\nDeuda total con intereses: $' + $d_tt;
|
|
||||||
printzeus += '\nTotal de interés exonerado por remisión: $' + $t_int;
|
|
||||||
printzeus += '\nValor a pagar exonerado por remisión: $' + $t_pag;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
agent.add(printzeus);
|
agent.add(printzeus);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return Fun_RetornarAlinicio(agent, req, res, funcion.conver_name(data_context.name));
|
return Fun_RetornarAlinicio(agent, req, res, funcion.conver_name(data_context.name));
|
||||||
} else {
|
} else {
|
||||||
agent.add(funcion.conver_name(data_context.name) + ', ' + legion['msg']);
|
agent.add(funcion.conver_name(data_context.name) + ', ' + legion['msg']);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user