|
|
@@ -95,7 +95,10 @@ export class CETE implements InstrumentComponent {
|
|
|
dataSource2 = new MatTableDataSource(this.proyecciones);
|
|
|
hasProjections: boolean;
|
|
|
fecha_vencimiento: any;
|
|
|
- consolidado_proyeccion: any;
|
|
|
+ consolidado_proyeccion = {
|
|
|
+ total_ingreso_bruto: 0,
|
|
|
+ total_ingreso_neto: 0
|
|
|
+ };
|
|
|
|
|
|
constructor(
|
|
|
private formBuilder: FormBuilder,
|
|
|
@@ -114,9 +117,11 @@ export class CETE implements InstrumentComponent {
|
|
|
(this.instrument_work.proyecciones != "" ||
|
|
|
this.instrument_work != undefined)
|
|
|
) {
|
|
|
+ this.consolidado_proyeccion = this.instrument_work.proyecciones[
|
|
|
+ this.instrument_work.proyecciones.length - 1
|
|
|
+ ];
|
|
|
this.hasProjections = true;
|
|
|
- this.consolidado_proyeccion = this.instrument_work.proyecciones.pop();
|
|
|
- this.dataSource2.data = this.instrument_work.proyecciones;
|
|
|
+ this.dataSource2.data = this.instrument_work.proyecciones.slice(0, -1);
|
|
|
this.dataSource2.paginator = this.paginator;
|
|
|
this.dataSource2.sort = this.sort;
|
|
|
} else {
|
|
|
@@ -292,13 +297,14 @@ export class CETE implements InstrumentComponent {
|
|
|
this.proyecciones = ans["result"]["proyecciones"];
|
|
|
this.fecha_vencimiento = ans["result"]["fecha_vencimiento"];
|
|
|
|
|
|
- this.dataSource.data = this.proyecciones;
|
|
|
- this.proyecciones = ans["result"]["proyecciones"];
|
|
|
if (this.proyecciones != undefined && this.proyecciones.length > 0) {
|
|
|
this.hasProjections = true;
|
|
|
- //this.consolidado_proyeccion = this.proyecciones.pop();
|
|
|
- this.proyecciones;
|
|
|
+ let proyecciones_temp = this.proyecciones;
|
|
|
+ this.consolidado_proyeccion =
|
|
|
+ proyecciones_temp[proyecciones_temp.length - 1];
|
|
|
+ this.proyecciones = ans["result"]["proyecciones"];
|
|
|
}
|
|
|
+ this.dataSource.data = this.proyecciones.slice(0, -1);
|
|
|
this.dataSource.paginator = this.paginator;
|
|
|
this.dataSource.sort = this.sort;
|
|
|
|