validacion del ticket
This commit is contained in:
@@ -89,7 +89,7 @@ const agregarDetalleServicio = async (monto, numeroCuenta) => {
|
||||
|
||||
return conn
|
||||
.query(
|
||||
`INSERT INTO recibo(monto, numero_hojas, id_cuenta, id_servicio, id_usuario, id_periodo) values(${monto}, 0, ${numeroCuenta}, 4, 134)`
|
||||
`INSERT INTO detalle_servicio(monto, numero_hojas, id_cuenta, id_servicio, id_usuario, id_periodo) values(${monto}, 0, ${numeroCuenta}, 4, 134)`
|
||||
)
|
||||
.then((rows) => {
|
||||
conn.end();
|
||||
|
||||
@@ -26,6 +26,7 @@ const validarTicket = async (body) => {
|
||||
{
|
||||
where: {
|
||||
folio,
|
||||
cancelacion: 0,
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -26,8 +26,8 @@ const inscripcion = async (body, file) => {
|
||||
);
|
||||
const idArea = validarNumeroEntero(body.idArea, 'id Area', true);
|
||||
const monto = validarNumero(body.monto, 'monto', true);
|
||||
const folio = validarNumero(body.folio, 'folio', true, 6);
|
||||
const fechaTicket = body.fechaTicket;
|
||||
const folio = body.folio;
|
||||
|
||||
let correo = {};
|
||||
let email = '';
|
||||
|
||||
+5
-13
@@ -60,20 +60,12 @@ const dataArea = async () => {
|
||||
};
|
||||
|
||||
const dataAdmin = async () => {
|
||||
const dataUser = ['Charly', 'Oscar', 'Jesus'];
|
||||
const dataPassWord = [
|
||||
process.env.ADMIN_PASSWORD1,
|
||||
process.env.ADMIN_PASSWORD2,
|
||||
process.env.ADMIN_PASSWORD3,
|
||||
];
|
||||
|
||||
console.log('\nPaso 4) Insertando admin.'.bold.blue);
|
||||
for (let i = 0; i < dataUser.length; i++)
|
||||
await Admin.create({
|
||||
idTipoUsuario: i + 1,
|
||||
usuario: dataUser[i],
|
||||
password: encriptar.encriptar(dataPassWord[i]),
|
||||
});
|
||||
await Admin.create({
|
||||
idTipoUsuario: 1,
|
||||
usuario: 'Araceli',
|
||||
password: encriptar.encriptar(process.env.ADMIN_PASSWORD),
|
||||
});
|
||||
};
|
||||
|
||||
const exe = async () => {
|
||||
|
||||
Reference in New Issue
Block a user