diff --git a/Inventarios/InventarioFisicoDetalle.aspx.vb b/Inventarios/InventarioFisicoDetalle.aspx.vb index e71d42996..b1f76bf7e 100644 --- a/Inventarios/InventarioFisicoDetalle.aspx.vb +++ b/Inventarios/InventarioFisicoDetalle.aspx.vb @@ -649,63 +649,14 @@ Partial Class Inventarios_InventarioFisicoDetalle Dim IncluyePS, ExcluyePS, IncluyeClasificacion, ExcluyeClasificacion, IncluyeProveedor As New StringBuilder Dim ObjInventario As New ClsInventarios - If ObjInventario.GetInventarioFisicoDetallesClasificacion(CveInventarioFisico, UsuarioActual.CveEmpresa) Then - Dim dt As DataTable = ObjInventario.DtResultados - If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then - For Each dr As DataRow In dt.FiltraParametros("Incluye = 1").Rows - IncluyeClasificacion.AppendFormat("{0},", dr("CveClasificacion")) - Next - For Each dr As DataRow In dt.FiltraParametros("Incluye = 0").Rows - ExcluyeClasificacion.AppendFormat("{0},", dr("CveClasificacion")) - Next - End If + If ObjInventario.GetInventarioFisicoUniversoProductos(CveInventarioFisico, UsuarioActual.CveEmpresa) Then End If - - If ObjInventario.GetInventarioFisicoDetallesProductosServicios(CveInventarioFisico, UsuarioActual.CveEmpresa) Then - Dim dt As DataTable = ObjInventario.DtResultados - If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then - For Each dr As DataRow In dt.FiltraParametros("Incluye = 1").Rows - IncluyePS.AppendFormat("{0},", dr("CvePS")) - Next - For Each dr As DataRow In dt.FiltraParametros("Incluye = 0").Rows - ExcluyePS.AppendFormat("{0},", dr("CvePS")) - Next - End If - - End If - - If ObjInventario.GetInventarioFisicoDetallesProveedores(CveInventarioFisico, UsuarioActual.CveEmpresa) Then - Dim dt As DataTable = ObjInventario.DtResultados - Dim str As New StringBuilder - If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then - For Each dr As DataRow In dt.FiltraParametros("Incluye = 1").Rows - IncluyeProveedor.AppendFormat("{0},", dr("CveProveedor")) - Next - End If - End If - Dim dtPS As DataTable = GlobalDTPS(UsuarioActual.CveEmpresa) - If IncluyePS.ToString <> "" Then - dtPS = dtPS.FiltraParametros(String.Format("CvePS IN ({0})", IncluyePS.ToString.TrimEnd(","))) - End If - If ExcluyePS.ToString <> "" Then - dtPS = dtPS.FiltraParametros(String.Format("CvePS NOT IN ({0})", ExcluyePS.ToString.TrimEnd(","))) - End If - If IncluyeClasificacion.ToString <> "" Then - dtPS = dtPS.FiltraParametros(String.Format("CveClasificacion IN ({0})", IncluyeClasificacion.ToString.TrimEnd(","))) - End If - If ExcluyeClasificacion.ToString <> "" Then - dtPS = dtPS.FiltraParametros(String.Format("CveClasificacion NOT IN ({0})", ExcluyeClasificacion.ToString.TrimEnd(","))) - End If - If IncluyeProveedor.ToString <> "" Then - dtPS = dtPS.FiltraParametros(String.Format("CveProveedorCompra IN ({0})", IncluyeProveedor.ToString.TrimEnd(","))) - End If - dtPS = dtPS.FiltraParametros("", "PS", {"Codigo", "PS", "Clasificacion", "ProveedorCompra"}) Dim NombreArchivo As String SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) Dim workbook As New ExcelFile() Dim worksheet = workbook.Worksheets.Add("Productos") - worksheet.InsertDataTable(dtPS, New InsertDataTableOptions() With + worksheet.InsertDataTable(ObjInventario.DtResultados, New InsertDataTableOptions() With { .ColumnHeaders = True, .StartRow = 0,