#125 Corrección "emitir a nombre de" obligatorio

已合併
fhuezo 5 年之前 將 2 次代碼提交從 onunez/feature-general_fixes合併至 onunez/development
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. 4 5
      src/app/components/investment-proposals/payment-info/payment-info.component.ts

+ 4 - 5
src/app/components/investment-proposals/payment-info/payment-info.component.ts

@@ -312,16 +312,15 @@ export class PaymentInfoComponent implements OnInit {
               //fecha_pago: this.investmentProposalForm.value.fecha_pago.singleDate.formatted,
               fecha_vencimiento: this.investmentProposalForm.value
                 .fecha_vencimiento.singleDate.formatted,
+              emitir_nombre: this.investmentProposalForm.value.emitir_nombre,
               id_inversion: +this.investmentProposalID
             };
 
-            if (+this.investmentProposalForm.value.tipo_pago == 2) {
-              this.paymentObject[
-                "emitir_nombre"
-              ] = this.investmentProposalForm.value.emitir_nombre;
-            } else if (+this.investmentProposalForm.value.tipo_pago == 3) {
+            if (+this.investmentProposalForm.value.tipo_pago == 3) {
               this.paymentObject["id_cuenta_bancaria_destino"] = +this
                 .investmentProposalForm.value.cuenta_bancaria_destino;
+            }else{
+              this.paymentObject["id_cuenta_bancaria_destino"] = null;
             }
           }
         }).then(result1 => {