diff --git a/Inventarios/InventarioFisicoDetalle.aspx b/Inventarios/InventarioFisicoDetalle.aspx
index dcc4ec481..4a530b714 100644
--- a/Inventarios/InventarioFisicoDetalle.aspx
+++ b/Inventarios/InventarioFisicoDetalle.aspx
@@ -369,9 +369,14 @@
" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info">
-
+
-
+
+
+
+
+
+
@@ -380,15 +385,15 @@
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/Inventarios/InventarioFisicoDetalle.aspx.vb b/Inventarios/InventarioFisicoDetalle.aspx.vb
index b1f76bf7e..49dd744fb 100644
--- a/Inventarios/InventarioFisicoDetalle.aspx.vb
+++ b/Inventarios/InventarioFisicoDetalle.aspx.vb
@@ -296,10 +296,14 @@ Partial Class Inventarios_InventarioFisicoDetalle
Dim Inventario As New ClsInventarios
If Inventario.GetInventarioFisicoDetalle(CveInventarioFisico, ddlUsuario.SelectedValue.ToString.ToEntero) Then
If Inventario.DtResultados.Rows.Count > 0 Then
+ GvIFD.Columns(1).Visible = Inventario.DtResultados.MAX("CodigoBarras") <> ""
GvIFD.Columns(4).Visible = Inventario.DtResultados.MAX("CveSeccionAlmacen", "CveSeccionAlmacen IS NOT NULL").ToEntero > 0
GvIFD.Columns(5).Visible = Inventario.DtResultados.MAX("SerieLote") <> ""
GvIFD.Columns(6).Visible = Inventario.DtResultados.MAX("Lote") <> ""
GvIFD.Columns(7).Visible = Inventario.DtResultados.MAX("FechaCaducidad", "FechaCaducidad IS NOT NULL").ToDate > MinFecha
+ GvIFD.Columns(9).Visible = Inventario.DtResultados.MAX("MalEstado", "MalEstado IS NOT NULL").ToEntero > 0
+ GvIFD.Columns(10).Visible = Inventario.DtResultados.MAX("NoVendible", "NoVendible IS NOT NULL").ToEntero > 0
+
GvIFD.DataSource = Inventario.DtResultados '.AsEnumerable.OrderByDescending(Function(k) k!CveInventarioFisicoDetalle).Take(500).CopyToDataTable
Else
GvIFD.DataSource = Nothing
@@ -648,15 +652,19 @@ Partial Class Inventarios_InventarioFisicoDetalle
Private Sub LnkExcelUniverso_Click(sender As Object, e As EventArgs) Handles LnkExcelUniverso.Click
Dim IncluyePS, ExcluyePS, IncluyeClasificacion, ExcluyeClasificacion, IncluyeProveedor As New StringBuilder
Dim ObjInventario As New ClsInventarios
-
+ Dim DtPS As DataTable
If ObjInventario.GetInventarioFisicoUniversoProductos(CveInventarioFisico, UsuarioActual.CveEmpresa) Then
-
+ If ObjInventario.DtResultados.Rows.Count > 0 Then
+ DtPS = ObjInventario.DtResultados.FiltraParametros("", "", {"Codigo", "PS", "Clasificacion", "RazonSocial"})
+ Else
+ Alert("Error al consultar la informacion")
+ End If
End If
Dim NombreArchivo As String
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
Dim workbook As New ExcelFile()
Dim worksheet = workbook.Worksheets.Add("Productos")
- worksheet.InsertDataTable(ObjInventario.DtResultados, New InsertDataTableOptions() With
+ worksheet.InsertDataTable(DtPS, New InsertDataTableOptions() With
{
.ColumnHeaders = True,
.StartRow = 0,
@@ -726,9 +734,13 @@ Partial Class Inventarios_InventarioFisicoDetalle
HfCvePS.Value = GvRow.DataKey("CvePS").ToString
HfCveUM.Value = GvRow.DataKey("CveUnidadMedida").ToString
- TxtSerieLote.Text = GvRow.DataKey("SerieLote").ToString
- TxtLoteEdit.Text = GvRow.DataKey("Lote").ToString
- TxtFechaCaducida.Text = GvRow.DataKey("FechaCaducidad").ToString
+ TxtSerieLote.Text = If(Convert.ToBoolean(GvRow.DataKey("AplicaSerie").ToString), GvRow.DataKey("SerieLote").ToString, "")
+ TxtLoteEdit.Text = If(Convert.ToBoolean(GvRow.DataKey("AplicaLote").ToString), GvRow.DataKey("Lote").ToString, "")
+ TxtFechaCaducida.Text = If(Convert.ToBoolean(GvRow.DataKey("AplicaCaducidad").ToString), If(GvRow.DataKey("FechaCaducidad").ToString <> "", GvRow.DataKey("FechaCaducidad").ToString.ToDate.ToShortDateString, ""), "")
+
+ TxtSerieLote.Enabled = Convert.ToBoolean(GvRow.DataKey("AplicaSerie").ToString)
+ TxtLoteEdit.Enabled = Convert.ToBoolean(GvRow.DataKey("AplicaLote").ToString)
+ TxtFechaCaducida.Enabled = Convert.ToBoolean(GvRow.DataKey("AplicaCaducidad").ToString)
TxtCantidad.Text = GvRow.DataKey("Cantidad").ToString
UpEditarPS.Update()