sigesp 1.1.15-20241017 → 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.
@@ -3745,7 +3745,7 @@ class MAdministrativeUnit extends MBasicModel {
3745
3745
  if (unidad.estructuras) {
3746
3746
  this.estructuras = unidad.estructuras.map(e => new MEstructuras(e));
3747
3747
  }
3748
- if (unidad.centros) {
3748
+ if (unidad.estructuras) {
3749
3749
  this.centroCosto = unidad.centros.map(e => new MCentroCosto(e));
3750
3750
  }
3751
3751
  }
@@ -6674,6 +6674,16 @@ class SigespService {
6674
6674
  return res;
6675
6675
  }));
6676
6676
  }
6677
+ /**
6678
+ * @description Obtiene el plan de cuentas
6679
+ * @param level Número de niveles de la configuración
6680
+ * @param id de la estructura el idEp3 o idEp5
6681
+ * @return Observable<MCuentaEgresos[]>
6682
+ */
6683
+ planInstitucionalSPG(tipo, idEnterprise, periodoFiscal, idEP3o5, nivel) {
6684
+ 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() })
6685
+ .pipe(map((res) => res.data.map(element => new MCuentaEgresos(element))));
6686
+ }
6677
6687
  /**
6678
6688
  * @description Obtiene las cuentas por nivel de las cuenats de egresos
6679
6689
  * @param level Número de niveles de la configuración
@@ -7040,6 +7050,22 @@ class SigespService {
7040
7050
  return res;
7041
7051
  }));
7042
7052
  }
7053
+ getCentroCostoUnidadOrganizativa(tipo, idEnterprise, periodoFiscal, idUnidadAdministrativa) {
7054
+ 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) => {
7055
+ if (res.success) {
7056
+ res.data = res.data.map(element => new MCentroCosto(element));
7057
+ }
7058
+ return res;
7059
+ }));
7060
+ }
7061
+ getEstructurasUnidadOrganizativa(tipo, idEnterprise, periodoFiscal, idUnidadAdministrativa) {
7062
+ 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) => {
7063
+ if (res.success) {
7064
+ res.data = res.data.map(element => new MEstructuras(element));
7065
+ }
7066
+ return res;
7067
+ }));
7068
+ }
7043
7069
  /**
7044
7070
  * @description Abre el dialog de checkks
7045
7071
  * @param columns Columnas que va a tener la tabla
@@ -7543,8 +7569,8 @@ class SigespService {
7543
7569
  }
7544
7570
  });
7545
7571
  }
7546
- getUnidadAdministrativa(tipo, idEnterprise, periodoFical) {
7547
- return this.http.get(`${this.URL}/dao/spg/unidad_administrativa_dao.php?tipo=${tipo}&e=${idEnterprise}&periodo=${periodoFical}`, { headers: this.getHttpHeaders() })
7572
+ getUnidadAdministrativa(tipo, idEnterprise, periodoFical, idUnidadOrganizativa) {
7573
+ return this.http.get(`${this.URL}/dao/spg/unidad_administrativa_dao.php?tipo=${tipo}&e=${idEnterprise}&periodo=${periodoFical}&id=${idUnidadOrganizativa}`, { headers: this.getHttpHeaders() })
7548
7574
  .pipe(map((res) => {
7549
7575
  if (res.success) {
7550
7576
  res.data = res.data.map(e => new MAdministrativeUnit(e));