Validaciones y correcciones
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
const moment = require('moment');
|
||||
const { convertArrayToCSV } = require('convert-array-to-csv');
|
||||
const { Op, where } = require('sequelize');
|
||||
const { Op } = require('sequelize');
|
||||
const helperPath = '../../helper';
|
||||
const helper = require(`${helperPath}/helper`);
|
||||
const validar = require(`${helperPath}/validar`);
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// const validar = require('../../../helper/validar');
|
||||
const dbPath = '../../db/tablas';
|
||||
const Usuario = require(`${dbPath}/Usuario`);
|
||||
const Inscripcion = require(`${dbPath}/Inscripcion`);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const moment = require('moment');
|
||||
const fs = require('fs');
|
||||
const { validarNumeroEntero } = require('../../helper/validar');
|
||||
const { validarNumeroEntero, validarNumero } = require('../../helper/validar');
|
||||
const { eliminarArchivo } = require('../../helper/helper');
|
||||
const dbPath = '../../db/tablas';
|
||||
const Carrera = require(`${dbPath}/Carrera`);
|
||||
@@ -10,6 +10,7 @@ const inscripcion = async (body, file) => {
|
||||
const ahora = moment();
|
||||
const idUsuario = validarNumeroEntero(body.idUsuario, 'id Usuario', true);
|
||||
const idArea = validarNumeroEntero(body.idArea, 'id Area', true);
|
||||
const monto = validarNumero(body.monto, 'monto', true);
|
||||
const folio = body.folio;
|
||||
|
||||
return Inscripcion.findOne({
|
||||
@@ -26,7 +27,7 @@ const inscripcion = async (body, file) => {
|
||||
idUsuario,
|
||||
idArea,
|
||||
folio,
|
||||
monto: body.monto,
|
||||
monto,
|
||||
hizoPago: true,
|
||||
rutaTicket: file.path,
|
||||
extension: file.mimetype.split('/')[1],
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
numeroCuenta,validacion,confirmacion,folio,monto,hizoPago,fechaInscripcion,idArea
|
||||
419085500,1,false,96320,6,true,02/23/2022,1
|
||||
numero_cuenta,id_area,folio,monto,hizo_pago,fecha_inscripcion
|
||||
419085500,1,99999,20,true,02/26/2022
|
||||
|
||||
|
Reference in New Issue
Block a user