Ferretera. Validacion de existencia, cambio de vigencia
This commit is contained in:
@@ -4398,7 +4398,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
If Valido Then
|
If Valido Then
|
||||||
Dim CveClasificacion As Integer
|
Dim CveClasificacion As Integer
|
||||||
Dim CveUM As Double
|
Dim CveUM As Integer
|
||||||
Dim CodigoPS As String = ""
|
Dim CodigoPS As String = ""
|
||||||
Dim PS As String = ""
|
Dim PS As String = ""
|
||||||
|
|
||||||
@@ -4415,6 +4415,14 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
PS = dr("PS").ToString.ToString
|
PS = dr("PS").ToString.ToString
|
||||||
End If
|
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
|
Dim registro As DataRow = DtMovimientosCambioVigencias.NewRow
|
||||||
registro.Item("Cantidad") = Cantidad
|
registro.Item("Cantidad") = Cantidad
|
||||||
registro.Item("CveUM") = CveUM
|
registro.Item("CveUM") = CveUM
|
||||||
|
|||||||
Reference in New Issue
Block a user