Jelajahi Sumber

correccion "emitir a nombre de" obligatorio

Francisco huezo 5 tahun lalu
induk
melakukan
c8bb88a9a4

+ 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 => {