diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index de8677cf2..a996d38e7 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5961,6 +5961,31 @@ Public Class ClsContabilidad Return Retorno End Function + Public Function CierreEjercicio(CveEmpresa As Integer, Ejercicio As Integer, CveCuentaCierre As Integer, FechaI As String, FechaF As String, CveUsuario As Integer) As Integer + Dim Retorno As Integer = -1 + + DataAdapter("PA_Conta_CierreEjercicio") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Ejercicio", SqlDbType.Int).Value = Ejercicio + .Add("@CveCuentaCierre", SqlDbType.Int).Value = CveCuentaCierre + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.DateTime).Value = FechaF + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CvePrePoliza", SqlDbType.Int).Direction = ParameterDirection.Output + End With + + Try + SqlAdapter.Fill(Data) + Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePoliza").Value.ToString.ToEntero + Catch ex As Exception + Me.OnError("Ocurrió un error al eliminar el catálogo de Conta Ejercicios", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function + #Region " RECONSTRUCCION DE PREPOLIZAS " Public Function ReconstruirPP_PagoCompra(CvePrePoliza As Integer) As Boolean Dim Retorno = False diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 2c4321a39..1a93bab94 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -5148,7 +5148,7 @@ Public Class ClsPaginas End With setup.SetCompatibilitySwitches({"NetFx40_LegacySecurityPolicy"}) Dim _casPolicyEnabledDomain As AppDomain = AppDomain.CreateDomain("Full Trust", Nothing, setup) - + Dim fllreport As ADSReportLib.FullTrustReportviewer = Nothing Try 'Dim rvNextgenReport2 As WebReportviewer.FullTrustReportviewer = CType(_casPolicyEnabledDomain.CreateInstanceFromAndUnwrap(GetType(WebReportviewer.FullTrustReportviewer).Assembly.CodeBase, GetType(WebReportviewer.FullTrustReportviewer).FullName), WebReportviewer.FullTrustReportviewer) 'rvNextgenReport2.Initialize(DisplayName, ReportPath, Visible, reportParam, reportRenderFormat, DeviceInfo, repMainContent, repSubContent) @@ -5158,7 +5158,8 @@ Public Class ClsPaginas 'Next 'Return rvNextgenReport2.Render(reportRenderFormat, DeviceInfo) - Dim fllreport As ADSReportLib.FullTrustReportviewer = CType(_casPolicyEnabledDomain.CreateInstanceFromAndUnwrap(GetType(ADSReportLib.FullTrustReportviewer).Assembly.CodeBase, GetType(ADSReportLib.FullTrustReportviewer).FullName), ADSReportLib.FullTrustReportviewer) + fllreport = CType(_casPolicyEnabledDomain.CreateInstanceFromAndUnwrap(GetType(ADSReportLib.FullTrustReportviewer).Assembly.CodeBase, GetType(ADSReportLib.FullTrustReportviewer).FullName), ADSReportLib.FullTrustReportviewer) + Dim bdir As String = AppDomain.CurrentDomain.BaseDirectory RutaReporte.Replace("/", "\") If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then @@ -5186,6 +5187,7 @@ Public Class ClsPaginas Finally AppDomain.Unload(_casPolicyEnabledDomain) End Try + If fllreport IsNot Nothing Then fllreport.liberarecursos() sw.Stop() If sw.Elapsed.TotalSeconds > 10 Then diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index fe9532a54..d45920d09 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -2986,8 +2986,6 @@ Namespace Modelos If ObjConta.DtResultados.Rows.Count > 0 Then 'Conta ContPAQ IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero - 'Conta SIG - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCtaContableSIG").ToString.ToEntero End If End If diff --git a/Bin/ADSReportLib.dll b/Bin/ADSReportLib.dll index dc5473fe4..3431176b1 100644 Binary files a/Bin/ADSReportLib.dll and b/Bin/ADSReportLib.dll differ diff --git a/Bin/ADSReportLib.pdb b/Bin/ADSReportLib.pdb index c7ff8b159..be65cba71 100644 Binary files a/Bin/ADSReportLib.pdb and b/Bin/ADSReportLib.pdb differ diff --git a/Contabilidad2/CatContaEjercicios.aspx b/Contabilidad2/CatContaEjercicios.aspx index edd8f515f..c61ecab0a 100644 --- a/Contabilidad2/CatContaEjercicios.aspx +++ b/Contabilidad2/CatContaEjercicios.aspx @@ -24,7 +24,7 @@ @@ -33,12 +33,17 @@ - + + + + + + - + @@ -60,14 +65,33 @@