Browse Source

Merge branch 'feature-general_fixes' of onunez/frontend-inversiones into development

corrección "emitir a nombre de" obligatorio
Francisco Huezo 5 năm trước cách đây
mục cha
commit
71e230e7b8

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