sigesp 1.1.14-20241014 → 1.1.16-20241017

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3734,7 +3734,7 @@ class MAdministrativeUnit extends MBasicModel {
3734
3734
  if (unidad.estructuras) {
3735
3735
  this.estructuras = unidad.estructuras.map(e => new MEstructuras(e));
3736
3736
  }
3737
- if (unidad.centros) {
3737
+ if (unidad.estructuras) {
3738
3738
  this.centroCosto = unidad.centros.map(e => new MCentroCosto(e));
3739
3739
  }
3740
3740
  }
@@ -6663,6 +6663,16 @@ class SigespService {
6663
6663
  return res;
6664
6664
  }));
6665
6665
  }
6666
+ /**
6667
+ * @description Obtiene el plan de cuentas
6668
+ * @param level Número de niveles de la configuración
6669
+ * @param id de la estructura el idEp3 o idEp5
6670
+ * @return Observable<MCuentaEgresos[]>
6671
+ */
6672
+ planInstitucionalSPG(tipo, idEnterprise, periodoFiscal, idEP3o5, nivel) {
6673
+ return this.http.get(`${this.URL}/dao/spg/cuentas_egresos_dao.php?tipo=${tipo}&e=${idEnterprise}&periodo=${periodoFiscal}&id=${idEP3o5}&nivel=${nivel}`, { headers: this.getHttpHeaders() })
6674
+ .pipe(map((res) => res.data.map(element => new MCuentaEgresos(element))));
6675
+ }
6666
6676
  /**
6667
6677
  * @description Obtiene las cuentas por nivel de las cuenats de egresos
6668
6678
  * @param level Número de niveles de la configuración
@@ -7027,6 +7037,22 @@ class SigespService {
7027
7037
  return res;
7028
7038
  }));
7029
7039
  }
7040
+ getCentroCostoUnidadOrganizativa(tipo, idEnterprise, periodoFiscal, idUnidadAdministrativa) {
7041
+ return this.http.get(`${this.URL}/dao/spg/unidad_administrativa_dao.php?tipo=${tipo}&e=${idEnterprise}&periodo=${periodoFiscal}&id=${idUnidadAdministrativa}`, { headers: this.getHttpHeaders() }).pipe(map((res) => {
7042
+ if (res.success) {
7043
+ res.data = res.data.map(element => new MCentroCosto(element));
7044
+ }
7045
+ return res;
7046
+ }));
7047
+ }
7048
+ getEstructurasUnidadOrganizativa(tipo, idEnterprise, periodoFiscal, idUnidadAdministrativa) {
7049
+ return this.http.get(`${this.URL}/dao/spg/unidad_administrativa_dao.php?tipo=${tipo}&e=${idEnterprise}&periodo=${periodoFiscal}&id=${idUnidadAdministrativa}`, { headers: this.getHttpHeaders() }).pipe(map((res) => {
7050
+ if (res.success) {
7051
+ res.data = res.data.map(element => new MEstructuras(element));
7052
+ }
7053
+ return res;
7054
+ }));
7055
+ }
7030
7056
  /**
7031
7057
  * @description Abre el dialog de checkks
7032
7058
  * @param columns Columnas que va a tener la tabla
@@ -7510,8 +7536,8 @@ class SigespService {
7510
7536
  return this.openCatalogoGenerico(["cuenta", "denominacion", "provStatus"], titulo, filteredAccounts, ["Cuenta", "Denominación", "Estado"], ancho);
7511
7537
  }
7512
7538
  }
7513
- getUnidadAdministrativa(tipo, idEnterprise, periodoFical) {
7514
- return this.http.get(`${this.URL}/dao/spg/unidad_administrativa_dao.php?tipo=${tipo}&e=${idEnterprise}&periodo=${periodoFical}`, { headers: this.getHttpHeaders() })
7539
+ getUnidadAdministrativa(tipo, idEnterprise, periodoFical, idUnidadOrganizativa) {
7540
+ return this.http.get(`${this.URL}/dao/spg/unidad_administrativa_dao.php?tipo=${tipo}&e=${idEnterprise}&periodo=${periodoFical}&id=${idUnidadOrganizativa}`, { headers: this.getHttpHeaders() })
7515
7541
  .pipe(map((res) => {
7516
7542
  if (res.success) {
7517
7543
  res.data = res.data.map(e => new MAdministrativeUnit(e));
@@ -9100,6 +9126,7 @@ class MUnidadAdministradoraCentral extends MBasicModel {
9100
9126
  this.denominacionUnidadCentral = e.denuac;
9101
9127
  this.tipoUnidad = e.tipuac == '1';
9102
9128
  this.responsableUnidad = e.resuac;
9129
+ this.periodoFiscal = +e.perfiscal;
9103
9130
  if (e.unidad_organizativa) {
9104
9131
  this.unidadOrganizativa = e.unidad_organizativa.map(e => new MAdministrativeUnit(e));
9105
9132
  }
@@ -9117,6 +9144,7 @@ class MUnidadAdministradoraCentral extends MBasicModel {
9117
9144
  denuac: this.denominacionUnidadCentral,
9118
9145
  resuac: this.responsableUnidad,
9119
9146
  tipuac: this.tipoUnidad ? '1' : '0',
9147
+ perfiscal: this.periodoFiscal.toString(),
9120
9148
  unidad_organizativa: this.unidadOrganizativa.map(function (e) { return e.dataInterface(); }),
9121
9149
  };
9122
9150
  }