sigesp 0.9.5-221123 → 0.9.6-2022-12-04

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.
@@ -2148,11 +2148,16 @@
2148
2148
  _this.countryCode = null;
2149
2149
  _this.name = null;
2150
2150
  _this.capital = null;
2151
+ _this.nameCapital = '';
2151
2152
  if (state) {
2152
2153
  _this.code = state.codest.trim();
2153
2154
  _this.countryCode = state.codpai.trim();
2154
2155
  _this.name = state.desest.trim();
2155
2156
  _this.capital = state.ciucapest.trim();
2157
+ _this.nameCapital = state.desciu;
2158
+ }
2159
+ else {
2160
+ _this.isNew = true;
2156
2161
  }
2157
2162
  return _this;
2158
2163
  }
@@ -2174,12 +2179,18 @@
2174
2179
  _this.countryCode = null;
2175
2180
  _this.stateCode = null;
2176
2181
  _this.name = null;
2182
+ _this.capital = '';
2183
+ _this.nameCapital = '';
2177
2184
  if (mun) {
2178
2185
  _this.code = mun.codmun.trim();
2179
2186
  _this.countryCode = mun.codpai.trim();
2180
2187
  _this.stateCode = mun.codest.trim();
2181
2188
  _this.name = mun.desmun.trim();
2182
2189
  _this.capital = mun.capmun.trim();
2190
+ _this.nameCapital = mun.desciu.trim();
2191
+ }
2192
+ else {
2193
+ _this.isNew = true;
2183
2194
  }
2184
2195
  return _this;
2185
2196
  }
@@ -6424,7 +6435,7 @@
6424
6435
  usuario: this.usuarioActivo.getInterface()
6425
6436
  }
6426
6437
  };
6427
- return this.http.post(this.URL + "/dao/cfg/comunidad_dao.php", request).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (resp) { return resp.map(function (element) { return new MComunidad(element); }); }));
6438
+ return this.http.post(this.URL + "/dao/cfg/comunidades_dao.php", request).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (resp) { return resp.map(function (element) { return new MComunidad(element); }); }));
6428
6439
  };
6429
6440
  /**
6430
6441
  * @description Abre el dialog de las las monedas
@@ -6436,7 +6447,7 @@
6436
6447
  var coins, dialogRef;
6437
6448
  return __generator(this, function (_a) {
6438
6449
  switch (_a.label) {
6439
- case 0: return [4 /*yield*/, this.getMonedas().toPromise()];
6450
+ case 0: return [4 /*yield*/, this.getMonedas('todas').toPromise()];
6440
6451
  case 1:
6441
6452
  coins = _a.sent();
6442
6453
  dialogRef = this.dialog.open(CatalogoComponent, {
@@ -6458,16 +6469,13 @@
6458
6469
  * @description Obtiene las monedas
6459
6470
  * @return Observable<MMoneda[]>
6460
6471
  * @author Miguel Ramírez
6472
+ * actualizado 4-12-2022
6473
+ * @param tipo :string {'todas','uno','actual}
6474
+ * @param id : number
6475
+ * @returns
6461
6476
  */
6462
- SigespService.prototype.getMonedas = function () {
6463
- var request = {
6464
- operacion: 'obtenerData',
6465
- sigesp_conexion: {
6466
- servidor: this.URL,
6467
- usuario: this.usuarioActivo.getInterface()
6468
- }
6469
- };
6470
- return this.http.post(this.URL + "/dao/cfg/moneda_dao.php", request).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (resp) { return resp.map(function (element) { return new MMoneda(element); }); }));
6477
+ SigespService.prototype.getMonedas = function (tipo, id) {
6478
+ return this.http.get(this.URL + "/dao/cfg/monedas_dao.php?tipo=" + tipo + "&id=" + id, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (resp) { return resp.map(function (element) { return new MMoneda(element); }); }));
6471
6479
  };
6472
6480
  /**
6473
6481
  * @description Abre el dialog de las las cuentas contables (Cuentas Institucionales)
@@ -6710,51 +6718,57 @@
6710
6718
  * @author Carlos Albornoz
6711
6719
  * @modified 10-01-2022
6712
6720
  * @param codigo: Codigo del pais
6721
+
6713
6722
  */
6714
6723
  SigespService.prototype.getCountries = function (codigo) {
6715
- return this.http.get(this.URL + "/dao/sigesp/pais_dao.php?codigo=" + codigo, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) { return res.data.map(function (e) { return new MCountry(e); }); }));
6724
+ return this.http.get(this.URL + "/dao/cfg/paises_dao.php?codigo=" + codigo, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) { return res.data.map(function (e) { return new MCountry(e); }); }));
6716
6725
  };
6717
6726
  /**
6718
6727
  * @description Obtiene los estados
6719
6728
  * @return Observable<MState>
6720
6729
  * @author Carlos Albornoz
6721
- * @modificado 10-01-2022
6730
+ * @modificado 4-12-2022
6722
6731
  * @param codigo: Codigo del pais
6723
6732
  */
6724
6733
  SigespService.prototype.getStates = function (codigo) {
6725
- return this.http.get(this.URL + "/dao/sigesp/estado_dao.php?codigo=" + codigo, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) { return res.data.map(function (e) { return new MState(e); }); }));
6734
+ return this.http.get(this.URL + "/dao/cfg/estados_dao.php?codigo=" + codigo, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) { return res.data.map(function (e) { return new MState(e); }); }));
6726
6735
  };
6727
6736
  /**
6728
6737
  * @description Obtiene los municipios
6729
6738
  * @return Observable<MMunicipality>
6730
6739
  * @author Carlos Albornoz
6731
6740
  * @modificado 10-01-2022
6732
- * @param pais: Codigo del pais, estado:Codigo del estado
6733
-
6741
+ * @param pais: Codigo del pais ,
6742
+ * @param estado: Codigo del estado
6743
+ * @actualizado 4-12-2022
6734
6744
  */
6735
6745
  SigespService.prototype.getMunicipalities = function (pais, estado) {
6736
- return this.http.get(this.URL + "/dao/sigesp/municipio_dao.php?pais=" + pais + "&estado=" + estado, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) { return res.data.map(function (e) { return new MMunicipality(e); }); }));
6746
+ return this.http.get(this.URL + "/dao/cfg/municipios_dao.php?pais=" + pais + "&estado=" + estado, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) { return res.data.map(function (e) { return new MMunicipality(e); }); }));
6737
6747
  };
6738
6748
  /**
6739
6749
  * @description Obtiene las parroquias
6740
6750
  * @return Observable<MParish>
6741
6751
  * @author Carlos Albornoz
6742
6752
  * @modificado 10-01-2022
6743
- * @param codigo: Codigo del pais, estado:Codigo del estado, municipio:codigo Municipio
6753
+ * @param pais: Codigo del pais
6754
+ * @param estado: Codigo del estado
6755
+ * @param municipio:codigo Municipio
6756
+ * @actualizado 4-12-2022
6757
+
6744
6758
  */
6745
- SigespService.prototype.getParishes = function (codigo, estado, municipio) {
6746
- return this.http.get(this.URL + "/dao/sigesp/parroquia_dao.php?codigo=" + codigo + "&estado=" + estado + "&municipio=" + municipio, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) { return res.data.map(function (e) { return new MParish(e); }); }));
6759
+ SigespService.prototype.getParishes = function (pais, estado, municipio) {
6760
+ return this.http.get(this.URL + "/dao/cfg/parroquias_dao.php?pais=" + pais + "&estado=" + estado + "&municipio=" + municipio, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) { return res.data.map(function (e) { return new MParish(e); }); }));
6747
6761
  };
6748
6762
  /**
6749
6763
  * @description Obtiene las ciudades
6750
6764
  * @return Observable<MParish>
6751
6765
  * @author Carlos Albornoz
6752
6766
  * @modificado 10-01-2022
6753
- * @param codigo: Codigo del pais
6767
+ * @param pais: Codigo del pais
6754
6768
 
6755
6769
  */
6756
- SigespService.prototype.getCitys = function (codigo) {
6757
- return this.http.get(this.URL + "/dao/sigesp/parroquia_dao.php?codigo=" + codigo, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) { return res.data.map(function (e) { return new MCity(e); }); }));
6770
+ SigespService.prototype.getCitys = function (pais) {
6771
+ return this.http.get(this.URL + "/dao/cfg/ciudades_dao.php?pais=" + pais, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) { return res.data.map(function (e) { return new MCity(e); }); }));
6758
6772
  };
6759
6773
  /**
6760
6774
  * @description Obtiene los sistemas activas
@@ -6768,9 +6782,10 @@
6768
6782
  * @description Obtiene la moneda actual
6769
6783
  * @return Observable<IResponse>
6770
6784
  * @author Carlos Albornoz
6785
+ * @actualizado: 4-12-20222
6771
6786
  */
6772
6787
  SigespService.prototype.getCurrentCurrency = function () {
6773
- return this.http.get(this.URL + "/dao/sigesp/moneda_actual_dao.php", { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) {
6788
+ return this.http.get(this.URL + "/dao/cfg/moneda_dao.php?tipo={'actual'}", { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) {
6774
6789
  if (res.success) {
6775
6790
  res.data = new MMonedaConfig(res.data);
6776
6791
  }
@@ -7023,8 +7038,8 @@
7023
7038
  * @author Dimaly Crespo
7024
7039
  *
7025
7040
  */
7026
- SigespService.prototype.getCompany = function () {
7027
- return this.http.get(this.URL + "/dao/cfg/empresas_dao.php", { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) {
7041
+ SigespService.prototype.getCompany = function (tipo, id) {
7042
+ return this.http.get(this.URL + "/dao/cfg/empresas_dao.php?tipo=" + tipo + "&id=" + id, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) {
7028
7043
  if (res.success) {
7029
7044
  res.data = res.data.map(function (e) { return new MEmpresa(e); });
7030
7045
  }