This commit is contained in:
Antonio Gonzalez
2020-04-01 14:52:41 -07:00
6 changed files with 1100 additions and 1070 deletions

View File

@@ -5148,7 +5148,7 @@ Public Class ClsPaginas
End With End With
setup.SetCompatibilitySwitches({"NetFx40_LegacySecurityPolicy"}) setup.SetCompatibilitySwitches({"NetFx40_LegacySecurityPolicy"})
Dim _casPolicyEnabledDomain As AppDomain = AppDomain.CreateDomain("Full Trust", Nothing, setup) Dim _casPolicyEnabledDomain As AppDomain = AppDomain.CreateDomain("Full Trust", Nothing, setup)
Dim fllreport As ADSReportLib.FullTrustReportviewer = Nothing
Try Try
'Dim rvNextgenReport2 As WebReportviewer.FullTrustReportviewer = CType(_casPolicyEnabledDomain.CreateInstanceFromAndUnwrap(GetType(WebReportviewer.FullTrustReportviewer).Assembly.CodeBase, GetType(WebReportviewer.FullTrustReportviewer).FullName), WebReportviewer.FullTrustReportviewer) '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) 'rvNextgenReport2.Initialize(DisplayName, ReportPath, Visible, reportParam, reportRenderFormat, DeviceInfo, repMainContent, repSubContent)
@@ -5158,7 +5158,8 @@ Public Class ClsPaginas
'Next 'Next
'Return rvNextgenReport2.Render(reportRenderFormat, DeviceInfo) '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 Dim bdir As String = AppDomain.CurrentDomain.BaseDirectory
RutaReporte.Replace("/", "\") RutaReporte.Replace("/", "\")
If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then If Not RutaReporte.ToUpper().StartsWith(bdir.ToUpper()) Then
@@ -5186,6 +5187,7 @@ Public Class ClsPaginas
Finally Finally
AppDomain.Unload(_casPolicyEnabledDomain) AppDomain.Unload(_casPolicyEnabledDomain)
End Try End Try
If fllreport IsNot Nothing Then fllreport.liberarecursos()
sw.Stop() sw.Stop()
If sw.Elapsed.TotalSeconds > 10 Then If sw.Elapsed.TotalSeconds > 10 Then

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@@ -260,6 +260,15 @@ Partial Class Inventarios_RecepcionEntrega
End Set End Set
End Property End Property
Private Property EsDevolucionDirecta As Boolean
Get
Return CBool(If(ViewState("EsDevolucionDirecta") Is Nothing, 0, ViewState("EsDevolucionDirecta")))
End Get
Set(value As Boolean)
ViewState("EsDevolucionDirecta") = value
End Set
End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
@@ -639,6 +648,19 @@ Partial Class Inventarios_RecepcionEntrega
Alert("La Venta original de la Devolución no tiene salida de Almacén.", TipoMensaje.MsgAdvertencia) Alert("La Venta original de la Devolución no tiene salida de Almacén.", TipoMensaje.MsgAdvertencia)
End If End If
If TipoDocto.Contiene("Ing") AndAlso TipoMovimiento = 2 Then
Dim DtMov As DataTable = DtExistencias.FiltraParametros("CveConcepto = 40", "", {"CveAlmacen"})
If DtMov.Rows.Count > 0 Then
Dim CveAlmacenDev As Integer = DtMov.Rows(0)("CveAlmacen").ToString().ToEntero()
DdlAlmacen.Items.Clear()
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveAlmacen = {CveAlmacenDev}")
DdlAlmacen.DataBind()
DdlAlmacen.SelectedValueExist(CveAlmacenDev)
EsDevolucionDirecta = True
End If
End If
Else Else
Alert("Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar.", TipoMensaje.MsgError) Alert("Ocurrió un error al cargar los datos de devolución. Por favor vuelva a intentar.", TipoMensaje.MsgError)
End If End If
@@ -1896,6 +1918,11 @@ Partial Class Inventarios_RecepcionEntrega
CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero
End If End If
'DEVOLUCION DIRECTA A ENTREGA POR ADELANTADO
If TipoMovimiento = 2 And ConceptoMovimiento = 18 AndAlso EsDevolucionDirecta Then
ConceptoMovimiento = 41
End If
CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text,
CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenTraspasoDestino, Modulo:="RE/G7") CveContrato:=CveContrato, CveAlmacenDestino:=CveAlmacenTraspasoDestino, Modulo:="RE/G7")
Folio = ObjInventario.Folio Folio = ObjInventario.Folio

View File

@@ -42,6 +42,8 @@