-- si es SMS-angeles, con 5 partidas, que se pueda surtir

This commit is contained in:
2024-05-17 18:16:03 -07:00
parent 1e7651bec9
commit 076398d103

View File

@@ -2052,21 +2052,7 @@ Partial Class Inventarios_EntregaAlmacen
End If
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
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
@@ -2102,8 +2088,26 @@ Partial Class Inventarios_EntregaAlmacen
End If
End If
If EsDevolucionVenta = 1 Or TipoDocto.Contiene({"Ped"}) Then
If Not (EsDevolucionVenta = 1 And TipoDocto.Contiene("Rem", "Ped")) Then ' condicion si hay una devolucion de remision, no verifique la totalidad surtido
If EsDevolucionVenta = 1 Or TipoDocto.Contiene({"Ped"}) Then
Dim ValidaSalidaCompleta As Boolean = Not (EsDevolucionVenta = 1 And TipoDocto.Contiene("Rem", "Ped"))
'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
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
ValidaSalidaCompleta = False
End If
If ValidaSalidaCompleta Then ' condicion si hay una devolucion de remision, no verifique la totalidad surtido
For Each Gvr As GridViewRow In GvDatos.Rows
If Not Gvr.FCCheckBox("cbInv").Checked Or (Gvr.FCCheckBox("cbInv").Checked AndAlso Gvr.FCTextBox("TbCantidadF").Text.ToDecimal <> Gvr.DataKey("CantidadC").ToString().ToDecimal) Then
Alert("Es necesario surtir todos los productos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)