agregarRecibo
This commit is contained in:
@@ -50,10 +50,10 @@ const agregarRecibo = async (folio, monto, fechaTicket, numeroCuenta) => {
|
||||
const conn = await pool.getConnection().catch((err) => {
|
||||
throw new Error('No se pudo conectar con la db. ' + err);
|
||||
});
|
||||
|
||||
console.log(fechaTicket)
|
||||
return conn
|
||||
.query(
|
||||
`INSERT INTO recibo(folio_recibo, monto, fecha_recibo, fecha_registro, id_cuenta, id_usuario) values(${folio}, ${monto}, STR_TO_DATE('${fechaTicket}', '%m/%d/%Y'), now() ,${numeroCuenta}, 134)`
|
||||
`INSERT INTO recibo(folio_recibo, monto, fecha_recibo, fecha_registro, id_cuenta, id_usuario) values(${folio}, ${monto}, '${fechaTicket}', now() ,${numeroCuenta}, 134)`
|
||||
)
|
||||
.then((rows) => {
|
||||
conn.end();
|
||||
|
||||
@@ -67,10 +67,11 @@ const inscripcion = async (body, file) => {
|
||||
.then((res) => {
|
||||
if (file && folio && monto && fechaTicket) {
|
||||
fs.renameSync(file.path, file.path + '.' + file.mimetype.split('/')[1]);
|
||||
|
||||
agregarRecibo(
|
||||
folio,
|
||||
monto,
|
||||
moment(fechaTicket).format('L'),
|
||||
moment(new Date(fechaTicket)).format('YYYY-MM-DD'),
|
||||
numeroCuenta
|
||||
);
|
||||
agregarDetalleServicio(monto, numeroCuenta);
|
||||
|
||||
@@ -8,13 +8,13 @@ const login = async (body) => {
|
||||
body.numeroCuenta,
|
||||
'número de cuenta',
|
||||
true
|
||||
);
|
||||
const data = {
|
||||
usuario: 'votacionesUser',
|
||||
password: 'poasfnr*/049_]',
|
||||
numeroCuenta: numeroCuenta,
|
||||
passwordUser: body.passwordUser,
|
||||
};
|
||||
);
|
||||
const data = {
|
||||
usuario: 'votacionesUser',
|
||||
password: 'poasfnr*/049_]',
|
||||
numeroCuenta: numeroCuenta,
|
||||
passwordUser: body.passwordUser,
|
||||
};
|
||||
|
||||
return axios
|
||||
.post(
|
||||
|
||||
Reference in New Issue
Block a user