diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb index da17d5806..8299297e3 100644 --- a/Inventarios/EntradasSalidas.aspx.vb +++ b/Inventarios/EntradasSalidas.aspx.vb @@ -1193,6 +1193,8 @@ Partial Class Inventarios_EntradasSalidas Dim CveMetodoInventario As Integer = RowPS("Inv_CveMetodoInventario").ToString().ToEntero() + Dim FechaCaducidadVal As Date = If(RowPS("AplicaCaducidad").ToString = "True", FechaCaducidad, MinFecha) + If CveMetodoInventario = 5 And (String.IsNullOrEmpty(SerieLote.Trim()) OrElse SerieLote = "-1") Then Valido = False Alert("El producto requiere Serie-Lote", TipoMensaje.MsgAdvertencia) @@ -1201,7 +1203,7 @@ Partial Class Inventarios_EntradasSalidas 'salida If Valido AndAlso DdlConcepto.SelectedValue.Contiene({"3", "5", "7", "8", "11", "12", "13", "15", "16", "17", "20", "21", "30", "31"}) Then ' salida de almacen - Dim Existencia As Double = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, If(SerieLote = "", "-1", SerieLote), If(Lote = "", "-1", Lote), FechaCaducidad) + Dim Existencia As Double = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, If(SerieLote = "", "-1", SerieLote), If(Lote = "", "-1", Lote), FechaCaducidadVal) ' LbAgregar.ToolTip = Existencia.ToString If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} {If(SerieLote <> "", $" AND Serie = '{SerieLote}'", "")}") < 0 Then If Existencia <= 0 Then