|
|
@@ -18,6 +18,16 @@ export class InvestmentPrint implements OnInit {
|
|
|
rates: any;
|
|
|
instrumentName: any;
|
|
|
|
|
|
+ allowedStateForPayment = ["PGAPR", "LIQUI", "FINAL"];
|
|
|
+ monto: any;
|
|
|
+ codigo_inversion: any;
|
|
|
+ codigo: any;
|
|
|
+ tipo_pago: any;
|
|
|
+ cuenta_bancaria: any;
|
|
|
+ cuenta_bancaria_destino: any;
|
|
|
+ emitir_nombre: any;
|
|
|
+ fecha_vencimiento: any;
|
|
|
+
|
|
|
constructor(
|
|
|
private scriptService: PdfmakeScriptService,
|
|
|
private investmentService: InvestmentsService,
|
|
|
@@ -34,17 +44,39 @@ export class InvestmentPrint implements OnInit {
|
|
|
this.investmentResult = res["result"];
|
|
|
this.instrumentName = this.investmentResult.id_inversion_instrumento.id_tipo_instrumento.codigo;
|
|
|
this.investmentInstrument = this.investmentResult.id_inversion_instrumento.instrumento;
|
|
|
+
|
|
|
this.getInstrumentColumns(
|
|
|
this.instrumentName,
|
|
|
this.investmentInstrument
|
|
|
);
|
|
|
|
|
|
- this.catalogService.getRateTypes().subscribe(res => {
|
|
|
- this.rates = res.find(
|
|
|
- e => e.id_tipo_tasa == this.investmentResult.id_tipo_tasa
|
|
|
- );
|
|
|
- this.rates = this.rates != undefined ? this.rates.nombre : "-";
|
|
|
- });
|
|
|
+ if (
|
|
|
+ this.allowedStateForPayment.includes(
|
|
|
+ this.investmentResult["id_estado_inversion"]["codigo"]
|
|
|
+ )
|
|
|
+ ) {
|
|
|
+ this.investmentService
|
|
|
+ .getPaymentInfoProposalInvestment(this.investmentID)
|
|
|
+ .subscribe(resp => {
|
|
|
+ this.monto = resp["result"]["monto"];
|
|
|
+ this.codigo_inversion =
|
|
|
+ resp["result"]["id_inversion"]["codigo_inversion"];
|
|
|
+ this.codigo = resp["result"]["codigo"];
|
|
|
+ this.tipo_pago = resp["result"]["id_tipo_pago"]["nombre"];
|
|
|
+ this.cuenta_bancaria =
|
|
|
+ resp["result"]["id_cuenta_bancaria"]["nombre"];
|
|
|
+
|
|
|
+ if (resp["result"]["id_cuenta_bancaria_destino"] != undefined) {
|
|
|
+ this.cuenta_bancaria_destino =
|
|
|
+ resp["result"]["id_cuenta_bancaria_destino"]["nombre"];
|
|
|
+ }
|
|
|
+ if (resp["result"]["emitir_nombre"] != undefined) {
|
|
|
+ this.emitir_nombre = resp["result"]["emitir_nombre"];
|
|
|
+ }
|
|
|
+
|
|
|
+ this.fecha_vencimiento = resp["result"]["fecha_vencimiento"];
|
|
|
+ });
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
@@ -1043,6 +1075,73 @@ export class InvestmentPrint implements OnInit {
|
|
|
widths: [150, 200],
|
|
|
body: [[this.columnKey, this.columnValue]]
|
|
|
}
|
|
|
+ },
|
|
|
+
|
|
|
+ { text: "Información de pago", style: "subheader", margin: [0, 10] },
|
|
|
+ {
|
|
|
+ style: "tableExample",
|
|
|
+ table: {
|
|
|
+ widths: [100, 200],
|
|
|
+ body: [
|
|
|
+ /*[
|
|
|
+ "Estado de inversión: ",
|
|
|
+ {
|
|
|
+ text: this.investmentResult.,
|
|
|
+ italics: true,
|
|
|
+ color: "gray"
|
|
|
+ }
|
|
|
+ ],*/
|
|
|
+
|
|
|
+ [
|
|
|
+ "Monto: ",
|
|
|
+ {
|
|
|
+ text: this.monto,
|
|
|
+ italics: true,
|
|
|
+ color: "gray"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "Tipo pagp: ",
|
|
|
+ {
|
|
|
+ text: this.tipo_pago,
|
|
|
+ italics: true,
|
|
|
+ color: "gray"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "Cuenta bancaria: ",
|
|
|
+ {
|
|
|
+ text: this.cuenta_bancaria,
|
|
|
+ italics: true,
|
|
|
+ color: "gray"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "Cuenta bancaria destino: ",
|
|
|
+ {
|
|
|
+ text: this.cuenta_bancaria_destino,
|
|
|
+ italics: true,
|
|
|
+ color: "gray"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "Emisión a nombre de: ",
|
|
|
+ {
|
|
|
+ text: this.emitir_nombre,
|
|
|
+ italics: true,
|
|
|
+ color: "gray"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ "Fecha vencimiento: ",
|
|
|
+ {
|
|
|
+ text: this.fecha_vencimiento,
|
|
|
+ italics: true,
|
|
|
+ color: "gray"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ ]
|
|
|
+ }
|
|
|
}
|
|
|
],
|
|
|
info: {
|