reportes e inscripcion

This commit is contained in:
Andres2908
2022-02-17 00:54:55 -06:00
parent 30700e4e76
commit 458be977d3
5 changed files with 23 additions and 15 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

+1
View File
@@ -34,6 +34,7 @@ const reporte = async (body) => {
data.push({
numeroCuenta: res[i].Usuario.numeroCuenta,
idArea: res[i].idArea,
hizoPago: res[i].hizoPago,
fechaInscripcion: moment(res[i].fechaInscripcion).format('L'),
});
}
@@ -27,18 +27,20 @@ const inscripcion = async (body, file) => {
if (file) {
return Inscripcion.create({
idUsuario,
idArea,
folio,
monto: body.monto,
idArea,
fechaInscripcion: ahora.format(),
fechaTicket: body.fechaTicket,
hizoPago: true,
rutaTicket: file.path,
extension: file.mimetype.split('/')[1],
fechaInscripcion: ahora.format(),
fechaTicket: body.fechaTicket,
});
} else {
return Inscripcion.create({
idUsuario,
idArea,
hizoPago: false,
fechaInscripcion: ahora.format(),
});
}
+14 -8
View File
@@ -34,13 +34,8 @@ Inscripcion.init(
allowNull: true,
defaultValue: null,
},
fechaInscripcion: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
},
fechaTicket: {
type: DataTypes.DATE,
hizoPago: {
type: DataTypes.BOOLEAN,
allowNull: true,
defaultValue: null,
},
@@ -51,7 +46,18 @@ Inscripcion.init(
},
extension: {
type: DataTypes.STRING(6),
allowNull: false,
allowNull: true,
defaultValue: null,
},
fechaInscripcion: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
},
fechaTicket: {
type: DataTypes.DATE,
allowNull: true,
defaultValue: null,
},
},
{
+3 -4
View File
@@ -1,4 +1,3 @@
numeroCuenta,idArea,fechaInscripcion
419085500,1,02/16/2022
419085500,3,02/16/2022
316304326,1,02/16/2022
numeroCuenta,idArea,hizoPago,fechaInscripcion
419085500,3,true,02/17/2022
419085500,1,false,02/17/2022
1 numeroCuenta idArea hizoPago fechaInscripcion
2 419085500 1 3 true 02/16/2022 02/17/2022
3 419085500 3 1 false 02/16/2022 02/17/2022
316304326 1 02/16/2022