sigesp 1.1.12-20241006 → 1.1.13-20241014

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.
@@ -2483,7 +2483,9 @@ class MSistema extends MBasicModel {
2483
2483
  this.codigo = sis.codsis;
2484
2484
  this.estado = sis.estsis;
2485
2485
  this.imagen = sis.imgsis;
2486
- this.usuarios = sis.usuarios.map(e => new MUserDetail(e));
2486
+ if (sis.usuarios) {
2487
+ this.usuarios = sis.usuarios.map(e => new MUserDetail(e));
2488
+ }
2487
2489
  }
2488
2490
  else {
2489
2491
  this.isNew = true;
@@ -6943,8 +6945,8 @@ class SigespService {
6943
6945
  * @return Observable<MConfigurationSPG[]>
6944
6946
  * @author Miguel Ramírez
6945
6947
  */
6946
- getConfigurationSPG() {
6947
- return this.http.get(`${this.URL}/dao/spg/estructura_presupuestaria_config_dao.php`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((resp) => new MConfigurationSPG(resp.data[0])));
6948
+ getConfigurationSPG(idEnterprise, periodoFical) {
6949
+ return this.http.get(`${this.URL}/dao/spg/estructura_presupuestaria_config_dao.php?e=${idEnterprise}&periodo=${periodoFical}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((resp) => new MConfigurationSPG(resp.data[0])));
6948
6950
  }
6949
6951
  /**
6950
6952
  * @description Obtiene las configuraciones de los proveedores
@@ -7525,8 +7527,8 @@ class SigespService {
7525
7527
  }
7526
7528
  });
7527
7529
  }
7528
- getUnidadAdministrativa(tipo, e) {
7529
- return this.http.get(`${this.URL}/dao/spg/unidad_administrativa_dao.php?tipo=${tipo}&e=${e}`, { headers: this.getHttpHeaders() })
7530
+ getUnidadAdministrativa(tipo, idEnterprise, periodoFical) {
7531
+ return this.http.get(`${this.URL}/dao/spg/unidad_administrativa_dao.php?tipo=${tipo}&e=${idEnterprise}&periodo=${periodoFical}`, { headers: this.getHttpHeaders() })
7530
7532
  .pipe(map((res) => {
7531
7533
  if (res.success) {
7532
7534
  res.data = res.data.map(e => new MAdministrativeUnit(e));
@@ -7636,9 +7638,14 @@ class SigespService {
7636
7638
  * (mon:formato para inputCurrency + id )
7637
7639
  */
7638
7640
  getCurrentCurrency(tipo = null, id) {
7639
- return this.http.get(`${this.URL}/dao/cfg/moneda_dao.php?tipo=${tipo}&id=${id}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => {
7641
+ return this.http.get(`${this.URL}/dao/cfg/moneda_dao.php?tipo=${tipo}&id=${id}`, { headers: this.getHttpHeaders() }).pipe(map((res) => {
7640
7642
  if (res.success) {
7641
- res.data = new MMonedaConfig(res.data);
7643
+ if (tipo == 'todas') {
7644
+ res.data = res.data.map(e => new MMonedaConfig(e));
7645
+ }
7646
+ else {
7647
+ res.data = new MMonedaConfig(res.data);
7648
+ }
7642
7649
  }
7643
7650
  return res;
7644
7651
  }));
@@ -7867,8 +7874,8 @@ class SigespService {
7867
7874
  * @return Observable<IResponse>
7868
7875
  * @author Carlos Albornoz
7869
7876
  */
7870
- getConfigSOC() {
7871
- return this.http.get(`${this.URL}/dao/soc/configuracion_dao.php`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => {
7877
+ getConfigSOC(idEnterprise) {
7878
+ return this.http.get(`${this.URL}/dao/soc/configuracion_dao.php?e=${idEnterprise}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => {
7872
7879
  if (res.success) {
7873
7880
  res.data = new MConfigSOC(res.data);
7874
7881
  }