Entradas salidas fix acumulado AddNew
This commit is contained in:
@@ -1629,7 +1629,14 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
Dim Existencia As Decimal = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, If(Serie = "", "-1", Serie), If(Lote = "", "-1", Lote), FechaCaducidadVal)
|
||||
' LbAgregar.ToolTip = Existencia.ToString
|
||||
If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} {If(Serie <> "", $" AND Serie = '{Serie}'", "")}") < 0 Then
|
||||
|
||||
Dim Acunmulado As Decimal = DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} {If(Serie <> "", $" AND Serie = '{Serie}'", "")}")
|
||||
|
||||
If FechaCaducidadVal > MinFecha Then
|
||||
Acunmulado = DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} and Lote = '{Lote}' and FechaCaducidad = '{FechaCaducidadVal}' ")
|
||||
End If
|
||||
|
||||
If Existencia - Cantidad - Acunmulado < 0 Then
|
||||
If Existencia <= 0 Then
|
||||
Alert("No hay existencia del producto: " & PS, TipoMensaje.MsgAdvertencia)
|
||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||
|
||||
Reference in New Issue
Block a user