|
@@ -134,9 +134,23 @@ export class FUTU implements InstrumentComponent {
|
|
|
console.log(this.operaciones);
|
|
console.log(this.operaciones);
|
|
|
console.log(this.instrument_work);
|
|
console.log(this.instrument_work);
|
|
|
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.instrument_work != undefined &&
|
|
|
|
|
+ this.instrument_work.completo == undefined
|
|
|
|
|
+ ) {
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.instrument_work.valor_pagado > 0 &&
|
|
|
|
|
+ this.instrument_work.valor_recibido > 0
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.ejecucion = 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.ejecucion = +this.instrument_work_summary.completo;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
this.investmentProposalForm = this.formBuilder.group({
|
|
this.investmentProposalForm = this.formBuilder.group({
|
|
|
operacion: [this.instrument_exists ? "" : this.instrument_work.corto],
|
|
operacion: [this.instrument_exists ? "" : this.instrument_work.corto],
|
|
|
- ejecucion: [this.instrument_exists ? "" : this.instrument_work.completa],
|
|
|
|
|
|
|
+ ejecucion: [this.instrument_exists ? "" : this.ejecucion],
|
|
|
ticket: [this.instrument_exists ? "" : this.instrument_work.ticket],
|
|
ticket: [this.instrument_exists ? "" : this.instrument_work.ticket],
|
|
|
precio_unitario_compra: [
|
|
precio_unitario_compra: [
|
|
|
this.instrument_exists
|
|
this.instrument_exists
|
|
@@ -275,8 +289,17 @@ export class FUTU implements InstrumentComponent {
|
|
|
console.log("datos");
|
|
console.log("datos");
|
|
|
console.log(this.instrument_work_summary);
|
|
console.log(this.instrument_work_summary);
|
|
|
|
|
|
|
|
- this.operacion = this.instrument_work_summary.corto;
|
|
|
|
|
- this.ejecucion = this.instrument_work_summary.completo;
|
|
|
|
|
|
|
+ this.operacion = +this.instrument_work_summary.corto;
|
|
|
|
|
+ if (this.instrument_work_summary.completo == undefined) {
|
|
|
|
|
+ if (
|
|
|
|
|
+ this.instrument_work_summary.valor_pagado > 0 &&
|
|
|
|
|
+ this.instrument_work_summary.valor_recibido > 0
|
|
|
|
|
+ ) {
|
|
|
|
|
+ this.ejecucion = 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.ejecucion = +this.instrument_work_summary.completo;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
this.toggle_operacion(this.operacion);
|
|
this.toggle_operacion(this.operacion);
|
|
|
this.toggle_ejecucion(this.ejecucion);
|
|
this.toggle_ejecucion(this.ejecucion);
|