|
@@ -34,7 +34,6 @@ export class TIT implements InstrumentComponent {
|
|
|
"amortizacion_porcentaje",
|
|
"amortizacion_porcentaje",
|
|
|
"amortizacion_capital",
|
|
"amortizacion_capital",
|
|
|
"ingreso_bruto",
|
|
"ingreso_bruto",
|
|
|
- "impuesto",
|
|
|
|
|
"ingreso_neto",
|
|
"ingreso_neto",
|
|
|
"renta",
|
|
"renta",
|
|
|
"saldo"
|
|
"saldo"
|
|
@@ -137,6 +136,13 @@ export class TIT implements InstrumentComponent {
|
|
|
ytm_vencimiento_porcentaje_venta: any;
|
|
ytm_vencimiento_porcentaje_venta: any;
|
|
|
comision_bolsa_venta: any;
|
|
comision_bolsa_venta: any;
|
|
|
consolidado_proyeccion: any;
|
|
consolidado_proyeccion: any;
|
|
|
|
|
+ ejecuciones = [
|
|
|
|
|
+ { codigo: 1, nombre: "Completa" },
|
|
|
|
|
+ { codigo: 0, nombre: "Parcial" }
|
|
|
|
|
+ ];
|
|
|
|
|
+ tipoEjecucion: number = 0;
|
|
|
|
|
+ precio_compra: any;
|
|
|
|
|
+ precio_venta: any;
|
|
|
|
|
|
|
|
constructor(
|
|
constructor(
|
|
|
private formBuilder: FormBuilder,
|
|
private formBuilder: FormBuilder,
|
|
@@ -155,6 +161,12 @@ export class TIT implements InstrumentComponent {
|
|
|
this.instrument_work != undefined &&
|
|
this.instrument_work != undefined &&
|
|
|
this.instrument_work.proyecciones != ""
|
|
this.instrument_work.proyecciones != ""
|
|
|
) {
|
|
) {
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.instrument_work["valor_nominal_venta"] != undefined &&
|
|
|
|
|
+ +this.instrument_work["valor_nominal_venta"] > 0
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.tipoEjecucion = 1;
|
|
|
|
|
+ }
|
|
|
this.hasProjections = true;
|
|
this.hasProjections = true;
|
|
|
this.consolidado_proyeccion = this.instrument_work.proyecciones[
|
|
this.consolidado_proyeccion = this.instrument_work.proyecciones[
|
|
|
this.instrument_work.proyecciones.length - 1
|
|
this.instrument_work.proyecciones.length - 1
|
|
@@ -184,6 +196,8 @@ export class TIT implements InstrumentComponent {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.investmentProposalForm = this.formBuilder.group({
|
|
this.investmentProposalForm = this.formBuilder.group({
|
|
|
|
|
+ ejecucion: [this.instrument_exists ? "" : this.tipoEjecucion],
|
|
|
|
|
+
|
|
|
renta_porcentaje: [
|
|
renta_porcentaje: [
|
|
|
this.instrument_exists ? "" : this.instrument_work.renta_porcentaje,
|
|
this.instrument_exists ? "" : this.instrument_work.renta_porcentaje,
|
|
|
[
|
|
[
|
|
@@ -476,6 +490,7 @@ export class TIT implements InstrumentComponent {
|
|
|
id_periodicidad: +this.general.periodicidad
|
|
id_periodicidad: +this.general.periodicidad
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
|
|
+ completo: this.tipoEjecucion,
|
|
|
renta_porcentaje: +this.f.renta_porcentaje.value,
|
|
renta_porcentaje: +this.f.renta_porcentaje.value,
|
|
|
costo_cedeval: +this.f.costo_cedeval.value,
|
|
costo_cedeval: +this.f.costo_cedeval.value,
|
|
|
costo_transferencia: +this.f.costo_transferencia.value,
|
|
costo_transferencia: +this.f.costo_transferencia.value,
|
|
@@ -497,19 +512,31 @@ export class TIT implements InstrumentComponent {
|
|
|
comision_bolsa_porcentaje_venta: this.f
|
|
comision_bolsa_porcentaje_venta: this.f
|
|
|
.comision_bolsa_porcentaje_venta.value,
|
|
.comision_bolsa_porcentaje_venta.value,
|
|
|
|
|
|
|
|
- fecha_vencimiento_compra: this.f.fecha_vencimiento_compra.value
|
|
|
|
|
- .singleDate.formatted,
|
|
|
|
|
- fecha_ultima_cupon_compra: this.f.fecha_ultima_cupon_compra.value
|
|
|
|
|
- .singleDate.formatted,
|
|
|
|
|
- fecha_liquidacion_compra: this.f.fecha_liquidacion_compra.value
|
|
|
|
|
- .singleDate.formatted,
|
|
|
|
|
-
|
|
|
|
|
- fecha_vencimiento_venta: this.f.fecha_vencimiento_venta.value
|
|
|
|
|
- .singleDate.formatted,
|
|
|
|
|
- fecha_ultima_cupon_venta: this.f.fecha_ultima_cupon_venta.value
|
|
|
|
|
- .singleDate.formatted,
|
|
|
|
|
- fecha_liquidacion_venta: this.f.fecha_liquidacion_venta.value
|
|
|
|
|
- .singleDate.formatted,
|
|
|
|
|
|
|
+ fecha_vencimiento_compra:
|
|
|
|
|
+ this.f.fecha_vencimiento_compra.value == ""
|
|
|
|
|
+ ? ""
|
|
|
|
|
+ : this.f.fecha_vencimiento_compra.value.singleDate.formatted,
|
|
|
|
|
+ fecha_ultima_cupon_compra:
|
|
|
|
|
+ this.f.fecha_ultima_cupon_compra.value == ""
|
|
|
|
|
+ ? ""
|
|
|
|
|
+ : this.f.fecha_ultima_cupon_compra.value.singleDate.formatted,
|
|
|
|
|
+ fecha_liquidacion_compra:
|
|
|
|
|
+ this.f.fecha_liquidacion_compra.value == ""
|
|
|
|
|
+ ? ""
|
|
|
|
|
+ : this.f.fecha_liquidacion_compra.value.singleDate.formatted,
|
|
|
|
|
+
|
|
|
|
|
+ fecha_vencimiento_venta:
|
|
|
|
|
+ this.f.fecha_vencimiento_venta.value == ""
|
|
|
|
|
+ ? ""
|
|
|
|
|
+ : this.f.fecha_vencimiento_venta.value.singleDate.formatted,
|
|
|
|
|
+ fecha_ultima_cupon_venta:
|
|
|
|
|
+ this.f.fecha_ultima_cupon_venta.value == ""
|
|
|
|
|
+ ? ""
|
|
|
|
|
+ : this.f.fecha_ultima_cupon_venta.value.singleDate.formatted,
|
|
|
|
|
+ fecha_liquidacion_venta:
|
|
|
|
|
+ this.f.fecha_liquidacion_venta.value == ""
|
|
|
|
|
+ ? ""
|
|
|
|
|
+ : this.f.fecha_liquidacion_venta.value.singleDate.formatted,
|
|
|
fecha_emision: this.f.fecha_emision.value.singleDate.formatted,
|
|
fecha_emision: this.f.fecha_emision.value.singleDate.formatted,
|
|
|
amortizacion_porcentajes: this.amortizaciones
|
|
amortizacion_porcentajes: this.amortizaciones
|
|
|
}
|
|
}
|
|
@@ -586,6 +613,12 @@ export class TIT implements InstrumentComponent {
|
|
|
|
|
|
|
|
// Resultado de la operacion
|
|
// Resultado de la operacion
|
|
|
this.operation_result = true;
|
|
this.operation_result = true;
|
|
|
|
|
+ this.valor_transado_compra =
|
|
|
|
|
+ ans["result"]["resultado_operacion"]["valor_transado_compra"];
|
|
|
|
|
+ this.precio_compra =
|
|
|
|
|
+ ans["result"]["resultado_operacion"]["precio_compra"];
|
|
|
|
|
+ this.precio_venta =
|
|
|
|
|
+ ans["result"]["resultado_operacion"]["precio_venta"];
|
|
|
this.dias_tenencia_total =
|
|
this.dias_tenencia_total =
|
|
|
ans["result"]["resultado_operacion"]["dias_tenencia_total"];
|
|
ans["result"]["resultado_operacion"]["dias_tenencia_total"];
|
|
|
this.ganancia_perdida_capital =
|
|
this.ganancia_perdida_capital =
|
|
@@ -595,7 +628,7 @@ export class TIT implements InstrumentComponent {
|
|
|
this.costos_totales =
|
|
this.costos_totales =
|
|
|
ans["result"]["resultado_operacion"]["costos_totales"];
|
|
ans["result"]["resultado_operacion"]["costos_totales"];
|
|
|
this.ganancia_perdida_total =
|
|
this.ganancia_perdida_total =
|
|
|
- ans["result"]["resultado_operacion"]["ganancia_perdida_total"];
|
|
|
|
|
|
|
+ ans["result"]["resultado_operacion"]["ganancia_perdida_total_neto"];
|
|
|
this.ganancia_perdida_capital_porcentaje =
|
|
this.ganancia_perdida_capital_porcentaje =
|
|
|
ans["result"]["resultado_operacion"][
|
|
ans["result"]["resultado_operacion"][
|
|
|
"ganancia_perdida_capital_porcentaje"
|
|
"ganancia_perdida_capital_porcentaje"
|
|
@@ -603,15 +636,13 @@ export class TIT implements InstrumentComponent {
|
|
|
this.intereses_porcentaje =
|
|
this.intereses_porcentaje =
|
|
|
ans["result"]["resultado_operacion"]["intereses_porcentaje"];
|
|
ans["result"]["resultado_operacion"]["intereses_porcentaje"];
|
|
|
this.neto_antes_impuesto_porcentaje =
|
|
this.neto_antes_impuesto_porcentaje =
|
|
|
- ans["result"]["resultado_operacion"][
|
|
|
|
|
- "neto_antes_impuesto_porcentaje"
|
|
|
|
|
- ];
|
|
|
|
|
|
|
+ ans["result"]["resultado_operacion"]["neto_antes_renta_porcentaje"];
|
|
|
this.neto_despues_impuesto_porcentaje =
|
|
this.neto_despues_impuesto_porcentaje =
|
|
|
ans["result"]["resultado_operacion"][
|
|
ans["result"]["resultado_operacion"][
|
|
|
- "neto_despues_impuesto_porcentaje"
|
|
|
|
|
|
|
+ "neto_despues_renta_porcentaje"
|
|
|
];
|
|
];
|
|
|
this.total_ingresos_recibidos =
|
|
this.total_ingresos_recibidos =
|
|
|
- ans["result"]["resultado_operacion"]["total_ingresos_recibidos"];
|
|
|
|
|
|
|
+ ans["result"]["resultado_operacion"]["total_interes_recibidos"];
|
|
|
|
|
|
|
|
// Proyecciones
|
|
// Proyecciones
|
|
|
this.proyecciones = ans["result"]["proyecciones"];
|
|
this.proyecciones = ans["result"]["proyecciones"];
|
|
@@ -631,6 +662,8 @@ export class TIT implements InstrumentComponent {
|
|
|
|
|
|
|
|
// Obj
|
|
// Obj
|
|
|
this.titulosObject = {
|
|
this.titulosObject = {
|
|
|
|
|
+ completo: this.tipoEjecucion,
|
|
|
|
|
+ cancelado: this.tipoEjecucion,
|
|
|
renta_porcentaje: this.investmentProposalForm.value
|
|
renta_porcentaje: this.investmentProposalForm.value
|
|
|
.renta_porcentaje,
|
|
.renta_porcentaje,
|
|
|
costo_cedeval: this.investmentProposalForm.value.costo_cedeval,
|
|
costo_cedeval: this.investmentProposalForm.value.costo_cedeval,
|
|
@@ -648,6 +681,13 @@ export class TIT implements InstrumentComponent {
|
|
|
comision_bolsa_porcentaje_compra: this.investmentProposalForm.value
|
|
comision_bolsa_porcentaje_compra: this.investmentProposalForm.value
|
|
|
.comision_bolsa_porcentaje_compra,
|
|
.comision_bolsa_porcentaje_compra,
|
|
|
|
|
|
|
|
|
|
+ fecha_vencimiento_compra: this.f.fecha_vencimiento_compra.value
|
|
|
|
|
+ .singleDate.formatted,
|
|
|
|
|
+ fecha_ultima_cupon_compra: this.f.fecha_ultima_cupon_compra.value
|
|
|
|
|
+ .singleDate.formatted,
|
|
|
|
|
+ fecha_liquidacion_compra: this.f.fecha_liquidacion_compra.value
|
|
|
|
|
+ .singleDate.formatted,
|
|
|
|
|
+
|
|
|
valor_nominal_venta: this.investmentProposalForm.value
|
|
valor_nominal_venta: this.investmentProposalForm.value
|
|
|
.valor_nominal_venta,
|
|
.valor_nominal_venta,
|
|
|
precio_venta: this.investmentProposalForm.value.precio_venta,
|
|
precio_venta: this.investmentProposalForm.value.precio_venta,
|
|
@@ -659,14 +699,6 @@ export class TIT implements InstrumentComponent {
|
|
|
.comision_casa_porcentaje_venta,
|
|
.comision_casa_porcentaje_venta,
|
|
|
comision_bolsa_porcentaje_venta: this.investmentProposalForm.value
|
|
comision_bolsa_porcentaje_venta: this.investmentProposalForm.value
|
|
|
.comision_bolsa_porcentaje_venta,
|
|
.comision_bolsa_porcentaje_venta,
|
|
|
-
|
|
|
|
|
- fecha_vencimiento_compra: this.f.fecha_vencimiento_compra.value
|
|
|
|
|
- .singleDate.formatted,
|
|
|
|
|
- fecha_ultima_cupon_compra: this.f.fecha_ultima_cupon_compra.value
|
|
|
|
|
- .singleDate.formatted,
|
|
|
|
|
- fecha_liquidacion_compra: this.f.fecha_liquidacion_compra.value
|
|
|
|
|
- .singleDate.formatted,
|
|
|
|
|
-
|
|
|
|
|
fecha_vencimiento_venta: this.f.fecha_vencimiento_venta.value
|
|
fecha_vencimiento_venta: this.f.fecha_vencimiento_venta.value
|
|
|
.singleDate.formatted,
|
|
.singleDate.formatted,
|
|
|
fecha_ultima_cupon_venta: this.f.fecha_ultima_cupon_venta.value
|
|
fecha_ultima_cupon_venta: this.f.fecha_ultima_cupon_venta.value
|
|
@@ -768,4 +800,8 @@ export class TIT implements InstrumentComponent {
|
|
|
goToNext(form: any) {
|
|
goToNext(form: any) {
|
|
|
this.getCalculations(form, true);
|
|
this.getCalculations(form, true);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ toggle_ejecucion(input: any) {
|
|
|
|
|
+ this.tipoEjecucion = +input;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|