--Validaciones de entrega
This commit is contained in:
@@ -1990,38 +1990,53 @@ 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
|
||||
Dim Cantidad As Decimal = 0.0D
|
||||
Dim NumRegistros As Integer = 0
|
||||
|
||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||
If CBool(Gvr.DataKey("AplicaSeccion")) AndAlso Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero() <= 0 Then
|
||||
ValidaSeccion = True
|
||||
End If
|
||||
If CBool(Gvr.DataKey("AplicaCaducidad")) AndAlso Gvr.FCTextBox("TxtCaducidad").Text.Trim = "" Then
|
||||
ValidaCaducidad = True
|
||||
End If
|
||||
If CBool(Gvr.DataKey("AplicaLote")) AndAlso Gvr.FCTextBox("TxtLote").Text.Trim = "" Then
|
||||
ValidaLote = True
|
||||
End If
|
||||
|
||||
If Gvr.FCCheckBox("cbInv").Checked AndAlso Gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||
Cantidad = Gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||
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
|
||||
|
||||
If CBool(Gvr.DataKey("AplicaSeccion")) AndAlso Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero() <= 0 Then
|
||||
ValidaSeccion = True
|
||||
End If
|
||||
|
||||
If CBool(Gvr.DataKey("AplicaCaducidad")) Then
|
||||
If GvDatos.Columns(8).Visible Then
|
||||
If String.IsNullOrEmpty(Gvr.FCDropDownList("DdlCaducidadProducto").SelectedValue.Trim()) OrElse Gvr.FCDropDownList("DdlCaducidadProducto").SelectedValue.Trim() = "|" Then
|
||||
ValidaCaducidad = True
|
||||
End If
|
||||
Else
|
||||
If String.IsNullOrEmpty(Gvr.FCTextBox("TxtCaducidad").Text.Trim) Then
|
||||
ValidaCaducidad = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If CBool(Gvr.DataKey("AplicaLote")) Then
|
||||
If GvDatos.Columns(8).Visible Then
|
||||
If String.IsNullOrEmpty(Gvr.FCDropDownList("DdlCaducidadProducto").SelectedValue.Trim()) OrElse Gvr.FCDropDownList("DdlCaducidadProducto").SelectedValue.Trim() = "|" Then
|
||||
ValidaLote = True
|
||||
End If
|
||||
Else
|
||||
If String.IsNullOrEmpty(Gvr.FCTextBox("TxtLote").Text.Trim) Then
|
||||
ValidaLote = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Gvr.FCCheckBox("cbInv").Checked AndAlso Gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||
Cantidad = Gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
|
||||
'LIMITAR EL NUMERO DE PARTIDAS QUE SE PUEDEN ENTREGAR
|
||||
If UsuarioActual.CveEmpresa = 186 Then
|
||||
Next
|
||||
|
||||
'LIMITAR EL NUMERO DE PARTIDAS QUE SE PUEDEN ENTREGAR
|
||||
If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||
'SI EL CLIENTE ES OPERADORA DE HOSPITALES ANGELES SOLO SE PUEDEN RECIBIR MAXIMO 5
|
||||
If CveCliente = 819998 Then
|
||||
If NumRegistros > 5 Then
|
||||
@@ -2034,12 +2049,12 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
ValidaSeccion = False
|
||||
ValidaCaducidad = False
|
||||
ValidaLote = False
|
||||
|
||||
End If
|
||||
|
||||
'ValidaSeccion = False
|
||||
'ValidaCaducidad = False
|
||||
'ValidaLote = False
|
||||
|
||||
If ValidaSeccion Then
|
||||
Alert("La sección de almacen no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -2053,11 +2068,12 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
If Not Cantidad > 0 Then
|
||||
Alert("No se detecto ningun movimiento por hacer. Por favor verifique e intente nuevamente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'PROCESO , si tiene proceso "176" no lo valida
|
||||
If Not UsuarioActual.TienePermisoProceso(176) Then
|
||||
|
||||
Reference in New Issue
Block a user