validacion folio

This commit is contained in:
Andres2908
2022-03-21 15:17:20 -06:00
parent 2cd8c0810c
commit 3f1099b29b
6 changed files with 20 additions and 14 deletions
+4 -4
View File
@@ -9,8 +9,8 @@ const actualizarTicket = async (body) => {
'id Inscripcion',
true
);
const monto = validarNumeroEntero(body.monto, 'monto', true);
const folio = validarNumeroEntero(body.folio, 'folio', true);
return Inscripcion.findOne({
where: {
@@ -21,9 +21,9 @@ const actualizarTicket = async (body) => {
if (!res) throw new Error('No pudimos encontrar este ticket.');
return Inscripcion.findOne({
where: {
folio: body.folio,
folio,
cancelacion: 0,
idInscripcion: {[Op.ne]: idInscripcion}
idInscripcion: { [Op.ne]: idInscripcion },
},
});
})
@@ -34,7 +34,7 @@ const actualizarTicket = async (body) => {
.then((res) => {
return Inscripcion.update(
{
folio: body.folio,
folio,
monto,
fechaTicket: body.fechaTicket,
},