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.
@@ -2472,7 +2472,9 @@ class MSistema extends MBasicModel {
2472
2472
  this.codigo = sis.codsis;
2473
2473
  this.estado = sis.estsis;
2474
2474
  this.imagen = sis.imgsis;
2475
- this.usuarios = sis.usuarios.map(e => new MUserDetail(e));
2475
+ if (sis.usuarios) {
2476
+ this.usuarios = sis.usuarios.map(e => new MUserDetail(e));
2477
+ }
2476
2478
  }
2477
2479
  else {
2478
2480
  this.isNew = true;
@@ -6930,8 +6932,8 @@ class SigespService {
6930
6932
  * @return Observable<MConfigurationSPG[]>
6931
6933
  * @author Miguel Ramírez
6932
6934
  */
6933
- getConfigurationSPG() {
6934
- 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])));
6935
+ getConfigurationSPG(idEnterprise, periodoFical) {
6936
+ 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])));
6935
6937
  }
6936
6938
  /**
6937
6939
  * @description Obtiene las configuraciones de los proveedores
@@ -7492,8 +7494,8 @@ class SigespService {
7492
7494
  return this.openCatalogoGenerico(["cuenta", "denominacion", "provStatus"], titulo, filteredAccounts, ["Cuenta", "Denominación", "Estado"], ancho);
7493
7495
  }
7494
7496
  }
7495
- getUnidadAdministrativa(tipo, e) {
7496
- return this.http.get(`${this.URL}/dao/spg/unidad_administrativa_dao.php?tipo=${tipo}&e=${e}`, { headers: this.getHttpHeaders() })
7497
+ getUnidadAdministrativa(tipo, idEnterprise, periodoFical) {
7498
+ return this.http.get(`${this.URL}/dao/spg/unidad_administrativa_dao.php?tipo=${tipo}&e=${idEnterprise}&periodo=${periodoFical}`, { headers: this.getHttpHeaders() })
7497
7499
  .pipe(map((res) => {
7498
7500
  if (res.success) {
7499
7501
  res.data = res.data.map(e => new MAdministrativeUnit(e));
@@ -7603,9 +7605,14 @@ class SigespService {
7603
7605
  * (mon:formato para inputCurrency + id )
7604
7606
  */
7605
7607
  getCurrentCurrency(tipo = null, id) {
7606
- 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) => {
7608
+ return this.http.get(`${this.URL}/dao/cfg/moneda_dao.php?tipo=${tipo}&id=${id}`, { headers: this.getHttpHeaders() }).pipe(map((res) => {
7607
7609
  if (res.success) {
7608
- res.data = new MMonedaConfig(res.data);
7610
+ if (tipo == 'todas') {
7611
+ res.data = res.data.map(e => new MMonedaConfig(e));
7612
+ }
7613
+ else {
7614
+ res.data = new MMonedaConfig(res.data);
7615
+ }
7609
7616
  }
7610
7617
  return res;
7611
7618
  }));
@@ -7832,8 +7839,8 @@ class SigespService {
7832
7839
  * @return Observable<IResponse>
7833
7840
  * @author Carlos Albornoz
7834
7841
  */
7835
- getConfigSOC() {
7836
- return this.http.get(`${this.URL}/dao/soc/configuracion_dao.php`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => {
7842
+ getConfigSOC(idEnterprise) {
7843
+ return this.http.get(`${this.URL}/dao/soc/configuracion_dao.php?e=${idEnterprise}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => {
7837
7844
  if (res.success) {
7838
7845
  res.data = new MConfigSOC(res.data);
7839
7846
  }