validación para la fecha de caducidad

This commit is contained in:
Antonio Gonzalez
2020-07-16 10:38:35 -07:00
parent 960866ffa4
commit 7db630eb1e

View File

@@ -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