sigesp 0.9.98-20240222 → 0.9.100-20240222

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.
@@ -3996,10 +3996,10 @@
3996
3996
  var _this = _super.call(this) || this;
3997
3997
  _this.idEmpresa = 0;
3998
3998
  _this.idEnterprise = 0;
3999
- _this.codigo = 0;
3999
+ _this.codigo = '';
4000
4000
  _this.denominacion = '';
4001
4001
  _this.unidadCentral = 0;
4002
- _this.emiteRequisicion = 0;
4002
+ _this.emiteRequisicion = true;
4003
4003
  _this.centroCosto = '';
4004
4004
  _this.id = 0;
4005
4005
  _this.denominacionUnidadCentral = '';
@@ -4007,13 +4007,13 @@
4007
4007
  _this.denominacionCentroCosto = '';
4008
4008
  _this.estructuras = [];
4009
4009
  if (unidad) {
4010
- _this.idEmpresa = unidad.id_empresa;
4011
- _this.idEnterprise = unidad.id_enterprise;
4012
- _this.id = unidad.id_uniadm;
4010
+ _this.idEmpresa = +unidad.id_empresa;
4011
+ _this.idEnterprise = +unidad.id_enterprise;
4012
+ _this.id = +unidad.id_uniadm;
4013
4013
  _this.codigo = unidad.coduniadm;
4014
4014
  _this.denominacion = unidad.denuniadm;
4015
- _this.unidadCentral = unidad.coduac;
4016
- _this.emiteRequisicion = unidad.estemireq;
4015
+ _this.unidadCentral = +unidad.coduac;
4016
+ _this.emiteRequisicion = unidad.estemireq == '1' ? true : false;
4017
4017
  _this.centroCosto = unidad.codcencos;
4018
4018
  _this.denominacionUnidadCentral = unidad.denuac;
4019
4019
  _this.codigoUnidadCentral = unidad.codigouac;
@@ -4029,14 +4029,14 @@
4029
4029
  }
4030
4030
  MAdministrativeUnit.prototype.dataInterface = function () {
4031
4031
  return {
4032
- id_empresa: this.idEmpresa,
4033
- id_enterprise: this.idEnterprise,
4032
+ id_empresa: this.idEmpresa.toString(),
4033
+ id_enterprise: this.idEnterprise.toString(),
4034
4034
  coduniadm: this.codigo,
4035
- coduac: this.unidadCentral,
4035
+ coduac: this.unidadCentral.toString(),
4036
4036
  denuniadm: this.denominacion,
4037
- estemireq: this.emiteRequisicion,
4037
+ estemireq: this.emiteRequisicion ? '1' : '0',
4038
4038
  codcencos: this.centroCosto,
4039
- id_uniadm: this.id,
4039
+ id_uniadm: this.id.toString(),
4040
4040
  estructuras: this.estructuras.map(function (e) { return e.dataInterface(); }),
4041
4041
  };
4042
4042
  };
@@ -4052,7 +4052,6 @@
4052
4052
  _this.cuentaPresupuestaria = dt.cuentapresupuestaria;
4053
4053
  _this.denominacion = dt.denominacion;
4054
4054
  _this.estructura = dt.estructura;
4055
- _this.fuentes = dt.fuentes.map(function (e) { return new MFuenteFinanciamiento(e); });
4056
4055
  _this.idEp1 = parseInt(dt.id_ep1);
4057
4056
  _this.idEp2 = parseInt(dt.id_ep2);
4058
4057
  _this.idEp3 = parseInt(dt.id_ep3);
@@ -4070,6 +4069,9 @@
4070
4069
  _this.denominacion3 = dt.status;
4071
4070
  _this.idDtUni = parseInt(dt.id_dt_uniadm);
4072
4071
  _this.idUnidadAdministrativa = parseInt(dt.id_uniadm);
4072
+ if (dt.fuentes) {
4073
+ _this.fuentes = dt.fuentes.map(function (e) { return new MFuenteFinanciamiento(e); });
4074
+ }
4073
4075
  }
4074
4076
  return _this;
4075
4077
  }