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.
@@ -2154,6 +2154,9 @@
2154
2154
  _this.name = state.desest.trim();
2155
2155
  _this.capital = state.ciucapest.trim();
2156
2156
  }
2157
+ else {
2158
+ _this.isNew = true;
2159
+ }
2157
2160
  return _this;
2158
2161
  }
2159
2162
  MState.prototype.dataInterface = function () {
@@ -2174,6 +2177,7 @@
2174
2177
  _this.countryCode = null;
2175
2178
  _this.stateCode = null;
2176
2179
  _this.name = null;
2180
+ _this.capital = '';
2177
2181
  if (mun) {
2178
2182
  _this.code = mun.codmun.trim();
2179
2183
  _this.countryCode = mun.codpai.trim();
@@ -2181,6 +2185,9 @@
2181
2185
  _this.name = mun.desmun.trim();
2182
2186
  _this.capital = mun.capmun.trim();
2183
2187
  }
2188
+ else {
2189
+ _this.isNew = true;
2190
+ }
2184
2191
  return _this;
2185
2192
  }
2186
2193
  MMunicipality.prototype.dataInterface = function () {
@@ -6424,7 +6431,7 @@
6424
6431
  usuario: this.usuarioActivo.getInterface()
6425
6432
  }
6426
6433
  };
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); }); }));
6434
+ 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
6435
  };
6429
6436
  /**
6430
6437
  * @description Abre el dialog de las las monedas
@@ -6436,7 +6443,7 @@
6436
6443
  var coins, dialogRef;
6437
6444
  return __generator(this, function (_a) {
6438
6445
  switch (_a.label) {
6439
- case 0: return [4 /*yield*/, this.getMonedas().toPromise()];
6446
+ case 0: return [4 /*yield*/, this.getMonedas('todas').toPromise()];
6440
6447
  case 1:
6441
6448
  coins = _a.sent();
6442
6449
  dialogRef = this.dialog.open(CatalogoComponent, {
@@ -6458,16 +6465,13 @@
6458
6465
  * @description Obtiene las monedas
6459
6466
  * @return Observable<MMoneda[]>
6460
6467
  * @author Miguel Ramírez
6468
+ * actualizado 4-12-2022
6469
+ * @param tipo :string {'todas','uno','actual}
6470
+ * @param id : number
6471
+ * @returns
6461
6472
  */
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); }); }));
6473
+ SigespService.prototype.getMonedas = function (tipo, id) {
6474
+ 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
6475
  };
6472
6476
  /**
6473
6477
  * @description Abre el dialog de las las cuentas contables (Cuentas Institucionales)
@@ -6710,51 +6714,57 @@
6710
6714
  * @author Carlos Albornoz
6711
6715
  * @modified 10-01-2022
6712
6716
  * @param codigo: Codigo del pais
6717
+
6713
6718
  */
6714
6719
  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); }); }));
6720
+ 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
6721
  };
6717
6722
  /**
6718
6723
  * @description Obtiene los estados
6719
6724
  * @return Observable<MState>
6720
6725
  * @author Carlos Albornoz
6721
- * @modificado 10-01-2022
6726
+ * @modificado 4-12-2022
6722
6727
  * @param codigo: Codigo del pais
6723
6728
  */
6724
6729
  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); }); }));
6730
+ 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
6731
  };
6727
6732
  /**
6728
6733
  * @description Obtiene los municipios
6729
6734
  * @return Observable<MMunicipality>
6730
6735
  * @author Carlos Albornoz
6731
6736
  * @modificado 10-01-2022
6732
- * @param pais: Codigo del pais, estado:Codigo del estado
6733
-
6737
+ * @param pais: Codigo del pais ,
6738
+ * @param estado: Codigo del estado
6739
+ * @actualizado 4-12-2022
6734
6740
  */
6735
6741
  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); }); }));
6742
+ 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
6743
  };
6738
6744
  /**
6739
6745
  * @description Obtiene las parroquias
6740
6746
  * @return Observable<MParish>
6741
6747
  * @author Carlos Albornoz
6742
6748
  * @modificado 10-01-2022
6743
- * @param codigo: Codigo del pais, estado:Codigo del estado, municipio:codigo Municipio
6749
+ * @param pais: Codigo del pais
6750
+ * @param estado: Codigo del estado
6751
+ * @param municipio:codigo Municipio
6752
+ * @actualizado 4-12-2022
6753
+
6744
6754
  */
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); }); }));
6755
+ SigespService.prototype.getParishes = function (pais, estado, municipio) {
6756
+ 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
6757
  };
6748
6758
  /**
6749
6759
  * @description Obtiene las ciudades
6750
6760
  * @return Observable<MParish>
6751
6761
  * @author Carlos Albornoz
6752
6762
  * @modificado 10-01-2022
6753
- * @param codigo: Codigo del pais
6763
+ * @param pais: Codigo del pais
6754
6764
 
6755
6765
  */
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); }); }));
6766
+ SigespService.prototype.getCitys = function (pais) {
6767
+ 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
6768
  };
6759
6769
  /**
6760
6770
  * @description Obtiene los sistemas activas
@@ -6768,9 +6778,10 @@
6768
6778
  * @description Obtiene la moneda actual
6769
6779
  * @return Observable<IResponse>
6770
6780
  * @author Carlos Albornoz
6781
+ * @actualizado: 4-12-20222
6771
6782
  */
6772
6783
  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) {
6784
+ 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
6785
  if (res.success) {
6775
6786
  res.data = new MMonedaConfig(res.data);
6776
6787
  }
@@ -7023,8 +7034,8 @@
7023
7034
  * @author Dimaly Crespo
7024
7035
  *
7025
7036
  */
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) {
7037
+ SigespService.prototype.getCompany = function (tipo, id) {
7038
+ 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
7039
  if (res.success) {
7029
7040
  res.data = res.data.map(function (e) { return new MEmpresa(e); });
7030
7041
  }