fixed perido
This commit is contained in:
@@ -94,6 +94,7 @@ export class OperationsService {
|
|||||||
|
|
||||||
const user = await this.userService.findOne(id_usuario);
|
const user = await this.userService.findOne(id_usuario);
|
||||||
const alum = await this.alumnoService.findOne(id_cuenta);
|
const alum = await this.alumnoService.findOne(id_cuenta);
|
||||||
|
const periodo = await this.periodoService.getPeriodoActivo();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const detalleData = {
|
const detalleData = {
|
||||||
@@ -102,6 +103,7 @@ export class OperationsService {
|
|||||||
alum,
|
alum,
|
||||||
fecha_recibo,
|
fecha_recibo,
|
||||||
monto,
|
monto,
|
||||||
|
periodo
|
||||||
};
|
};
|
||||||
|
|
||||||
await this.reciboService.create(detalleData, queryRunner.manager);
|
await this.reciboService.create(detalleData, queryRunner.manager);
|
||||||
@@ -138,6 +140,7 @@ export class OperationsService {
|
|||||||
|
|
||||||
const user = await this.userService.findOne(id_usuario);
|
const user = await this.userService.findOne(id_usuario);
|
||||||
const alum = await this.alumnoService.findOne(id_cuenta);
|
const alum = await this.alumnoService.findOne(id_cuenta);
|
||||||
|
const periodo = await this.periodoService.getPeriodoActivo();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const detalleRecibo = {
|
const detalleRecibo = {
|
||||||
@@ -156,6 +159,7 @@ export class OperationsService {
|
|||||||
alum,
|
alum,
|
||||||
monto,
|
monto,
|
||||||
fecha_operacion: new Date(),
|
fecha_operacion: new Date(),
|
||||||
|
periodo,
|
||||||
};
|
};
|
||||||
|
|
||||||
await this.detalleServicioService.Create(
|
await this.detalleServicioService.Create(
|
||||||
@@ -204,27 +208,30 @@ export class OperationsService {
|
|||||||
|
|
||||||
const user = await this.userService.findOne(id_usuario);
|
const user = await this.userService.findOne(id_usuario);
|
||||||
const alum = await this.alumnoService.findOne(id_cuenta);
|
const alum = await this.alumnoService.findOne(id_cuenta);
|
||||||
|
const periodo = await this.periodoService.getPeriodoActivo();
|
||||||
|
|
||||||
|
const detalleRecibo = {
|
||||||
|
folio_recibo,
|
||||||
|
user,
|
||||||
|
alum,
|
||||||
|
fecha_recibo,
|
||||||
|
monto,
|
||||||
|
};
|
||||||
|
|
||||||
|
const detalleData = {
|
||||||
|
servicio: 4,
|
||||||
|
user,
|
||||||
|
alum,
|
||||||
|
monto,
|
||||||
|
fecha_operacion: new Date(),
|
||||||
|
periodo,
|
||||||
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const detalleRecibo = {
|
|
||||||
folio_recibo,
|
|
||||||
user,
|
|
||||||
alum,
|
|
||||||
fecha_recibo,
|
|
||||||
monto,
|
|
||||||
};
|
|
||||||
|
|
||||||
await this.reciboService.create(detalleRecibo, queryRunner.manager);
|
await this.reciboService.create(detalleRecibo, queryRunner.manager);
|
||||||
|
|
||||||
const detalleData = {
|
const ola = await this.detalleServicioService.Create(
|
||||||
servicio: 4,
|
|
||||||
user,
|
|
||||||
alum,
|
|
||||||
monto,
|
|
||||||
fecha_operacion: new Date(),
|
|
||||||
};
|
|
||||||
|
|
||||||
await this.detalleServicioService.Create(
|
|
||||||
detalleData,
|
detalleData,
|
||||||
queryRunner.manager,
|
queryRunner.manager,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export class DetalleServicioService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
findAll() {
|
findAll() {
|
||||||
return this.detalleServicioRepository.find({ take: 100 });
|
return this.detalleServicioRepository.find({ take: 100 ,order:{fecha_operacion:'DESC'}});
|
||||||
}
|
}
|
||||||
|
|
||||||
async findByDateRange(desde: string, hasta: string) {
|
async findByDateRange(desde: string, hasta: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user