sigesp 1.1.21-20241106 → 1.1.23-20241113
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.
- package/esm2020/lib/core/interfaces/CuentaIngreso.mjs +1 -1
- package/esm2020/lib/core/models/SCG/IncomeAccount.mjs +45 -5
- package/esm2020/lib/sigesp.service.mjs +56 -16
- package/fesm2015/sigesp.mjs +101 -19
- package/fesm2015/sigesp.mjs.map +1 -1
- package/fesm2020/sigesp.mjs +99 -19
- package/fesm2020/sigesp.mjs.map +1 -1
- package/lib/core/interfaces/CuentaIngreso.d.ts +0 -1
- package/lib/core/models/SCG/IncomeAccount.d.ts +2 -2
- package/lib/sigesp.service.d.ts +15 -7
- package/package.json +1 -1
package/fesm2020/sigesp.mjs
CHANGED
|
@@ -2617,7 +2617,7 @@ class MComprobantePresupuestarioIngresos {
|
|
|
2617
2617
|
// TERMINAR EL MODELO
|
|
2618
2618
|
|
|
2619
2619
|
class MCuentaIngresos extends MBasicModel {
|
|
2620
|
-
constructor(cuenta = null
|
|
2620
|
+
constructor(cuenta = null) {
|
|
2621
2621
|
super();
|
|
2622
2622
|
this.idEmpresa = 0;
|
|
2623
2623
|
this.idEnterprise = 0;
|
|
@@ -2626,7 +2626,6 @@ class MCuentaIngresos extends MBasicModel {
|
|
|
2626
2626
|
this.denominacion = '';
|
|
2627
2627
|
this.cuenta = null;
|
|
2628
2628
|
this.cuentaContable = null;
|
|
2629
|
-
this.cuentaONCOP = null;
|
|
2630
2629
|
this.clasificador = null;
|
|
2631
2630
|
this.referencia = null;
|
|
2632
2631
|
this.estado = null;
|
|
@@ -2689,8 +2688,6 @@ class MCuentaIngresos extends MBasicModel {
|
|
|
2689
2688
|
this.noviembre = parseInt(cuenta.noviembre);
|
|
2690
2689
|
this.diciembre = parseInt(cuenta.diciembre);
|
|
2691
2690
|
this.clasificador = cuenta.codcuecla;
|
|
2692
|
-
this.cuentaONCOP = cuenta.cueoncop;
|
|
2693
|
-
this.isNew = isNew;
|
|
2694
2691
|
this.idEP1 = parseInt(cuenta.id_ep1);
|
|
2695
2692
|
this.idEP2 = parseInt(cuenta.id_ep2);
|
|
2696
2693
|
this.idEP3 = parseInt(cuenta.id_ep3);
|
|
@@ -2699,6 +2696,49 @@ class MCuentaIngresos extends MBasicModel {
|
|
|
2699
2696
|
this.id = cuenta.id_del_spicta ? parseInt(cuenta.id_del_spicta) : 0;
|
|
2700
2697
|
this.estructura = cuenta.estructura ? cuenta.estructura : "";
|
|
2701
2698
|
}
|
|
2699
|
+
else {
|
|
2700
|
+
this.isNew = true;
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
dataInterface() {
|
|
2704
|
+
return {
|
|
2705
|
+
id_enterprise: this.idEnterprise.toString(),
|
|
2706
|
+
perfiscal: this.periodoFiscal.toString(),
|
|
2707
|
+
abril: this.abril.toString(),
|
|
2708
|
+
agosto: this.agosto.toString(),
|
|
2709
|
+
aumento: this.aumento.toString(),
|
|
2710
|
+
cobrado: this.cobrado.toString(),
|
|
2711
|
+
cobrado_anticipado: this.anticipoCobrado.toString(),
|
|
2712
|
+
denspi: this.denominacion.toString(),
|
|
2713
|
+
devengado: this.devengado.toString(),
|
|
2714
|
+
diciembre: this.diciembre.toString(),
|
|
2715
|
+
disminucion: this.disminucion.toString(),
|
|
2716
|
+
distribuir: this.distribuir.toString(),
|
|
2717
|
+
enero: this.enero.toString(),
|
|
2718
|
+
febrero: this.febrero.toString(),
|
|
2719
|
+
id_empresa: this.idEmpresa.toString(),
|
|
2720
|
+
julio: this.julio.toString(),
|
|
2721
|
+
junio: this.junio.toString(),
|
|
2722
|
+
marzo: this.marzo.toString(),
|
|
2723
|
+
mayo: this.mayo.toString(),
|
|
2724
|
+
nivel: this.nivel.toString(),
|
|
2725
|
+
noviembre: this.noviembre.toString(),
|
|
2726
|
+
octubre: this.octubre.toString(),
|
|
2727
|
+
previsto: this.previsto.toString(),
|
|
2728
|
+
referencia: this.referencia.toString(),
|
|
2729
|
+
sc_cuenta: this.cuentaContable,
|
|
2730
|
+
septiembre: this.septiembre.toString(),
|
|
2731
|
+
spi_cuenta: this.cuenta.toString(),
|
|
2732
|
+
stamov: this.estado.toString(),
|
|
2733
|
+
codcuecla: this.clasificador.toString(),
|
|
2734
|
+
id_ep1: this.idEP1.toString(),
|
|
2735
|
+
id_ep2: this.idEP2.toString(),
|
|
2736
|
+
id_ep3: this.idEP3.toString(),
|
|
2737
|
+
id_ep4: this.idEP4.toString(),
|
|
2738
|
+
id_ep5: this.idEP5.toString(),
|
|
2739
|
+
id_del_spicta: this.id.toString(),
|
|
2740
|
+
estructura: this.estructura.toString(),
|
|
2741
|
+
};
|
|
2702
2742
|
}
|
|
2703
2743
|
}
|
|
2704
2744
|
|
|
@@ -6758,15 +6798,15 @@ class SigespService {
|
|
|
6758
6798
|
* @returns
|
|
6759
6799
|
*/
|
|
6760
6800
|
getBudgetStructureComplete(tipo = 'completa', idEnterprise, periodoFiscal, codigo = '') {
|
|
6761
|
-
return this.http.get(`${this.URL}/dao/spg/estructura_presupuestaria_dao.php?tipo=${tipo}
|
|
6801
|
+
return this.http.get(`${this.URL}/dao/spg/estructura_presupuestaria_dao.php?tipo=${tipo}&e=${idEnterprise}&per=${periodoFiscal}&cod=${codigo}`, { headers: this.getHttpHeaders() }).pipe(map((resp) => resp.data.map(e => new MEstructuras(e))));
|
|
6762
6802
|
}
|
|
6763
6803
|
/**
|
|
6764
6804
|
* @description Obtiene las configuraciones de la estructura presupuestaria
|
|
6765
6805
|
* @return Observable<MConfigurationSPG[]>
|
|
6766
6806
|
* @author Miguel Ramírez
|
|
6767
6807
|
*/
|
|
6768
|
-
getConfigurationSPG(idEnterprise,
|
|
6769
|
-
return this.http.get(`${this.URL}/dao/spg/configuracion_presupuestaria_dao.php?e=${idEnterprise}&periodo=${
|
|
6808
|
+
getConfigurationSPG(idEnterprise, periodoFiscal) {
|
|
6809
|
+
return this.http.get(`${this.URL}/dao/spg/configuracion_presupuestaria_dao.php?e=${idEnterprise}&periodo=${periodoFiscal}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((resp) => new MConfigurationSPG(resp.data[0])));
|
|
6770
6810
|
}
|
|
6771
6811
|
/**
|
|
6772
6812
|
* @description Obtiene las configuraciones de los proveedores
|
|
@@ -6828,8 +6868,8 @@ class SigespService {
|
|
|
6828
6868
|
* @return Observable<MFuenteFinanciamiento[]>
|
|
6829
6869
|
* @author Miguel Ramírez
|
|
6830
6870
|
*/
|
|
6831
|
-
getFuenteFinanciamiento() {
|
|
6832
|
-
return this.http.get(`${this.URL}/dao/spg/fuente_financiamiento_dao.php`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((resp) => resp.data.map(element => new MFuenteFinanciamiento(element))));
|
|
6871
|
+
getFuenteFinanciamiento(idEnterprise, periodoFiscal) {
|
|
6872
|
+
return this.http.get(`${this.URL}/dao/spg/fuente_financiamiento_dao.php?e=${idEnterprise}&per=${periodoFiscal}`, { headers: this.getHttpHeaders() }).pipe(retry(3), catchError(this.handlerError), map((resp) => resp.data.map(element => new MFuenteFinanciamiento(element))));
|
|
6833
6873
|
}
|
|
6834
6874
|
/**
|
|
6835
6875
|
* @description Obtiene los centros de costo
|
|
@@ -7192,8 +7232,8 @@ class SigespService {
|
|
|
7192
7232
|
* @return Promise<McuentaInstitucional>
|
|
7193
7233
|
* @author Miguel Ramírez
|
|
7194
7234
|
*/
|
|
7195
|
-
async openDialogCuentasInstitucionales(idEnterprise,
|
|
7196
|
-
let accounts = await this.getCuentasInstitucionales(idEnterprise,
|
|
7235
|
+
async openDialogCuentasInstitucionales(idEnterprise, periodoFiscal) {
|
|
7236
|
+
let accounts = await this.getCuentasInstitucionales(idEnterprise, periodoFiscal).toPromise();
|
|
7197
7237
|
let dialogRef = this.dialog.open(CatalogoComponent, {
|
|
7198
7238
|
data: {
|
|
7199
7239
|
columns: ['cuenta', 'denominacion'],
|
|
@@ -7211,8 +7251,8 @@ class SigespService {
|
|
|
7211
7251
|
* @return Observable<MCuentaInstitucional[]>
|
|
7212
7252
|
* @author Miguel Ramírez
|
|
7213
7253
|
*/
|
|
7214
|
-
getCuentasInstitucionales(idEnterprise,
|
|
7215
|
-
return this.http.get(`${this.URL}/dao/scg/cuentas_dao.php?e=${idEnterprise}&periodo=${
|
|
7254
|
+
getCuentasInstitucionales(idEnterprise, periodoFiscal, inventory) {
|
|
7255
|
+
return this.http.get(`${this.URL}/dao/scg/cuentas_dao.php?e=${idEnterprise}&periodo=${periodoFiscal}${(inventory) ? '&inventory=true' : ''}`, { headers: this.getHttpHeaders() }).pipe(map((resp) => resp.data.map(element => new MCuentaInstitucional(element))));
|
|
7216
7256
|
}
|
|
7217
7257
|
/**
|
|
7218
7258
|
* @description Abre el dialog de las cuentas de presupuesto (Recursos y Egresos)
|
|
@@ -7241,6 +7281,46 @@ class SigespService {
|
|
|
7241
7281
|
getCuentasPresupuesto(filter) {
|
|
7242
7282
|
return this.http.get(`${this.URL}/dao/scg/plan_unico_cuentas_dao.php?filter=${filter}`, { headers: this.getHttpHeaders() }).pipe(map((res) => res.data.map(element => new MCuentaPresupuesto(element))));
|
|
7243
7283
|
}
|
|
7284
|
+
/**
|
|
7285
|
+
* @description Abre el cátalogo de cuentas de la tabla "spg_cuentas"
|
|
7286
|
+
* @returns Promise<MCuentaEgresos>
|
|
7287
|
+
* @author Carlos Albornoz
|
|
7288
|
+
* @params presupuesto: Indica si se a trabajar con estructura de presupuesto o no
|
|
7289
|
+
*/
|
|
7290
|
+
async openCatalogoCuentasEgreso(idEnterprise, periodoFiscal, titulo, presupuesto = true, ancho = "1000px") {
|
|
7291
|
+
let cuentas = [];
|
|
7292
|
+
await this.getExpenseAccounts(idEnterprise, periodoFiscal).toPromise().then(res => {
|
|
7293
|
+
cuentas = res;
|
|
7294
|
+
cuentas = cuentas.filter(e => {
|
|
7295
|
+
return e.status == "C";
|
|
7296
|
+
}).map(e => {
|
|
7297
|
+
e['provStatus'] = e.status == "C" ? "Movimientos" : "Totalizadora";
|
|
7298
|
+
return e;
|
|
7299
|
+
});
|
|
7300
|
+
});
|
|
7301
|
+
if (presupuesto) {
|
|
7302
|
+
return this.openCatalogoDosInputs(["cuenta", "denominacion", "estructura", "provStatus"], titulo, cuentas, [{
|
|
7303
|
+
placeholder: "Cuenta",
|
|
7304
|
+
property: "cuenta"
|
|
7305
|
+
}, {
|
|
7306
|
+
placeholder: "Estructura",
|
|
7307
|
+
property: "estructura"
|
|
7308
|
+
}], ["Cuenta", "Denominación", "Estructura", "Estado"], ancho);
|
|
7309
|
+
}
|
|
7310
|
+
else {
|
|
7311
|
+
let filteredAccounts = [];
|
|
7312
|
+
cuentas.forEach(c => {
|
|
7313
|
+
if (!filteredAccounts.find(e => e.cuenta == c.cuenta)) {
|
|
7314
|
+
filteredAccounts.push(c);
|
|
7315
|
+
}
|
|
7316
|
+
});
|
|
7317
|
+
return this.openCatalogoGenerico(["cuenta", "denominacion", "provStatus"], titulo, filteredAccounts, ["Cuenta", "Denominación", "Estado"], ancho);
|
|
7318
|
+
}
|
|
7319
|
+
}
|
|
7320
|
+
getExpenseAccounts(idEnterprise, periodoFiscal) {
|
|
7321
|
+
return this.http.get(`${this.URL}/dao/spg/cuentas_egresos_dao.php?e=${idEnterprise}&periodo=${periodoFiscal}`, { headers: this.getHttpHeaders() })
|
|
7322
|
+
.pipe(map((res) => res.data.map(element => new MCuentaEgresos(element))));
|
|
7323
|
+
}
|
|
7244
7324
|
/**
|
|
7245
7325
|
* @description Abre el cátalogo de cuentas de la tabla "scg_plan_unico_re"
|
|
7246
7326
|
* @returns Promise<MCuentaPresupuesto>
|
|
@@ -7277,9 +7357,9 @@ class SigespService {
|
|
|
7277
7357
|
* @author Carlos Albornoz
|
|
7278
7358
|
* @params presupuesto: Indica si se a trabajar con estructura de presupuesto o no
|
|
7279
7359
|
*/
|
|
7280
|
-
async openCatalogoCuentasIngreso(
|
|
7360
|
+
async openCatalogoCuentasIngreso(idEnterprise, periodoFiscal, nivel, idEP, titulo, ancho = "1000px", presupuesto = false) {
|
|
7281
7361
|
let cuentas = [];
|
|
7282
|
-
await this.getIncomeAccounts().toPromise().then((res) => {
|
|
7362
|
+
await this.getIncomeAccounts('default', idEnterprise, periodoFiscal, nivel, idEP).toPromise().then((res) => {
|
|
7283
7363
|
cuentas = res.data;
|
|
7284
7364
|
cuentas = cuentas.filter(e => {
|
|
7285
7365
|
return e.estado == "C";
|
|
@@ -7307,8 +7387,8 @@ class SigespService {
|
|
|
7307
7387
|
return this.openCatalogoGenerico(["cuenta", "denominacion", "provStatus"], titulo, filteredAccounts, ["Cuenta", "Denominación", "Estado"], ancho);
|
|
7308
7388
|
}
|
|
7309
7389
|
}
|
|
7310
|
-
getUnidadAdministrativa(tipo, idEnterprise,
|
|
7311
|
-
return this.http.get(`${this.URL}/dao/spg/unidad_administrativa_dao.php?tipo=${tipo}&e=${idEnterprise}&periodo=${
|
|
7390
|
+
getUnidadAdministrativa(tipo, idEnterprise, periodoFiscal, idUnidadOrganizativa) {
|
|
7391
|
+
return this.http.get(`${this.URL}/dao/spg/unidad_administrativa_dao.php?tipo=${tipo}&e=${idEnterprise}&periodo=${periodoFiscal}&id=${idUnidadOrganizativa}`, { headers: this.getHttpHeaders() })
|
|
7312
7392
|
.pipe(map((res) => {
|
|
7313
7393
|
if (res.success) {
|
|
7314
7394
|
res.data = res.data.map(e => new MAdministrativeUnit(e));
|
|
@@ -7673,8 +7753,8 @@ class SigespService {
|
|
|
7673
7753
|
return res;
|
|
7674
7754
|
}));
|
|
7675
7755
|
}
|
|
7676
|
-
getIncomeAccounts(
|
|
7677
|
-
return this.http.get(`${this.URL}/dao/spi/cuentas_ingresos_dao.php
|
|
7756
|
+
getIncomeAccounts(tipo, idEnterprise, periodoFiscal, nivel = 0, idEP, estatus = '') {
|
|
7757
|
+
return this.http.get(`${this.URL}/dao/spi/cuentas_ingresos_dao.php?tipo=${tipo}&e=${idEnterprise}&per=${periodoFiscal}&niv=${nivel}&ep=${idEP}&est=${estatus}`, { headers: this.getHttpHeaders() }).pipe(map((res) => {
|
|
7678
7758
|
if (res.success) {
|
|
7679
7759
|
res.data = res.data.map(e => new MCuentaIngresos(e));
|
|
7680
7760
|
}
|