sigesp 0.9.18-20221221 → 0.9.20-20221228

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.
@@ -1072,20 +1072,46 @@
1072
1072
  return MCuentaInstitucional;
1073
1073
  }());
1074
1074
 
1075
- var MMoneda = /** @class */ (function () {
1075
+ var MMoneda = /** @class */ (function (_super) {
1076
+ __extends(MMoneda, _super);
1076
1077
  function MMoneda(moneda) {
1077
- this.codigo = moneda.codigo;
1078
- this.denominacion = moneda.denominacion;
1079
- this.iso = moneda.iso;
1080
- this.simbolo = moneda.simbolo;
1078
+ var _this = _super.call(this) || this;
1079
+ _this.codigo = '';
1080
+ _this.denominacion = '';
1081
+ _this.iso = '';
1082
+ _this.simbolo = '';
1083
+ _this.separadorDecimal = '';
1084
+ _this.separadorMiles = '';
1085
+ _this.decimales = 0;
1086
+ if (moneda) {
1087
+ _this.codigo = moneda.codmon;
1088
+ _this.denominacion = moneda.denmon;
1089
+ _this.iso = moneda.codiso;
1090
+ _this.simbolo = moneda.simmon;
1091
+ _this.separadorDecimal = moneda.separadordec;
1092
+ _this.separadorMiles = moneda.separadormil;
1093
+ _this.decimales = parseInt(moneda.decimal);
1094
+ }
1095
+ return _this;
1081
1096
  }
1097
+ MMoneda.prototype.dataInterface = function () {
1098
+ return {
1099
+ codmon: this.codigo,
1100
+ denmon: this.denominacion,
1101
+ codiso: this.iso,
1102
+ simmon: this.simbolo,
1103
+ separadordec: this.separadorDecimal,
1104
+ separadormil: this.separadorMiles,
1105
+ decimal: this.decimales.toString(),
1106
+ };
1107
+ };
1082
1108
  return MMoneda;
1083
- }());
1109
+ }(MBasicModel));
1084
1110
  var MMonedaConfig = /** @class */ (function (_super) {
1085
1111
  __extends(MMonedaConfig, _super);
1086
1112
  function MMonedaConfig(moneda) {
1087
1113
  var _this = _super.call(this) || this;
1088
- _this.codigo = null;
1114
+ _this.codigo = '';
1089
1115
  _this.denominacion = '';
1090
1116
  _this.codigoIso = '';
1091
1117
  _this.simbolo = '';
@@ -1623,11 +1649,15 @@
1623
1649
  var _this = _super.call(this) || this;
1624
1650
  _this.idEmpresa = 0;
1625
1651
  _this.idEnterprise = 0;
1652
+ _this.usuarios = [];
1626
1653
  if (centroCosto) {
1627
1654
  _this.idEmpresa = +centroCosto.id_empresa;
1628
1655
  _this.idEnterprise = +centroCosto.id_enterprise;
1629
1656
  _this.centro = centroCosto.centro ? centroCosto.centro : centroCosto.codcencos;
1630
1657
  _this.denominacion = centroCosto.denominacion;
1658
+ if (centroCosto.usuarios) {
1659
+ _this.usuarios = centroCosto.usuarios.map(function (e) { return new MUsuarioCentroCosto(e); });
1660
+ }
1631
1661
  }
1632
1662
  else {
1633
1663
  _this.isNew = true;
@@ -1641,6 +1671,7 @@
1641
1671
  id_enterprise: this.idEnterprise.toString(),
1642
1672
  codcencos: this.centro,
1643
1673
  denominacion: this.denominacion,
1674
+ usuarios: this.usuarios.map(function (e) { return e.dataInterface(); }),
1644
1675
  };
1645
1676
  };
1646
1677
  return MCentroCosto;
@@ -1659,7 +1690,7 @@
1659
1690
  _this.idEnterprise = +e.id_enterprise;
1660
1691
  _this.codigoCentroCosto = e.codcencos;
1661
1692
  _this.usuario = e.codusu;
1662
- _this.usuario = e.codusu;
1693
+ _this.idDtCentro = +e.id_dt_cencos;
1663
1694
  }
1664
1695
  else {
1665
1696
  _this.isNew = true;
@@ -6165,7 +6196,7 @@
6165
6196
  * @return Promise<any[]>
6166
6197
  * @author Miguel Ramírez
6167
6198
  */
6168
- SigespService.prototype.getBudgetStructureComplete = function () {
6199
+ SigespService.prototype.getBudgetStructureComplete = function (nivel) {
6169
6200
  return __awaiter(this, void 0, void 0, function () {
6170
6201
  var _this = this;
6171
6202
  return __generator(this, function (_a) {
@@ -6175,7 +6206,7 @@
6175
6206
  switch (_a.label) {
6176
6207
  case 0:
6177
6208
  data = [];
6178
- return [4 /*yield*/, this.getBudgetStructureFive(5).subscribe(function (result) {
6209
+ return [4 /*yield*/, this.getBudgetStructureFive(nivel).subscribe(function (result) {
6179
6210
  data.push.apply(data, __spread(result));
6180
6211
  })];
6181
6212
  case 1:
@@ -6471,14 +6502,19 @@
6471
6502
  * @description Obtiene los centros de costo
6472
6503
  * @return Observable<MCentroCosto[]>
6473
6504
  * @author Miguel Ramírez
6474
- * modificado 9-11-2022
6505
+ * @param id:idusurio o id del ecntro de costo
6506
+ * modificado 28-12-2022
6475
6507
  */
6476
- SigespService.prototype.getCentroCosto = function (tipo) {
6477
- return this.http.get(this.URL + "/dao/scg/centro_costo_dao.php?codigo=" + tipo, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) {
6478
- if (res.success) {
6479
- res.data = res.data.map(function (e) { return new MCentroCosto(e); });
6508
+ SigespService.prototype.getCentroCosto = function (tipo, id) {
6509
+ if (tipo === void 0) { tipo = null; }
6510
+ return this.http.get(this.URL + "/dao/scg/centro_costo_dao.php?tipo=" + tipo + "&id=" + id, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (resp) {
6511
+ if (tipo == 'all') {
6512
+ resp = resp.data.map(function (element) { return new MCentroCosto(element); });
6480
6513
  }
6481
- return res;
6514
+ else {
6515
+ resp.data.map(function (element) { return new MCentroCosto(element); });
6516
+ }
6517
+ return resp;
6482
6518
  }));
6483
6519
  };
6484
6520
  /**
@@ -6495,7 +6531,7 @@
6495
6531
  }));
6496
6532
  };
6497
6533
  SigespService.prototype.getUserCostCenters = function (codigo) {
6498
- return this.http.get(this.URL + "/dao/scg/control_numero_usuario_dao.php?codigo=" + codigo, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) {
6534
+ return this.http.get(this.URL + "/dao/scg/centro_costo_usuario_dao.php?codigo=" + codigo, { headers: this.getHttpHeaders() }).pipe(operators.retry(3), operators.catchError(this.handlerError), operators.map(function (res) {
6499
6535
  if (res.success) {
6500
6536
  res.data = res.data.map(function (element) { return new MUsuarioCentroCosto(element); });
6501
6537
  }
@@ -6847,7 +6883,7 @@
6847
6883
  coins = _a.sent();
6848
6884
  dialogRef = this.dialog.open(CatalogoComponent, {
6849
6885
  data: {
6850
- columns: ['codigo', 'denominacion', 'iso', 'simbolo'],
6886
+ columns: ['codigo', 'denominacion', 'codigoIso', 'simbolo'],
6851
6887
  title: 'Catálogo de Monedas',
6852
6888
  columnNames: ['código', 'denominación', 'iso', 'simbolo'],
6853
6889
  dataSource: coins
@@ -8332,7 +8368,7 @@
8332
8368
  TableSelectComponent,
8333
8369
  CatalogoEstructurasComponent,
8334
8370
  CatalogoDobleInputComponent,
8335
- IsoCurrencyPipe
8371
+ IsoCurrencyPipe,
8336
8372
  ],
8337
8373
  imports: [
8338
8374
  common.CommonModule,