reportes e inscripcion
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 129 KiB |
@@ -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(),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user