|
@@ -77,6 +77,7 @@ export class PaymentInfoComponent implements OnInit {
|
|
|
investmentService: any;
|
|
investmentService: any;
|
|
|
payment_check: boolean;
|
|
payment_check: boolean;
|
|
|
payment_transfer: boolean;
|
|
payment_transfer: boolean;
|
|
|
|
|
+ accounts_destination: any;
|
|
|
|
|
|
|
|
constructor(
|
|
constructor(
|
|
|
private router: Router,
|
|
private router: Router,
|
|
@@ -158,6 +159,12 @@ export class PaymentInfoComponent implements OnInit {
|
|
|
//this.payment_types = res;
|
|
//this.payment_types = res;
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
|
|
+ this.catalogService
|
|
|
|
|
+ .getCatalogInfo("cuentas-bancaria-destino")
|
|
|
|
|
+ .subscribe(res => {
|
|
|
|
|
+ this.accounts_destination = res;
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
this.investmentProposalForm = this.formBuilder.group({
|
|
this.investmentProposalForm = this.formBuilder.group({
|
|
|
monto: [
|
|
monto: [
|
|
|
this.inversionAmount,
|
|
this.inversionAmount,
|
|
@@ -233,7 +240,7 @@ export class PaymentInfoComponent implements OnInit {
|
|
|
Swal.fire({
|
|
Swal.fire({
|
|
|
title: `<h3>Enviar información de pago</h3>`,
|
|
title: `<h3>Enviar información de pago</h3>`,
|
|
|
icon: "info",
|
|
icon: "info",
|
|
|
- html: `${this.generated_inputs_next}`,
|
|
|
|
|
|
|
+ html: `<div>Notificar a:</div>${this.generated_inputs_next}`,
|
|
|
confirmButtonText: "Enviar información",
|
|
confirmButtonText: "Enviar información",
|
|
|
showCancelButton: true,
|
|
showCancelButton: true,
|
|
|
cancelButtonText: "Cancelar",
|
|
cancelButtonText: "Cancelar",
|
|
@@ -255,24 +262,23 @@ export class PaymentInfoComponent implements OnInit {
|
|
|
this.reviewProposal["notificar"] = array.toString();
|
|
this.reviewProposal["notificar"] = array.toString();
|
|
|
this.paymentObject = {
|
|
this.paymentObject = {
|
|
|
monto: this.investmentProposalForm.value.monto,
|
|
monto: this.investmentProposalForm.value.monto,
|
|
|
- id_tipo_pago: this.investmentProposalForm.value.tipo_pago,
|
|
|
|
|
- id_cuenta_bancaria: this.investmentProposalForm.value
|
|
|
|
|
|
|
+ id_tipo_pago: +this.investmentProposalForm.value.tipo_pago,
|
|
|
|
|
+ id_cuenta_bancaria: +this.investmentProposalForm.value
|
|
|
.cuenta_bancaria,
|
|
.cuenta_bancaria,
|
|
|
|
|
|
|
|
//fecha_pago: this.investmentProposalForm.value.fecha_pago.singleDate.formatted,
|
|
//fecha_pago: this.investmentProposalForm.value.fecha_pago.singleDate.formatted,
|
|
|
fecha_vencimiento: this.investmentProposalForm.value
|
|
fecha_vencimiento: this.investmentProposalForm.value
|
|
|
.fecha_vencimiento.singleDate.formatted,
|
|
.fecha_vencimiento.singleDate.formatted,
|
|
|
- id_inversion: this.investmentProposalID
|
|
|
|
|
|
|
+ id_inversion: +this.investmentProposalID
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- if (this.investmentProposalForm.value.tipo_pago == 2) {
|
|
|
|
|
|
|
+ if (+this.investmentProposalForm.value.tipo_pago == 2) {
|
|
|
this.paymentObject[
|
|
this.paymentObject[
|
|
|
"emitir_nombre"
|
|
"emitir_nombre"
|
|
|
] = this.investmentProposalForm.value.emitir_nombre;
|
|
] = this.investmentProposalForm.value.emitir_nombre;
|
|
|
- } else if (this.investmentProposalForm.value.tipo_pago == 3) {
|
|
|
|
|
- this.paymentObject[
|
|
|
|
|
- "id_cuenta_bancaria_destino"
|
|
|
|
|
- ] = this.investmentProposalForm.value.cuenta_bancaria_destino;
|
|
|
|
|
|
|
+ } else if (+this.investmentProposalForm.value.tipo_pago == 3) {
|
|
|
|
|
+ this.paymentObject["id_cuenta_bancaria_destino"] = +this
|
|
|
|
|
+ .investmentProposalForm.value.cuenta_bancaria_destino;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
this.investmentsService
|
|
this.investmentsService
|