diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index cbe7469ca..de8677cf2 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -6308,7 +6308,7 @@ Public Class ClsContabilidad
End Function
- Public Function GetEstadosAnuallHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer) As Boolean
+ Public Function GetEstadosAnualHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno = False
DataAdapter("PA_Conta2_EstadoResultadosAnualHorizontal")
@@ -6334,5 +6334,34 @@ Public Class ClsContabilidad
Return Retorno
End Function
+
+ Public Function GetEstadosSubProyectoHorizontal(FechaI As Date, FechaF As Date, CveSubProyecto As Integer, Divisor As Integer, CveEmpresa As Integer, CveUsuario As Integer, Optional Tipo As Integer = 1) As Boolean
+ Dim Retorno = False
+
+ DataAdapter("PA_Conta2_EstadoResultadosSubProyectolHorizontal")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@FechaI", SqlDbType.Date).Value = FechaI
+ .Add("@FechaF", SqlDbType.Date).Value = FechaF
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
+ .Add("@Divisor", SqlDbType.Int).Value = Divisor
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
+ .Add("@Tipo", SqlDbType.Int).Value = Tipo
+
+ End With
+
+ SqlAdapter.SelectCommand.CommandTimeout = 0
+
+ Try
+ SqlAdapter.Fill(DSet)
+ Retorno = True
+ Catch ex As Exception
+ Me.OnError("Ocurrió un error al obtener el Estado de resultados anual horizontal", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End Try
+
+ Return Retorno
+ End Function
+
#End Region
End Class
\ No newline at end of file
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 1fefdd172..2c4321a39 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -5138,55 +5138,43 @@ Public Class ClsPaginas
'limpio ReportViwer
Dim sw As New System.Diagnostics.Stopwatch()
sw.Start()
- 'Dim Bytes As Byte() = Nothing
- 'Try
- ' Dim fllreport As New ADSReportLib.FullTrustReportviewer()
- ' fllreport.Initialize("DisplayName", RutaReporte, Parametros, New List(Of String()), True)
- ' For Each RDS As ReportDataSource In DataSource
- ' fllreport.AddDataSources(RDS)
- ' Next
- ' Dim Warnings As Warning() = Nothing
- ' Dim StreamIds As String() = Nothing
- ' Dim MimeType As String = Nothing
- ' Dim Encoding As String = Nothing
- ' Dim Extension As String = Nothing
- ' Bytes = fllreport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds, Warnings)
- ' fllreport = Nothing
- 'Catch ex As Microsoft.Reporting.WebForms.ScriptManagerNotFoundException
- ' GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}")
- ' 'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
- ' 'GuardaLog($"Error: {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
- 'Catch ex As Exception
- ' GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}")
- ''HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
- ''GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
- 'End Try
-
- If IsNothing(MR) Then MR = New ReportViewer
-
Dim Bytes As Byte() = Nothing
+
+
+ Dim setup As AppDomainSetup = New AppDomainSetup
+ With setup
+ .ApplicationBase = Environment.CurrentDirectory
+ .LoaderOptimization = LoaderOptimization.MultiDomainHost
+ End With
+ setup.SetCompatibilitySwitches({"NetFx40_LegacySecurityPolicy"})
+ Dim _casPolicyEnabledDomain As AppDomain = AppDomain.CreateDomain("Full Trust", Nothing, setup)
+
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)
+ 'For Each _ReportDataSource As ReportDataSource In DataSources
+ ' rvNextgenReport2.AddDataSources(_ReportDataSource.Name, CType(_ReportDataSource.Value, DataTable))
+ '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)
+ Dim bdir As String = AppDomain.CurrentDomain.BaseDirectory
+ RutaReporte.Replace("/", "\")
+ If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
+ RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
+ End If
+ fllreport.Initialize("DisplayName", RutaReporte, Parametros.AsEnumerable(), New List(Of String()), True)
For Each RDS As ReportDataSource In DataSource
- MR.LocalReport.DataSources.Add(RDS)
+ fllreport.AddDataSources(RDS.Name, DirectCast(RDS.Value, DataTable))
Next
- 'Dim permissions As New Security.PermissionSet(Security.Permissions.PermissionState.None)
- 'permissions.AddPermission(New Security.Permissions.FileIOPermission(Security.Permissions.PermissionState.Unrestricted))
- 'permissions.AddPermission(New Security.Permissions.SecurityPermission(Security.Permissions.SecurityPermissionFlag.Execution))
- 'MR.LocalReport.SetBasePermissionsForSandboxAppDomain(permissions)
-
- MR.LocalReport.ReportPath = RutaReporte
- MR.ProcessingMode = ProcessingMode.Local
- MR.LocalReport.EnableExternalImages = True
- MR.LocalReport.SetParameters(Parametros)
- MR.LocalReport.Refresh()
Dim Warnings As Warning() = Nothing
Dim StreamIds As String() = Nothing
Dim MimeType As String = Nothing
Dim Encoding As String = Nothing
Dim Extension As String = Nothing
- Bytes = MR.LocalReport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds, Warnings)
-
+ Bytes = fllreport.Render(Formato, Nothing, MimeType, Encoding, Extension, StreamIds)
+ fllreport = Nothing
Catch ex As Microsoft.Reporting.WebForms.ScriptManagerNotFoundException
GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}")
'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
@@ -5195,9 +5183,9 @@ Public Class ClsPaginas
GuardaLog($"Error: { If(ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, ex.Message) } | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))} - Ruta {RutaReporte}")
'HAY QUE VALIDAR QUE LOS OBJETOS QUE SE USAN PARA GUARDAR LOG EXISTEN!!! IPP 14 AGOSTO 2017
'GuardaLog($"Error {ex.InnerException.Message} | Descripcion: {If(ex.InnerException.InnerException IsNot Nothing, ex.InnerException.InnerException.Message, "Sin descripcion")} - Ruta {RutaReporte}")
+ Finally
+ AppDomain.Unload(_casPolicyEnabledDomain)
End Try
- MR.LocalReport.ReleaseSandboxAppDomain()
- MR.Dispose()
sw.Stop()
If sw.Elapsed.TotalSeconds > 10 Then
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index a137a7432..25548fcf6 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -1372,10 +1372,17 @@ Partial Class Bancos_IE
BtnGuardar.Enabled = True
End Sub
- Protected Sub DdlCuenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuenta.SelectedIndexChanged
- 'si solo es de egreso el movimiento debe de generar el siguiente folio.
+ Protected Sub DdlCuenta_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCuenta.SelectedIndexChanged
+ 'si solo es de egreso el movimiento debe de generar el siguiente folio.
+
+ Dim ExistenComplementosVigentes As Boolean = VerificaComplementos(True)
+ Dim ActualizaCuenta As Boolean = False
+
+ If (Not ExistenComplementosVigentes) And UsuarioActual.TienePermisoProceso(99) And BtnActualizar.Visible = True Then
+ ActualizaCuenta = True
+ End If
- If HdnTipoTransaccion.Value = "Egs" AndAlso UsuarioActual.Empresa.Funcionalidad(505) <> "1" Or Opcion = "DevDinC" Then
+ If HdnTipoTransaccion.Value = "Egs" AndAlso UsuarioActual.Empresa.Funcionalidad(505) <> "1" Or Opcion = "DevDinC" Or ActualizaCuenta Then
Dim Folio As Long
Dim Banco As New ClsBancos
@@ -5608,7 +5615,7 @@ Partial Class Bancos_IE
Protected Sub GvM_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
- If e.Row.DBCampo("CveVenta").ToString.ToEntero > 0 AndAlso e.Row.DBCampo("CveCliente").ToString.ToEntero > 0 AndAlso e.Row.DBCampo("ImporteMN").ToString.ToDecimal > 0 AndAlso e.Row.DBCampo("CveConceptoContable").ToString.ToEntero = 2 AndAlso e.Row.DBCampo("Saldo").ToString.ToDecimal = 0 Then
+ If e.Row.DBCampo("CveVenta").ToString.ToEntero > 0 AndAlso e.Row.DBCampo("CveCliente").ToString.ToEntero > 0 AndAlso e.Row.DBCampo("ImporteMN").ToString.ToDecimal > 0 AndAlso e.Row.DBCampo("CveConceptoContable").ToString.ToEntero = 2 Then
e.Row.FCLinkButton("LnkCancelaMovimiento").Visible = True
End If
End If
diff --git a/Bin/ADSReportLib.dll b/Bin/ADSReportLib.dll
index d1edd2a16..dc5473fe4 100644
Binary files a/Bin/ADSReportLib.dll and b/Bin/ADSReportLib.dll differ
diff --git a/Bin/ADSReportLib.pdb b/Bin/ADSReportLib.pdb
index 9b46fdb6d..c7ff8b159 100644
Binary files a/Bin/ADSReportLib.pdb and b/Bin/ADSReportLib.pdb differ
diff --git a/Bin/Microsoft.ReportViewer.WebForms.dll b/Bin/Microsoft.ReportViewer.WebForms.dll
new file mode 100644
index 000000000..8dfaf553b
Binary files /dev/null and b/Bin/Microsoft.ReportViewer.WebForms.dll differ
diff --git a/Compras/Compras.aspx b/Compras/Compras.aspx
index b0c19e93b..5278e8d44 100644
--- a/Compras/Compras.aspx
+++ b/Compras/Compras.aspx
@@ -2815,9 +2815,9 @@
-
-
-
+
+
+
diff --git a/Contabilidad2/RepEstadoResultadosHorizontal.aspx b/Contabilidad2/RepEstadoResultadosHorizontal.aspx
index 04fb69647..8078f7a8f 100644
--- a/Contabilidad2/RepEstadoResultadosHorizontal.aspx
+++ b/Contabilidad2/RepEstadoResultadosHorizontal.aspx
@@ -61,7 +61,7 @@