sigesp 1.0.18-20240821 → 1.0.19-20240821

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.
Files changed (576) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +12 -9
  3. package/esm2020/lib/app/app.component.mjs +14 -0
  4. package/esm2020/lib/app/app.module.mjs +34 -0
  5. package/esm2020/lib/core/interfaces/Auditoria.mjs +49 -0
  6. package/esm2020/lib/core/interfaces/Banco.mjs +2 -0
  7. package/esm2020/lib/core/interfaces/Catalogo.mjs +2 -0
  8. package/esm2020/lib/core/interfaces/CentroCosto.mjs +2 -0
  9. package/esm2020/lib/core/interfaces/Clasificacion.mjs +2 -0
  10. package/esm2020/lib/core/interfaces/Cliente.mjs +2 -0
  11. package/esm2020/lib/core/interfaces/ComprobantePresupuestario.mjs +2 -0
  12. package/esm2020/lib/core/interfaces/Comunidad.mjs +2 -0
  13. package/esm2020/lib/core/interfaces/Configuracion.mjs +2 -0
  14. package/esm2020/lib/core/interfaces/ConfiguracionRPC.mjs +2 -0
  15. package/esm2020/lib/core/interfaces/ConfiguracionSCG.mjs +2 -0
  16. package/esm2020/lib/core/interfaces/ConfigurationSPG.mjs +2 -0
  17. package/esm2020/lib/core/interfaces/Constantes.mjs +365 -0
  18. package/esm2020/lib/core/interfaces/CuentaEgresos.mjs +2 -0
  19. package/esm2020/lib/core/interfaces/CuentaIngreso.mjs +2 -0
  20. package/esm2020/lib/core/interfaces/CuentaIngresoEstructura.mjs +2 -0
  21. package/esm2020/lib/core/interfaces/CuentaInstitucional.mjs +2 -0
  22. package/esm2020/lib/core/interfaces/CuentaPresupuesto.mjs +2 -0
  23. package/esm2020/lib/core/interfaces/CuentasPorPagar.mjs +2 -0
  24. package/esm2020/lib/core/interfaces/Documento.mjs +2 -0
  25. package/esm2020/lib/core/interfaces/EntradaSuministro.mjs +2 -0
  26. package/esm2020/lib/core/interfaces/Especialidad.mjs +2 -0
  27. package/esm2020/lib/core/interfaces/EstructuraPresupuestaria.mjs +2 -0
  28. package/esm2020/lib/core/interfaces/FuenteFinanciamiento.mjs +2 -0
  29. package/esm2020/lib/core/interfaces/IBancoCuentasPorPagar.mjs +2 -0
  30. package/esm2020/lib/core/interfaces/ITipoDepositos.mjs +2 -0
  31. package/esm2020/lib/core/interfaces/Integracion.mjs +2 -0
  32. package/esm2020/lib/core/interfaces/Lugares.mjs +2 -0
  33. package/esm2020/lib/core/interfaces/Moneda.mjs +2 -0
  34. package/esm2020/lib/core/interfaces/Nomina.mjs +27 -0
  35. package/esm2020/lib/core/interfaces/PlanUnicoCuenta.mjs +2 -0
  36. package/esm2020/lib/core/interfaces/Presupuesto.mjs +2 -0
  37. package/esm2020/lib/core/interfaces/Proveedor.mjs +2 -0
  38. package/esm2020/lib/core/interfaces/RecursosHumanos.mjs +4 -0
  39. package/esm2020/lib/core/interfaces/Request.mjs +2 -0
  40. package/esm2020/lib/core/interfaces/Response.mjs +2 -0
  41. package/esm2020/lib/core/interfaces/Seguridad.mjs +2 -0
  42. package/esm2020/lib/core/interfaces/Servicios.mjs +2 -0
  43. package/esm2020/lib/core/interfaces/Sistema.mjs +2 -0
  44. package/esm2020/lib/core/interfaces/Tributos.mjs +2 -0
  45. package/esm2020/lib/core/interfaces/UnidadTributaria.mjs +2 -0
  46. package/esm2020/lib/core/interfaces/Usuario.mjs +2 -0
  47. package/esm2020/lib/core/interfaces/UsuarioPrefijo.mjs +2 -0
  48. package/esm2020/lib/core/models/CFG/Empresa.model.mjs +151 -0
  49. package/esm2020/lib/core/models/CFG/Enterprise.model.mjs +70 -0
  50. package/esm2020/lib/core/models/CFG/MPrefijo.model.mjs +64 -0
  51. package/esm2020/lib/core/models/CFG/Procede.model.mjs +31 -0
  52. package/esm2020/lib/core/models/CFG/TasaCambio.model.mjs +34 -0
  53. package/esm2020/lib/core/models/CFG/comunidad.model.mjs +22 -0
  54. package/esm2020/lib/core/models/CFG/locations.model.mjs +170 -0
  55. package/esm2020/lib/core/models/CFG/moneda.model.mjs +72 -0
  56. package/esm2020/lib/core/models/CFG/userPrefix.model.mjs +46 -0
  57. package/esm2020/lib/core/models/CXP/MConceptosCXP.model.mjs +34 -0
  58. package/esm2020/lib/core/models/CXP/MTipoDocumentoCXP.model.mjs +44 -0
  59. package/esm2020/lib/core/models/RPC/clasification.model.mjs +16 -0
  60. package/esm2020/lib/core/models/RPC/configuracionRPC.model.mjs +23 -0
  61. package/esm2020/lib/core/models/RPC/document.model.mjs +16 -0
  62. package/esm2020/lib/core/models/RPC/proveedores.model.mjs +9 -0
  63. package/esm2020/lib/core/models/RPC/providerBeneficiary.model.mjs +164 -0
  64. package/esm2020/lib/core/models/RPC/specialty.model.mjs +12 -0
  65. package/esm2020/lib/core/models/SCB/bank.model.mjs +181 -0
  66. package/esm2020/lib/core/models/SCG/IncomeAccount.mjs +83 -0
  67. package/esm2020/lib/core/models/SCG/accountMarriage.model.mjs +29 -0
  68. package/esm2020/lib/core/models/SCG/centroCosto.model.mjs +65 -0
  69. package/esm2020/lib/core/models/SCG/configuracionSCG.model.mjs +169 -0
  70. package/esm2020/lib/core/models/SCG/cuentaInstitucional.model.mjs +89 -0
  71. package/esm2020/lib/core/models/SCG/planUnicoCuenta.model.mjs +17 -0
  72. package/esm2020/lib/core/models/SFV/MClienteModel.mjs +116 -0
  73. package/esm2020/lib/core/models/SIV/MDetaContable.model.mjs +62 -0
  74. package/esm2020/lib/core/models/SIV/MDetaEntrada.model.mjs +94 -0
  75. package/esm2020/lib/core/models/SIV/MEntradaSuministro.model.mjs +132 -0
  76. package/esm2020/lib/core/models/SIV/MTipoDepositos.model.mjs +61 -0
  77. package/esm2020/lib/core/models/SNO/MAnticipoPrestaciones.model.mjs +100 -0
  78. package/esm2020/lib/core/models/SNO/MArchivoTxtCampo.model.mjs +61 -0
  79. package/esm2020/lib/core/models/SNO/MArchivosTxt.model.mjs +41 -0
  80. package/esm2020/lib/core/models/SNO/MAsignacionCargo.model.mjs +205 -0
  81. package/esm2020/lib/core/models/SNO/MAspectoEvaluacion.model.mjs +90 -0
  82. package/esm2020/lib/core/models/SNO/MAuditoria.model.mjs +61 -0
  83. package/esm2020/lib/core/models/SNO/MBeneficiario.model.mjs +137 -0
  84. package/esm2020/lib/core/models/SNO/MCargaFamiliar.model.mjs +52 -0
  85. package/esm2020/lib/core/models/SNO/MCargaMasiva.model.mjs +34 -0
  86. package/esm2020/lib/core/models/SNO/MCargosPersonal.model.mjs +101 -0
  87. package/esm2020/lib/core/models/SNO/MClasificacionObrero.mdel.mjs +46 -0
  88. package/esm2020/lib/core/models/SNO/MCodigoUnicoRac.model.mjs +39 -0
  89. package/esm2020/lib/core/models/SNO/MComponete.model.mjs +38 -0
  90. package/esm2020/lib/core/models/SNO/MConceptoVacaciones.model.mjs +85 -0
  91. package/esm2020/lib/core/models/SNO/MConceptosNomina.model.mjs +234 -0
  92. package/esm2020/lib/core/models/SNO/MConceptosPersonalNomina.model.mjs +97 -0
  93. package/esm2020/lib/core/models/SNO/MConcursante.model.mjs +317 -0
  94. package/esm2020/lib/core/models/SNO/MConcurso.model.mjs +246 -0
  95. package/esm2020/lib/core/models/SNO/MConfiguracionSNO.model.mjs +410 -0
  96. package/esm2020/lib/core/models/SNO/MConstanteNomina.model.mjs +70 -0
  97. package/esm2020/lib/core/models/SNO/MConstantePersonalNomina.model.mjs +79 -0
  98. package/esm2020/lib/core/models/SNO/MDedicacion.model.mjs +35 -0
  99. package/esm2020/lib/core/models/SNO/MDefinicionNomina.model.mjs +313 -0
  100. package/esm2020/lib/core/models/SNO/MDefinicionesBasicas.model.mjs +84 -0
  101. package/esm2020/lib/core/models/SNO/MDeudaAnterior.model.mjs +40 -0
  102. package/esm2020/lib/core/models/SNO/MEncargaduria.model.mjs +138 -0
  103. package/esm2020/lib/core/models/SNO/MEscalaEvaluacion.model.mjs +38 -0
  104. package/esm2020/lib/core/models/SNO/MEscalaEvaluacionDt.model.mjs +37 -0
  105. package/esm2020/lib/core/models/SNO/MEstructuraOrganizativa.model.mjs +119 -0
  106. package/esm2020/lib/core/models/SNO/MFamiliares.model.mjs +86 -0
  107. package/esm2020/lib/core/models/SNO/MFeriados.model.mjs +43 -0
  108. package/esm2020/lib/core/models/SNO/MFideicomiso.model.mjs +406 -0
  109. package/esm2020/lib/core/models/SNO/MFormacionAcademica.model.mjs +49 -0
  110. package/esm2020/lib/core/models/SNO/MGrado.model.mjs +47 -0
  111. package/esm2020/lib/core/models/SNO/MHojaTiempo.model.mjs +117 -0
  112. package/esm2020/lib/core/models/SNO/MImpuestoSobreRenta.model.mjs +73 -0
  113. package/esm2020/lib/core/models/SNO/MMetodoBanco.model.mjs +105 -0
  114. package/esm2020/lib/core/models/SNO/MNominaSimple.model.mjs +86 -0
  115. package/esm2020/lib/core/models/SNO/MPeriodoNomina.model.mjs +184 -0
  116. package/esm2020/lib/core/models/SNO/MPermisos.model.mjs +68 -0
  117. package/esm2020/lib/core/models/SNO/MPersonal.model.mjs +638 -0
  118. package/esm2020/lib/core/models/SNO/MPersonalJubilado.model.mjs +64 -0
  119. package/esm2020/lib/core/models/SNO/MPersonalNomina.model.mjs +313 -0
  120. package/esm2020/lib/core/models/SNO/MPlanHorario.model.mjs +117 -0
  121. package/esm2020/lib/core/models/SNO/MPlantillaConstancia.model.mjs +31 -0
  122. package/esm2020/lib/core/models/SNO/MPrestamo.model.mjs +221 -0
  123. package/esm2020/lib/core/models/SNO/MPrimaGrados.model.mjs +43 -0
  124. package/esm2020/lib/core/models/SNO/MPrimasConcepto.model.mjs +43 -0
  125. package/esm2020/lib/core/models/SNO/MRango.model.mjs +43 -0
  126. package/esm2020/lib/core/models/SNO/MReportesRRHH.mjs +402 -0
  127. package/esm2020/lib/core/models/SNO/MRequisitosConcursante.model.mjs +46 -0
  128. package/esm2020/lib/core/models/SNO/MRequisitosConcursos.model.mjs +37 -0
  129. package/esm2020/lib/core/models/SNO/MRequisitosMinimos.model.mjs +113 -0
  130. package/esm2020/lib/core/models/SNO/MSalarioHistorico.model.mjs +70 -0
  131. package/esm2020/lib/core/models/SNO/MSolicitudEmpleo.model.mjs +121 -0
  132. package/esm2020/lib/core/models/SNO/MTablaVacaciones.model.mjs +57 -0
  133. package/esm2020/lib/core/models/SNO/MTablaVacacionesPeriodo.model.mjs +40 -0
  134. package/esm2020/lib/core/models/SNO/MTabulador.model.mjs +96 -0
  135. package/esm2020/lib/core/models/SNO/MTipoEvaluacion.model.mjs +75 -0
  136. package/esm2020/lib/core/models/SNO/MTipoPersonal.model.mjs +34 -0
  137. package/esm2020/lib/core/models/SNO/MTiposEnfermedad.model.mjs +37 -0
  138. package/esm2020/lib/core/models/SNO/MTrabajoAnterior.model.mjs +65 -0
  139. package/esm2020/lib/core/models/SNO/MUbicacionFisica.model.mjs +61 -0
  140. package/esm2020/lib/core/models/SNO/MVacacionesPersonal.model.mjs +115 -0
  141. package/esm2020/lib/core/models/SOC/charge.model.mjs +66 -0
  142. package/esm2020/lib/core/models/SOC/clause.model.mjs +31 -0
  143. package/esm2020/lib/core/models/SOC/clauseModality.model.mjs +35 -0
  144. package/esm2020/lib/core/models/SOC/configuracionSOC.model.mjs +62 -0
  145. package/esm2020/lib/core/models/SOC/service.model.mjs +46 -0
  146. package/esm2020/lib/core/models/SOC/serviceCharge.model.mjs +37 -0
  147. package/esm2020/lib/core/models/SOC/serviceType.model.mjs +31 -0
  148. package/esm2020/lib/core/models/SPG/UnidadAdministradoraCentral.mjs +43 -0
  149. package/esm2020/lib/core/models/SPG/administrativeUnit.model.mjs +112 -0
  150. package/esm2020/lib/core/models/SPG/comprobantePresupuestario.model.mjs +51 -0
  151. package/esm2020/lib/core/models/SPG/configurationSPG.model.mjs +59 -0
  152. package/esm2020/lib/core/models/SPG/cuentaPresupuesto.model.mjs +120 -0
  153. package/esm2020/lib/core/models/SPG/estructuraPresupuestaria.model.mjs +176 -0
  154. package/esm2020/lib/core/models/SPG/expensiveAccount.model.mjs +108 -0
  155. package/esm2020/lib/core/models/SPG/fuenteFinanciamiento.model.mjs +31 -0
  156. package/esm2020/lib/core/models/SPG/incomeStructureAccount.model.mjs +81 -0
  157. package/esm2020/lib/core/models/SPG/organizationType.model.mjs +12 -0
  158. package/esm2020/lib/core/models/SSS/component.model.mjs +44 -0
  159. package/esm2020/lib/core/models/SSS/group.model.mjs +30 -0
  160. package/esm2020/lib/core/models/SSS/log.model.mjs +29 -0
  161. package/esm2020/lib/core/models/SSS/securityConfiguration.model.mjs +20 -0
  162. package/esm2020/lib/core/models/SSS/sistema.mjs +71 -0
  163. package/esm2020/lib/core/models/SSS/user.model.mjs +32 -0
  164. package/esm2020/lib/core/models/SSS/userDetail.model.mjs +73 -0
  165. package/esm2020/lib/core/models/SSS/userPermit.model.mjs +47 -0
  166. package/esm2020/lib/core/models/SSS/userRights.model.mjs +104 -0
  167. package/esm2020/lib/core/models/STB/MCargosAdicionales.mjs +84 -0
  168. package/esm2020/lib/core/models/STB/deduction.model.mjs +90 -0
  169. package/esm2020/lib/core/models/STB/deductionType.model.mjs +20 -0
  170. package/esm2020/lib/core/models/STB/unidadTributaria.model.mjs +14 -0
  171. package/esm2020/lib/core/models/basic-model.model.mjs +8 -0
  172. package/esm2020/lib/shared/components/catalogo/catalogo.component.mjs +76 -0
  173. package/esm2020/lib/shared/components/catalogo-doble-input/catalogo-doble-input.component.mjs +87 -0
  174. package/esm2020/lib/shared/components/catalogo-estructuras/catalogo-estructuras.component.mjs +74 -0
  175. package/esm2020/lib/shared/components/confirm/confirm.component.mjs +35 -0
  176. package/esm2020/lib/shared/components/icon/icon.component.mjs +22 -0
  177. package/esm2020/lib/shared/components/table-select/table-select.component.mjs +99 -0
  178. package/esm2020/lib/shared/material/customPaginator.mjs +24 -0
  179. package/esm2020/lib/shared/material/material.module.mjs +322 -0
  180. package/esm2020/lib/shared/pipes/iso-currency.pipe.mjs +43 -0
  181. package/esm2020/lib/shared/shared.module.mjs +66 -0
  182. package/esm2020/lib/sigesp.service.mjs +2064 -0
  183. package/esm2020/lib/validation.service.mjs +131 -0
  184. package/esm2020/public-api.mjs +156 -0
  185. package/esm2020/sigesp.mjs +5 -0
  186. package/fesm2015/sigesp.mjs +14629 -0
  187. package/fesm2015/sigesp.mjs.map +1 -0
  188. package/fesm2020/sigesp.mjs +14588 -0
  189. package/fesm2020/sigesp.mjs.map +1 -0
  190. package/index.d.ts +5 -0
  191. package/lib/app/app.component.d.ts +8 -0
  192. package/lib/app/app.module.d.ts +10 -0
  193. package/lib/core/interfaces/Auditoria.d.ts +19 -0
  194. package/lib/core/interfaces/Banco.d.ts +593 -0
  195. package/lib/core/interfaces/Catalogo.d.ts +13 -0
  196. package/lib/core/interfaces/CentroCosto.d.ts +18 -0
  197. package/lib/core/interfaces/Clasificacion.d.ts +6 -0
  198. package/lib/core/interfaces/Cliente.d.ts +36 -0
  199. package/lib/core/interfaces/ComprobantePresupuestario.d.ts +42 -0
  200. package/lib/core/interfaces/Comunidad.d.ts +12 -0
  201. package/lib/core/interfaces/Configuracion.d.ts +101 -0
  202. package/lib/core/interfaces/ConfiguracionRPC.d.ts +10 -0
  203. package/lib/core/interfaces/ConfiguracionSCG.d.ts +54 -0
  204. package/lib/core/interfaces/ConfigurationSPG.d.ts +42 -0
  205. package/lib/core/interfaces/Constantes.d.ts +84 -0
  206. package/lib/core/interfaces/CuentaEgresos.d.ts +153 -0
  207. package/lib/core/interfaces/CuentaIngreso.d.ts +37 -0
  208. package/lib/core/interfaces/CuentaIngresoEstructura.d.ts +24 -0
  209. package/lib/core/interfaces/CuentaInstitucional.d.ts +26 -0
  210. package/lib/core/interfaces/CuentaPresupuesto.d.ts +6 -0
  211. package/lib/core/interfaces/CuentasPorPagar.d.ts +37 -0
  212. package/lib/core/interfaces/Documento.d.ts +6 -0
  213. package/lib/core/interfaces/EntradaSuministro.d.ts +87 -0
  214. package/lib/core/interfaces/Especialidad.d.ts +4 -0
  215. package/lib/core/interfaces/EstructuraPresupuestaria.d.ts +89 -0
  216. package/lib/core/interfaces/FuenteFinanciamiento.d.ts +7 -0
  217. package/lib/core/interfaces/IBancoCuentasPorPagar.d.ts +186 -0
  218. package/lib/core/interfaces/ITipoDepositos.d.ts +17 -0
  219. package/lib/core/interfaces/Integracion.d.ts +6 -0
  220. package/lib/core/interfaces/Lugares.d.ts +40 -0
  221. package/lib/core/interfaces/Moneda.d.ts +20 -0
  222. package/lib/core/interfaces/Nomina.d.ts +550 -0
  223. package/lib/core/interfaces/PlanUnicoCuenta.d.ts +4 -0
  224. package/lib/core/interfaces/Presupuesto.d.ts +122 -0
  225. package/lib/core/interfaces/Proveedor.d.ts +75 -0
  226. package/lib/core/interfaces/RecursosHumanos.d.ts +1616 -0
  227. package/{src/lib/core/interfaces/Request.ts → lib/core/interfaces/Request.d.ts} +3 -4
  228. package/lib/core/interfaces/Response.d.ts +7 -0
  229. package/lib/core/interfaces/Seguridad.d.ts +110 -0
  230. package/lib/core/interfaces/Servicios.d.ts +58 -0
  231. package/lib/core/interfaces/Sistema.d.ts +19 -0
  232. package/lib/core/interfaces/Tributos.d.ts +73 -0
  233. package/lib/core/interfaces/UnidadTributaria.d.ts +11 -0
  234. package/lib/core/interfaces/Usuario.d.ts +52 -0
  235. package/lib/core/interfaces/UsuarioPrefijo.d.ts +12 -0
  236. package/lib/core/models/CFG/Empresa.model.d.ts +52 -0
  237. package/lib/core/models/CFG/Enterprise.model.d.ts +24 -0
  238. package/lib/core/models/CFG/MPrefijo.model.d.ts +22 -0
  239. package/lib/core/models/CFG/Procede.model.d.ts +11 -0
  240. package/lib/core/models/CFG/TasaCambio.model.d.ts +12 -0
  241. package/lib/core/models/CFG/comunidad.model.d.ts +15 -0
  242. package/lib/core/models/CFG/locations.model.d.ts +54 -0
  243. package/lib/core/models/CFG/moneda.model.d.ts +26 -0
  244. package/lib/core/models/CFG/userPrefix.model.d.ts +16 -0
  245. package/lib/core/models/CXP/MConceptosCXP.model.d.ts +12 -0
  246. package/lib/core/models/CXP/MTipoDocumentoCXP.model.d.ts +16 -0
  247. package/lib/core/models/RPC/clasification.model.d.ts +11 -0
  248. package/lib/core/models/RPC/configuracionRPC.model.d.ts +12 -0
  249. package/lib/core/models/RPC/document.model.d.ts +11 -0
  250. package/lib/core/models/RPC/proveedores.model.d.ts +8 -0
  251. package/lib/core/models/RPC/providerBeneficiary.model.d.ts +75 -0
  252. package/lib/core/models/RPC/specialty.model.d.ts +9 -0
  253. package/lib/core/models/SCB/bank.model.d.ts +63 -0
  254. package/lib/core/models/SCG/IncomeAccount.d.ts +43 -0
  255. package/lib/core/models/SCG/accountMarriage.model.d.ts +11 -0
  256. package/lib/core/models/SCG/centroCosto.model.d.ts +23 -0
  257. package/lib/core/models/SCG/configuracionSCG.model.d.ts +58 -0
  258. package/lib/core/models/SCG/cuentaInstitucional.model.d.ts +32 -0
  259. package/lib/core/models/SCG/planUnicoCuenta.model.d.ts +8 -0
  260. package/lib/core/models/SFV/MClienteModel.d.ts +40 -0
  261. package/lib/core/models/SIV/MDetaContable.model.d.ts +21 -0
  262. package/lib/core/models/SIV/MDetaEntrada.model.d.ts +33 -0
  263. package/lib/core/models/SIV/MEntradaSuministro.model.d.ts +47 -0
  264. package/lib/core/models/SIV/MTipoDepositos.model.d.ts +21 -0
  265. package/lib/core/models/SNO/MAnticipoPrestaciones.model.d.ts +32 -0
  266. package/lib/core/models/SNO/MArchivoTxtCampo.model.d.ts +21 -0
  267. package/lib/core/models/SNO/MArchivosTxt.model.d.ts +15 -0
  268. package/lib/core/models/SNO/MAsignacionCargo.model.d.ts +79 -0
  269. package/lib/core/models/SNO/MAspectoEvaluacion.model.d.ts +30 -0
  270. package/lib/core/models/SNO/MAuditoria.model.d.ts +21 -0
  271. package/lib/core/models/SNO/MBeneficiario.model.d.ts +48 -0
  272. package/lib/core/models/SNO/MCargaFamiliar.model.d.ts +18 -0
  273. package/lib/core/models/SNO/MCargaMasiva.model.d.ts +12 -0
  274. package/lib/core/models/SNO/MCargosPersonal.model.d.ts +40 -0
  275. package/lib/core/models/SNO/MClasificacionObrero.mdel.d.ts +16 -0
  276. package/lib/core/models/SNO/MCodigoUnicoRac.model.d.ts +14 -0
  277. package/lib/core/models/SNO/MComponete.model.d.ts +14 -0
  278. package/lib/core/models/SNO/MConceptoVacaciones.model.d.ts +30 -0
  279. package/lib/core/models/SNO/MConceptosNomina.model.d.ts +78 -0
  280. package/lib/core/models/SNO/MConceptosPersonalNomina.model.d.ts +34 -0
  281. package/lib/core/models/SNO/MConcursante.model.d.ts +104 -0
  282. package/lib/core/models/SNO/MConcurso.model.d.ts +83 -0
  283. package/lib/core/models/SNO/MConfiguracionSNO.model.d.ts +138 -0
  284. package/lib/core/models/SNO/MConstanteNomina.model.d.ts +24 -0
  285. package/lib/core/models/SNO/MConstantePersonalNomina.model.d.ts +27 -0
  286. package/lib/core/models/SNO/MDedicacion.model.d.ts +13 -0
  287. package/lib/core/models/SNO/MDefinicionNomina.model.d.ts +119 -0
  288. package/lib/core/models/SNO/MDefinicionesBasicas.model.d.ts +26 -0
  289. package/lib/core/models/SNO/MDeudaAnterior.model.d.ts +14 -0
  290. package/lib/core/models/SNO/MEncargaduria.model.d.ts +47 -0
  291. package/lib/core/models/SNO/MEscalaEvaluacion.model.d.ts +15 -0
  292. package/lib/core/models/SNO/MEscalaEvaluacionDt.model.d.ts +14 -0
  293. package/lib/core/models/SNO/MEstructuraOrganizativa.model.d.ts +42 -0
  294. package/lib/core/models/SNO/MFamiliares.model.d.ts +31 -0
  295. package/lib/core/models/SNO/MFeriados.model.d.ts +16 -0
  296. package/lib/core/models/SNO/MFideicomiso.model.d.ts +143 -0
  297. package/lib/core/models/SNO/MFormacionAcademica.model.d.ts +18 -0
  298. package/lib/core/models/SNO/MGrado.model.d.ts +18 -0
  299. package/lib/core/models/SNO/MHojaTiempo.model.d.ts +40 -0
  300. package/lib/core/models/SNO/MImpuestoSobreRenta.model.d.ts +25 -0
  301. package/lib/core/models/SNO/MMetodoBanco.model.d.ts +35 -0
  302. package/lib/core/models/SNO/MNominaSimple.model.d.ts +36 -0
  303. package/lib/core/models/SNO/MPeriodoNomina.model.d.ts +58 -0
  304. package/lib/core/models/SNO/MPermisos.model.d.ts +24 -0
  305. package/lib/core/models/SNO/MPersonal.model.d.ts +219 -0
  306. package/lib/core/models/SNO/MPersonalJubilado.model.d.ts +23 -0
  307. package/lib/core/models/SNO/MPersonalNomina.model.d.ts +100 -0
  308. package/lib/core/models/SNO/MPlanHorario.model.d.ts +41 -0
  309. package/lib/core/models/SNO/MPlantillaConstancia.model.d.ts +11 -0
  310. package/lib/core/models/SNO/MPrestamo.model.d.ts +69 -0
  311. package/lib/core/models/SNO/MPrimaGrados.model.d.ts +15 -0
  312. package/lib/core/models/SNO/MPrimasConcepto.model.d.ts +15 -0
  313. package/lib/core/models/SNO/MRango.model.d.ts +15 -0
  314. package/lib/core/models/SNO/MReportesRRHH.d.ts +130 -0
  315. package/lib/core/models/SNO/MRequisitosConcursante.model.d.ts +16 -0
  316. package/lib/core/models/SNO/MRequisitosConcursos.model.d.ts +14 -0
  317. package/lib/core/models/SNO/MRequisitosMinimos.model.d.ts +39 -0
  318. package/lib/core/models/SNO/MSalarioHistorico.model.d.ts +25 -0
  319. package/lib/core/models/SNO/MSolicitudEmpleo.model.d.ts +42 -0
  320. package/lib/core/models/SNO/MTablaVacaciones.model.d.ts +15 -0
  321. package/lib/core/models/SNO/MTablaVacacionesPeriodo.model.d.ts +15 -0
  322. package/lib/core/models/SNO/MTabulador.model.d.ts +39 -0
  323. package/lib/core/models/SNO/MTipoEvaluacion.model.d.ts +28 -0
  324. package/lib/core/models/SNO/MTipoPersonal.model.d.ts +13 -0
  325. package/lib/core/models/SNO/MTiposEnfermedad.model.d.ts +14 -0
  326. package/lib/core/models/SNO/MTrabajoAnterior.model.d.ts +24 -0
  327. package/lib/core/models/SNO/MUbicacionFisica.model.d.ts +21 -0
  328. package/lib/core/models/SNO/MVacacionesPersonal.model.d.ts +40 -0
  329. package/lib/core/models/SOC/charge.model.d.ts +24 -0
  330. package/lib/core/models/SOC/clause.model.d.ts +11 -0
  331. package/lib/core/models/SOC/clauseModality.model.d.ts +13 -0
  332. package/lib/core/models/SOC/configuracionSOC.model.d.ts +20 -0
  333. package/lib/core/models/SOC/service.model.d.ts +16 -0
  334. package/lib/core/models/SOC/serviceCharge.model.d.ts +13 -0
  335. package/lib/core/models/SOC/serviceType.model.d.ts +11 -0
  336. package/lib/core/models/SPG/UnidadAdministradoraCentral.d.ts +15 -0
  337. package/lib/core/models/SPG/administrativeUnit.model.d.ts +58 -0
  338. package/lib/core/models/SPG/comprobantePresupuestario.model.d.ts +46 -0
  339. package/lib/core/models/SPG/configurationSPG.model.d.ts +37 -0
  340. package/lib/core/models/SPG/cuentaPresupuesto.model.d.ts +57 -0
  341. package/lib/core/models/SPG/estructuraPresupuestaria.model.d.ts +123 -0
  342. package/lib/core/models/SPG/expensiveAccount.model.d.ts +49 -0
  343. package/lib/core/models/SPG/fuenteFinanciamiento.model.d.ts +11 -0
  344. package/lib/core/models/SPG/incomeStructureAccount.model.d.ts +38 -0
  345. package/lib/core/models/SPG/organizationType.model.d.ts +9 -0
  346. package/lib/core/models/SSS/component.model.d.ts +16 -0
  347. package/lib/core/models/SSS/group.model.d.ts +16 -0
  348. package/lib/core/models/SSS/log.model.d.ts +15 -0
  349. package/lib/core/models/SSS/securityConfiguration.model.d.ts +9 -0
  350. package/lib/core/models/SSS/sistema.d.ts +25 -0
  351. package/lib/core/models/SSS/user.model.d.ts +22 -0
  352. package/lib/core/models/SSS/userDetail.model.d.ts +26 -0
  353. package/lib/core/models/SSS/userPermit.model.d.ts +18 -0
  354. package/lib/core/models/SSS/userRights.model.d.ts +35 -0
  355. package/lib/core/models/STB/MCargosAdicionales.d.ts +31 -0
  356. package/lib/core/models/STB/deduction.model.d.ts +30 -0
  357. package/lib/core/models/STB/deductionType.model.d.ts +9 -0
  358. package/lib/core/models/STB/unidadTributaria.model.d.ts +13 -0
  359. package/lib/core/models/basic-model.model.d.ts +6 -0
  360. package/lib/shared/components/catalogo/catalogo.component.d.ts +35 -0
  361. package/lib/shared/components/catalogo-doble-input/catalogo-doble-input.component.d.ts +39 -0
  362. package/lib/shared/components/catalogo-estructuras/catalogo-estructuras.component.d.ts +38 -0
  363. package/lib/shared/components/confirm/confirm.component.d.ts +21 -0
  364. package/lib/shared/components/icon/icon.component.d.ts +11 -0
  365. package/lib/shared/components/table-select/table-select.component.d.ts +39 -0
  366. package/lib/shared/material/customPaginator.d.ts +9 -0
  367. package/lib/shared/material/material.module.d.ts +48 -0
  368. package/lib/shared/pipes/iso-currency.pipe.d.ts +13 -0
  369. package/lib/shared/shared.module.d.ts +16 -0
  370. package/lib/sigesp.service.d.ts +1060 -0
  371. package/lib/validation.service.d.ts +15 -0
  372. package/package.json +31 -11
  373. package/public-api.d.ts +164 -0
  374. package/karma.conf.js +0 -32
  375. package/ng-package.json +0 -7
  376. package/src/lib/app/app.component.html +0 -1
  377. package/src/lib/app/app.component.scss +0 -0
  378. package/src/lib/app/app.component.ts +0 -15
  379. package/src/lib/app/app.module.ts +0 -21
  380. package/src/lib/core/interfaces/Auditoria.ts +0 -72
  381. package/src/lib/core/interfaces/Banco.ts +0 -633
  382. package/src/lib/core/interfaces/Catalogo.ts +0 -15
  383. package/src/lib/core/interfaces/CentroCosto.ts +0 -20
  384. package/src/lib/core/interfaces/Clasificacion.ts +0 -6
  385. package/src/lib/core/interfaces/Cliente.ts +0 -36
  386. package/src/lib/core/interfaces/ComprobantePresupuestario.ts +0 -43
  387. package/src/lib/core/interfaces/Comunidad.ts +0 -12
  388. package/src/lib/core/interfaces/Configuracion.ts +0 -110
  389. package/src/lib/core/interfaces/ConfiguracionRPC.ts +0 -10
  390. package/src/lib/core/interfaces/ConfiguracionSCG.ts +0 -54
  391. package/src/lib/core/interfaces/ConfigurationSPG.ts +0 -43
  392. package/src/lib/core/interfaces/Constantes.ts +0 -463
  393. package/src/lib/core/interfaces/CuentaEgresos.ts +0 -159
  394. package/src/lib/core/interfaces/CuentaIngreso.ts +0 -37
  395. package/src/lib/core/interfaces/CuentaIngresoEstructura.ts +0 -25
  396. package/src/lib/core/interfaces/CuentaInstitucional.ts +0 -26
  397. package/src/lib/core/interfaces/CuentaPresupuesto.ts +0 -7
  398. package/src/lib/core/interfaces/CuentasPorPagar.ts +0 -40
  399. package/src/lib/core/interfaces/Documento.ts +0 -6
  400. package/src/lib/core/interfaces/EntradaSuministro.ts +0 -93
  401. package/src/lib/core/interfaces/Especialidad.ts +0 -4
  402. package/src/lib/core/interfaces/EstructuraPresupuestaria.ts +0 -96
  403. package/src/lib/core/interfaces/FuenteFinanciamiento.ts +0 -7
  404. package/src/lib/core/interfaces/IBancoCuentasPorPagar.ts +0 -192
  405. package/src/lib/core/interfaces/ITipoDepositos.ts +0 -17
  406. package/src/lib/core/interfaces/Integracion.ts +0 -6
  407. package/src/lib/core/interfaces/Lugares.ts +0 -45
  408. package/src/lib/core/interfaces/Moneda.ts +0 -22
  409. package/src/lib/core/interfaces/Nomina.ts +0 -607
  410. package/src/lib/core/interfaces/PlanUnicoCuenta.ts +0 -4
  411. package/src/lib/core/interfaces/Presupuesto.ts +0 -132
  412. package/src/lib/core/interfaces/Proveedor.ts +0 -79
  413. package/src/lib/core/interfaces/RecursosHumanos.ts +0 -1728
  414. package/src/lib/core/interfaces/Response.ts +0 -7
  415. package/src/lib/core/interfaces/Seguridad.ts +0 -118
  416. package/src/lib/core/interfaces/Servicios.ts +0 -64
  417. package/src/lib/core/interfaces/Sistema.ts +0 -21
  418. package/src/lib/core/interfaces/Tributos.ts +0 -78
  419. package/src/lib/core/interfaces/UnidadTributaria.ts +0 -11
  420. package/src/lib/core/interfaces/Usuario.ts +0 -57
  421. package/src/lib/core/interfaces/UsuarioPrefijo.ts +0 -12
  422. package/src/lib/core/models/CFG/Empresa.model.ts +0 -155
  423. package/src/lib/core/models/CFG/Enterprise.model.ts +0 -74
  424. package/src/lib/core/models/CFG/MPrefijo.model.ts +0 -66
  425. package/src/lib/core/models/CFG/Procede.model.ts +0 -34
  426. package/src/lib/core/models/CFG/TasaCambio.model.ts +0 -37
  427. package/src/lib/core/models/CFG/comunidad.model.ts +0 -34
  428. package/src/lib/core/models/CFG/locations.model.ts +0 -189
  429. package/src/lib/core/models/CFG/moneda.model.ts +0 -82
  430. package/src/lib/core/models/CFG/userPrefix.model.ts +0 -48
  431. package/src/lib/core/models/CXP/MConceptosCXP.model.ts +0 -36
  432. package/src/lib/core/models/CXP/MTipoDocumentoCXP.model.ts +0 -49
  433. package/src/lib/core/models/RPC/clasification.model.ts +0 -22
  434. package/src/lib/core/models/RPC/configuracionRPC.model.ts +0 -27
  435. package/src/lib/core/models/RPC/document.model.ts +0 -20
  436. package/src/lib/core/models/RPC/proveedores.model.ts +0 -15
  437. package/src/lib/core/models/RPC/providerBeneficiary.model.ts +0 -164
  438. package/src/lib/core/models/RPC/specialty.model.ts +0 -14
  439. package/src/lib/core/models/SCB/bank.model.ts +0 -205
  440. package/src/lib/core/models/SCG/IncomeAccount.ts +0 -87
  441. package/src/lib/core/models/SCG/accountMarriage.model.ts +0 -33
  442. package/src/lib/core/models/SCG/centroCosto.model.ts +0 -72
  443. package/src/lib/core/models/SCG/configuracionSCG.model.ts +0 -172
  444. package/src/lib/core/models/SCG/cuentaInstitucional.model.ts +0 -91
  445. package/src/lib/core/models/SCG/planUnicoCuenta.model.ts +0 -22
  446. package/src/lib/core/models/SFV/MClienteModel.ts +0 -119
  447. package/src/lib/core/models/SIV/MDetaContable.model.ts +0 -65
  448. package/src/lib/core/models/SIV/MDetaEntrada.model.ts +0 -98
  449. package/src/lib/core/models/SIV/MEntradaSuministro.model.ts +0 -135
  450. package/src/lib/core/models/SIV/MTipoDepositos.model.ts +0 -65
  451. package/src/lib/core/models/SNO/MAnticipoPrestaciones.model.ts +0 -112
  452. package/src/lib/core/models/SNO/MArchivoTxtCampo.model.ts +0 -63
  453. package/src/lib/core/models/SNO/MArchivosTxt.model.ts +0 -53
  454. package/src/lib/core/models/SNO/MAsignacionCargo.model.ts +0 -218
  455. package/src/lib/core/models/SNO/MAspectoEvaluacion.model.ts +0 -97
  456. package/src/lib/core/models/SNO/MAuditoria.model.ts +0 -67
  457. package/src/lib/core/models/SNO/MBeneficiario.model.ts +0 -139
  458. package/src/lib/core/models/SNO/MCargaFamiliar.model.ts +0 -54
  459. package/src/lib/core/models/SNO/MCargaMasiva.model.ts +0 -37
  460. package/src/lib/core/models/SNO/MCargosPersonal.model.ts +0 -108
  461. package/src/lib/core/models/SNO/MClasificacionObrero.mdel.ts +0 -48
  462. package/src/lib/core/models/SNO/MCodigoUnicoRac.model.ts +0 -41
  463. package/src/lib/core/models/SNO/MComponete.model.ts +0 -40
  464. package/src/lib/core/models/SNO/MConceptoVacaciones.model.ts +0 -94
  465. package/src/lib/core/models/SNO/MConceptosNomina.model.ts +0 -240
  466. package/src/lib/core/models/SNO/MConceptosPersonalNomina.model.ts +0 -103
  467. package/src/lib/core/models/SNO/MConcursante.model.ts +0 -333
  468. package/src/lib/core/models/SNO/MConcurso.model.ts +0 -267
  469. package/src/lib/core/models/SNO/MConfiguracionSNO.model.ts +0 -412
  470. package/src/lib/core/models/SNO/MConstanteNomina.model.ts +0 -76
  471. package/src/lib/core/models/SNO/MConstantePersonalNomina.model.ts +0 -85
  472. package/src/lib/core/models/SNO/MDedicacion.model.ts +0 -37
  473. package/src/lib/core/models/SNO/MDefinicionNomina.model.ts +0 -330
  474. package/src/lib/core/models/SNO/MDefinicionesBasicas.model.ts +0 -94
  475. package/src/lib/core/models/SNO/MDeudaAnterior.model.ts +0 -42
  476. package/src/lib/core/models/SNO/MEncargaduria.model.ts +0 -142
  477. package/src/lib/core/models/SNO/MEscalaEvaluacion.model.ts +0 -43
  478. package/src/lib/core/models/SNO/MEscalaEvaluacionDt.model.ts +0 -40
  479. package/src/lib/core/models/SNO/MEstructuraOrganizativa.model.ts +0 -125
  480. package/src/lib/core/models/SNO/MFamiliares.model.ts +0 -91
  481. package/src/lib/core/models/SNO/MFeriados.model.ts +0 -46
  482. package/src/lib/core/models/SNO/MFideicomiso.model.ts +0 -423
  483. package/src/lib/core/models/SNO/MFormacionAcademica.model.ts +0 -52
  484. package/src/lib/core/models/SNO/MGrado.model.ts +0 -50
  485. package/src/lib/core/models/SNO/MHojaTiempo.model.ts +0 -128
  486. package/src/lib/core/models/SNO/MImpuestoSobreRenta.model.ts +0 -77
  487. package/src/lib/core/models/SNO/MMetodoBanco.model.ts +0 -113
  488. package/src/lib/core/models/SNO/MNominaSimple.model.ts +0 -93
  489. package/src/lib/core/models/SNO/MPeriodoNomina.model.ts +0 -196
  490. package/src/lib/core/models/SNO/MPermisos.model.ts +0 -70
  491. package/src/lib/core/models/SNO/MPersonal.model.ts +0 -659
  492. package/src/lib/core/models/SNO/MPersonalJubilado.model.ts +0 -71
  493. package/src/lib/core/models/SNO/MPersonalNomina.model.ts +0 -328
  494. package/src/lib/core/models/SNO/MPlanHorario.model.ts +0 -134
  495. package/src/lib/core/models/SNO/MPlantillaConstancia.model.ts +0 -33
  496. package/src/lib/core/models/SNO/MPrestamo.model.ts +0 -242
  497. package/src/lib/core/models/SNO/MPrimaGrados.model.ts +0 -46
  498. package/src/lib/core/models/SNO/MPrimasConcepto.model.ts +0 -45
  499. package/src/lib/core/models/SNO/MRango.model.ts +0 -45
  500. package/src/lib/core/models/SNO/MReportesRRHH.ts +0 -425
  501. package/src/lib/core/models/SNO/MRequisitosConcursante.model.ts +0 -48
  502. package/src/lib/core/models/SNO/MRequisitosConcursos.model.ts +0 -41
  503. package/src/lib/core/models/SNO/MRequisitosMinimos.model.ts +0 -123
  504. package/src/lib/core/models/SNO/MSalarioHistorico.model.ts +0 -75
  505. package/src/lib/core/models/SNO/MSolicitudEmpleo.model.ts +0 -125
  506. package/src/lib/core/models/SNO/MTablaVacaciones.model.ts +0 -61
  507. package/src/lib/core/models/SNO/MTablaVacacionesPeriodo.model.ts +0 -45
  508. package/src/lib/core/models/SNO/MTabulador.model.ts +0 -108
  509. package/src/lib/core/models/SNO/MTipoEvaluacion.model.ts +0 -85
  510. package/src/lib/core/models/SNO/MTipoPersonal.model.ts +0 -37
  511. package/src/lib/core/models/SNO/MTiposEnfermedad.model.ts +0 -40
  512. package/src/lib/core/models/SNO/MTrabajoAnterior.model.ts +0 -70
  513. package/src/lib/core/models/SNO/MUbicacionFisica.model.ts +0 -63
  514. package/src/lib/core/models/SNO/MVacacionesPersonal.model.ts +0 -119
  515. package/src/lib/core/models/SOC/charge.model.ts +0 -78
  516. package/src/lib/core/models/SOC/clause.model.ts +0 -36
  517. package/src/lib/core/models/SOC/clauseModality.model.ts +0 -40
  518. package/src/lib/core/models/SOC/configuracionSOC.model.ts +0 -68
  519. package/src/lib/core/models/SOC/service.model.ts +0 -50
  520. package/src/lib/core/models/SOC/serviceCharge.model.ts +0 -39
  521. package/src/lib/core/models/SOC/serviceType.model.ts +0 -36
  522. package/src/lib/core/models/SPG/UnidadAdministradoraCentral.ts +0 -47
  523. package/src/lib/core/models/SPG/administrativeUnit.model.ts +0 -153
  524. package/src/lib/core/models/SPG/comprobantePresupuestario.model.ts +0 -93
  525. package/src/lib/core/models/SPG/configurationSPG.model.ts +0 -88
  526. package/src/lib/core/models/SPG/cuentaPresupuesto.model.ts +0 -131
  527. package/src/lib/core/models/SPG/estructuraPresupuestaria.model.ts +0 -280
  528. package/src/lib/core/models/SPG/expensiveAccount.model.ts +0 -114
  529. package/src/lib/core/models/SPG/fuenteFinanciamiento.model.ts +0 -33
  530. package/src/lib/core/models/SPG/incomeStructureAccount.model.ts +0 -84
  531. package/src/lib/core/models/SPG/organizationType.model.ts +0 -16
  532. package/src/lib/core/models/SSS/component.model.ts +0 -51
  533. package/src/lib/core/models/SSS/group.model.ts +0 -39
  534. package/src/lib/core/models/SSS/log.model.ts +0 -36
  535. package/src/lib/core/models/SSS/securityConfiguration.model.ts +0 -26
  536. package/src/lib/core/models/SSS/sistema.ts +0 -85
  537. package/src/lib/core/models/SSS/user.model.ts +0 -52
  538. package/src/lib/core/models/SSS/userDetail.model.ts +0 -78
  539. package/src/lib/core/models/SSS/userPermit.model.ts +0 -61
  540. package/src/lib/core/models/SSS/userRights.model.ts +0 -113
  541. package/src/lib/core/models/STB/MCargosAdicionales.ts +0 -93
  542. package/src/lib/core/models/STB/deduction.model.ts +0 -100
  543. package/src/lib/core/models/STB/deductionType.model.ts +0 -23
  544. package/src/lib/core/models/STB/unidadTributaria.model.ts +0 -25
  545. package/src/lib/core/models/basic-model.model.ts +0 -9
  546. package/src/lib/shared/components/catalogo/catalogo.component.html +0 -45
  547. package/src/lib/shared/components/catalogo/catalogo.component.scss +0 -82
  548. package/src/lib/shared/components/catalogo/catalogo.component.ts +0 -71
  549. package/src/lib/shared/components/catalogo-doble-input/catalogo-doble-input.component.html +0 -57
  550. package/src/lib/shared/components/catalogo-doble-input/catalogo-doble-input.component.scss +0 -82
  551. package/src/lib/shared/components/catalogo-doble-input/catalogo-doble-input.component.ts +0 -80
  552. package/src/lib/shared/components/catalogo-estructuras/catalogo-estructuras.component.html +0 -121
  553. package/src/lib/shared/components/catalogo-estructuras/catalogo-estructuras.component.scss +0 -81
  554. package/src/lib/shared/components/catalogo-estructuras/catalogo-estructuras.component.ts +0 -68
  555. package/src/lib/shared/components/confirm/confirm.component.html +0 -15
  556. package/src/lib/shared/components/confirm/confirm.component.scss +0 -37
  557. package/src/lib/shared/components/confirm/confirm.component.ts +0 -32
  558. package/src/lib/shared/components/icon/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2 +0 -0
  559. package/src/lib/shared/components/icon/icon.component.html +0 -6
  560. package/src/lib/shared/components/icon/icon.component.scss +0 -22
  561. package/src/lib/shared/components/icon/icon.component.ts +0 -19
  562. package/src/lib/shared/components/table-select/table-select.component.html +0 -73
  563. package/src/lib/shared/components/table-select/table-select.component.scss +0 -86
  564. package/src/lib/shared/components/table-select/table-select.component.ts +0 -102
  565. package/src/lib/shared/material/customPaginator.ts +0 -22
  566. package/src/lib/shared/material/material.module.ts +0 -144
  567. package/src/lib/shared/pipes/iso-currency.pipe.ts +0 -44
  568. package/src/lib/shared/shared.module.ts +0 -41
  569. package/src/lib/sigesp.service.ts +0 -2770
  570. package/src/lib/validation.service.ts +0 -172
  571. package/src/public-api.ts +0 -489
  572. package/src/test.ts +0 -23
  573. package/tsconfig.lib.json +0 -27
  574. package/tsconfig.lib.prod.json +0 -6
  575. package/tsconfig.spec.json +0 -17
  576. package/tslint.json +0 -17
@@ -1,2770 +0,0 @@
1
- import { MPrefijo } from './core/models/CFG/MPrefijo.model';
2
- import { MEnterprise } from './core/models/CFG/Enterprise.model';
3
- import { MPersonalNomina } from './core/models/SNO/MPersonalNomina.model';
4
- import { MHojaTiempo } from './core/models/SNO/MHojaTiempo.model';
5
- import { Injectable } from '@angular/core';
6
- import { MUsuario } from './core/models/SSS/user.model';
7
- import { HttpClient, HttpErrorResponse, HttpHeaders} from '@angular/common/http';
8
- import { IRequest } from './core/interfaces/Request';
9
- import { Observable, throwError } from 'rxjs';
10
- import { MProveedor } from './core/models/RPC/proveedores.model';
11
- import { map, catchError, retry } from 'rxjs/operators';
12
- import { MatDialog } from '@angular/material/dialog';
13
- import { MUsuarioPrefijo } from './core/models/CFG/userPrefix.model';
14
- import { ICatalogo, filterData } from './core/interfaces/Catalogo';
15
- import { CatalogoComponent } from './shared/components/catalogo/catalogo.component';
16
- import { MCuentaPresupuesto } from './core/models/SPG/cuentaPresupuesto.model';
17
- import { MCuentaInstitucional } from './core/models/SCG/cuentaInstitucional.model';
18
- import { MMoneda, MMonedaConfig } from './core/models/CFG/moneda.model';
19
- import { ToastrService } from 'ngx-toastr';
20
- import { MUnidadTributaria } from './core/models/STB/unidadTributaria.model';
21
- import { AbstractControl, UntypedFormGroup } from '@angular/forms';
22
- import { ConfirmComponent } from './shared/components/confirm/confirm.component';
23
- import { MConfiguracionSCG } from './core/models/SCG/configuracionSCG.model';
24
- import { MPlanUnicoCuenta } from './core/models/SCG/planUnicoCuenta.model';
25
- import { IConexion } from './core/interfaces/Usuario';
26
- import { TableSelectComponent } from './shared/components/table-select/table-select.component';
27
- import { MConfigurationSPG } from './core/models/SPG/configurationSPG.model';
28
- import { MEstructuraPresupuestariaOne, MEstructuraPresupuestariaTwo, MEstructuraPresupuestariaThree, MEstructuraPresupuestariaFour, MEstructuraPresupuestariaFiveComplete, MEstructuraPresupuestariaFive, MEstructuraPresupuestariaThreeComplete, MAllStructure } from './core/models/SPG/estructuraPresupuestaria.model';
29
- import { IEstructuraPresupuestariaOne, IEstructuraPresupuestariaTwo, IEstructuraPresupuestariaThree, IEstructuraPresupuestariaFour, IEstructuraPresupuestariaFiveComplete, IEstructuraPresupuestariaFive } from './core/interfaces/EstructuraPresupuestaria';
30
- import { MCentroCosto, MUsuarioCentroCosto } from './core/models/SCG/centroCosto.model';
31
- import { MFuenteFinanciamiento } from './core/models/SPG/fuenteFinanciamiento.model';
32
- import { MCuentaEgresos } from './core/models/SPG/expensiveAccount.model';
33
- import { CatalogoEstructurasComponent } from './shared/components/catalogo-estructuras/catalogo-estructuras.component';
34
- import { IUpdateDistribution, IUpdateDistribution2, IUpdateDistributionIngresos, IUpdateDistributionIngresos2 } from './core/interfaces/CuentaEgresos';
35
- import { CatalogoDobleInputComponent } from './shared/components/catalogo-doble-input/catalogo-doble-input.component';
36
- import { MSistema, MUsuarioSistema } from './core/models/SSS/sistema';
37
- import { IComprobantePresupuestarioEgresos, IComprobantePresupuestarioIngresos } from './core/interfaces/ComprobantePresupuestario';
38
- import { MComprobantePresupuestarioEgresos, MComprobantePresupuestarioIngresos } from './core/models/SPG/comprobantePresupuestario.model';
39
- import { MCuentaIngresos } from './core/models/SCG/IncomeAccount';
40
- import { MIncomeStructureAccount } from './core/models/SPG/incomeStructureAccount.model';
41
- import { MOrganizationType } from './core/models/SPG/organizationType.model';
42
- import { MSpecialty } from './core/models/RPC/specialty.model';
43
- import { MDocument } from './core/models/RPC/document.model';
44
- import { MClasification } from './core/models/RPC/clasification.model';
45
- import { MCountry, MState, MMunicipality, MParish, MCity, MCommunity } from './core/models/CFG/locations.model';
46
- import { MProviderBeneficiary } from './core/models/RPC/providerBeneficiary.model';
47
- import { MSigecofBank, MBank, MBankAccountType, MAgenciaBanco, MCuentaBanco } from './core/models/SCB/bank.model';
48
- import { IResponse } from './core/interfaces/Response';
49
- import { MConfigurationRPC } from './core/models/RPC/configuracionRPC.model';
50
- import { MConfigSOC } from './core/models/SOC/configuracionSOC.model';
51
- import { MDeductionType } from './core/models/STB/deductionType.model';
52
- import { MCargo } from './core/models/SOC/charge.model';
53
- import { MConceptoRetencion, MDeduction } from './core/models/STB/deduction.model';
54
- import { MConfigSSS } from './core/models/SSS/securityConfiguration.model';
55
- import { MAdministrativeUnit } from './core/models/SPG/administrativeUnit.model';
56
- import { MComponent } from './core/models/SSS/component.model';
57
- import { MLog } from './core/models/SSS/log.model';
58
- import { MServiceCharge } from './core/models/SOC/serviceCharge.model';
59
- import { MEmpresa } from './core/models/CFG/Empresa.model';
60
- import { MConceptosCXP } from './core/models/CXP/MConceptosCXP.model';
61
- import { MTipoDocumentoCXP } from './core/models/CXP/MTipoDocumentoCXP.model';
62
- import { MConfiguracionSNO } from './core/models/SNO/MConfiguracionSNO.model';
63
- import { MDefinicionNomina } from './core/models/SNO/MDefinicionNomina.model';
64
- import { MAsignacionCargo } from './core/models/SNO/MAsignacionCargo.model';
65
- import { MNominaSimple } from './core/models/SNO/MNominaSimple.model';
66
- import { MPersonal } from './core/models/SNO/MPersonal.model';
67
- import { MEntradaSuministros } from './core/models/SIV/MEntradaSuministro.model';
68
- import Swal from 'sweetalert2'
69
- import * as CryptoJS from 'crypto-js';
70
- import { MSnoLog } from './core/models/SNO/MAuditoria.model';
71
- import { MTipoDepositos } from './core/models/SIV/MTipoDepositos.model';
72
- import { MComunidad } from './core/models/CFG/comunidad.model';
73
- import { MExchangeRate } from './core/models/CFG/TasaCambio.model';
74
- import { MCargosAdicionales} from './core/models/STB/MCargosAdicionales';
75
- import { MClient } from './core/models/SFV/MClienteModel';
76
-
77
-
78
- @Injectable({
79
- providedIn: 'root'
80
- })
81
- export class SigespService {
82
-
83
- public usuarioActivo: MUsuario = null;
84
- public URL: string;
85
- public currentComponent: MComponent = null;
86
- public userMenu = null;
87
- public ip_adress = '127.0.0.1';
88
- // public URL: string = "http://192.168.1.67/sigesp_php";
89
- // usuarioActivo: MUsuario = {
90
- // conexionDB: {
91
- // baseDeDatos: "db_sigesp_demov3",
92
- // gestor: "postgres",
93
- // login: "postgres",
94
- // nombre: "SIGESP C.A, servidor 85 (SE PUEDE USAR)",
95
- // password: "adminsigesp",
96
- // puerto: "5432",
97
- // servidor: "192.168.1.67",
98
- // },
99
- // empresa: {
100
- // id: 1,
101
- // periodoFiscal: "2019-01-01",
102
- // titulo: "SIGESP C.A."
103
- // },
104
- // nombre: "SIGESP",
105
- // token: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzM4NCJ9.eyJwYXNzd29yZF91c3UiOiIxMjM0NTY3OCIsImlkX2VtcHJlc2EiOiIxIiwidGl0ZW1wIjoiU0lHRVNQIEMuQS4iLCJwZXJmaXNjYWwiOiIyMDE5LTAxLTAxIiwibF91c3VhcmlvIjoiU0lHRVNQIiwic2Vydmlkb3IiOiIxOTIuMTY4LjEuNjciLCJwdWVydG8iOiI1NDMyIiwiYmFzZWRlZGF0b3MiOiJkYl9zaWdlc3BfZGVtb3YzIiwibG9naW4iOiJwb3N0Z3JlcyIsInBhc3N3b3JkIjoiYWRtaW5zaWdlc3AifQ.PISBSfueRAdsWsJ1AaGcVCgW-2aJkgtvLdsW0Bgo5ltyYowD8oy_nqK5sjE2URGk"
106
- // }
107
- // procede: string = 'SCGCMP';
108
- // codsis: string = 'SCG';
109
-
110
-
111
- constructor(private http: HttpClient, private dialog: MatDialog, private toast: ToastrService) { }
112
-
113
- /**
114
- * @description Valida que selo se escriban guiones y 9
115
- * @param event
116
- */
117
- public onlyGuionesAndNine(event: any) {
118
- if (event.key === '-' || event.key === '9') {
119
- return true;
120
- }
121
- return false;
122
- }
123
-
124
-
125
-
126
- /**
127
- * @description Actualiza el moncmp de sigesp_comprobante
128
- */
129
- public updateComprobanteAmount(amount: number, idComprobante: number): Observable<any> {
130
- return this.http.put<any>(`${this.URL}/dao/sigesp/comprobante_dao.php?monto=true`, {
131
- moncmp: amount,
132
- id_comprobante: idComprobante
133
- }, {
134
- headers: this.getHttpHeaders()
135
- });
136
- }
137
-
138
- /**
139
- * @description Actualiza el comprobante prsupuestario de Egresos
140
- * @param comprobante
141
- */
142
- public updateComprobantePresupuestarioEgresos(comprobante: IComprobantePresupuestarioEgresos): Observable<any> {
143
- return this.http.put<any>(`${this.URL}/dao/spg/comprobante_presupuestario_egresos_dao.php`,
144
- { ...comprobante, id: comprobante.id_dt_spgcmp }, { headers: this.getHttpHeaders() });
145
- }
146
-
147
- /**
148
- * @description Obtiene el comprobante presupuestario de Egresos
149
- */
150
- public getComprobantePresupuestarioEgresos(): Observable<MComprobantePresupuestarioEgresos[]> {
151
- return this.http.get<MComprobantePresupuestarioEgresos[]>(`${this.URL}/dao/spg/comprobante_presupuestario_egresos_dao.php`, {
152
- headers: this.getHttpHeaders()
153
- }).pipe(
154
- retry(3),
155
- catchError(this.handlerError),
156
- map((res: any) => res.data.map(element => new MComprobantePresupuestarioEgresos(element)))
157
- );
158
- }
159
-
160
- /**
161
- * @description Actualiza el comprobante prsupuestario de Ingresos
162
- * @param comprobante
163
- */
164
- public updateComprobantePresupuestarioIngresos(comprobante: IComprobantePresupuestarioIngresos): Observable<any> {
165
- return this.http.put<any>(`${this.URL}/dao/spg/comprobante_presupuestario_egresos_dao.php`,
166
- { ...comprobante, id: comprobante.id_dt_spicmp }, { headers: this.getHttpHeaders() });
167
- }
168
-
169
- /**
170
- * @description Obtiene el comprobante presupuestario de Ingresos
171
- */
172
- public getComprobantePresupuestarioIngresos(): Observable<MComprobantePresupuestarioIngresos[]> {
173
- return this.http.get<MComprobantePresupuestarioIngresos[]>(`${this.URL}/dao/spi/comprobante_presupuestario_ingresos_dao.php`, {
174
- headers: this.getHttpHeaders()
175
- }).pipe(
176
- retry(3),
177
- catchError(this.handlerError),
178
- map((res: any) => res.data.map(element => new MComprobantePresupuestarioIngresos(element)))
179
- );
180
- }
181
-
182
- /**
183
- * @Actualiza la distribución de la cuenta de egreso
184
- * @param distribution
185
- */
186
- public updateDistributionExpenseAccount(distribution: IUpdateDistribution): Observable<any> {
187
- return this.http.put(`${this.URL}/dao/spg/cuentas_egresos_dao.php`, distribution,
188
- {headers: this.getHttpHeaders()});
189
- }
190
-
191
- /**
192
- * @Actualiza la distribución de la cuenta de egreso
193
- * @param distribution
194
- */
195
- public updateDistributionExpenseAccount2(distribution: IUpdateDistribution2[]): Observable<any> {
196
- return this.http.put(`${this.URL}/dao/spg/cuentas_egresos_dao.php`, distribution,
197
- {headers: this.getHttpHeaders()});
198
- }
199
-
200
- /**
201
- * @Actualiza la distribución de la cuenta de Ingreso
202
- * @param distribution
203
- */
204
- public updateDistributionIncomeAccount(distribution: IUpdateDistributionIngresos): Observable<IResponse> {
205
- return this.http.put<IResponse>(`${this.URL}/dao/spi/cuentas_ingresos_dao.php`, distribution,
206
- {headers: this.getHttpHeaders()})
207
- .pipe(
208
- map((res: any) => {
209
- if (res.success){
210
- res.data = new MCuentaIngresos(res.data);
211
- }
212
- return res;
213
- })
214
- );
215
- }
216
-
217
- public updateDistributionIncomeAccount2(distribution: IUpdateDistributionIngresos2[]): Observable<IResponse> {
218
- return this.http.put<IResponse>(`${this.URL}/dao/spi/cuentas_ingresos_dao.php`, distribution,
219
- {headers: this.getHttpHeaders()})
220
- .pipe(
221
- map((res: any) => {
222
- if (res.success){
223
- res.data = new MCuentaIngresos(res.data);
224
- }
225
- return res;
226
- })
227
- );
228
- }
229
-
230
- /**
231
- * @Actualiza la distribución de la cuenta de Ingreso de Estructura
232
- * @param distribution
233
- */
234
- public updateDistributionIncomeStructureAccount(distribution: IUpdateDistributionIngresos, level: number): Observable<IResponse> {
235
- return this.http.put<IResponse>(`${this.URL}/dao/spi/cuenta_estructura_ingresos_dao.php`, distribution,
236
- {headers: this.getHttpHeaders()})
237
- .pipe(
238
- map((res: any) => {
239
- if (res.success){
240
- res.data = new MIncomeStructureAccount(res.data, level);
241
- }
242
- return res;
243
- })
244
- );
245
- }
246
-
247
- /**
248
- * @description Obtiene las cuentas por nivel de las cuenats de egresos
249
- * @param level Número de niveles de la configuración
250
- * @param id id del nivel 3 o 5 que se va a buscar
251
- * @return Observable<MCuentaEgresos[]>
252
- */
253
- public getExpenseAccountsForLevel(level: number, id: string): Observable<MCuentaEgresos[]>{
254
- return this.http.get<MCuentaEgresos[]>(`${this.URL}/dao/spg/cuentas_egresos_dao.php?level=${level}&id=${id}`,
255
- {headers: this.getHttpHeaders()})
256
- .pipe(
257
- map((res:any) => res.data.map(element => new MCuentaEgresos(element)))
258
- )
259
- }
260
-
261
- /**
262
- * @description Abre el catálogo de estructura presupuesaria
263
- * @param data Data que se va a mostrar
264
- * @param configuration Configuración de la estructura
265
- * @return Promise<any>
266
- * @author Miguel Ramírez
267
- */
268
- public openCatalogoEstructuraPresupuestaria(data: any[], configuration: MConfigurationSPG): Promise<any> {
269
- const catalogo = this.dialog.open(CatalogoEstructurasComponent, {
270
- data: {
271
- data,
272
- configuration
273
- },
274
- width: '1000px',
275
- maxHeight: '90vh'
276
- });
277
- return catalogo.afterClosed().toPromise();
278
- }
279
-
280
- /**
281
- * @description Obtiene las cuentas de egresos
282
- * @param onlyAvailable
283
- * @return Observable<MCuentaEgresos[]>
284
- */
285
- public getExpenseAccounts(onlyAvailable: boolean = false): Observable<MCuentaEgresos[]>{
286
- return this.http.get<MCuentaEgresos[]>(`${this.URL}/dao/spg/cuentas_egresos_dao.php${
287
- onlyAvailable ? '?available=true' : ''
288
- }`, {headers: this.getHttpHeaders()})
289
- .pipe(
290
- map((res:any) => res.data.map(element => new MCuentaEgresos(element)))
291
- )
292
- }
293
-
294
- /**
295
- * @description Obtiene todas las estructuras presupuetsarias de las 5 tablas
296
- * @return Promise<MAllStructure>
297
- * @author Miguel Ramírez
298
- */
299
- public getAllBudgetStructure(): Promise<MAllStructure> {
300
- return new Promise((resolve, reject) => {
301
- this.getBudgetStructureOne().subscribe(structureOne => {
302
- this.getBudgetStructureTwoAll().subscribe(structureTwo => {
303
- this.getBudgetStructureThree().subscribe(structureThree => {
304
- this.getBudgetStructureFour().subscribe(structureFour => {
305
- this.getBudgetStructureFiveByIdEp4().subscribe(structureFive => {
306
- resolve(new MAllStructure({
307
- structureOne,
308
- structureTwo,
309
- structureThree,
310
- structureFour,
311
- structureFive
312
- }));
313
- });
314
- });
315
- });
316
- });
317
- });
318
- })
319
- }
320
-
321
- /**
322
- * @description Obtiene la estructura completa dependiendo de la configuración
323
- * @return Promise<any[]>
324
- * @author Miguel Ramírez
325
- * @type= {}
326
- */
327
- public async getBudgetStructureComplete(nivel:number,tipo?:string): Promise<any[]> {
328
- return new Promise(async (resolve) => {
329
- let data = [];
330
- await this.getBudgetStructureFive(nivel,tipo).subscribe(result => {
331
- data.push(...result)
332
- })
333
- // await this.getBudgetStructureThreeComplete(3).subscribe(result => {
334
- // data.push(...result)
335
- // })
336
-
337
- await resolve(data);
338
-
339
- });
340
- }
341
-
342
- /**
343
- * @description Elimina una o varias estructuras presupuestarias
344
- * @param idStructures Id de las estructuras presupuestarias 5 que van a ser eliminadas
345
- * @return Observable<any>
346
- * @author Miguel Ramírez
347
- */
348
- public deleteBudgetStructureFive(idStructures: any[]): Observable<any> {
349
- return this.http.request('delete', `${this.URL}/dao/spg/estructura_presupuestaria5_dao.php`,
350
- { body: idStructures, headers: this.getHttpHeaders() });
351
- }
352
-
353
- /**
354
- * @description Actualiza una o varias estructuras 4
355
- * @param structures Estructuras presupuestarias que van a ser actualizadas
356
- * @return Observable<any>
357
- * @author Miguel Ramírez
358
- */
359
- public updateBudgetStructureFive(structures: IEstructuraPresupuestariaFive[]): Observable<any> {
360
- return this.http.put(`${this.URL}/dao/spg/estructura_presupuestaria5_dao.php`, structures,
361
- { headers: this.getHttpHeaders() });
362
- }
363
-
364
- /**
365
- * @description Agrega una o varias estructuras presupuestarias 4
366
- * @param structures Las estructuras que van a ser registradas
367
- * @return Observable<any>
368
- * @author Miguel Ramírez
369
- */
370
- public setBudgetStructureFive(structures: IEstructuraPresupuestariaFive[]): Observable<any> {
371
- return this.http.post(`${this.URL}/dao/spg/estructura_presupuestaria5_dao.php`, structures,
372
- { headers: this.getHttpHeaders() });
373
- }
374
-
375
- /**
376
- * @description Obtiene toda la estructura presupuestaria 5
377
- * @return Observable<MEstructuraPresupuestariaFive[]>
378
- * @author Miguel Ramírez
379
- * @params tipo:"sss"
380
- */
381
- public getBudgetStructureFive(level: number = null, tipo:string=''): Observable<MEstructuraPresupuestariaFiveComplete[]> {
382
- return this.http.get<MEstructuraPresupuestariaFiveComplete[]>(
383
- `${this.URL}/dao/spg/estructura_presupuestaria5_dao.php?complete=true&tipo=${tipo}`,
384
- { headers: this.getHttpHeaders() }).pipe(
385
- map((resp: any) => resp.data.map(e => new MEstructuraPresupuestariaFiveComplete(e, level)))
386
- );
387
- }
388
-
389
- /**
390
- * @description Obtiene la estructura presupuestaria 5 por el Id de la estructura 4
391
- * @param idEp4 id de la estructura presupuestaria 4
392
- */
393
- public getBudgetStructureFiveByIdEp4(idEp4?: string): Observable<any[]> {
394
- return this.http.get<any[]>(
395
- `${this.URL}/dao/spg/estructura_presupuestaria5_dao.php${idEp4 ? `?id_ep4=${idEp4}` : ''}`,
396
- { headers: this.getHttpHeaders() }).pipe(
397
- retry(3),
398
- catchError(this.handlerError),
399
- map((resp: any) => resp.data.map(element => new MEstructuraPresupuestariaFive(element)))
400
- );
401
- }
402
-
403
- /**
404
- * @description Elimina una o varias estructuras presupuestarias
405
- * @param idStructures Id de las estructuras presupuestarias 3 que vana ser eliminadas
406
- * @return Observable<any>
407
- * @author Miguel Ramírez
408
- */
409
- public deleteBudgetStructureFour(idStructures: any[]): Observable<any> {
410
- return this.http.request('delete', `${this.URL}/dao/spg/estructura_presupuestaria4_dao.php`,
411
- { body: idStructures, headers: this.getHttpHeaders() });
412
- }
413
-
414
- /**
415
- * @description Actualiza una o varias estructuras 4
416
- * @param structures Estructuras presupuestarias que van a ser actualizadas
417
- * @return Observable<any>
418
- * @author Miguel Ramírez
419
- */
420
- public updateBudgetStructureFour(structures: IEstructuraPresupuestariaFour[]): Observable<any> {
421
- return this.http.put(`${this.URL}/dao/spg/estructura_presupuestaria4_dao.php`, structures,
422
- { headers: this.getHttpHeaders() });
423
- }
424
-
425
- /**
426
- * @description Agrega una o varias estructuras presupuestarias 4
427
- * @param structures Las estructuras que van a ser registradas
428
- * @return Observable<any>
429
- * @author Miguel Ramírez
430
- */
431
- public setBudgetStructureFour(structures: IEstructuraPresupuestariaFour[]): Observable<any> {
432
- return this.http.post(`${this.URL}/dao/spg/estructura_presupuestaria4_dao.php`, structures,
433
- { headers: this.getHttpHeaders() });
434
- }
435
-
436
- /**
437
- * @description Obtiene las estructuras presupuestarias 4
438
- * @param idEp3 Id de la estructura presupuestaria 3
439
- * @return Observable<MEstructurapresupuestaria[]>
440
- * @author Miguel Ramírez
441
- */
442
- public getBudgetStructureFour(idEp3?: string): Observable<MEstructuraPresupuestariaFour[]> {
443
- return this.http.get<MEstructuraPresupuestariaFour[]>(
444
- `${this.URL}/dao/spg/estructura_presupuestaria4_dao.php${idEp3 ? `?id_ep3=${idEp3}` : ''}`,
445
- { headers: this.getHttpHeaders() }).pipe(
446
- retry(3),
447
- catchError(this.handlerError),
448
- map((resp: any) => resp.data.map(element => new MEstructuraPresupuestariaFour(element)))
449
- );
450
- }
451
-
452
- /**
453
- * @description Elimina una o varias estructuras presupuestarias
454
- * @param idStructures Id de las estructuras presupuestarias 3 que vana ser eliminadas
455
- * @return Observable<any>
456
- * @author Miguel Ramírez
457
- */
458
- public deleteBudgetStructureThree(idStructures: any[]): Observable<any> {
459
- return this.http.request('delete', `${this.URL}/dao/spg/estructura_presupuestaria3_dao.php`,
460
- { body: idStructures, headers: this.getHttpHeaders() });
461
- }
462
-
463
- /**
464
- * @description Actualiza una o varias estructuras 3
465
- * @param structures Estructuras presupuestarias que van a ser actualizadas
466
- * @return Observable<any>
467
- * @author Miguel Ramírez
468
- */
469
- public updateBudgetStructureThree(structures: IEstructuraPresupuestariaThree[]): Observable<any> {
470
- return this.http.put(`${this.URL}/dao/spg/estructura_presupuestaria3_dao.php`, structures,
471
- { headers: this.getHttpHeaders() });
472
- }
473
-
474
- /**
475
- * @description Agrega una o varias estructuras presupuestarias 3
476
- * @param structures Las estructuras que van a ser registradas
477
- * @return Observable<any>
478
- * @author Miguel Ramírez
479
- */
480
- public setBudgetStructureThree(structures: IEstructuraPresupuestariaThree[]): Observable<any> {
481
- return this.http.post(`${this.URL}/dao/spg/estructura_presupuestaria3_dao.php`, structures,
482
- { headers: this.getHttpHeaders() });
483
- }
484
-
485
- /**
486
- * @description Se trae la estructura presupuestaria completa hasta el nivel 3
487
- * @return Observable<any[]>
488
- * @author Miguel Ramírez
489
- */
490
- public getBudgetStructureThreeComplete(level: number): Observable<MEstructuraPresupuestariaFiveComplete[]> {
491
- return this.http.get<MEstructuraPresupuestariaFiveComplete[]>(
492
- `${this.URL}/dao/spg/estructura_presupuestaria3_dao.php?complete=true`,
493
- { headers: this.getHttpHeaders() }).pipe(
494
- retry(3),
495
- catchError(this.handlerError),
496
- map((resp: any) => resp.data.map(element => new MEstructuraPresupuestariaFiveComplete(element, level)))
497
- );
498
- }
499
-
500
- /**
501
- * @description Obtiene las estructuras presupuestarias 3
502
- * @param idEp2 Id de la estructura presupuestaria 2
503
- * @return Observable<MEstructurapresupuestaria[]>
504
- * @author Miguel Ramírez
505
- */
506
- public getBudgetStructureThree(idEp2?: string): Observable<MEstructuraPresupuestariaThree[]> {
507
- return this.http.get<MEstructuraPresupuestariaThree[]>(
508
- `${this.URL}/dao/spg/estructura_presupuestaria3_dao.php${idEp2 ? `?id_ep2=${idEp2}` : ''}`,
509
- { headers: this.getHttpHeaders() }).pipe(
510
- retry(3),
511
- catchError(this.handlerError),
512
- map((resp: any) => resp.data.map(element => new MEstructuraPresupuestariaThree(element)))
513
- );
514
- }
515
-
516
- /**
517
- * @description Elimina una o varias estructuras presupuestarias uno
518
- * @param idStructures Id de la o las estructuras presupuestarias que van a ser eliminadas
519
- * @return Observable<any>
520
- * @author Miguel Ramírez
521
- */
522
- public deleteBudgetStructureTwo(idStructures: any[]): Observable<any> {
523
- return this.http.request('delete', `${this.URL}/dao/spg/estructura_presupuestaria2_dao.php`,
524
- { body: idStructures, headers: this.getHttpHeaders() });
525
- }
526
-
527
- /**
528
- * @description Actualiza una estructura presupuestaria dos
529
- * @param structure Estructura presupuestaria uno que se va a actualizar
530
- * @return Observable<any>
531
- */
532
- public updateBudgetStructureTwo(structure: IEstructuraPresupuestariaTwo[]): Observable<any> {
533
- return this.http.put(`${this.URL}/dao/spg/estructura_presupuestaria2_dao.php`, structure,
534
- { headers: this.getHttpHeaders() });
535
- }
536
-
537
- /**
538
- * @description Registra las estructuras presupuestrias dos en la base de datos
539
- * @param budgetStructures Array de estructuras presupuestaria que se van a registrar
540
- * @return Observable<any>
541
- * @author Miguel Ramírez
542
- */
543
- public setBudgetStructureTwo(budgetStructures: IEstructuraPresupuestariaTwo[]): Observable<any> {
544
- return this.http.post(`${this.URL}/dao/spg/estructura_presupuestaria2_dao.php`,
545
- budgetStructures, { headers: this.getHttpHeaders() })
546
- }
547
-
548
- /**
549
- * @description Obtiene la estructura presupuestaria
550
- * @return Observable<MEstructuraPresupuestaria[]>
551
- * @author Miguel Ramírez
552
- */
553
- public getBudgetStructureTwo(idEp1: string): Observable<MEstructuraPresupuestariaTwo[]> {
554
- return this.http.get<MEstructuraPresupuestariaTwo[]>(`${this.URL}/dao/spg/estructura_presupuestaria2_dao.php?id_ep1=${idEp1}`,
555
- { headers: this.getHttpHeaders() }).pipe(
556
- retry(3),
557
- catchError(this.handlerError),
558
- map(((resp: any) => resp.data.map(element => new MEstructuraPresupuestariaTwo(element))))
559
- );
560
- }
561
-
562
- /**
563
- * @description Obtiene la estructura presupuestaria
564
- * @return Observable<MEstructuraPresupuestaria[]>
565
- * @author Miguel Ramírez
566
- */
567
- public getBudgetStructureTwoAll(): Observable<MEstructuraPresupuestariaTwo[]> {
568
- return this.http.get<MEstructuraPresupuestariaTwo[]>(`${this.URL}/dao/spg/estructura_presupuestaria2_dao.php`,
569
- { headers: this.getHttpHeaders() }).pipe(
570
- retry(3),
571
- catchError(this.handlerError),
572
- map(((resp: any) => resp.data.map(element => new MEstructuraPresupuestariaTwo(element))))
573
- );
574
- }
575
-
576
- /**
577
- * @description Elimina una o varias estructuras presupuestarias uno
578
- * @param idStructures Id de la o las estructuras presupuestarias que van a ser eliminadas
579
- * @return Observable<any>
580
- * @author Miguel Ramírez
581
- */
582
- public deleteBudgetStructureOne(idStructures: any[]): Observable<any> {
583
- return this.http.request('delete', `${this.URL}/dao/spg/estructura_presupuestaria1_dao.php`,
584
- { body: idStructures, headers: this.getHttpHeaders() });
585
- }
586
-
587
- /**
588
- * @description Actualiza una estructura presupuestaria uno
589
- * @param structure Estructura presupuestaria uno que se va a actualizar
590
- * @return Observable<any>
591
- */
592
- public updateBudgetStructureOne(structure: IEstructuraPresupuestariaOne[]): Observable<any> {
593
- return this.http.put(`${this.URL}/dao/spg/estructura_presupuestaria1_dao.php`, structure,
594
- { headers: this.getHttpHeaders() });
595
- }
596
-
597
- /**
598
- * @description Registra las estructuras presupuestrias en la base de datos
599
- * @param budgetStructures Array de estructuras presupuestaria que s evan a registrar
600
- * @return Observable<any>
601
- * @author Miguel Ramírez
602
- */
603
- public setBudgetStructureOne(budgetStructures: IEstructuraPresupuestariaOne[]): Observable<any> {
604
- return this.http.post(`${this.URL}/dao/spg/estructura_presupuestaria1_dao.php`,
605
- budgetStructures, { headers: this.getHttpHeaders() })
606
- }
607
-
608
- /**
609
- * @description Obtiene la estructura presupuestaria
610
- * @return Observable<MEstructuraPresupuestaria[]>
611
- * @author Miguel Ramírez
612
- */
613
- public getBudgetStructureOne(): Observable<MEstructuraPresupuestariaOne[]> {
614
- return this.http.get<MEstructuraPresupuestariaOne[]>(`${this.URL}/dao/spg/estructura_presupuestaria1_dao.php`,
615
- { headers: this.getHttpHeaders() }).pipe(
616
- retry(3),
617
- catchError(this.handlerError),
618
- map(((resp: any) => resp.data.map(element => new MEstructuraPresupuestariaOne(element))))
619
- );
620
- }
621
-
622
- /**
623
- * @description Obtiene las configuraciones de la estructura presupuestaria
624
- * @return Observable<MConfigurationSPG[]>
625
- * @author Miguel Ramírez
626
- */
627
- public getConfigurationSPG(): Observable<MConfigurationSPG> {
628
-
629
- return this.http.get<MConfigurationSPG>(`${this.URL}/dao/spg/estructura_presupuestaria_config_dao.php`,
630
- { headers: this.getHttpHeaders() }).pipe(
631
- retry(3),
632
- catchError(this.handlerError),
633
- map((resp: any) => new MConfigurationSPG(resp.data[0]))
634
- );
635
- }
636
- /**
637
- * @description Obtiene las configuraciones de los proveedores
638
- * @return Observable<MConfigurationRPC[]>
639
- * @author Carlos Albornoz
640
- */
641
- public getConfigurationRPC(): Observable<IResponse> {
642
-
643
- return this.http.get<MConfigurationRPC>(`${this.URL}/dao/rpc/proveedor_config_dao.php`,
644
- { headers: this.getHttpHeaders() }).pipe(
645
- retry(3),
646
- catchError(this.handlerError),
647
- map((resp: IResponse) => {
648
- if (resp.success) {
649
- resp.data = new MConfigurationRPC(resp.data)
650
- }
651
- return resp
652
- })
653
- );
654
- }
655
-
656
- /**
657
- * @description Obtiene las MConfiguracionSNO de la nomina
658
- * @return Observable<MConfiguracionSNO[]>
659
- * @date 27-07-2021
660
- */
661
- public getConfigurationSNO(): Observable<IResponse> {
662
-
663
- return this.http.get<IResponse>(`${this.URL}/dao/sno/configuracion_dao.php?tipo=${'configuracion'}`,
664
- { headers: this.getHttpHeaders() }).pipe(
665
- retry(3),
666
- catchError(this.handlerError),
667
- map((resp: IResponse) => {
668
- if (resp.success) {
669
- if(resp.data !=null){
670
- resp.data = resp.data.map(e => new MConfiguracionSNO(e));
671
- } else {
672
- resp.data=[];
673
- }
674
- }
675
- return resp
676
- })
677
- );
678
- }
679
-
680
-
681
- public dateToString(date: Date): string{
682
- return `${date.getFullYear()}-${
683
- date.getMonth() + 1 >= 10 ? date.getMonth() + 1 : `0${date.getMonth() + 1}`
684
- }-${
685
- date.getDate() >= 10 ? date.getDate() : `0${date.getDate()}`
686
- }`
687
- }
688
-
689
- /**
690
- * @description Obtiene las configuraciones de Seguridad
691
- * @return Observable<IResponse>
692
- * @author Carlos Albornoz
693
- */
694
- public getConfigSSS(): Observable<IResponse> {
695
-
696
- return this.http.get<IResponse>(`${this.URL}/dao/sss/seguridad_config_dao.php`,
697
- { headers: this.getHttpHeaders() }).pipe(
698
- retry(3),
699
- catchError(this.handlerError),
700
- map((resp: IResponse) => {
701
- if (resp.success) {
702
- resp.data = new MConfigSSS(resp.data)
703
- }
704
- return resp
705
- })
706
- );
707
- }
708
-
709
- public getComponents(systemCode: string = null, permit: boolean): Observable<IResponse>{
710
-
711
- return this.http.get<IResponse>(
712
- `${this.URL}/dao/sss/componentes_dao.php?${systemCode ? `codsis=${systemCode}${
713
- permit ? `&permit=true` : ''
714
- }` : ''}`,
715
- { headers: this.getHttpHeaders() }
716
- ).pipe(
717
-
718
- map(res => {
719
- if (res.success) {
720
- res.data = res.data.map(e => new MComponent(e));
721
- }
722
- return res;
723
- })
724
- )
725
-
726
- }
727
-
728
- /**
729
- * @description Obtiene las fuentes de financiamiento
730
- * @return Observable<MFuenteFinanciamiento[]>
731
- * @author Miguel Ramírez
732
- */
733
- public getFuenteFinanciamiento(): Observable<MFuenteFinanciamiento[]> {
734
- return this.http.get<MFuenteFinanciamiento[]>(`${this.URL}/dao/spg/fuente_financiamiento_dao.php`,
735
- { headers: this.getHttpHeaders() }).pipe(
736
- retry(3),
737
- catchError(this.handlerError),
738
- map((resp: any) => resp.data.map(element => new MFuenteFinanciamiento(element)))
739
- );
740
- }
741
-
742
- /**
743
- * @description Obtiene los centros de costo
744
- * @return Observable<MCentroCosto[]>
745
- * @author Miguel Ramírez
746
- * @param id:idusurio o id del ecntro de costo
747
- * modificado 28-12-2022
748
- */
749
- public getCentroCosto(tipo: 'all'|'one'|'user'|'enter'= null, id?:string): Observable<MCentroCosto[]> {
750
- return this.http.get<IResponse>(`${this.URL}/dao/scg/centro_costo_dao.php?tipo=${tipo}&id=${id}`,
751
- { headers: this.getHttpHeaders() }).pipe(
752
- retry(3),
753
- catchError(this.handlerError),
754
- map((resp: any) => resp.data.map(element => new MCentroCosto(element)))
755
- );
756
- }
757
-
758
-
759
-
760
- /**
761
- * @description Obtiene los centros de costo
762
- * @return Observable<IResponse>
763
- * @author Carlos Albornoz
764
- */
765
- public getCostCenters(): Observable<IResponse> {
766
- return this.http.get<IResponse>(`${this.URL}/dao/scg/centro_costo_dao.php`,
767
- {headers: this.getHttpHeaders()}
768
- ).pipe(
769
- retry(3),
770
- catchError(this.handlerError),
771
- map((res: IResponse) => {
772
- if (res.success) {
773
- res.data = res.data.map(element => new MCentroCosto(element))
774
- }
775
- return res
776
- })
777
- );
778
- }
779
-
780
- public getUserCostCenters(codigo:string): Observable<IResponse> {
781
- return this.http.get<IResponse>(`${this.URL}/dao/scg/centro_costo_usuario_dao.php?codigo=${codigo}`,
782
- {headers: this.getHttpHeaders()}
783
- ).pipe(
784
- retry(3),
785
- catchError(this.handlerError),
786
- map((res: IResponse) => {
787
- if (res.success) {
788
- res.data = res.data.map(element => new MUsuarioCentroCosto(element))
789
- }
790
- return res
791
- })
792
- );
793
- }
794
-
795
-
796
- /**
797
- * @description Abre el dialog de checkks
798
- * @param columns Columnas que va a tener la tabla
799
- * @param title Título de la modal
800
- * @param dataSource Data que s eva a mostrar en la tabla
801
- */
802
- public openDialogMultiSelect(
803
- // columns: string[],
804
- // title: string,
805
- // dataSource: any[],
806
- // columnNames?: string[]
807
- columns: string[],
808
- title: string,
809
- dataSource: any[],
810
- columnNames: string[] = null,
811
- width: string = '1000px',
812
- options: {
813
- hasBackdrop?: boolean,
814
- disableClose?: boolean,
815
- // disableMasterToggle?: boolean
816
- } = {
817
- disableClose: false,
818
- hasBackdrop: false,
819
- // disableMasterToggle: false
820
- }
821
- ): Promise<any[]> {
822
- let dialogRef = this.dialog.open(TableSelectComponent, {
823
- data: {
824
- title: title,
825
- columns: columns,
826
- dataSource: dataSource,
827
- columnNames,
828
- // disableMasterToggle: options.disableMasterToggle
829
- },
830
- width: width,
831
- maxHeight: '90vh',
832
- hasBackdrop: options.hasBackdrop,
833
- disableClose: options.disableClose
834
- });
835
-
836
- return dialogRef.afterClosed().toPromise();
837
- }
838
- /**
839
- * @description Abre el dialog de las comunidades
840
- * @return Promise<MPlanUnicoCuenta>
841
- * @author Miguel Ramírez
842
- */
843
- public async openDialogPlanUnicoCuentas(): Promise<MPlanUnicoCuenta> {
844
- let planes: MPlanUnicoCuenta[] = await this.getListadoPLanUnicoCuentas().toPromise();
845
- let dialogRef = this.dialog.open(CatalogoComponent, {
846
- data: {
847
- columns: ['cuenta', 'denominacion'],
848
- columnNames: ['cuenta', 'denominación'],
849
- title: 'Catálogo de Plan de Cuentas Géneral',
850
- dataSource: planes
851
- } as ICatalogo,
852
- width: '1000px',
853
- maxHeight: '90vh'
854
- });
855
- return dialogRef.afterClosed().toPromise();
856
- }
857
-
858
- /**
859
- * @description Obtiene el listado del plan único de cuentas
860
- * @return Observable<MplanUnicoCuenta[]>
861
- * @author Miguel Ramírez
862
- */
863
- public getListadoPLanUnicoCuentas(): Observable<MPlanUnicoCuenta[]> {
864
- return this.http.get<MPlanUnicoCuenta[]>(`${this.URL}/dao/scg/plan_unico_dao.php`,
865
- { headers: this.getHttpHeaders() }).pipe(
866
- retry(3),
867
- catchError(this.handlerError),
868
- map((resp: any) => resp.data.map(element => new MPlanUnicoCuenta(element)))
869
- )
870
- }
871
-
872
- /**
873
- * @description Obtiene la configuración de SCG
874
- * @return Observable<MConfiguracionSCG[]>
875
- * @author Miguel Ramírez
876
- * @modifit 25-07-2021
877
- */
878
- public getConfigurationSCG(): Observable<MConfiguracionSCG[]> {
879
- return this.http.get<MConfiguracionSCG[]>(`${this.URL}/dao/scg/configuracion_contabilidad_dao.php`,
880
- {headers: this.getHttpHeaders()}
881
- ).pipe(
882
- retry(3),
883
- catchError(this.handlerError),
884
- map((resp: any) => resp.data.map(element => new MConfiguracionSCG(element)))
885
- )
886
- }
887
-
888
- /**
889
- * @description Abre un dialog de confirmación
890
- * @param title Título de la modal de confirm
891
- * @param message Mensaje (opcional) para el ususario
892
- * @return Promise<boolean>
893
- * @author Miguel Ramírez
894
- */
895
- public openDialogConfirm(title: string, message?: string): Promise<boolean> {
896
- let dialogRef = this.dialog.open(ConfirmComponent, {
897
- data: {
898
- title: title,
899
- message: (message) ? message : null
900
- },
901
- width: '1000px',
902
- maxHeight: '90vh'
903
- });
904
-
905
- return dialogRef.afterClosed().toPromise();
906
- }
907
-
908
- /**
909
- * @description Convierte el contenido de un AbstractControl en mayúscula (Usar en evento keyup)
910
- * @param formGroup Formulario dónde se va a buscar el AbstractControl
911
- * @param name Nombre del AbstractControl
912
- * @return void
913
- * @author Miguel Ramírez
914
- */
915
- public changeToUpperCase(formGroup: UntypedFormGroup, name: string): void {
916
- this.getAbstractControl(formGroup, name).setValue(this.getAbstractControl(formGroup, name).value.toUpperCase());
917
- }
918
-
919
- /**
920
- * @description Obtiene el AbstractControl de un formulario
921
- * @param formGroup Formulario donde se va a buscar el AbstractControl
922
- * @param name Nombre del AbstractControl
923
- * @return AbstractControl
924
- * @author Miguel Ramírez
925
- */
926
- public getAbstractControl(formGroup: UntypedFormGroup, name: string): AbstractControl {
927
- return formGroup.get(name);
928
- }
929
-
930
- /**
931
- * @description Previene que se escriban letras en el input (Usar en keypress)
932
- * @param event Evento del teclado
933
- * @return boolean
934
- * @author Miguel Ramírez
935
- * @modificado como onlyNumero para corregir codigo, usar currency-input si quiere usar decimales
936
- */
937
- public onlyDecimal(event?: any): boolean {
938
- if (!isNaN(+event.key) && event.keyCode != 32) {
939
- return true;
940
- }
941
- return false;
942
- }
943
-
944
- /**
945
- * @description Previene que se escriban letras en el input (Usar en keypress)
946
- * @param event Evento del teclado
947
- * @return boolean
948
- * @author Miguel Ramírez
949
- */
950
- public onlyNumbers(event?: any): boolean {
951
- // console.log(event);
952
- if (!isNaN(+event.key) && event.keyCode != 32) {
953
- return true;
954
- }
955
- return false;
956
- }
957
-
958
- /**
959
- * @description Acepta solo numero, delete y backspace
960
- * @param event Evento del teclado
961
- * @return boolean
962
- * @author Dimaly Crespo
963
- */
964
- public onlyNumbers2(event?: any): boolean {
965
- if (!isNaN(+event.key) || event.keyCode == 8 || event.keyCode == 46) {
966
- return true;
967
- }
968
- return false;
969
- }
970
-
971
- /**
972
- * @description Acepta solo numero,guiones, parentesis,espacios
973
- * @param event Evento del teclado
974
- * @return boolean
975
- * @author Dimaly Crespo
976
- */
977
- public typeNumbersHyphen(event?: any): boolean {
978
- if (!isNaN(+event.key) || event.keyCode == 8 || event.keyCode == 32 || event.keyCode == 46
979
- || event.keyCode == 58 || event.keyCode == 57 || event.keyCode == 189) {
980
- return true;
981
- }
982
- return false;
983
- }
984
-
985
- /**
986
- * @description Permite (a-z A-Z á-ú ñÑ üÜ ',.) que se escriban numeros en el input (Usar en keypress)
987
- * @param event Evento del teclado
988
- * @return boolean
989
- * @date 14-05-2022
990
- *
991
- */
992
- public typeName(event?: any): boolean {
993
- if ((event.key>='a' && event.key<='z') || (event.key>='A' && event.key<='Z') || event.key=="ñ" || event.key=="Ñ"
994
- || (event.key>='á' && event.key<='ú') || event.key>='ü' || event.key>='Ü' || event.key=="'" || event.keyCode==32
995
- || event.key=="." || event.key=="," || event.keyCode == 8 || event.keyCode == 32 || event.keyCode == 46 ){
996
- return true;
997
- }
998
- return false;
999
- }
1000
- /**
1001
- * @description Permite (0-9 a-z A-Z á-ú ñÑ üÜ ',.-_/:()%#º&$€£¥) que se escriban en el input (Usar en keypress)
1002
- * @param event Evento del teclado
1003
- * @return boolean
1004
- * @date 14-05-2022
1005
- *
1006
- */
1007
- public typeText(event?: any): boolean {
1008
- if ((event.key>='a' && event.key<='z') || (event.key>='A' && event.key<='Z') || event.key=="ñ" || event.key=="Ñ"
1009
- || (event.key>='á' && event.key<='ú') || event.key=='ü' || event.key=='Ü' || event.key=="'" || isNaN(+event.key)
1010
- || event.key=="." || event.key=="," || event.key=="&" || event.key=="_"|| event.key=="-" || event.key=="#"
1011
- || event.key=="º" || event.key=="$" || event.key=="(" || event.key==")" || event.key=="%" || event.key==' '
1012
- || event.key==':' ||event.key=='/'|| event.keyCode==8364 || event.keyCode==165 ||event.keyCode==163
1013
- || event.keyCode == 8 || event.keyCode == 32 || event.keyCode == 46 ){
1014
- return true;
1015
- }
1016
- return false;
1017
- }
1018
-
1019
- /**
1020
- * @description Permite (0-9 a-z A-Z ñÑ .-_) que se escriban en el input (Usar en keypress)
1021
- * @param event Evento del teclado
1022
- * @return boolean
1023
- * @date 14-05-2022
1024
- */
1025
- public typeCode(event?: any): boolean {
1026
- if ((event.key>='a' && event.key<='z') || (event.key>='A' && event.key<='Z') || event.key=="ñ" || event.key=="Ñ"
1027
- ||isNaN(+event.key) || event.key=="." || event.key=="_" || event.key=="-" || event.keyCode == 8 || event.keyCode == 32 || event.keyCode == 46 ){
1028
- return true;
1029
- }
1030
- return false;
1031
- }
1032
-
1033
- /**
1034
- * @description Abre el dialog de las comunidades
1035
- * @return Promise<MComunidad>
1036
- * @author Miguel Ramírez
1037
- */
1038
- public async openDialogUnidadesTributarias(): Promise<any> {
1039
- let udTributarias: MUnidadTributaria[] = await this.getUnidadesTributarias().toPromise();
1040
- let dialogRef = this.dialog.open(CatalogoComponent, {
1041
- data: {
1042
- columns: ['año', 'nro_decreto', 'fecha_decreto', 'entrada_videncia', 'publicacion_gaceta', 'nro_gaceta', 'valorut'],
1043
- title: 'Catálogo de Unidades Tributarias',
1044
- dataSource: udTributarias
1045
- } as ICatalogo,
1046
- width: '1000x',
1047
- maxHeight: '90vh'
1048
- });
1049
- return dialogRef.afterClosed().toPromise();
1050
- }
1051
-
1052
- /**
1053
- * @description Obtiene las unidades tributarias
1054
- * @return Observable<any>
1055
- * @author Miguel Ramírez
1056
- */
1057
- public getUnidadesTributarias(): Observable<MUnidadTributaria[]> {
1058
- const request: IRequest = {
1059
- operacion: 'obtenerData',
1060
- sigesp_conexion: {
1061
- servidor: this.URL,
1062
- usuario: this.usuarioActivo.getInterface()
1063
- }
1064
- }
1065
- return this.http.post<MUnidadTributaria[]>(`${this.URL}/dao/cfg/undtributaria_dao.php`, request).pipe(
1066
- retry(3),
1067
- catchError(this.handlerError),
1068
- map((resp: any[]) => resp.map(element => new MUnidadTributaria(element)))
1069
- );
1070
- }
1071
-
1072
- /**
1073
- * @description Abre una modal génerica
1074
- * @param columns Columnas que va a tener la tabla
1075
- * @param title Título del dialog
1076
- * @param dataSource Data que se va a mostrar en la tabla
1077
- * @return Promise<any>
1078
- * @author Miguel Ramírez
1079
- */
1080
- public async openCatalogoGenerico(
1081
- columns: string[],
1082
- title: string,
1083
- dataSource: any[],
1084
- columnNames: string[] = null,
1085
- width: string = '1000px',
1086
- options: {
1087
- hasBackdrop?: boolean,
1088
- disableClose?: boolean
1089
- } = {disableClose: false, hasBackdrop: false}
1090
- ): Promise<any> {
1091
- let dialogRef = this.dialog.open(CatalogoComponent, {
1092
- data: {
1093
- columns,
1094
- title,
1095
- dataSource,
1096
- columnNames
1097
- } as ICatalogo,
1098
- width: width,
1099
- maxHeight: '90vh',
1100
- hasBackdrop: options.hasBackdrop ? options.hasBackdrop : false,
1101
- disableClose: options.disableClose ? options.disableClose : false,
1102
- });
1103
- return dialogRef.afterClosed().toPromise();
1104
- }
1105
-
1106
- /**
1107
- * @description Abre una modal génerica con 2 inputs
1108
- * @param columns Columnas que va a tener la tabla
1109
- * @param title Título del dialog
1110
- * @param dataSource Data que se va a mostrar en la tabla
1111
- * @return Promise<any>
1112
- * @author Carlos Albornoz
1113
- */
1114
- public async openCatalogoDosInputs(
1115
- columns: string[],
1116
- title: string,
1117
- dataSource: any[],
1118
- filterData: filterData[],
1119
- columnNames: string[] = null,
1120
- width: string = "1000px"
1121
- ): Promise<any> {
1122
- let dialogRef = this.dialog.open(CatalogoDobleInputComponent, {
1123
- data: {
1124
- columns,
1125
- title,
1126
- dataSource,
1127
- columnNames,
1128
- filterData
1129
- } as ICatalogo,
1130
- width: width,
1131
- maxHeight: '90vh'
1132
- });
1133
- return dialogRef.afterClosed().toPromise();
1134
- }
1135
-
1136
- /**
1137
- * @description Abre el dialog de las comunidades
1138
- * @return Promise<MComunidad>
1139
- * @author Miguel Ramírez
1140
- */
1141
- public async openDialogComunidad(): Promise<MComunidad> {
1142
- let comunidades: MComunidad[] = await this.getComunidades().toPromise();
1143
- let dialogRef = this.dialog.open(CatalogoComponent, {
1144
- data: {
1145
- columns: ['prefijo', 'pais', 'estado', 'municipio', 'parroquia', 'codigo', 'comunidad'],
1146
- title: 'Catálogo de Comunidades',
1147
- dataSource: comunidades
1148
- } as ICatalogo,
1149
- width: '1000px',
1150
- maxHeight: '90vh'
1151
- });
1152
- return dialogRef.afterClosed().toPromise();
1153
- }
1154
-
1155
- /**
1156
- * @description Obtiene las comunidades
1157
- * @return Observable<MComunidad[]>
1158
- * @author Miguel Ramírez
1159
- */
1160
- public getComunidades(): Observable<MComunidad[]> {
1161
- const request: IRequest = {
1162
- operacion: 'obtenerData',
1163
- sigesp_conexion: {
1164
- servidor: this.URL,
1165
- usuario: this.usuarioActivo.getInterface()
1166
- }
1167
- }
1168
- return this.http.post<MComunidad[]>(`${this.URL}/dao/cfg/comunidades_dao.php`, request).pipe(
1169
- map((resp: any[]) => resp.map(element => new MComunidad(element)))
1170
- );
1171
- }
1172
-
1173
- /**
1174
- * @description Abre el dialog de las las monedas
1175
- * @return Promise<MMoneda>
1176
- * @author Miguel Ramírez
1177
- */
1178
- public async openDialogMonedas(): Promise<MMoneda> {
1179
- let coins: MMoneda[] = await this.getMonedas('todas').toPromise();
1180
- let dialogRef = this.dialog.open(CatalogoComponent, {
1181
- data: {
1182
- columns: ['codigo', 'denominacion', 'codigoIso', 'simbolo'],
1183
- title: 'Catálogo de Monedas',
1184
- columnNames: ['código', 'denominación', 'iso', 'simbolo'],
1185
- dataSource: coins
1186
- } as ICatalogo,
1187
- width: '1000px',
1188
- maxHeight: '90vh'
1189
- });
1190
- return dialogRef.afterClosed().toPromise();
1191
- }
1192
-
1193
- /**
1194
- * @description Obtiene las monedas
1195
- * @return Observable<MMoneda[]>
1196
- * @author Miguel Ramírez
1197
- * actualizado 4-12-2022
1198
- * @param tipo :string {'todas','uno','actual}
1199
- * @param id : number
1200
- * @returns
1201
- */
1202
-
1203
-
1204
- public getMonedas(tipo:string,id?:number): Observable<MMoneda[]> {
1205
- return this.http.get<MMoneda[]>(`${this.URL}/dao/cfg/moneda_dao.php?tipo=${tipo}&id=${id}`,
1206
- { headers: this.getHttpHeaders()}).pipe(
1207
- map((resp: any) => resp.data.map(element => new MMoneda(element)))
1208
- );
1209
- }
1210
-
1211
-
1212
- /**
1213
- * @Description: Obtiene la tasa de cambio asociadas a uno o varias monedas
1214
- * @param tipo string
1215
- * @param id codigo moneda
1216
- * @returns array/null
1217
- * @tipo:all->todas, (moneda->una moneda id->id de moneda)
1218
- */
1219
- public getCurrencyExchangeRate(tipo: 'all'| 'moneda'= null, id?:number): Observable<MExchangeRate[]> {
1220
- return this.http.get<MExchangeRate[]>(`${this.URL}/dao/cfg/tasa_cambio_dao.php?tipo=${tipo}&id=${id}`,
1221
- { headers: this.getHttpHeaders()}).pipe(
1222
- map((resp: any) => resp.data.map(element => new MExchangeRate(element)))
1223
- );
1224
- }
1225
-
1226
-
1227
-
1228
-
1229
-
1230
- /**
1231
- * @description Abre el dialog de las las cuentas contables (Cuentas Institucionales)
1232
- * @return Promise<McuentaInstitucional>
1233
- * @author Miguel Ramírez
1234
- */
1235
- public async openDialogCuentasInstitucionales(): Promise<MCuentaInstitucional> {
1236
- let accounts: MCuentaInstitucional[] = await this.getCuentasInstitucionales().toPromise();
1237
- let dialogRef = this.dialog.open(CatalogoComponent, {
1238
- data: {
1239
- columns: ['cuenta', 'denominacion'],
1240
- columnNames: ['cuenta', 'denominación'],
1241
- title: 'Catálogo de plan de cuenta institucional',
1242
- dataSource: accounts
1243
- } as ICatalogo,
1244
- width: '1000px',
1245
- maxHeight: '90vh'
1246
- });
1247
- return dialogRef.afterClosed().toPromise();
1248
- }
1249
-
1250
- /**
1251
- * @description Obtiene las cuentas contables (Cuentas Institucionales)
1252
- * @return Observable<MCuentaInstitucional[]>
1253
- * @author Miguel Ramírez
1254
- */
1255
- public getCuentasInstitucionales(inventory?: boolean): Observable<MCuentaInstitucional[]> {
1256
- return this.http.get<MCuentaInstitucional[]>(`${this.URL}/dao/scg/cuentas_dao.php${(inventory) ? '?inventory=true' : ''}`,
1257
- { headers: this.getHttpHeaders() }).pipe(
1258
- retry(3),
1259
- catchError(this.handlerError),
1260
- map((resp: any) => resp.data.map(element => new MCuentaInstitucional(element)))
1261
- );
1262
- }
1263
-
1264
- /**
1265
- * @description Abre el dialog de las cuentas de presupuesto (Recursos y Egresos)
1266
- * @return Promise<MCuentaPresupuesto>
1267
- * @author Miguel Ramírez
1268
- */
1269
- public async openDialogCuentasPresupuesto(): Promise<MCuentaPresupuesto> {
1270
- let accounts: MCuentaPresupuesto[] = await this.getCuentasPresupuesto().toPromise();
1271
- let dialogRef = this.dialog.open(CatalogoComponent, {
1272
- data: {
1273
- columnNames: ['cuenta', 'denominación'],
1274
- columns: ['cuenta', 'denominacion'],
1275
- title: 'Catálogo de Cuentas de Presupuesto',
1276
- dataSource: accounts
1277
- } as ICatalogo,
1278
- width: '1000px',
1279
- maxHeight: '90vh'
1280
- });
1281
- return dialogRef.afterClosed().toPromise();
1282
- }
1283
-
1284
- /**
1285
- * @description Obtiene las cuentas de recursos y egresos
1286
- * @return Observable<MCuentaPresupuesto>
1287
- * @author Miguel Ramírez
1288
- */
1289
- public getCuentasPresupuesto(filter?:string): Observable<MCuentaPresupuesto[]> {
1290
- return this.http.get<MCuentaPresupuesto>(`${this.URL}/dao/scg/plan_unico_cuentas_dao.php?filter=${filter}`,
1291
- { headers: this.getHttpHeaders() }).pipe( map((res: any) => res.data.map(element => new MCuentaPresupuesto(element))));
1292
- }
1293
-
1294
-
1295
- /**
1296
- * @description Abre el cátalogo de cuentas de la tabla "scg_plan_unico_re"
1297
- * @returns Promise<MCuentaPresupuesto>
1298
- * @author Carlos Albornoz
1299
- * @params filtro: Indica bajo que parametros se va a filtrar el catalogo
1300
- */
1301
- public async openCatalogoCuentasPresuspuesto(
1302
- titulo: string,
1303
- filtro: filtroCuentasPresupuesto = null,
1304
- ancho: string = '1000px'
1305
- ): Promise<MCuentaPresupuesto> {
1306
- let cuentas: MCuentaPresupuesto[] = [];
1307
-
1308
- await this.getCuentasPresupuesto().toPromise().then((res) => {
1309
- cuentas = res;
1310
- if (filtro) {
1311
- if (filtro.estado) {
1312
- cuentas = cuentas.filter(c => {
1313
- return c.status == filtro.estado
1314
- })
1315
- }
1316
- if (filtro.tipo) {
1317
- cuentas = cuentas.filter(c => {
1318
- return c.tipo == filtro.tipo
1319
- })
1320
- }
1321
- }
1322
- cuentas = cuentas.map(e => {
1323
- e['provStatus'] = e.status == "C" ? "Movimientos" : "Totalizadora"
1324
- e['provType'] = e.status == "R" ? "Recursos" : "Ingresos"
1325
- return e
1326
- })
1327
- })
1328
- return this.openCatalogoGenerico(
1329
- ["cuenta","denominacion","provStatus","provType"],
1330
- titulo,
1331
- cuentas,
1332
- ["Cuenta","Denominación","Estado","Tipo"],
1333
- ancho
1334
- )
1335
- }
1336
-
1337
- /**
1338
- * @description Abre el cátalogo de cuentas de la tabla "spg_cuentas"
1339
- * @returns Promise<MCuentaEgresos>
1340
- * @author Carlos Albornoz
1341
- * @params presupuesto: Indica si se a trabajar con estructura de presupuesto o no
1342
- */
1343
- public async openCatalogoCuentasEgreso(
1344
- titulo: string,
1345
- presupuesto: boolean = true,
1346
- ancho: string = "1000px"
1347
- ): Promise<MCuentaEgresos>{
1348
- let cuentas: MCuentaEgresos[] = [];
1349
- await this.getExpenseAccounts().toPromise().then(res => {
1350
- cuentas = res
1351
- cuentas = cuentas.filter(e => {
1352
- return e.status == "C"
1353
- }).map(e => {
1354
- e['provStatus'] = e.status == "C" ? "Movimientos" : "Totalizadora"
1355
- return e;
1356
- })
1357
- })
1358
- if (presupuesto) {
1359
- return this.openCatalogoDosInputs(
1360
- ["cuenta","denominacion","estructura","provStatus"],
1361
- titulo,
1362
- cuentas,
1363
- [{
1364
- placeholder: "Cuenta",
1365
- property: "cuenta"
1366
- }, {
1367
- placeholder: "Estructura",
1368
- property: "estructura"
1369
- }],
1370
- ["Cuenta", "Denominación", "Estructura", "Estado"],
1371
- ancho
1372
- )
1373
- } else {
1374
- let filteredAccounts: MCuentaEgresos[] = [];
1375
- cuentas.forEach(c => {
1376
- if (!filteredAccounts.find(e => e.cuenta == c.cuenta)) {
1377
- filteredAccounts.push(c)
1378
- }
1379
- })
1380
- return this.openCatalogoGenerico(
1381
- ["cuenta","denominacion","provStatus"],
1382
- titulo,
1383
- filteredAccounts,
1384
- ["Cuenta", "Denominación", "Estado"],
1385
- ancho
1386
- )
1387
- }
1388
- }
1389
-
1390
- /**
1391
- * @description Abre el cátalogo de cuentas de la tabla "spi_cuentas"
1392
- * @returns Promise<MCuentaIngresos>
1393
- * @author Carlos Albornoz
1394
- * @params presupuesto: Indica si se a trabajar con estructura de presupuesto o no
1395
- */
1396
- public async openCatalogoCuentasIngreso(
1397
- titulo: string,
1398
- presupuesto: boolean = true,
1399
- ancho: string = "1000px"
1400
- ): Promise<MCuentaIngresos>{
1401
- let cuentas: MCuentaIngresos[] = [];
1402
- await this.getIncomeAccounts().toPromise().then((res: IResponse) => {
1403
- cuentas = res.data
1404
- cuentas = cuentas.filter(e => {
1405
- return e.estado == "C"
1406
- }).map(e => {
1407
- e['provStatus'] = e.estado == "C" ? "Movimientos" : "Totalizadora"
1408
- return e;
1409
- })
1410
- })
1411
- if (presupuesto) {
1412
- return this.openCatalogoDosInputs(
1413
- ["cuenta","denominacion","estructura","provStatus"],
1414
- titulo,
1415
- cuentas,
1416
- [{
1417
- placeholder: "Cuenta",
1418
- property: "cuenta"
1419
- }, {
1420
- placeholder: "Estructura",
1421
- property: "estructura"
1422
- }],
1423
- ["Cuenta", "Denominación", "Estructura", "Estado"],
1424
- ancho
1425
- )
1426
- } else {
1427
- let filteredAccounts: MCuentaIngresos[] = [];
1428
- cuentas.forEach(c => {
1429
- if (!filteredAccounts.find(e => e.cuenta == c.cuenta)) {
1430
- filteredAccounts.push(c)
1431
- }
1432
- })
1433
- return this.openCatalogoGenerico(
1434
- ["cuenta","denominacion","provStatus"],
1435
- titulo,
1436
- filteredAccounts,
1437
- ["Cuenta", "Denominación", "Estado"],
1438
- ancho
1439
- )
1440
- }
1441
- }
1442
-
1443
- public getUnidadAdministrativa(tipo?:string,e?:number){
1444
- return this.http.get(`${this.URL}/dao/spg/unidad_administrativa_dao.php?tipo=${tipo}&e=${e}`,
1445
- {headers: this.getHttpHeaders()})
1446
- .pipe(
1447
- map((res:any) => {
1448
- if (res.success) {
1449
- res.data = res.data.map(e => new MAdministrativeUnit(e));
1450
- }
1451
- return res;
1452
- })
1453
- )
1454
- }
1455
-
1456
- /**
1457
- * @description Obtiene los cargos de servicios
1458
- * @return Observable<IResponse>
1459
- * @author Carlos Albornoz
1460
- */
1461
- public getServiceCharges(serviceId:number = null): Observable<IResponse> {
1462
- return this.http.get<IResponse>(`${this.URL}/dao/soc/servicio_cargo_dao.php${
1463
- serviceId ? `?service_id=${serviceId}` : ''
1464
- }`,
1465
- { headers: this.getHttpHeaders() }).pipe(
1466
- retry(3),
1467
- catchError(this.handlerError),
1468
- map((res: any) => {
1469
- if (res.success) {
1470
- res.data = res.data.map(e => new MServiceCharge(e));
1471
- }
1472
- return res;
1473
- })
1474
- );
1475
- }
1476
-
1477
- /**
1478
- * @description Obtiene los paises
1479
- * @return Observable<MCountry>
1480
- * @author Carlos Albornoz
1481
- * @modified 10-01-2022
1482
- * @param codigo: Codigo del pais
1483
-
1484
- */
1485
- public getCountries(codigo?:string): Observable<MCountry[]> {
1486
-
1487
- return this.http.get<MCountry>(`${this.URL}/dao/cfg/paises_dao.php?codigo=${codigo}`,
1488
- { headers: this.getHttpHeaders() }).pipe(
1489
- retry(3),
1490
- catchError(this.handlerError),
1491
- map((res: any) => res.data.map(e => new MCountry(e)))
1492
- );
1493
- }
1494
-
1495
- /**
1496
- * @description Obtiene los estados
1497
- * @return Observable<MState>
1498
- * @author Carlos Albornoz
1499
- * @modificado 4-12-2022
1500
- * @param codigo: Codigo del pais
1501
- */
1502
- public getStates(codigo?:string): Observable<MState[]> {
1503
- return this.http.get<MState>(`${this.URL}/dao/cfg/estados_dao.php?codigo=${codigo}`,
1504
- { headers: this.getHttpHeaders() }).pipe(
1505
- retry(3),
1506
- catchError(this.handlerError),
1507
- map((res: any) => res.data.map(e => new MState(e)))
1508
- );
1509
- }
1510
-
1511
- /**
1512
- * @description Obtiene los municipios
1513
- * @return Observable<MMunicipality>
1514
- * @author Carlos Albornoz
1515
- * @modificado 10-01-2022
1516
- * @param pais: Codigo del pais ,
1517
- * @param estado: Codigo del estado
1518
- * @actualizado 4-12-2022
1519
- */
1520
- public getMunicipalities(pais?:string,estado?:string): Observable<MMunicipality[]> {
1521
- return this.http.get<MMunicipality>(`${this.URL}/dao/cfg/municipios_dao.php?pais=${pais}&estado=${estado}`,
1522
- { headers: this.getHttpHeaders() }).pipe(
1523
- retry(3),
1524
- catchError(this.handlerError),
1525
- map((res: any) => res.data.map(e => new MMunicipality(e)))
1526
- );
1527
- }
1528
-
1529
- /**
1530
- * @description Obtiene las parroquias
1531
- * @return Observable<MParish>
1532
- * @author Carlos Albornoz
1533
- * @modificado 10-01-2022
1534
- * @param pais: Codigo del pais
1535
- * @param estado: Codigo del estado
1536
- * @param municipio:codigo Municipio
1537
- * @actualizado 4-12-2022
1538
-
1539
- */
1540
- public getParishes(pais?:string,estado?:string,municipio?:string): Observable<MParish[]> {
1541
- return this.http.get<MParish>(`${this.URL}/dao/cfg/parroquias_dao.php?pais=${pais}&estado=${estado}&municipio=${municipio}`,
1542
- { headers: this.getHttpHeaders() }).pipe(
1543
- retry(3),
1544
- catchError(this.handlerError),
1545
- map((res: any) => res.data.map(e => new MParish(e)))
1546
- );
1547
- }
1548
-
1549
- /**
1550
- * @description Obtiene las ciudades
1551
- * @return Observable<MParish>
1552
- * @author Carlos Albornoz
1553
- * @modificado 10-01-2022
1554
- * @param pais: Codigo del pais
1555
- * @param estado: Codigo del estado
1556
-
1557
-
1558
- */
1559
- public getCity(pais?:string,estado?:string): Observable<MCity[]> {
1560
- return this.http.get<MCity>(`${this.URL}/dao/cfg/ciudades_dao.php?pais=${pais}&estado=${estado}`,
1561
- { headers: this.getHttpHeaders() }).pipe(
1562
- retry(3),
1563
- catchError(this.handlerError),
1564
- map((res: any) => res.data.map(e => new MCity(e)))
1565
- );
1566
- }
1567
-
1568
- /**
1569
- * @description Obtiene las ciudades
1570
- * @return Observable<MParish>
1571
- * @author Dimaly Crespo
1572
- * @modificado 10-01-2022
1573
- * @param pais: Codigo del pais
1574
-
1575
- */
1576
- public getCommunities(pais?:string,estado?:string, municipio?:string,parroquia?:string): Observable<MCommunity[]> {
1577
- return this.http.get<MCommunity>(`${this.URL}/dao/cfg/comunidades_dao.php?pais=${pais}&estado=${estado}&municipio=${municipio}&parroquia=${parroquia}`,
1578
- { headers: this.getHttpHeaders() }).pipe(
1579
- retry(3),
1580
- catchError(this.handlerError),
1581
- map((res: any) => res.data.map(e => new MCommunity(e)))
1582
- );
1583
- }
1584
-
1585
- /**
1586
- * @description Obtiene los sistemas activas
1587
- * @return Observable<MSistema>
1588
- * @author Carlos Albornoz
1589
- */
1590
- public getSistemas(): Observable<MSistema[]> {
1591
- return this.http.get<MSistema>(`${this.URL}/dao/sss/sistemas_dao.php`,
1592
- { headers: this.getHttpHeaders() }).pipe(
1593
- retry(3),
1594
- catchError(this.handlerError),
1595
- map((res: any) => res.data.map(e => new MSistema(e)))
1596
- );
1597
- }
1598
-
1599
- /**
1600
- * @description Obtiene la moneda actual
1601
- * @return Observable<IResponse>
1602
- * @author Carlos Albornoz
1603
- * @actualizado: 4-12-20222
1604
- * @params id: id de la moneda,
1605
- * @params tipo: todas->obtiene todas las moneda, (uno-> obtiene una moneda + id)
1606
- * (mon:formato para inputCurrency + id )
1607
- */
1608
- public getCurrentCurrency(tipo:'todas'|'uno'|'mon'=null,id?:number): Observable<IResponse> {
1609
- return this.http.get<IResponse>(`${this.URL}/dao/cfg/moneda_dao.php?tipo=${tipo}&id=${id}`,
1610
- { headers: this.getHttpHeaders() }).pipe(
1611
- retry(3),
1612
- catchError(this.handlerError),
1613
- map((res: any) => {
1614
- if (res.success) {
1615
- res.data = new MMonedaConfig(res.data);
1616
- }
1617
- return res;
1618
- })
1619
- );
1620
- }
1621
-
1622
- /**
1623
- * @description Obtiene la linea empresa
1624
- * @return Observable<IResponse>
1625
- * @author Dimaly Crespo
1626
- * @actualizado: 5-12-20222
1627
- */
1628
- public getEnterprise(tipo:'linea' |'proceso'|'default'=null ,id?:number): Observable<IResponse> {
1629
- return this.http.get<IResponse>(`${this.URL}/dao/cfg/enterprise_dao.php?tipo=${tipo}`,
1630
- { headers: this.getHttpHeaders() }).pipe(
1631
- retry(3),
1632
- catchError(this.handlerError),
1633
- map((res: any) => {
1634
- if (res.success) {
1635
- res.data = res.data.map(e => new MEnterprise(e));
1636
- }
1637
- return res;
1638
- })
1639
- );
1640
- }
1641
-
1642
-
1643
- /**
1644
- * @description Obtiene los tipos de organizacion
1645
- * @return Observable<IResponse>
1646
- * @author Carlos Albornoz
1647
- */
1648
- public getOrganizationTypes(): Observable<IResponse> {
1649
- return this.http.get<IResponse>(`${this.URL}/dao/rpc/tipo_organizacion_dao.php`,
1650
- { headers: this.getHttpHeaders() }).pipe(
1651
- retry(3),
1652
- catchError(this.handlerError),
1653
- map((res: any) => {
1654
- if (res.success) {
1655
- res.data = res.data.map(e => new MOrganizationType(e));
1656
- }
1657
- return res;
1658
- })
1659
- );
1660
- }
1661
-
1662
- /**
1663
- * @description Obtiene los tipos de organizacion
1664
- * @return Observable<IResponse>
1665
- * @author Carlos Albornoz
1666
- */
1667
- public getSpecialties(): Observable<IResponse> {
1668
- return this.http.get<IResponse>(`${this.URL}/dao/rpc/especialidad_dao.php`,
1669
- { headers: this.getHttpHeaders() }).pipe(
1670
- retry(3),
1671
- catchError(this.handlerError),
1672
- map((res: any) => {
1673
- if (res.success) {
1674
- res.data = res.data.map(e => new MSpecialty(e));
1675
- }
1676
- return res;
1677
- })
1678
- );
1679
- }
1680
-
1681
- /**
1682
- * @description Obtiene los documentos
1683
- * @return Observable<IResponse>
1684
- * @author Carlos Albornoz
1685
- */
1686
- public getDocuments(): Observable<IResponse> {
1687
- return this.http.get<IResponse>(`${this.URL}/dao/rpc/documento_dao.php`,
1688
- { headers: this.getHttpHeaders() }).pipe(
1689
- retry(3),
1690
- catchError(this.handlerError),
1691
- map((res: any) => {
1692
- if (res.success) {
1693
- res.data = res.data.map(e => new MDocument(e));
1694
- }
1695
- return res;
1696
- })
1697
- );
1698
- }
1699
-
1700
- /**
1701
- * @description Obtiene las clasificaciones
1702
- * @return Observable<IResponse>
1703
- * @author Carlos Albornoz
1704
- */
1705
- public getClasifications(): Observable<IResponse> {
1706
- return this.http.get<IResponse>(`${this.URL}/dao/rpc/clasificacion_dao.php`,
1707
- { headers: this.getHttpHeaders() }).pipe(
1708
- retry(3),
1709
- catchError(this.handlerError),
1710
- map((res: any) => {
1711
- if (res.success) {
1712
- res.data = res.data.map(e => new MClasification(e));
1713
- }
1714
- return res;
1715
- })
1716
- );
1717
- }
1718
-
1719
- /**
1720
- * @description Obtiene el prefijo de los usuarios
1721
- * @param procede De que módulo procede
1722
- * @param codsis Código del sistema
1723
- * @return Observable<MUsuarioPrefijo[]>
1724
- * @author Carlos Albornoz
1725
- */
1726
- public getUserPrefix(filter: 'detail' = null, code: string = null): Observable<IResponse> {
1727
- return this.http.get<IResponse>(`${this.URL}/dao/cfg/control_numero_dao.php${
1728
- filter ? `?filter=${filter}&code=${code}` : ''
1729
- }`,
1730
- { headers: this.getHttpHeaders() }).pipe(
1731
- retry(3),
1732
- catchError(this.handlerError),
1733
- map((res: any) => {
1734
- if (res.success) {
1735
- res.data = res.data.map(e => new MUsuarioPrefijo(e));
1736
- }
1737
- return res;
1738
- })
1739
- );
1740
- }
1741
-
1742
-
1743
- /**
1744
- * @description Obtiene los pefijo
1745
- * @param procede De que módulo procede
1746
- * @param codsis Código del sistema
1747
- * @return Observable<MUsuarioPrefijo[]>
1748
- * @author DimalyCrespo 17-12-2022
1749
- */
1750
- public getPrefix(filter: 'all' | 'one' = null, code: string = null): Observable<IResponse> {
1751
-
1752
- return this.http.get<IResponse>(`${this.URL}/dao/cfg/control_numero_dao.php${
1753
- filter ? `?filter=${filter}&code=${code}` : ''
1754
- }`,
1755
- { headers: this.getHttpHeaders() }).pipe(
1756
- retry(3),
1757
- catchError(this.handlerError),
1758
- map((res: any) => {
1759
- if (res.success) {
1760
- res.data = res.data.map(e => new MPrefijo(e));
1761
- }
1762
- return res;
1763
- })
1764
- );
1765
- }
1766
-
1767
- /**
1768
- * @description Abre el dialog para buscar los proveedores
1769
- * @return Promise<MProveedor>
1770
- * @author Miguel Ramírez
1771
- */
1772
- public async openDialogProveedores(): Promise<MProveedor> {
1773
- let proveedores: MProveedor[] = await this.getProveedores().toPromise();
1774
- let dialogRef = this.dialog.open(CatalogoComponent, {
1775
- data: {
1776
- columns: ['tipo', 'rif', 'nombre'],
1777
- title: 'Catálogo de Proveedores y Beneficiarios',
1778
- dataSource: proveedores
1779
- } as ICatalogo,
1780
- width: '450px',
1781
- maxHeight: '90vh'
1782
- });
1783
-
1784
- return dialogRef.afterClosed().toPromise();
1785
- }
1786
-
1787
- /**
1788
- * @description Obtiene los proveedores
1789
- * @return Observable<MProveedor[]>
1790
- * @author Miguel Ramírez
1791
- */
1792
- public getProveedores(): Observable<MProveedor[]> {
1793
- let request: IRequest = {
1794
- operacion: 'obtenerData',
1795
- sigesp_conexion: {
1796
- servidor: this.URL,
1797
- usuario: this.usuarioActivo.getInterface()
1798
- }
1799
- }
1800
- return this.http.post<MProveedor[]>(`${this.URL}/dao/rpc/proveedor_beneficiario_dao.php`, request).pipe(
1801
- retry(3),
1802
- catchError(this.handlerError),
1803
- map((res: any) => res.map(element => new MProveedor(element)))
1804
- );
1805
- }
1806
-
1807
- /**
1808
- * @description Obtiene los proveedores y beneficiarios
1809
- * @Note Si quiere solo los datos basicos use los parametros ('S','P','N')
1810
- * @return Observable<IResponse>
1811
- * @author Carlos Albornoz
1812
- * @type ={'P','B','S'}
1813
- * @destination ={'P','B','C','A','N'}≈{Proveedor,Beneficiario,Contatista,Ambos,Ninguno}
1814
- * @account ={'S','N'} para traer las cuentas bancarias del proveedor por defecto esta en N
1815
- * @modificado 17-07-2023
1816
- */
1817
-
1818
- public getProvidersAndBeneficiaries(type: string ='default', destination:string=null, account:string='N'): Observable<IResponse> {
1819
- return this.http.get<IResponse>(`${this.URL}/dao/rpc/proveedor_beneficiario_dao.php${type ? `?provider_type=${type}` : ''}&destination=${destination}&account=${account}`,
1820
- { headers: this.getHttpHeaders() }).pipe(
1821
- retry(3),
1822
- catchError(this.handlerError),
1823
- map((res: any) => {
1824
- if (res.success) {
1825
- res.data = res.data.map(e => new MProviderBeneficiary(e));
1826
- }
1827
- return res;
1828
- })
1829
- );
1830
- }
1831
-
1832
-
1833
- /**
1834
- * @description Obtiene un Usuario segun su ID
1835
- * @return Observable<IResponse>
1836
- * @author Carlos Albornoz
1837
- */
1838
- public getUserById(id: number): Observable<IResponse> {
1839
- return this.http.get<IResponse>(`${this.URL}/dao/sss/usuario_dao.php?id=${id}`,
1840
- { headers: this.getHttpHeaders() }).pipe(
1841
- retry(3),
1842
- catchError(this.handlerError),
1843
- map((res: any) => {
1844
- if (res.success) {
1845
- res.data = new MUsuario(res.data);
1846
- }
1847
- return res;
1848
- })
1849
- );
1850
- }
1851
-
1852
- /**
1853
- * @description Obtiene los bancos
1854
- * @return Observable<IResponse>
1855
- * @author Carlos Albornoz
1856
- */
1857
- public getBanks(idEnterprise?:number): Observable<IResponse> {
1858
- return this.http.get<IResponse>(`${this.URL}/dao/scb/banco_dao.php?e=${idEnterprise}`,
1859
- { headers: this.getHttpHeaders() }).pipe(
1860
- retry(3),
1861
- catchError(this.handlerError),
1862
- map((res: any) => {
1863
- if (res.success) {
1864
- res.data = res.data.map(e => new MBank(e));
1865
- }
1866
- return res;
1867
- })
1868
- );
1869
- }
1870
-
1871
- /**
1872
- * @description Obtiene los tipos de cuenta bancarias
1873
- * @return Observable<IResponse>
1874
- * @author Carlos Albornoz
1875
- */
1876
- public getBankAccountTypes(): Observable<IResponse> {
1877
- return this.http.get<IResponse>(`${this.URL}/dao/scb/banco_tipo_cuenta_dao.php`,
1878
- { headers: this.getHttpHeaders() }).pipe(
1879
- retry(3),
1880
- catchError(this.handlerError),
1881
- map((res: any) => {
1882
- if (res.success) {
1883
- res.data = res.data.map(e => new MBankAccountType(e));
1884
- }
1885
- return res;
1886
- })
1887
- );
1888
- }
1889
-
1890
-
1891
- /**
1892
- * @description obtiene las cuenta segun el id
1893
- * @param tipo {'banco', 'default'}
1894
- * @param id para la opcion banco usar id=idBanco, opcion defaulf id=idEnterprise
1895
- * @returns
1896
- */
1897
- public getAllBankAccount(tipo:string,id:number){
1898
- return this.http.get(`${this.URL}/dao/scb/cuenta_banco_dao.php?tipo=${tipo}&e=${id}`,
1899
- {headers: this.getHttpHeaders()})
1900
- .pipe(
1901
- map((res:any) => {
1902
- if (res.success) {
1903
- res.data = res.data.map(element => new MCuentaBanco(element));
1904
- } else {
1905
- res.data = [];
1906
- }
1907
- return res
1908
- })
1909
- )
1910
- }
1911
-
1912
- /**
1913
- * @description Obtiene los bancos sigecof
1914
- * @return Observable<IResponse>
1915
- * @author Carlos Albornoz
1916
- */
1917
- public getSigecofBanks(): Observable<IResponse> {
1918
- return this.http.get<IResponse>(`${this.URL}/dao/sigesp/banco_sigecof_dao.php`,
1919
- { headers: this.getHttpHeaders() }).pipe(
1920
- retry(3),
1921
- catchError(this.handlerError),
1922
- map((res: any) => {
1923
- if (res.success) {
1924
- res.data = res.data.map(e => new MSigecofBank(e));
1925
- }
1926
- return res;
1927
- })
1928
- );
1929
- }
1930
-
1931
- /**
1932
- * @description Obtiene la configuracion de SOC
1933
- * @return Observable<IResponse>
1934
- * @author Carlos Albornoz
1935
- */
1936
- public getConfigSOC(): Observable<IResponse> {
1937
- return this.http.get<IResponse>(`${this.URL}/dao/soc/configuracion_dao.php`,
1938
- { headers: this.getHttpHeaders() }).pipe(
1939
- retry(3),
1940
- catchError(this.handlerError),
1941
- map((res: any) => {
1942
- if (res.success) {
1943
- res.data = new MConfigSOC(res.data);
1944
- }
1945
- return res;
1946
- })
1947
- );
1948
- }
1949
-
1950
- /**
1951
- * @description Obtiene los tipos de deduccion
1952
- * @return Observable<IResponse>
1953
- * @author Carlos Albornoz
1954
- */
1955
- public getDeductionTypes(): Observable<IResponse> {
1956
- return this.http.get<IResponse>(`${this.URL}/dao/stb/tipo_deduccion_dao.php`,
1957
- { headers: this.getHttpHeaders() }).pipe(
1958
- retry(3),
1959
- catchError(this.handlerError),
1960
- map((res: any) => {
1961
- if (res.success) {
1962
- res.data = res.data.map(e => new MDeductionType(e));
1963
- }
1964
- return res;
1965
- })
1966
- );
1967
- }
1968
-
1969
- public getIncomeAccounts(onlyAvailable: boolean = false): Observable<any>{
1970
- return this.http.get(`${this.URL}/dao/spi/cuentas_ingresos_dao.php${
1971
- onlyAvailable ? '?available=true' : ''
1972
- }`, {headers: this.getHttpHeaders()}).pipe(
1973
- map((res:any) => {
1974
- if (res.success) {
1975
- res.data = res.data.map(e => new MCuentaIngresos(e))
1976
- }
1977
- return res;
1978
- })
1979
- )
1980
- }
1981
-
1982
- public getCharges(){
1983
-
1984
- return this.http.get<IResponse>(
1985
- `${this.URL}/dao/stb/cargos_dao.php`,
1986
- { headers: this.getHttpHeaders() }
1987
- ).pipe(
1988
- map((res: IResponse) => {
1989
- if (res.success) {
1990
- res.data = res.data.map(e => new MCargo(e))
1991
- }
1992
- return res;
1993
- })
1994
- )
1995
-
1996
- }
1997
-
1998
- public getDeductions(){
1999
- return this.http.get<IResponse>(
2000
- `${this.URL}/dao/stb/deducciones_dao.php`,
2001
- { headers: this.getHttpHeaders() }
2002
- ).pipe(
2003
- map((res: IResponse) => {
2004
- if (res.success) {
2005
- res.data = res.data.map(e => new MDeduction(e))
2006
- }
2007
- return res;
2008
- })
2009
- )
2010
- }
2011
-
2012
- /**
2013
- * @description Obtiene la los datos de Empresa
2014
- * @return Observable<IResponse>
2015
- * @author Dimaly Crespo
2016
- *
2017
- */
2018
- public getCompany(tipo?:string,id?:number): Observable<IResponse> {
2019
- return this.http.get<IResponse>(`${this.URL}/dao/cfg/empresas_dao.php?tipo=${tipo}&id=${id}`,
2020
- { headers: this.getHttpHeaders() }).pipe(
2021
- map((res: any) => {
2022
- if (res.success) {
2023
- res.data = res.data.map(e => new MEmpresa(e));
2024
- }
2025
- return res;
2026
- })
2027
- );
2028
- }
2029
-
2030
- /**
2031
- * @description Obtiene los tipos de documentos registrados en CXP
2032
- * @return Observable<IResponse>
2033
- * @author Dimaly Crespo
2034
- * @date 20-07-2021
2035
- */
2036
- public getTiposDocumetos(): Observable<IResponse> {
2037
- return this.http.get<IResponse>(`${this.URL}/dao/cxp/tipo_documento_dao.php?operacion=${'buscar'}&existen=${'existen'}`,
2038
- { headers: this.getHttpHeaders() }).pipe(
2039
- retry(3),
2040
- catchError(this.handlerError),
2041
- map((res: any) => {
2042
- if (res.success) {
2043
- res.data = res.data.map(e => new MTipoDocumentoCXP(e));
2044
- }
2045
- return res;
2046
- })
2047
- );
2048
- }
2049
-
2050
- /**
2051
- * @param get toma los valores: [ idOrdenCompra ,'recepcion','existen','codigo', 'ordenesSOC', 'op', 'art' ]
2052
- * @param n codigo Documento Orden, se usa para obtener los detalles de la orden de compra, es obligatorio al combinar con la opcion get: idOrdenCompra
2053
- * @description 'recepcion': Obtine las ordenes de suministro,
2054
- * existe y codigo: Obtiene los codigos registrados,
2055
- * ordenesSOC: obtiene las ordenes de compra,
2056
- * op: obtiene las ordenes pendientes
2057
- * art: obtiene los articulos
2058
- * @return Observable<IResponse>
2059
- * @date 3-10-2021
2060
- * @returns
2061
- */
2062
- public getEntradaSuministros(get:any, n?:string): Observable<IResponse> {
2063
- return this.http.get<IResponse>(`${this.URL}/dao/siv/entrada_suministro_dao.php?get=${get}&n=${n}`,
2064
- { headers: this.getHttpHeaders() }).pipe(
2065
- retry(3),
2066
- catchError(this.handlerError),
2067
- map((res: any) => {
2068
- if (res.success) {
2069
- res.data = res.data.map(e => new MEntradaSuministros(e))
2070
- }
2071
- return res;
2072
- })
2073
- );
2074
- }
2075
- /**
2076
- * @description Obtiene los tipos de documentos registrados en CXP
2077
- * @return Observable<IResponse>
2078
- * @author Dimaly Crespo
2079
- * @date 20-07-2021
2080
- */
2081
-
2082
- public getConceptosCxP(){
2083
- return this.http.get<IResponse>(`${this.URL}/dao/cxp/concepto_dao.php?operacion=${'buscar'}`,
2084
- { headers: this.getHttpHeaders() }).pipe(
2085
- retry(3),
2086
- catchError(this.handlerError),
2087
- map((res: any) => {
2088
- if (res.success) {
2089
- res.data = res.data.map(e => new MConceptosCXP(e));
2090
- }
2091
- return res;
2092
- })
2093
- );
2094
- }
2095
-
2096
- /**
2097
- * @description Obtiene los los conceptos Retencion ISRL
2098
- * @return Observable<IResponse>
2099
- * @author Dimaly Crespo
2100
- * @date 26-07-2021
2101
- */
2102
-
2103
- public getConceptosRetencion(){
2104
- return this.http.get<IResponse>(`${this.URL}/dao/stb/deducciones_dao.php?code=${'conceptos'}`,
2105
- { headers: this.getHttpHeaders() }).pipe(
2106
- retry(3),
2107
- catchError(this.handlerError),
2108
- map((res: any) => {
2109
- if (res.success) {
2110
- res.data = res.data.map(e => new MConceptoRetencion(e));
2111
- }
2112
- return res;
2113
- })
2114
- );
2115
- }
2116
-
2117
- /**
2118
- * @description Obtiene la configuración de RRHH y de SNO
2119
- * @return Observable<IResponse>
2120
- * @author Dimaly Crespo
2121
- */
2122
- public obtenerConfiguracionSNO(){
2123
-
2124
- return this.http.get<IResponse>(`${this.URL}/dao/sno/configuracion_dao.php?tipo=${'configuracion'}`,
2125
- { headers: this.getHttpHeaders() }).pipe(
2126
- retry(3),
2127
- catchError(this.handlerError),
2128
- map((res: any) => {
2129
- if (res.success) {
2130
- if (res.data.length>0){
2131
- res.data = res.data.map(e => new MConfiguracionSNO(e));
2132
- }
2133
- }
2134
- return res;
2135
- })
2136
- );
2137
-
2138
- }
2139
-
2140
- /**
2141
- *
2142
- * @param tipo ['default', 'uno', 'cargos','linea'] dafault:Todas las nominas, uno: una nomina,
2143
- * 'cargos': nominas por cargos, 'linea': nominas activas por lineas
2144
- * @param id : Para los tipo: uno y cargos el id es idNomina. Para linea: id es el idEnterprise
2145
- * @returns array()
2146
- * @description Obtiene las nominas registradas
2147
- * @return Observable<IResponse>
2148
- * @date 20-10-21
2149
- * @actualizado 26-05-2024
2150
- *
2151
- */
2152
-
2153
- public getNomina(tipo:string,id?:number,act?:number){
2154
- return this.http.get<IResponse>(`${this.URL}/dao/sno/definicion_nomina_dao.php?tipo=${tipo}&id=${id}`,
2155
- { headers: this.getHttpHeaders() }).pipe(
2156
- map((res: any) => {
2157
- if (res.success) {
2158
- res.data = res.data.map(e => new MDefinicionNomina(e));
2159
- }
2160
- return res;
2161
- })
2162
- );
2163
- }
2164
-
2165
- /**
2166
- * @description Obtiene los cargos de las nomina
2167
- * @param tipo ['codigo','default'] ->codigo: obtiene el proximo codigo. ->default: obtiene todos los cargos de la nomina
2168
- * @param id id de la nomina
2169
- * @returns array()
2170
- */
2171
- public getCargosNomina(tipo:string,id?:number){
2172
- return this.http.get<IResponse>(`${this.URL}/dao/sno/asignacion_cargos_dao.php?tipo=${tipo}&id=${id}`,
2173
- { headers: this.getHttpHeaders() }).pipe(
2174
- retry(3),
2175
- catchError(this.handlerError),
2176
- map((res: any) => {
2177
- if (res.success) {
2178
- res.data = res.data.map(e => new MAsignacionCargo(e));
2179
- }
2180
- return res;
2181
- })
2182
- );
2183
- }
2184
-
2185
- /**
2186
- * @description Obtiene un personal de la nómina
2187
- * @return Observable<IResponse>
2188
- * @author Dimaly Crespo
2189
- */
2190
- public getPersonalSRH(tipo:string,id?:number){
2191
- return this.http.get<IResponse>(`${this.URL}/dao/sno/personal_dao.php?tipo=${tipo}&id=${id}`,
2192
- { headers: this.getHttpHeaders() }).pipe(
2193
- retry(3),
2194
- catchError(this.handlerError),
2195
- map((res: any) => {
2196
- if (res.success) {
2197
- res.data = res.data.map(e => new MPersonal(e));
2198
- }
2199
- return res;
2200
- })
2201
- );
2202
- }
2203
-
2204
- /**
2205
- * @description Obtiene las agencia de banco
2206
- * @return Observable<IResponse>
2207
- * @author Dimaly Crespo
2208
- */
2209
- public getAgenciaBanco(tipo:string,id?:number){
2210
- return this.http.get<IResponse>(`${this.URL}/dao/scb/agencia_dao.php?code=${tipo}&id=${id}`,
2211
- { headers: this.getHttpHeaders() }).pipe(
2212
- retry(3),
2213
- catchError(this.handlerError),
2214
- map((res: any) => {
2215
- if (res.success) {
2216
- res.data = res.data.map(e => new MAgenciaBanco(e));
2217
- }
2218
- return res;
2219
- })
2220
- );
2221
- }
2222
-
2223
- /**
2224
- * @description Obtiene la hojas de tiempo
2225
- * @return Observable<IResponse>
2226
- * @author Dimaly Crespo
2227
- */
2228
- public getHojaTiempo(tipo:string,idPersonal?:number,idNomina?:number){
2229
- return this.http.get<IResponse>(`${this.URL}/dao/sno/hoja_tiempo_dao.php?idPersonal=${idPersonal}&idNomina=${idNomina}`,
2230
- { headers: this.getHttpHeaders() }).pipe(
2231
- retry(3),
2232
- catchError(this.handlerError),
2233
- map((res: any) => {
2234
- if (res.success) {
2235
- res.data = res.data.map(e => new MHojaTiempo(e));
2236
- }
2237
- return res;
2238
- })
2239
- );
2240
- }
2241
-
2242
- /**
2243
- * @description Obtiene los clientes
2244
- * @return Observable<IResponse>
2245
- * @author Dimaly Crespo
2246
- * @tipo [basico,codigo,cedula]
2247
- *
2248
- */
2249
-
2250
- public getCliente(tipo: string ='default', id:number=0, codigo:string='', cedula:string=''): Observable<IResponse> {
2251
- return this.http.get<IResponse>(`${this.URL}/dao/sfv/client_dao.php?tipo=${tipo}&id=${id}&codigo=${codigo}&cedrifcli=${cedula}`,
2252
- { headers: this.getHttpHeaders() }).pipe(
2253
- map((res: any) => {
2254
- if (res.success) {
2255
- res.data = res.data.map(e => new MClient(e));
2256
- }
2257
- return res;
2258
- })
2259
- );
2260
- }
2261
-
2262
- /**
2263
- * @description Valida si la fecha esta dentro del periodo fiscal y el mes esta abierto o cerrado
2264
- * @return Observable<IResponse>
2265
- * @author Dimaly Crespo
2266
- * @author 11-10-2023
2267
- */
2268
- public getValidarPeriodo(fecha:string, periodoFiscal:string){
2269
- return this.http.get<IResponse>(`${this.URL}/dao/scg/configuracion_contabilidad_dao.php?fecha=${fecha}&periodo=${periodoFiscal}`,
2270
- { headers: this.getHttpHeaders() }).pipe(map((res: any) => { return res;}));
2271
- }
2272
-
2273
-
2274
-
2275
-
2276
-
2277
-
2278
- public userHasRights(column:'administrador' | 'insertar' | 'actualizar' | 'consultar'
2279
- | 'eliminar' | 'anular' |'descargar' | 'ejecutar__procesar_' | 'imprimir'
2280
- | 'enviar__correo_' | 'visible'){
2281
-
2282
- return this.http.get<IResponse>(
2283
- `${this.URL}/dao/sss/derechos_usuario_dao.php?idComponent=${
2284
- this.currentComponent.id
2285
- }&column=${column}`,
2286
- { headers: this.getHttpHeaders() }
2287
- )
2288
-
2289
- }
2290
-
2291
- /**
2292
- * @description Retorna los headers para hacer las peticiones
2293
- * @params type: Tipo MIME permitido por defecto se toma application/json
2294
- * @return HttpHeaders
2295
- * @author Miguel Ramírez
2296
- * @date-update: 15-06-2022
2297
- */
2298
- public getHttpHeaders(type?:string): HttpHeaders {
2299
- !type? type='application/json':'';
2300
- const headers = new HttpHeaders({
2301
- 'Content-Type': type,
2302
- 'Authorization': `${this.usuarioActivo.token}`
2303
- });
2304
- return headers;
2305
- }
2306
-
2307
- /**
2308
- * @description Obtiene el servidor guardado en el sessionStorage
2309
- * @return string
2310
- * @author Miguel Ramírez
2311
- */
2312
- public getServer(): string {
2313
- return this.URL;
2314
- }
2315
-
2316
- /**
2317
- * @description Obtiene el usuario guardado en el sessionStorage
2318
- * @return MUsuario
2319
- * @author Miguel Ramírez
2320
- */
2321
- public async getUser() {
2322
- let conexion: IConexion = await (sessionStorage.getItem('user')) ? JSON.parse(atob(sessionStorage.getItem('user'))) : null;
2323
- //console.log(conexion)
2324
- // debugger
2325
- if (conexion) {
2326
- this.usuarioActivo = new MUsuario(conexion.usuario);
2327
- this.URL = conexion.servidor;
2328
- }
2329
-
2330
- }
2331
-
2332
- /**
2333
- * @description Muestra un toast de success
2334
- * @param message Mensaje que se va a mostrar
2335
- * @return void
2336
- * @author Miguel Ramírez
2337
- */
2338
- public showToastSuccess(message: string): void {
2339
- this.toast.success(message);
2340
- }
2341
-
2342
- /**
2343
- * @description Muestra un toast de error
2344
- * @param message Mensaje que se va a mostrar
2345
- * @return void
2346
- * @author Miguel Ramírez
2347
- */
2348
- public showToastError(message: string): void {
2349
- this.toast.error(message);
2350
- }
2351
-
2352
- /**
2353
- * @description Muestra un sweetalert2 de éxito
2354
- * @param message Mensaje que se va a mostrar
2355
- * @return void
2356
- * @date 22-11-2021
2357
- */
2358
- public showToastSuccessSwal(message: string): void {
2359
- Swal.fire({
2360
- icon: 'success',
2361
- title: 'Éxito',
2362
- text: message,
2363
- })
2364
- }
2365
-
2366
-
2367
-
2368
- /**
2369
- * @description Muestra un sweetalert2 de error
2370
- * @param message Mensaje que se va a mostrar
2371
- * @return void
2372
- * @date 22-11-2021
2373
- */
2374
- public showToastErrorSwal(message: string): void {
2375
- Swal.fire({
2376
- icon: 'error',
2377
- title: '¡Error!',
2378
- text: message,
2379
-
2380
- })
2381
- }
2382
-
2383
- /**
2384
- * @description Guarda el usuario logueado en el SessionStorage
2385
- * @param user Usuario que se va a guardar en el SessionStorage
2386
- * @return void
2387
- * @author Miguel Ramírez
2388
- */
2389
- public saveUser(data: IConexion): void {
2390
- this.usuarioActivo = new MUsuario(data.usuario);
2391
- this.URL = data.servidor;
2392
- let encryptedUser: string = btoa(JSON.stringify(data));
2393
- sessionStorage.setItem('user', encryptedUser);
2394
- }
2395
-
2396
- /**
2397
- * @description Sete a la url a la cual se le van a realizar peticiones al backEnd
2398
- * @param url URl donde se van a realizar las peticiones
2399
- * @return void
2400
- * @author Miguel Ramírez
2401
- */
2402
- public setUrl(url: string): void {
2403
- this.URL = url;
2404
- }
2405
-
2406
- /**
2407
- * @description Inicializa el servicio de sigesp
2408
- * @return void
2409
- * @author Miguel Ramírez
2410
- */
2411
- public init(): void {
2412
- // Verificamos si hay un usuario en la sessionStorage, esto es necesario para recargar la página
2413
- if (sessionStorage.getItem('user')) {
2414
- // console.log(sessionStorage.getItem('user'))
2415
- this.getUser();
2416
- }
2417
- }
2418
-
2419
- /**
2420
- * @description Verifica si un usuario está logueado
2421
- * @return Promise<boolean>
2422
- * @author Miguel Ramírez
2423
- */
2424
- public async isLogged(): Promise<boolean> {
2425
- return new Promise((resolve, reject) => {
2426
- if (sessionStorage.getItem('user')) {
2427
- resolve(true)
2428
- } else {
2429
- resolve(false)
2430
- }
2431
- })
2432
- }
2433
-
2434
- private handlerError(error: HttpErrorResponse): any {
2435
- return throwError('Ocurrió un error')
2436
- }
2437
-
2438
- /**
2439
- * @description obtiene el personal segun filtro
2440
- * @return Observable<IResponse>
2441
- * @date 15-11-2021
2442
- * @param tipo: valores ['catalogo','catalogoSno','default','nomina','responsables']
2443
- * @params dato:object {nombre:string, apellido:string, cedula.string} use para la opcion 'catalogo' o 'catalogoSno'
2444
- */
2445
- public getPersonal(tipo:string, dato?:any){
2446
- let cedula='';
2447
- let nombre='';
2448
- let apellido='';
2449
- let idEnterprise=0;
2450
- if(dato){
2451
- cedula=dato.cedula
2452
- nombre=dato.nombre
2453
- apellido=dato.apellido
2454
- idEnterprise=dato.idEnterprise
2455
- }
2456
- return this.http.get<IResponse>(`${this.URL}/dao/sno/personal_dao.php?tipo=${tipo}&cedula=${cedula}&nombre=${nombre}&apellido=${apellido}&e=${idEnterprise}`,
2457
- { headers: this.getHttpHeaders() }).pipe(
2458
- retry(3),
2459
- catchError(this.handlerError),
2460
- map((res: any) => {
2461
- if (res.success) {
2462
- res.data = res.data.map(e => new MPersonal(e));
2463
- }
2464
- return res;
2465
- })
2466
- );
2467
- }
2468
-
2469
- /**
2470
- * @description obtener personal Nomina segun filtro
2471
- * @return Observable<IResponse>
2472
- * @date 15-11-2021
2473
- * * @param tipo: valores ['catalogo','default','nomina']
2474
- * @params dato:object {nombre:string, apellido:string, cedula.string} use para la opcion 'catalogo'
2475
-
2476
- */
2477
- public getPersonalNomina(tipo:string,dato?:any){
2478
- let cedula='';
2479
- let nombre='';
2480
- let apellido='';
2481
- let idEnterprise=0;
2482
- let idNomina=0;
2483
- if(dato){
2484
- cedula=dato.cedula
2485
- nombre=dato.nombre
2486
- apellido=dato.apellido
2487
- idEnterprise=dato.idEnterprise
2488
- idNomina=dato.idNomina
2489
- }
2490
- return this.http.get<IResponse>(`${this.URL}/dao/sno/asignacion_personal_nomina_dao.php?
2491
- tipo=${tipo}&cedula=${cedula}&nombre=${nombre}&apellido=${apellido}&idNomina=${idNomina}&idEnterprise=${idEnterprise}`,
2492
- { headers: this.getHttpHeaders() }).pipe(
2493
- map((res: any) => {
2494
- if (res.success) {
2495
- res.data = res.data.map(e => new MPersonalNomina(e));
2496
- }
2497
- return res;
2498
- })
2499
- );
2500
- }
2501
-
2502
-
2503
- /**
2504
- * @param idPersonal: id del personal
2505
- * @param tipo: valores['nomina_personal']
2506
- * @description Obtiene las nominas del personal resumida
2507
- * @deprecated; 20-01-22
2508
- * @returns
2509
- */
2510
-
2511
- public getPersonalNominaResumida(idPersonal:number,tipo:string){
2512
- return this.http.get<IResponse>(`${this.URL}/dao/sno/personal_dao.php?idPersonal=${idPersonal}&tipo=${tipo}`,
2513
- { headers: this.getHttpHeaders() }).pipe(
2514
- map((res: any) => {
2515
- if (res.success) {
2516
- res.data = res.data.map(e => new MNominaSimple(e));
2517
- }
2518
- return res;
2519
- })
2520
- );
2521
- }
2522
-
2523
- /**
2524
- * @description Obtiene el Json Sistemas para el usuario definido segun su permisologia del Sistema
2525
- * @return Json data
2526
- * @author Ing. Dimaly Crespo
2527
- */
2528
- public getPerfilSistema(id_usuario:number ){
2529
- return this.http.get(`${this.URL}/dao/sss/usuarios_sistemas_dao.php?id_usuario=${id_usuario}`,
2530
- { headers: this.getHttpHeaders() }).pipe(
2531
- map((res: any) => {
2532
- if(res.data.length>0){
2533
- res.data = res.data.map(e => new MUsuarioSistema(e));
2534
- }
2535
- return res;
2536
- })
2537
-
2538
- );
2539
-
2540
- }
2541
-
2542
-
2543
- /**
2544
- * @description Obtiene el Json Menu para el usuario definido segun su permisologia del Sistema
2545
- * @return Json data
2546
- * @author Ing. Wilmer Briceno
2547
- */
2548
- public getPerfilNoComponent(id_usuario:number,sistema:string, nameComponent: string ){
2549
- return this.http.get(`${this.URL}/dao/sss/derechos_usuario_dao.php?id_usuario=${id_usuario}&sistema=${sistema}&namecomponent=${nameComponent}`,
2550
- { headers: this.getHttpHeaders() }).pipe(
2551
- map((res: any) => {
2552
- return res;
2553
- })
2554
- );
2555
-
2556
- }
2557
-
2558
- /**
2559
- * @description Obtiene el Json Menu para el usuario definido segun su permisologia del Sistema
2560
- * @return Json data
2561
- * @author Ing. Wilmer Briceno
2562
- */
2563
- public getJsonMenu(id_usuario:number,sistema:string){
2564
- return this.http.get(`${this.URL}/dao/sss/menu_dao.php?id_usuario=${id_usuario}&sistema=${sistema}`,
2565
- { headers: this.getHttpHeaders() }).pipe(
2566
- map((res: any) => {
2567
- this.userMenu = res.data;
2568
- return this.userMenu;
2569
- })
2570
- );
2571
-
2572
- }
2573
-
2574
- /**
2575
- * @description Obtiene el Json Menu para el usuario definido segun su permisologia del Sistema
2576
- * @return Json data
2577
- * @author Ing. Wilmer Briceno
2578
- */
2579
- public log(body: MLog ){
2580
-
2581
- return this.http.post(`${this.URL}/dao/sss/log_dao.php`, body , {
2582
- headers: this.getHttpHeaders()
2583
- }).pipe(
2584
- map((res: any) => {
2585
-
2586
- return res;
2587
- })
2588
- )
2589
-
2590
- }
2591
-
2592
-
2593
-
2594
- /**
2595
- * @name EncryptData
2596
- * @description Enscripta una expresion data
2597
- * @author Ing. Wilmer Briceño
2598
- */
2599
- public EncryptData( expresion : string){
2600
- const key = CryptoJS.enc.Utf8.parse ("0123456789SIGESP"); // número hexadecimal de 16 dígitos como clave
2601
- const iv = CryptoJS.enc.Utf8.parse ('SIGESP0123456789'); // Número hexadecimal como desplazamiento de clave
2602
- let srcs = CryptoJS.enc.Utf8.parse(expresion);
2603
- let encrypted = CryptoJS.AES.encrypt(srcs, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 });
2604
- return encrypted.ciphertext.toString().toUpperCase();
2605
- }
2606
-
2607
- /**
2608
- * @name DecryptData
2609
- * @description Desencripta una expresion data
2610
- * @author Ing. Wilmer Briceño
2611
- */
2612
- public DecryptData( expresion : string){
2613
- const key = CryptoJS.enc.Utf8.parse ("0123456789SIGESP"); // número hexadecimal de 16 dígitos como clave
2614
- const iv = CryptoJS.enc.Utf8.parse ('SIGESP0123456789'); // Número hexadecimal como desplazamiento de clave
2615
- let encryptedHexStr = CryptoJS.enc.Hex.parse(expresion);
2616
- let srcs = CryptoJS.enc.Base64.stringify(encryptedHexStr);
2617
- let decrypt = CryptoJS.AES.decrypt(srcs, key, { iv: iv, mode: CryptoJS.mode.CBC, padding: CryptoJS.pad.Pkcs7 });
2618
- let decryptedStr = decrypt.toString(CryptoJS.enc.Utf8);
2619
- return decryptedStr.toString();
2620
- }
2621
-
2622
-
2623
- /**
2624
- * @name getResponsePerfilToolbar
2625
- * @description Metodo que obtiene una respuesta true o false basado en una estructura sring binanria segun
2626
- * la posicion dada del toolbar. se pasa string binario que contiene 1 y 0 en representacion
2627
- * de las propiestades administrador,consultar,ejecutar,imprimir etc ... cada posicion secuencial
2628
- * si esta en 1 es true y 0 en false y devuleve el valor segun lo requiera el usuario:
2629
- * stringbinario : '1011' y posicion es 2, por tanto se tare 0 y es false que representa opcion consultar.
2630
- * Estructura string binario:
2631
- * Posición :
2632
- * 0. Administrador 6. Descargar 12. Reversar aprobar 18. Reversar anular contabilizado
2633
- * 1. insertar 7. Ejecutar 13. Anular.
2634
- * 2. Actualizar 8. Enviar 14. reversar anular
2635
- * 3. consultar 9. Imprimir 15. contabilizar
2636
- * 4. Eliminar 10. Visible 16. reversar contabilizar
2637
- * 5. Anular 11. Aprobar 17. anular contabilizado
2638
- *
2639
- * @author Ing. Wilmer Briceño
2640
- */
2641
- public getResponsePerfilToolbar( stringbinario : string, position : number ){
2642
- let binario = stringbinario.substring(position,position+1) ;
2643
- if (binario=="1"){
2644
- return true;
2645
- }
2646
- return false;
2647
- }
2648
-
2649
- /**
2650
- * @description Obtiene el Ip del cliente
2651
- * @return Json data
2652
- * @author Ing. Wilmer Briceno
2653
- */
2654
- public getIPAddress(){
2655
-
2656
- return this.http.get("http://api.ipify.org/?format=json")
2657
- .pipe(
2658
- catchError((err) => {
2659
- console.log('error caught in service')
2660
- console.error(err);
2661
- sessionStorage.setItem('ip_adress', '127.0.0.1');
2662
- //Handle the error here
2663
-
2664
- return throwError(err); //Rethrow it back to component
2665
- })
2666
- );
2667
-
2668
- }
2669
- /**
2670
- * @description Obtiene el Ip del cliente
2671
- * @return Json data
2672
- * @author Ing. Wilmer Briceno
2673
- */
2674
- public setIpAdress(){
2675
- this.getIPAddress().subscribe( (resp: any) => {
2676
- sessionStorage.setItem('ip_adress', resp.ip);
2677
- this.ip_adress = resp.ip;
2678
- });
2679
- }
2680
- /**
2681
- * @description Obtiene el Ip del cliente
2682
- * @return Json data
2683
- * @author Ing. Wilmer Briceno
2684
- */
2685
- public getIpAdress(){
2686
- this.ip_adress = sessionStorage.getItem('ip_adress');
2687
- }
2688
-
2689
- /**
2690
- * @description Obtiene el Ip del cliente
2691
- * @return Json data
2692
- * @dia 19-05-2022
2693
- */
2694
-
2695
- public createAuditoria(sno:MSnoLog[]){
2696
- let body=[];
2697
- sno.forEach(e=> {body.push(e.dataInteface())});
2698
- return this.http.post<IResponse>(`${this.URL}/dao/sno/seguridad_dao.php?`,body,
2699
- { headers: this.getHttpHeaders()})
2700
- .pipe(
2701
- map((res: any) => {return res;})
2702
- );
2703
- }
2704
-
2705
- /**
2706
- * @description Obtiene los tipos de depositos *
2707
- * @param procede : procede del modulo
2708
- * @param idArticulo : id del articulo
2709
- * @param idUsuario : id usuario permitido
2710
- * @returns
2711
- * @author Javier Tovar
2712
- * @date 23-11-2022
2713
- */
2714
- public getDepositType(procede:string,idArticulo:number,idUsuario?:number){
2715
- return this.http.get<IResponse>(`${this.URL}/dao/siv/catalogo_parametrizado_dao.php?get=${procede}&id=${idArticulo}&i=${idUsuario}`,
2716
- { headers: this.getHttpHeaders() }).pipe(
2717
- map((res: any) => {
2718
- if (res.success) {
2719
- res.data = res.data.map(e => new MTipoDepositos(e));
2720
- }
2721
- return res;
2722
- })
2723
- );
2724
- }
2725
-
2726
- /**
2727
- * @description Obtiene Cargos Adicionales *
2728
- * @param tipo : one,default
2729
- * @param id : id del cargo
2730
- * @returns
2731
- * @author Dimaly Crespo
2732
- * @date 13-11-2022
2733
- */
2734
- public getCargosAdicionales(tipo:string,id?:number){
2735
- return this.http.get<IResponse>(`${this.URL}/dao/stb/cargos_adicionales_dao.php?tipo=${tipo}&id=${id}`,
2736
- { headers: this.getHttpHeaders() }).pipe(
2737
- map((res: any) => {
2738
- if (res.success) {
2739
- res.data = res.data.map(e => new MCargosAdicionales(e));
2740
- }
2741
- return res;
2742
- })
2743
- );
2744
- }
2745
-
2746
-
2747
- /**
2748
- * @description Obtiene los release
2749
- * @param tipo : release (obtiene el ultimo release del sistema),verificar(verifica si se ejecuto el ultimo release)
2750
- * @param sistema : sistema
2751
- * @param seccion : tipo 'RELEASE'
2752
- * @returns string
2753
- * @author Dimaly Crespo
2754
- * @date 21-06-2024
2755
- */
2756
- public getVerificarRelease(tipo:string,sistema:string,seccion:string=null){
2757
- return this.http.get<IResponse>(`${this.URL}/dao/ins/instala_dao.php?tipo=${tipo}&sistema=${sistema}&seccion=${seccion}`,
2758
- { headers: this.getHttpHeaders() }).pipe(
2759
- map((res: any) => {return res;})
2760
- );
2761
- }
2762
- }
2763
-
2764
-
2765
- interface filtroCuentasPresupuesto {
2766
- tipo?: 'E' | 'R',
2767
- estado?: 'C' | 'S'
2768
- }
2769
-
2770
-