From 076398d103c780bdd21d4c804300f977bee49736 Mon Sep 17 00:00:00 2001 From: rrene Date: Fri, 17 May 2024 18:16:03 -0700 Subject: [PATCH] -- si es SMS-angeles, con 5 partidas, que se pueda surtir --- Inventarios/EntregaAlmacen.aspx.vb | 38 +++++++++++++++++------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 48e50512c..be8f99da8 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -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)