-- mostrar ps sino tiene existencia

This commit is contained in:
2024-10-01 09:02:23 -07:00
parent 8faee1bbfd
commit 9c7886119b

View File

@@ -1603,9 +1603,8 @@ Partial Class Inventarios_EntradasSalidas
If RowPS Is Nothing Then Exit Sub
Dim CveMetodoInventario As Integer = RowPS("Inv_CveMetodoInventario").ToString().ToEntero()
Dim FechaCaducidadVal As Date = If(RowPS("AplicaCaducidad").ToString = "True", FechaCaducidad, MinFecha)
PS = RowPS("CodigoPS").ToString
If RowPS("AplicaSerie").ToString = "True" And (String.IsNullOrEmpty(Serie.Trim()) OrElse Serie = "-1") Then
'SI NO ES USADO O GARANTIA O SALIDA APOYO LOGISTICO
@@ -1631,8 +1630,6 @@ Partial Class Inventarios_EntradasSalidas
Serie = ""
End If
End If
'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
@@ -1640,11 +1637,11 @@ Partial Class Inventarios_EntradasSalidas
' LbAgregar.ToolTip = Existencia.ToString
If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} {If(Serie <> "", $" AND Serie = '{Serie}'", "")}") < 0 Then
If Existencia <= 0 Then
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
Alert("No hay existencia del producto: " & PS, TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
Valido = False
Else
Alert(String.Format("Solo hay en existencia: {0}", Existencia), TipoMensaje.MsgAdvertencia)
Alert(String.Format("Solo hay en existencia: {0} - {1}", Existencia, PS), TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
If Not UsuarioActual.TienePermisoProceso(114) Then
Cantidad = Existencia
@@ -1655,13 +1652,11 @@ Partial Class Inventarios_EntradasSalidas
End If
If IndexEspecidico >= 0 Then
Dim CveClasificacion As Integer
'Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS).FiltroPrimero("", "PS")
If RowPS IsNot Nothing Then CveClasificacion = RowPS("CveClasificacion").ToString.ToEntero
If Valido Then
DtMovimientos.Rows(IndexEspecidico)("Cantidad") = Cantidad
DtMovimientos.Rows(IndexEspecidico)("CveUM") = CveUM
DtMovimientos.Rows(IndexEspecidico)("UnidadMedida") = UM
@@ -5134,7 +5129,6 @@ Partial Class Inventarios_EntradasSalidas
Dim CvePS As Integer = 0
Dim CveUM As Integer = 0
Dim DataTemp As DataTable
NumRow = NumRow + 1
Dim CveSeccionAlmacen As Integer = -1