--Ferretera. Validar existencia al agregar producto

This commit is contained in:
2024-03-25 17:26:02 -07:00
parent d4701179d2
commit 5f8277f2d6

View File

@@ -18444,7 +18444,7 @@ Partial Class Ventas
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Or UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
'VALIDA EXISTENCIA
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140, 186}) Then
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140, 186, 190}) Then
If CveVenta <= 0 OrElse Me.EsCreaApartirDe Then
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < (If(CantidadModal > 0, CantidadModal, TxtCantidad.Text.ToDouble)) Then
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)