agregarRecibo

This commit is contained in:
Andres2908
2022-09-07 14:24:14 -05:00
parent 1e3f49a1ab
commit ce6dc0405d
3 changed files with 11 additions and 10 deletions
+2 -2
View File
@@ -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();