Ferretera. Validacion de existencia, cambio de vigencia

This commit is contained in:
2024-03-05 14:34:55 -07:00
parent b63ce53815
commit 07aca13531

View File

@@ -4398,7 +4398,7 @@ Partial Class Inventarios_EntradasSalidas
If Valido Then
Dim CveClasificacion As Integer
Dim CveUM As Double
Dim CveUM As Integer
Dim CodigoPS As String = ""
Dim PS As String = ""
@@ -4415,6 +4415,14 @@ Partial Class Inventarios_EntradasSalidas
PS = dr("PS").ToString.ToString
End If
Dim CantidadExistencia = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacenCambioVigencias.SelectedValue.ToEntero, CveSeccionAlmacen, Serie, Lote, Caducidad.ToDateTime())
If Cantidad > CantidadExistencia Then
Dim msg = $"El producto {PS} no tiene existencia. " + If(Serie.Length > 0, $"Serie: {Serie} ", "") + If(Lote.Length > 0, $"Lote: {Lote} ", "") + If(Caducidad.ToDateTime() > MinFecha, $"Caducidad: {Caducidad} ", "")
Alert(msg, TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim registro As DataRow = DtMovimientosCambioVigencias.NewRow
registro.Item("Cantidad") = Cantidad
registro.Item("CveUM") = CveUM