|
@@ -687,8 +687,7 @@ export class TIT implements InstrumentComponent {
|
|
|
.singleDate.formatted,
|
|
.singleDate.formatted,
|
|
|
fecha_liquidacion_compra: this.f.fecha_liquidacion_compra.value
|
|
fecha_liquidacion_compra: this.f.fecha_liquidacion_compra.value
|
|
|
.singleDate.formatted,
|
|
.singleDate.formatted,
|
|
|
- fecha_emision: this.f.fecha_emision.value
|
|
|
|
|
- .singleDate.formatted,
|
|
|
|
|
|
|
+ fecha_emision: this.f.fecha_emision.value.singleDate.formatted,
|
|
|
|
|
|
|
|
// Instrumento de compra
|
|
// Instrumento de compra
|
|
|
|
|
|
|
@@ -838,5 +837,87 @@ export class TIT implements InstrumentComponent {
|
|
|
|
|
|
|
|
toggle_ejecucion(input: any) {
|
|
toggle_ejecucion(input: any) {
|
|
|
this.tipoEjecucion = +input;
|
|
this.tipoEjecucion = +input;
|
|
|
|
|
+ this.setValidators();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ setValidators() {
|
|
|
|
|
+ const precio_venta = this.investmentProposalForm.get("precio_venta");
|
|
|
|
|
+
|
|
|
|
|
+ const valor_nominal_venta = this.investmentProposalForm.get(
|
|
|
|
|
+ "valor_nominal_venta"
|
|
|
|
|
+ );
|
|
|
|
|
+ const precio_vencimiento_venta = this.investmentProposalForm.get(
|
|
|
|
|
+ "precio_vencimiento_venta"
|
|
|
|
|
+ );
|
|
|
|
|
+ const cupon_porcentaje_venta = this.investmentProposalForm.get(
|
|
|
|
|
+ "cupon_porcentaje_venta"
|
|
|
|
|
+ );
|
|
|
|
|
+ const comision_casa_porcentaje_venta = this.investmentProposalForm.get(
|
|
|
|
|
+ "comision_casa_porcentaje_venta"
|
|
|
|
|
+ );
|
|
|
|
|
+ const comision_bolsa_porcentaje_venta = this.investmentProposalForm.get(
|
|
|
|
|
+ "comision_bolsa_porcentaje_venta"
|
|
|
|
|
+ );
|
|
|
|
|
+ const fecha_ultima_cupon_venta = this.investmentProposalForm.get(
|
|
|
|
|
+ "fecha_ultima_cupon_venta"
|
|
|
|
|
+ );
|
|
|
|
|
+ const fecha_liquidacion_venta = this.investmentProposalForm.get(
|
|
|
|
|
+ "fecha_liquidacion_venta"
|
|
|
|
|
+ );
|
|
|
|
|
+ const fecha_vencimiento_venta = this.investmentProposalForm.get(
|
|
|
|
|
+ "fecha_vencimiento_venta"
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ if (this.tipoEjecucion == 1) {
|
|
|
|
|
+ precio_venta.setValidators([
|
|
|
|
|
+ Validators.required,
|
|
|
|
|
+ Validators.pattern(/^[+]?([0-9]+(?:[\.][0-9]*)?|\.[0-9]+)$/)
|
|
|
|
|
+ ]);
|
|
|
|
|
+
|
|
|
|
|
+ valor_nominal_venta.setValidators([
|
|
|
|
|
+ Validators.required,
|
|
|
|
|
+ Validators.pattern(/^[+]?([0-9]+(?:[\.][0-9]*)?|\.[0-9]+)$/)
|
|
|
|
|
+ ]);
|
|
|
|
|
+ precio_vencimiento_venta.setValidators([
|
|
|
|
|
+ Validators.required,
|
|
|
|
|
+ Validators.pattern(/^[+]?([0-9]+(?:[\.][0-9]*)?|\.[0-9]+)$/)
|
|
|
|
|
+ ]);
|
|
|
|
|
+ cupon_porcentaje_venta.setValidators([
|
|
|
|
|
+ Validators.required,
|
|
|
|
|
+ Validators.pattern(/^[+]?([0-9]+(?:[\.][0-9]*)?|\.[0-9]+)$/)
|
|
|
|
|
+ ]);
|
|
|
|
|
+ comision_casa_porcentaje_venta.setValidators([
|
|
|
|
|
+ Validators.required,
|
|
|
|
|
+ Validators.pattern(/^[+]?([0-9]+(?:[\.][0-9]*)?|\.[0-9]+)$/)
|
|
|
|
|
+ ]);
|
|
|
|
|
+ comision_bolsa_porcentaje_venta.setValidators([
|
|
|
|
|
+ Validators.required,
|
|
|
|
|
+ Validators.pattern(/^[+]?([0-9]+(?:[\.][0-9]*)?|\.[0-9]+)$/)
|
|
|
|
|
+ ]);
|
|
|
|
|
+ fecha_ultima_cupon_venta.setValidators([Validators.required]);
|
|
|
|
|
+ fecha_liquidacion_venta.setValidators([Validators.required]);
|
|
|
|
|
+ fecha_vencimiento_venta.setValidators([Validators.required]);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ precio_venta.setValidators(null);
|
|
|
|
|
+
|
|
|
|
|
+ valor_nominal_venta.setValidators(null);
|
|
|
|
|
+ precio_vencimiento_venta.setValidators(null);
|
|
|
|
|
+ cupon_porcentaje_venta.setValidators(null);
|
|
|
|
|
+ comision_casa_porcentaje_venta.setValidators(null);
|
|
|
|
|
+ comision_bolsa_porcentaje_venta.setValidators(null);
|
|
|
|
|
+ fecha_ultima_cupon_venta.setValidators(null);
|
|
|
|
|
+ fecha_liquidacion_venta.setValidators(null);
|
|
|
|
|
+ fecha_vencimiento_venta.setValidators(null);
|
|
|
|
|
+ }
|
|
|
|
|
+ precio_venta.updateValueAndValidity();
|
|
|
|
|
+
|
|
|
|
|
+ valor_nominal_venta.updateValueAndValidity();
|
|
|
|
|
+ precio_vencimiento_venta.updateValueAndValidity();
|
|
|
|
|
+ cupon_porcentaje_venta.updateValueAndValidity();
|
|
|
|
|
+ comision_casa_porcentaje_venta.updateValueAndValidity();
|
|
|
|
|
+ comision_bolsa_porcentaje_venta.updateValueAndValidity();
|
|
|
|
|
+ fecha_ultima_cupon_venta.updateValueAndValidity();
|
|
|
|
|
+ fecha_liquidacion_venta.updateValueAndValidity();
|
|
|
|
|
+ fecha_vencimiento_venta.updateValueAndValidity();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|