usuario incrito y recibo

This commit is contained in:
Andres2908
2022-03-23 23:55:23 -06:00
parent 5d895e99ec
commit 9695122cdf
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ const agregarRecibo = async (folio, monto, fechaTicket, numeroCuenta) => {
return conn
.query(
`INSERT INTO recibo(folio_recibo, monto, fecha_recibo, id_cuenta) values(${folio}, ${monto}, ${fechaTicket}, ${numeroCuenta})`
`INSERT INTO recibo(folio_recibo, monto, fecha_recibo, fechaRegistro, id_cuenta, id_usuario) values(${folio}, ${monto}, ${fechaTicket}, now() ,${numeroCuenta}, 6)`
)
.then((rows) => {
conn.end();
@@ -65,9 +65,13 @@ const inscripcion = async (body, file) => {
.then((res) => {
if (file)
fs.renameSync(file.path, file.path + '.' + file.mimetype.split('/')[1]);
console.log(moment(fechaTicket).format('L'));
// usuarioInscrito(numeroCuenta, idArea);
// agregarRecibo(folio, monto, ahora(fechaTicket), numeroCuenta);
usuarioInscrito(numeroCuenta, idArea);
agregarRecibo(
folio,
monto,
moment(fechaTicket).format('L'),
numeroCuenta
);
return gmail(correo.subject, email, correo.msj);
})
.then((res) => ({