diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb index 6e51b4464..aef28ee58 100644 --- a/Inventarios/EntregaAlmacen.aspx.vb +++ b/Inventarios/EntregaAlmacen.aspx.vb @@ -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 diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index ecf503ca3..1a2e21d5c 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2650,20 +2650,6 @@ Partial Class Ventas 'CargarCamiones() If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then - 'SI ES COTIZACION CARGAR CLIENTE PUBLICO GENERAL - If Opcion = "Cot" Then - Dim CveClientePG As Integer = -1 - If UsuarioActual.CveEmpresa = 186 Then - CveClientePG = 1151377 - ViewState("CveCliente") = CveClientePG - HdnCveCliente.Value = CveClientePG.ToString() - CargaCliente(CveCliente) - - TrVentasMedicas2.Visible = False - TrVentasMedicas3.Visible = False - End If - End If - CargaMedicos() CargaProcedimientos() CargaDdlClientesSucursal() @@ -2713,6 +2699,23 @@ Partial Class Ventas RBLPago.SelectedValue = "2" CargaCliente(CveCliente) End If + + If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then + 'SI ES COTIZACION CARGAR CLIENTE PUBLICO GENERAL + If Opcion = "Cot" Then + Dim CveClientePG As Integer = -1 + If UsuarioActual.CveEmpresa = 186 Then + CveClientePG = 1151377 + ViewState("CveCliente") = CveClientePG + HdnCveCliente.Value = CveClientePG.ToString() + CargaCliente(CveCliente) + + TrVentasMedicas2.Visible = False + TrVentasMedicas3.Visible = False + End If + End If + End If + End If 'Carga empresa CRM @@ -8451,7 +8454,6 @@ Partial Class Ventas 'If UsuarioActual.CveEmpresa = 119 Then ' e.Row.FCTextBox("TxtDescuento").Enabled = False 'End If - Else 'MODO NORMAL @@ -8601,6 +8603,10 @@ Partial Class Ventas If EsVentaMedica Then GvPS.Rows(e.NewEditIndex).FCTextBox("TxtPrecio").Enabled = False + + If DdlTipoComprobante.SelectedValue = "Cot" Then + GvPS.Rows(e.NewEditIndex).FCTextBox("TxtPrecio").Enabled = True + End If End If If CveCicloComercial > 0 Then @@ -17564,6 +17570,10 @@ Partial Class Ventas If UsuarioActual.CveUsuario = 3986 Then TxtPrecio.Enabled = True End If + + If DdlTipoComprobante.SelectedValue = "Cot" Then + TxtPrecio.Enabled = True + End If Else If drPS("CveTipoPS").ToString() = "1" Then 'Si es servicio If UsuarioActual.Empresa.Funcionalidad(558).ToString() = "1" Then 'Si es Empresa llantera