|
|
@@ -0,0 +1,448 @@
|
|
|
+<h2 class="floating-title">{{ title }}</h2>
|
|
|
+
|
|
|
+<div class="main-content">
|
|
|
+ <div class="container-fluid">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-12 align-right">
|
|
|
+ <div class="align-container">
|
|
|
+ <nav aria-label="breadcrumb">
|
|
|
+ <ol class="breadcrumb">
|
|
|
+ <li class="breadcrumb-item">
|
|
|
+ <a [routerLink]="['/']">Dashboard</a>
|
|
|
+ </li>
|
|
|
+ <li class="breadcrumb-item">
|
|
|
+ <a [routerLink]="['/investment-incomes']">
|
|
|
+ Ingresos
|
|
|
+ </a>
|
|
|
+ </li>
|
|
|
+ <li class="breadcrumb-item">Formulario general</li>
|
|
|
+ </ol>
|
|
|
+ </nav>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="col-12">
|
|
|
+ <div class="align-container">
|
|
|
+ <div class="card borderless card-wrapper">
|
|
|
+ <div class="wrapper-costs">
|
|
|
+ <h4 class="card-title">
|
|
|
+ Información de la proyección para la fecha: {{ payment_date }}
|
|
|
+ </h4>
|
|
|
+ <div class="align-container">
|
|
|
+ <div class="income-summary" *ngIf="projection_exists">
|
|
|
+ <div class="row">
|
|
|
+ <div class="col-lg-3 col-md-4 col-sm-6">
|
|
|
+ <h4>Codigo de la inversión:</h4>
|
|
|
+ <div class="field">
|
|
|
+ {{ projection.codigo_inversion }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="col-lg-3 col-md-4 col-sm-6">
|
|
|
+ <h4>Nombre de la inversión:</h4>
|
|
|
+ <div class="field">
|
|
|
+ {{ projection.nombre_inversion }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="col-lg-3 col-md-4 col-sm-6">
|
|
|
+ <h4>Empresa:</h4>
|
|
|
+ <div class="field">
|
|
|
+ {{ projection.empresa }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="col-lg-3 col-md-4 col-sm-6">
|
|
|
+ <h4>Tipo instrumento:</h4>
|
|
|
+ <div class="field">
|
|
|
+ {{ projection.tipo_instrumento }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="col-lg-3 col-md-4 col-sm-6">
|
|
|
+ <h4>Capital:</h4>
|
|
|
+ <div class="field">
|
|
|
+ $USD {{ projection.capital | number: "1.2-4" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-3 col-md-4 col-sm-6">
|
|
|
+ <h4>Ingreso bruto:</h4>
|
|
|
+ <div class="field">
|
|
|
+ $USD {{ projection.ingreso_bruto | number: "1.2-4" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-3 col-md-4 col-sm-6">
|
|
|
+ <h4>Renta:</h4>
|
|
|
+ <div class="field">
|
|
|
+ $USD {{ projection.renta | number: "1.2-4" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-3 col-md-4 col-sm-6">
|
|
|
+ <h4>Ingreso neto:</h4>
|
|
|
+ <div class="field">
|
|
|
+ $USD {{ projection.ingreso_neto | number: "1.2-4" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="col-lg-3 col-md-4 col-sm-6">
|
|
|
+ <h4>Capital faltante:</h4>
|
|
|
+ <div class="field">
|
|
|
+ $USD
|
|
|
+ {{ projection.capital_faltante | number: "1.2-4" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-3 col-md-4 col-sm-6">
|
|
|
+ <h4>Ingreso bruto:</h4>
|
|
|
+ <div class="field">
|
|
|
+ $USD
|
|
|
+ {{
|
|
|
+ projection.ingreso_bruto_faltante | number: "1.2-4"
|
|
|
+ }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-3 col-md-4 col-sm-6">
|
|
|
+ <h4>Renta:</h4>
|
|
|
+ <div class="field">
|
|
|
+ $USD {{ projection.renta_faltante | number: "1.2-4" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-3 col-md-4 col-sm-6">
|
|
|
+ <h4>Ingreso neto:</h4>
|
|
|
+ <div class="field">
|
|
|
+ $USD
|
|
|
+ {{ projection.ingreso_neto_faltante | number: "1.2-4" }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <br />
|
|
|
+ <br />
|
|
|
+ <div *ngIf="incomes_exists">
|
|
|
+ <h4 class="card-title">
|
|
|
+ Listado de ingresos parciales para proyección
|
|
|
+ </h4>
|
|
|
+ <div class="align-container">
|
|
|
+ <div class="instrument-calcs-summary">
|
|
|
+ <table
|
|
|
+ mat-table
|
|
|
+ [dataSource]="dataSource"
|
|
|
+ class="example-table"
|
|
|
+ >
|
|
|
+ <ng-container matColumnDef="fecha_proyeccion_ingreso">
|
|
|
+ <th mat-header-cell *matHeaderCellDef>
|
|
|
+ Fecha de proyección
|
|
|
+ </th>
|
|
|
+ <td mat-cell *matCellDef="let row">
|
|
|
+ {{
|
|
|
+ row.fecha_proyeccion_ingreso == "" ||
|
|
|
+ row.fecha_proyeccion_ingreso == undefined
|
|
|
+ ? "-"
|
|
|
+ : row.fecha_proyeccion_ingreso
|
|
|
+ }}
|
|
|
+ </td>
|
|
|
+ </ng-container>
|
|
|
+ <ng-container matColumnDef="fecha_ingreso">
|
|
|
+ <th mat-header-cell *matHeaderCellDef>
|
|
|
+ Fecha de ingreso
|
|
|
+ </th>
|
|
|
+ <td mat-cell *matCellDef="let row">
|
|
|
+ {{
|
|
|
+ row.fecha_ingreso == "" ||
|
|
|
+ row.fecha_ingreso == undefined
|
|
|
+ ? "-"
|
|
|
+ : row.fecha_ingreso
|
|
|
+ }}
|
|
|
+ </td>
|
|
|
+ </ng-container>
|
|
|
+ <ng-container matColumnDef="fecha_conciliacion">
|
|
|
+ <th mat-header-cell *matHeaderCellDef>
|
|
|
+ Fecha conciliación
|
|
|
+ </th>
|
|
|
+ <td mat-cell *matCellDef="let row">
|
|
|
+ {{
|
|
|
+ row.fecha_conciliacion == "" ||
|
|
|
+ row.fecha_conciliacion == undefined
|
|
|
+ ? "-"
|
|
|
+ : row.fecha_conciliacion
|
|
|
+ }}
|
|
|
+ </td>
|
|
|
+ </ng-container>
|
|
|
+ <ng-container matColumnDef="capital">
|
|
|
+ <th mat-header-cell *matHeaderCellDef>Ingreso neto</th>
|
|
|
+ <td mat-cell *matCellDef="let row">
|
|
|
+ $USD
|
|
|
+ {{
|
|
|
+ row.capital == "" || row.capital == undefined
|
|
|
+ ? "-"
|
|
|
+ : (row.ingreso_neto | number: "1.2-4")
|
|
|
+ }}
|
|
|
+ </td>
|
|
|
+ </ng-container>
|
|
|
+ <ng-container matColumnDef="ingreso_bruto">
|
|
|
+ <th mat-header-cell *matHeaderCellDef>Ingreso bruto</th>
|
|
|
+ <td mat-cell *matCellDef="let row">
|
|
|
+ $USD
|
|
|
+ {{
|
|
|
+ row.ingreso_bruto == "" ||
|
|
|
+ row.ingreso_bruto == undefined
|
|
|
+ ? "-"
|
|
|
+ : (row.ingreso_bruto | number: "1.2-4")
|
|
|
+ }}
|
|
|
+ </td>
|
|
|
+ </ng-container>
|
|
|
+ <ng-container matColumnDef="renta">
|
|
|
+ <th mat-header-cell *matHeaderCellDef>Renta</th>
|
|
|
+ <td mat-cell *matCellDef="let row">
|
|
|
+ {{
|
|
|
+ row.renta == "" || row.renta == undefined
|
|
|
+ ? "-"
|
|
|
+ : (row.renta | number: "1.2-4")
|
|
|
+ }}%
|
|
|
+ </td>
|
|
|
+ </ng-container>
|
|
|
+
|
|
|
+ <tr
|
|
|
+ mat-header-row
|
|
|
+ *matHeaderRowDef="displayedColumns"
|
|
|
+ ></tr>
|
|
|
+ <tr
|
|
|
+ mat-row
|
|
|
+ *matRowDef="let row; columns: displayedColumns"
|
|
|
+ ></tr>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ <br />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <br />
|
|
|
+ <br />
|
|
|
+ <h4 class="card-title">
|
|
|
+ Formulario para ingreso
|
|
|
+ </h4>
|
|
|
+
|
|
|
+ <div class="align-container">
|
|
|
+ <form
|
|
|
+ class="form-auth-small ng-untouched ng-pristine ng-valid"
|
|
|
+ [formGroup]="investmentProposalForm"
|
|
|
+ >
|
|
|
+ <div class="row">
|
|
|
+ <!-- Valor nominal -->
|
|
|
+ <div class="col-lg-6 col-sm-12 pr-xl-3">
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="capital">Capital: </label>
|
|
|
+ <div class="input-box-container">
|
|
|
+ <p>
|
|
|
+ <i class="fas fa-dollar-sign"></i>
|
|
|
+ </p>
|
|
|
+ <input
|
|
|
+ type="text"
|
|
|
+ formControlName="capital"
|
|
|
+ class="form-control"
|
|
|
+ [ngClass]="{
|
|
|
+ 'is-invalid': submitted && f.capital.errors
|
|
|
+ }"
|
|
|
+ />
|
|
|
+ <div
|
|
|
+ *ngIf="submitted && f.capital.errors"
|
|
|
+ class="invalid-feedback"
|
|
|
+ >
|
|
|
+ <div *ngIf="f.capital.errors.required">
|
|
|
+ Campo requerido
|
|
|
+ </div>
|
|
|
+ <div *ngIf="f.capital.errors.pattern">
|
|
|
+ Debe ingresar una cifra válida
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- Valor nominal -->
|
|
|
+ <div class="col-lg-6 col-sm-12 pr-xl-3">
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="ingreso_bruto">Ingreso bruto: </label>
|
|
|
+ <div class="input-box-container">
|
|
|
+ <p>
|
|
|
+ <i class="fas fa-dollar-sign"></i>
|
|
|
+ </p>
|
|
|
+ <input
|
|
|
+ type="text"
|
|
|
+ formControlName="ingreso_bruto"
|
|
|
+ class="form-control"
|
|
|
+ [ngClass]="{
|
|
|
+ 'is-invalid': submitted && f.ingreso_bruto.errors
|
|
|
+ }"
|
|
|
+ />
|
|
|
+ <div
|
|
|
+ *ngIf="submitted && f.ingreso_bruto.errors"
|
|
|
+ class="invalid-feedback"
|
|
|
+ >
|
|
|
+ <div *ngIf="f.ingreso_bruto.errors.required">
|
|
|
+ Campo requerido
|
|
|
+ </div>
|
|
|
+ <div *ngIf="f.ingreso_bruto.errors.pattern">
|
|
|
+ Debe ingresar una cifra válida
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- Valor nominal -->
|
|
|
+ <div class="col-lg-6 col-sm-12 pr-xl-3">
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="ingreso_neto">Ingreso neto: </label>
|
|
|
+ <div class="input-box-container">
|
|
|
+ <p>
|
|
|
+ <i class="fas fa-dollar-sign"></i>
|
|
|
+ </p>
|
|
|
+ <input
|
|
|
+ type="text"
|
|
|
+ formControlName="ingreso_neto"
|
|
|
+ class="form-control"
|
|
|
+ [ngClass]="{
|
|
|
+ 'is-invalid': submitted && f.ingreso_neto.errors
|
|
|
+ }"
|
|
|
+ />
|
|
|
+ <div
|
|
|
+ *ngIf="submitted && f.ingreso_neto.errors"
|
|
|
+ class="invalid-feedback"
|
|
|
+ >
|
|
|
+ <div *ngIf="f.ingreso_neto.errors.required">
|
|
|
+ Campo requerido
|
|
|
+ </div>
|
|
|
+ <div *ngIf="f.ingreso_neto.errors.pattern">
|
|
|
+ Debe ingresar una cifra válida
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-6 col-sm-12 pr-xl-3">
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="payment_types">Tipo pago: </label>
|
|
|
+
|
|
|
+ <select
|
|
|
+ class="custom-select"
|
|
|
+ formControlName="tipo_pago"
|
|
|
+ [ngClass]="{
|
|
|
+ 'is-invalid': submitted && f.tipo_pago.errors
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <option
|
|
|
+ *ngFor="let item of payment_types"
|
|
|
+ [value]="item.id_tipo_pago"
|
|
|
+ >
|
|
|
+ {{ item.nombre }}</option
|
|
|
+ >
|
|
|
+ </select>
|
|
|
+ <div
|
|
|
+ *ngIf="submitted && f.tipo_pago.errors"
|
|
|
+ class="invalid-feedback"
|
|
|
+ >
|
|
|
+ <div *ngIf="f.tipo_pago.errors.required">
|
|
|
+ Campo requerido
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="col-lg-6 col-sm-12 pr-xl-3">
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="cuenta_bancaria">Cuenta bancaria: </label>
|
|
|
+
|
|
|
+ <select
|
|
|
+ class="custom-select"
|
|
|
+ formControlName="cuenta_bancaria"
|
|
|
+ [ngClass]="{
|
|
|
+ 'is-invalid': submitted && f.cuenta_bancaria.errors
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <option
|
|
|
+ *ngFor="let item of accounts"
|
|
|
+ [value]="item.id_cuenta_bancaria"
|
|
|
+ >
|
|
|
+ {{ nameBankAccounts(item.id_banco) }} -
|
|
|
+ {{ item.nombre }}</option
|
|
|
+ >
|
|
|
+ </select>
|
|
|
+ <div
|
|
|
+ *ngIf="submitted && f.cuenta_bancaria.errors"
|
|
|
+ class="invalid-feedback"
|
|
|
+ >
|
|
|
+ <div *ngIf="f.cuenta_bancaria.errors.required">
|
|
|
+ Campo requerido
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- Fecha vencimiento -->
|
|
|
+ <div class="col-lg-6 col-sm-12 pr-xl-3">
|
|
|
+ <div class="form-group">
|
|
|
+ <label for="fecha_vencimiento">Fecha ingreso: </label>
|
|
|
+
|
|
|
+ <div class="input-box-container">
|
|
|
+ <div>
|
|
|
+ <p>
|
|
|
+ <i class="far fa-calendar" aria-hidden="true"></i>
|
|
|
+ </p>
|
|
|
+ <input
|
|
|
+ class="input-box form-control"
|
|
|
+ placeholder="Seleccione una fecha"
|
|
|
+ angular-mydatepicker
|
|
|
+ formControlName="fecha_ingreso"
|
|
|
+ (click)="dp2.toggleCalendar()"
|
|
|
+ [options]="myDpOptions"
|
|
|
+ #dp2="angular-mydatepicker"
|
|
|
+ [ngClass]="{
|
|
|
+ 'is-invalid':
|
|
|
+ submitted && f.fecha_ingreso.errors
|
|
|
+ }"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div
|
|
|
+ *ngIf="submitted && f.fecha_vencimiento.errors"
|
|
|
+ class="invalid-feedback"
|
|
|
+ >
|
|
|
+ <div *ngIf="f.fecha_vencimiento.errors.required">
|
|
|
+ Campo requerido
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="col-lg-12 col-sm-12 pr-xl-12">
|
|
|
+ <br />
|
|
|
+ <button
|
|
|
+ class="btn btn-primary center-component float-left"
|
|
|
+ type="button"
|
|
|
+ (click)="conciliateIncome()"
|
|
|
+ >
|
|
|
+ Conciliar ingreso
|
|
|
+ </button>
|
|
|
+ <button
|
|
|
+ class="btn btn-success center-component float-right"
|
|
|
+ type="submit"
|
|
|
+ (click)="submitIncome(investmentProposalForm)"
|
|
|
+ >
|
|
|
+ Guardar información de ingreso
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </form>
|
|
|
+ <br />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <br />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</div>
|