sigesp 0.9.5-221123 → 0.9.7-20221204

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.
@@ -1795,6 +1795,9 @@ class MState extends MBasicModel {
1795
1795
  this.name = state.desest.trim();
1796
1796
  this.capital = state.ciucapest.trim();
1797
1797
  }
1798
+ else {
1799
+ this.isNew = true;
1800
+ }
1798
1801
  }
1799
1802
  dataInterface() {
1800
1803
  return {
@@ -1812,6 +1815,7 @@ class MMunicipality extends MBasicModel {
1812
1815
  this.countryCode = null;
1813
1816
  this.stateCode = null;
1814
1817
  this.name = null;
1818
+ this.capital = '';
1815
1819
  if (mun) {
1816
1820
  this.code = mun.codmun.trim();
1817
1821
  this.countryCode = mun.codpai.trim();
@@ -1819,6 +1823,9 @@ class MMunicipality extends MBasicModel {
1819
1823
  this.name = mun.desmun.trim();
1820
1824
  this.capital = mun.capmun.trim();
1821
1825
  }
1826
+ else {
1827
+ this.isNew = true;
1828
+ }
1822
1829
  }
1823
1830
  dataInterface() {
1824
1831
  return {
@@ -5879,7 +5886,7 @@ class SigespService {
5879
5886
  usuario: this.usuarioActivo.getInterface()
5880
5887
  }
5881
5888
  };
5882
- return this.http.post(`${this.URL}/dao/cfg/comunidad_dao.php`, request).pipe(retry(3), catchError(this.handlerError), map((resp) => resp.map(element => new MComunidad(element))));
5889
+ return this.http.post(`${this.URL}/dao/cfg/comunidades_dao.php`, request).pipe(retry(3), catchError(this.handlerError), map((resp) => resp.map(element => new MComunidad(element))));
5883
5890
  }
5884
5891
  /**
5885
5892
  * @description Abre el dialog de las las monedas
@@ -5888,7 +5895,7 @@ class SigespService {
5888
5895
  */
5889
5896
  openDialogMonedas() {
5890
5897
  return __awaiter(this, void 0, void 0, function* () {
5891
- let coins = yield this.getMonedas().toPromise();
5898
+ let coins = yield this.getMonedas('todas').toPromise();
5892
5899
  let dialogRef = this.dialog.open(CatalogoComponent, {
5893
5900
  data: {
5894
5901
  columns: ['codigo', 'denominacion', 'iso', 'simbolo'],
@@ -5906,16 +5913,13 @@ class SigespService {
5906
5913
  * @description Obtiene las monedas
5907
5914
  * @return Observable<MMoneda[]>
5908
5915
  * @author Miguel Ramírez
5916
+ * actualizado 4-12-2022
5917
+ * @param tipo :string {'todas','uno','actual}
5918
+ * @param id : number
5919
+ * @returns
5909
5920
  */
5910
- getMonedas() {
5911
- const request = {
5912
- operacion: 'obtenerData',
5913
- sigesp_conexion: {
5914
- servidor: this.URL,
5915
- usuario: this.usuarioActivo.getInterface()
5916
- }
5917
- };
5918
- return this.http.post(`${this.URL}/dao/cfg/moneda_dao.php`, request).pipe(retry(3), catchError(this.handlerError), map((resp) => resp.map(element => new MMoneda(element))));
5921
+ getMonedas(tipo, id) {
5922
+ return this.http.get(`${this.URL}/dao/cfg/monedas_dao.php?tipo=${tipo}&id=${id}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((resp) => resp.map(element => new MMoneda(element))));
5919
5923
  }
5920
5924
  /**
5921
5925
  * @description Abre el dialog de las las cuentas contables (Cuentas Institucionales)
@@ -6111,51 +6115,57 @@ class SigespService {
6111
6115
  * @author Carlos Albornoz
6112
6116
  * @modified 10-01-2022
6113
6117
  * @param codigo: Codigo del pais
6118
+
6114
6119
  */
6115
6120
  getCountries(codigo) {
6116
- return this.http.get(`${this.URL}/dao/sigesp/pais_dao.php?codigo=${codigo}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => res.data.map(e => new MCountry(e))));
6121
+ return this.http.get(`${this.URL}/dao/cfg/paises_dao.php?codigo=${codigo}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => res.data.map(e => new MCountry(e))));
6117
6122
  }
6118
6123
  /**
6119
6124
  * @description Obtiene los estados
6120
6125
  * @return Observable<MState>
6121
6126
  * @author Carlos Albornoz
6122
- * @modificado 10-01-2022
6127
+ * @modificado 4-12-2022
6123
6128
  * @param codigo: Codigo del pais
6124
6129
  */
6125
6130
  getStates(codigo) {
6126
- return this.http.get(`${this.URL}/dao/sigesp/estado_dao.php?codigo=${codigo}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => res.data.map(e => new MState(e))));
6131
+ return this.http.get(`${this.URL}/dao/cfg/estados_dao.php?codigo=${codigo}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => res.data.map(e => new MState(e))));
6127
6132
  }
6128
6133
  /**
6129
6134
  * @description Obtiene los municipios
6130
6135
  * @return Observable<MMunicipality>
6131
6136
  * @author Carlos Albornoz
6132
6137
  * @modificado 10-01-2022
6133
- * @param pais: Codigo del pais, estado:Codigo del estado
6134
-
6138
+ * @param pais: Codigo del pais ,
6139
+ * @param estado: Codigo del estado
6140
+ * @actualizado 4-12-2022
6135
6141
  */
6136
6142
  getMunicipalities(pais, estado) {
6137
- return this.http.get(`${this.URL}/dao/sigesp/municipio_dao.php?pais=${pais}&estado=${estado}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => res.data.map(e => new MMunicipality(e))));
6143
+ return this.http.get(`${this.URL}/dao/cfg/municipios_dao.php?pais=${pais}&estado=${estado}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => res.data.map(e => new MMunicipality(e))));
6138
6144
  }
6139
6145
  /**
6140
6146
  * @description Obtiene las parroquias
6141
6147
  * @return Observable<MParish>
6142
6148
  * @author Carlos Albornoz
6143
6149
  * @modificado 10-01-2022
6144
- * @param codigo: Codigo del pais, estado:Codigo del estado, municipio:codigo Municipio
6150
+ * @param pais: Codigo del pais
6151
+ * @param estado: Codigo del estado
6152
+ * @param municipio:codigo Municipio
6153
+ * @actualizado 4-12-2022
6154
+
6145
6155
  */
6146
- getParishes(codigo, estado, municipio) {
6147
- return this.http.get(`${this.URL}/dao/sigesp/parroquia_dao.php?codigo=${codigo}&estado=${estado}&municipio=${municipio}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => res.data.map(e => new MParish(e))));
6156
+ getParishes(pais, estado, municipio) {
6157
+ return this.http.get(`${this.URL}/dao/cfg/parroquias_dao.php?pais=${pais}&estado=${estado}&municipio=${municipio}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => res.data.map(e => new MParish(e))));
6148
6158
  }
6149
6159
  /**
6150
6160
  * @description Obtiene las ciudades
6151
6161
  * @return Observable<MParish>
6152
6162
  * @author Carlos Albornoz
6153
6163
  * @modificado 10-01-2022
6154
- * @param codigo: Codigo del pais
6164
+ * @param pais: Codigo del pais
6155
6165
 
6156
6166
  */
6157
- getCitys(codigo) {
6158
- return this.http.get(`${this.URL}/dao/sigesp/parroquia_dao.php?codigo=${codigo}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => res.data.map(e => new MCity(e))));
6167
+ getCitys(pais) {
6168
+ return this.http.get(`${this.URL}/dao/cfg/ciudades_dao.php?pais=${pais}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => res.data.map(e => new MCity(e))));
6159
6169
  }
6160
6170
  /**
6161
6171
  * @description Obtiene los sistemas activas
@@ -6169,9 +6179,10 @@ class SigespService {
6169
6179
  * @description Obtiene la moneda actual
6170
6180
  * @return Observable<IResponse>
6171
6181
  * @author Carlos Albornoz
6182
+ * @actualizado: 4-12-20222
6172
6183
  */
6173
6184
  getCurrentCurrency() {
6174
- return this.http.get(`${this.URL}/dao/sigesp/moneda_actual_dao.php`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => {
6185
+ return this.http.get(`${this.URL}/dao/cfg/moneda_dao.php?tipo={'actual'}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => {
6175
6186
  if (res.success) {
6176
6187
  res.data = new MMonedaConfig(res.data);
6177
6188
  }
@@ -6413,8 +6424,8 @@ class SigespService {
6413
6424
  * @author Dimaly Crespo
6414
6425
  *
6415
6426
  */
6416
- getCompany() {
6417
- return this.http.get(`${this.URL}/dao/cfg/empresas_dao.php`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => {
6427
+ getCompany(tipo, id) {
6428
+ return this.http.get(`${this.URL}/dao/cfg/empresas_dao.php?tipo=${tipo}&id=${id}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((res) => {
6418
6429
  if (res.success) {
6419
6430
  res.data = res.data.map(e => new MEmpresa(e));
6420
6431
  }