valida existencia comparando lo ya registrado en el listado
This commit is contained in:
@@ -453,11 +453,11 @@ Partial Class Inventarios_ResguardoMaterial
|
|||||||
Dim Valido As Boolean = True
|
Dim Valido As Boolean = True
|
||||||
Dim cantidadd As Double = txtCantidad.Text.ToDouble
|
Dim cantidadd As Double = txtCantidad.Text.ToDouble
|
||||||
Dim Existencia As Double = GetExistencias(PSSelected, DdlUnidad.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, If(TxtnSerie.Visible, TxtnSerie.Text, "-1").ToString)
|
Dim Existencia As Double = GetExistencias(PSSelected, DdlUnidad.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, If(TxtnSerie.Visible, TxtnSerie.Text, "-1").ToString)
|
||||||
If Existencia - txtCantidad.Text.ToDouble < 0 Then
|
If Existencia - txtCantidad.Text.ToDouble - DtMovimientos.SUM("Cantidad", $"CvePS = {PSSelected} ") < 0 Then
|
||||||
If Existencia <= 0 Then
|
If Existencia <= 0 Then
|
||||||
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
Alert(String.Format("Solo hay en existencia: {0}", Existencia), TipoMensaje.MsgAdvertencia)
|
Alert(String.Format("Solo hay en existencia: {0}", Existencia - DtMovimientos.SUM("Cantidad", $"CvePS = {PSSelected} ")), TipoMensaje.MsgAdvertencia)
|
||||||
If Not UsuarioActual.TienePermisoProceso(114) Then
|
If Not UsuarioActual.TienePermisoProceso(114) Then
|
||||||
cantidadd = Existencia
|
cantidadd = Existencia
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user