--SMS.LIMITAR EL NUMERO DE PARTIDAS AL SURTIR VENTAS A 10 (5 SI ES EL CLIENTE ANGELES)

This commit is contained in:
2024-04-25 16:57:49 -07:00
parent 908b0656e2
commit b8aab0c9a1

View File

@@ -1991,6 +1991,7 @@ Partial Class Inventarios_EntregaAlmacen
Dim ValidaSeccion As Boolean = False : Dim ValidaCaducidad As Boolean = False : Dim ValidaLote As Boolean = False
'VALIDA CANTIDAD DE SALIDA
Dim Cantidad As Decimal = 0.0D
For Each Gvr As GridViewRow In GvDatos.Rows
If CBool(Gvr.DataKey("AplicaSeccion")) AndAlso Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero() <= 0 Then
ValidaSeccion = True
@@ -2007,8 +2008,34 @@ Partial Class Inventarios_EntregaAlmacen
Exit For
End If
Next
Dim NumRegistros As Integer = 0
For Each Gvr As GridViewRow In GvDatos.Rows
If Gvr.RowType = DataControlRowType.DataRow Then
If Gvr.FCCheckBox("cbInv").Checked Then
NumRegistros += 1
End If
End If
Next
'LIMITAR EL NUMERO DE PARTIDAS QUE SE PUEDEN ENTREGAR
If UsuarioActual.CveEmpresa = 186 Then
'SI EL CLIENTE ES OPERADORA DE HOSPITALES ANGELES SOLO SE PUEDEN RECIBIR MAXIMO 5
If CveCliente = 819998 Then
If NumRegistros > 5 Then
Alert("Solo se pueden recibir maximo 5 partidas.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Else
If NumRegistros > 10 Then
Alert("Solo se pueden recibir maximo 10 partidas.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
End If
ValidaSeccion = False
ValidaCaducidad = False
ValidaLote = False