diff --git a/Inventarios/EntradasSalidas.aspx.vb b/Inventarios/EntradasSalidas.aspx.vb
index ce3cd5acf..b7acf9b87 100644
--- a/Inventarios/EntradasSalidas.aspx.vb
+++ b/Inventarios/EntradasSalidas.aspx.vb
@@ -3842,7 +3842,7 @@ Partial Class Inventarios_EntradasSalidas
#Region "DESCARGAR E IMPRIMIR LISTADO"
Public Sub DescargarFormato()
- Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\Formatos\FormatoEntradasSalidas.xlsx"
+ Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoEntradasSalidas.xlsx"
Dim Archivo As New IO.FileInfo(Directorio)
If Archivo.Exists Then
@@ -4169,7 +4169,7 @@ Partial Class Inventarios_EntradasSalidas
'#End Region
- Protected Sub LkAgregar_Click() Handles LkAgregar.Click
+ Protected Sub LkAgregar_Click() Handles LnkAgregarProducto.Click
limpiarModalDetalle()
UpAgregar.Update()
RegistraScript("$('#ModalAgregar').modal()")
diff --git a/Inventarios/EntregaAlmacen.aspx.vb b/Inventarios/EntregaAlmacen.aspx.vb
index 4777d29aa..87b0ad449 100644
--- a/Inventarios/EntregaAlmacen.aspx.vb
+++ b/Inventarios/EntregaAlmacen.aspx.vb
@@ -596,7 +596,9 @@ Partial Class Inventarios_EntregaAlmacen
DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen)
End If
-
+ If Not DtDatos.Columns.Contains("Serie") Then
+ DtDatos.Columns.Add("Serie", GetType(String))
+ End If
If Not DtDatos.Columns.Contains("Lote") Then
DtDatos.Columns.Add("Lote", GetType(String))
End If
@@ -744,6 +746,20 @@ Partial Class Inventarios_EntregaAlmacen
DdlAlmacen.SelectedValueExist(CveAlmacenTraspasoOrigen)
End If
+ If Not DtDatos.Columns.Contains("CveSeccion") Then
+ DtDatos.Columns.Add("CveSeccion", GetType(Integer))
+ End If
+
+ If Not DtDatos.Columns.Contains("FechaCaducidad") Then
+ DtDatos.Columns.Add("FechaCaducidad", GetType(Date))
+ End If
+ If Not DtDatos.Columns.Contains("Seleccionado") Then
+ DtDatos.Columns.Add("Seleccionado", GetType(Boolean))
+ End If
+ If Not DtDatos.Columns.Contains("CantidadSeleccionada") Then
+ DtDatos.Columns.Add("CantidadSeleccionada", GetType(Double))
+ End If
+
If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
DivCodigoSeriePS.Visible = True
Else
@@ -812,7 +828,8 @@ Partial Class Inventarios_EntregaAlmacen
If e.Row.DBCampo("Consec") <> "" AndAlso DtDatosDetalle IsNot Nothing Then
Dim Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", e.Row.DBCampo("Consec"))).Rows.Count
e.Row.FCTextBox("TbCantidadF").Text = Contador.ToString
- 'e.Row.FCTextBox("TbCantidadF").Text = "0"
+ Else
+ e.Row.FCTextBox("TbCantidadF").Text = "0"
End If
@@ -867,6 +884,7 @@ Partial Class Inventarios_EntregaAlmacen
'FUNCIONALIDAD PISTOLA DE CODIGOS
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
+ e.Row.FCTextBox("TbCantidadF").Text = "0"
'NO BLOQUEA PARA ROL AD
If UsuarioActual.CveRol = 1 Then
If e.Row.DBCampo("Inv_CveMetodoInventario").Contiene("5", "6") Then
@@ -2540,10 +2558,10 @@ Partial Class Inventarios_EntregaAlmacen
If CBool(Dr("AplicaSerie")) Then
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
For Each Dr1 As DataRow In DtDetalle.Rows
- StrXML.AppendFormat("
", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("YYYY/MM/DD"))
+ StrXML.AppendFormat("
", Dr1("CvePS"), Dr1("CveUM"), 1, IfNull(Dr("CveSeccion"), -1), Dr1("Serie"), Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
Next
Else
- StrXML.AppendFormat("
", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("YYYY/MM/DD"))
+ StrXML.AppendFormat("
", Dr("CvePS"), Dr("CveUM"), Dr("CantidadGV"), IfNull(Dr("CveSeccion"), -1), "-1", Lote, FechaCaducidad.ToString("yyyy/MM/dd"))
End If
End If
Next
diff --git a/Inventarios/PopUpBuscarMovto.aspx.vb b/Inventarios/PopUpBuscarMovto.aspx.vb
index 92994df68..9f5c1dd38 100644
--- a/Inventarios/PopUpBuscarMovto.aspx.vb
+++ b/Inventarios/PopUpBuscarMovto.aspx.vb
@@ -49,27 +49,38 @@ Partial Class PopUpBuscarFolio
CargaDatos()
End Sub
Private Sub CargaDatos()
- Dim Reporte As New ClsInventarios
+ If ValidarFiltrosSeleccionados() Then
+ Dim Reporte As New ClsInventarios
- Dim FechaInicial = If(TxtFechaI.Text.Trim <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text.ToDate, MinFecha)
- Dim FechaFinal = If(TxtFechaF.Text.Trim <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text.ToDate, MaxFecha)
- Dim FechaIngI = If(TxtFechaIngInicio.Text.Trim <> "" AndAlso TxtFechaIngInicio.Text <> "__/__/____", TxtFechaIngInicio.Text.ToDate, MinFecha)
- Dim FechaIngF = If(TxtFechaIngFin.Text.Trim <> "" AndAlso TxtFechaIngFin.Text <> "__/__/____", TxtFechaIngFin.Text.ToDate, MaxFecha)
+ Dim FechaInicial = If(TxtFechaI.Text.Trim <> "" AndAlso TxtFechaI.Text <> "__/__/____", TxtFechaI.Text.ToDate, MinFecha)
+ Dim FechaFinal = If(TxtFechaF.Text.Trim <> "" AndAlso TxtFechaF.Text <> "__/__/____", TxtFechaF.Text.ToDate, MaxFecha)
+ Dim FechaIngI = If(TxtFechaIngInicio.Text.Trim <> "" AndAlso TxtFechaIngInicio.Text <> "__/__/____", TxtFechaIngInicio.Text.ToDate, MinFecha)
+ Dim FechaIngF = If(TxtFechaIngFin.Text.Trim <> "" AndAlso TxtFechaIngFin.Text <> "__/__/____", TxtFechaIngFin.Text.ToDate, MaxFecha)
- If Reporte.GetMovimientosRep(DdlAlmacen.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, If(TxtFolio.Text = "", "-1", TxtFolio.Text.Trim).ToEntero, FechaIngI, FechaIngF, FechaInicial, FechaFinal, -1, UsuarioActual.CveEmpresa) Then
- GvM.DataSource = Reporte.DtResultados
- LtlTotalRegistros.Text = Reporte.DtResultados.Rows.Count.ToString.FormatoNumero(0)
+ If Reporte.GetMovimientosRep(DdlAlmacen.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, If(TxtFolio.Text = "", "-1", TxtFolio.Text.Trim).ToEntero,
+ FechaIngI, FechaIngF, FechaInicial, FechaFinal, -1, UsuarioActual.CveEmpresa) Then
+ GvM.DataSource = Reporte.DtResultados
+ LtlTotalRegistros.Text = Reporte.DtResultados.Rows.Count.ToString.FormatoNumero(0)
+ Else
+ GvM.DataSource = Nothing
+ End If
+
+ GvM.DataBind()
+
+ UPDatos.Update()
+ TblBusqueda.Visible = True
+ Reporte.Dispose()
Else
- GvM.DataSource = Nothing
+ Alert("Seleccione un criterio de busqueda", TipoMensaje.MsgAdvertencia)
End If
-
- GvM.DataBind()
-
- UPDatos.Update()
- TblBusqueda.Visible = True
- Reporte.Dispose()
End Sub
+
+ Private Function ValidarFiltrosSeleccionados() As Boolean
+ If DdlAlmacen.SelectedValue.ToEntero > 0 Then Return True
+ If DdlTipoMovimiento.SelectedValue.ToEntero > 0 Then Return True
+ If TxtFolio.Text.Length > 0 Then Return True
+ Return False
+ End Function
#End Region
-
End Class
diff --git a/Inventarios/PopUpExistenciasAlmacen.aspx.vb b/Inventarios/PopUpExistenciasAlmacen.aspx.vb
index 4f988dc7f..c3bc4fc7c 100644
--- a/Inventarios/PopUpExistenciasAlmacen.aspx.vb
+++ b/Inventarios/PopUpExistenciasAlmacen.aspx.vb
@@ -94,72 +94,77 @@ Partial Class Inventarios_Default
End If
End Sub
Private Sub CargaDatos(CvePS As Integer, Tipo As Integer)
- Dim ObjInventarios As New ClsInventarios()
- If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
- Dim dr As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
- If dr IsNot Nothing Then
- LtPs.Text = $"Producto:
{dr("PSCodigo").ToString}"
- Dim CvePrecioLista As Integer = -1
- If Not UsuarioActual.Empresa.Funcionalidad(404).ToString = "1" Then 'sino manneja precios de lista
- CvePrecioLista = -2
- End If
+ If ValidarFiltrosSeleccionados() Then
+ Dim ObjInventarios As New ClsInventarios()
+ If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
+ Dim dr As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
- Dim ObjVta As New ClsVentas
- Dim objPS As New ClsProductosServicios
- If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
- If ObjVta.DtResultados.Rows.Count > 0 Then
- If CvePrecioLista = -1 Then CvePrecioLista = ObjVta.DtResultados.Rows(0)("CvePrecioLista").ToString.ToEntero
- If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioLista, -1, DDlPS.SelectedValue.ToEntero) Then
- If objPS.DtResultados.Rows.Count > 0 Then
- LtPrecioPS.Text = $"Precio de venta:
$: {objPS.DtResultados.Rows(0)("PrecioLista").ToString.FormatoNumero} {dr("Abreviatura").ToString}"
+ If dr IsNot Nothing Then
+ LtPs.Text = $"Producto:
{dr("PSCodigo").ToString}"
+ Dim CvePrecioLista As Integer = -1
+ If Not UsuarioActual.Empresa.Funcionalidad(404).ToString = "1" Then 'sino manneja precios de lista
+ CvePrecioLista = -2
+ End If
+
+ Dim ObjVta As New ClsVentas
+ Dim objPS As New ClsProductosServicios
+ If ObjVta.GetPrecioListas(UsuarioActual.CveEmpresa) Then
+ If ObjVta.DtResultados.Rows.Count > 0 Then
+ If CvePrecioLista = -1 Then CvePrecioLista = ObjVta.DtResultados.Rows(0)("CvePrecioLista").ToString.ToEntero
+ If objPS.GetPSPreciosLista(UsuarioActual.CveEmpresa, CvePrecioLista, -1, DDlPS.SelectedValue.ToEntero) Then
+ If objPS.DtResultados.Rows.Count > 0 Then
+ LtPrecioPS.Text = $"Precio de venta:
$: {objPS.DtResultados.Rows(0)("PrecioLista").ToString.FormatoNumero} {dr("Abreviatura").ToString}"
+ End If
End If
End If
End If
+ ObjVta.Dispose()
+ objPS.Dispose()
+ If UsuarioActual.CveEmpresa = 119 Then
+ If CBool(dr("AplicaIEPS")) Then
+ LtlIEPS.Visible = True
+ LtlIEPSPorcentaje.Visible = True
+ LtlIEPSPorcentaje.Text = $"
% {(dr("IEPSPorcentaje").ToString.ToDouble * 100).FormatoNumero}"
+ Else
+ LtlIEPS.Visible = False
+ LtlIEPSPorcentaje.Visible = False
+ End If
+ If dr("IVA").ToString = "-1" OrElse dr("IVA").ToString.ToDecimal > 0 Then
+ LtlIVA.Visible = True
+ LtlIVAPorcentaje.Visible = True
+ LtlIVAPorcentaje.Text = $"
Si"
+ Else
+ LtlIVA.Visible = False
+ LtlIVAPorcentaje.Visible = False
+ End If
+ End If
End If
- ObjVta.Dispose()
- objPS.Dispose()
- If UsuarioActual.CveEmpresa = 119 Then
- If CBool(dr("AplicaIEPS")) Then
- LtlIEPS.Visible = True
- LtlIEPSPorcentaje.Visible = True
- LtlIEPSPorcentaje.Text = $"
% {(dr("IEPSPorcentaje").ToString.ToDouble * 100).FormatoNumero}"
- Else
- LtlIEPS.Visible = False
- LtlIEPSPorcentaje.Visible = False
- End If
- If dr("IVA").ToString = "-1" OrElse dr("IVA").ToString.ToDecimal > 0 Then
- LtlIVA.Visible = True
- LtlIVAPorcentaje.Visible = True
- LtlIVAPorcentaje.Text = $"
Si"
- Else
- LtlIVA.Visible = False
- LtlIVAPorcentaje.Visible = False
- End If
+
+ If UsuarioActual.CveUsuario = 100 Then
+ HlPendiente.Visible = True
+ HlPendiente.NavigateUrl = String.Format("/Inventarios/RepVentasXSurtir.aspx?CvePS={0}", CvePS)
+ End If
+
+ If ObjInventarios.DtResultados.Rows.Count > 0 Then
+ GV.DataSource = ObjInventarios.DtResultados
+ Else
+ GV.DataSource = Nothing
+ Dim Js = If(Tipo = 1, "", "window.setTimeout(Focus,200);")
+ Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If
End If
- If UsuarioActual.CveUsuario = 100 Then
- HlPendiente.Visible = True
- HlPendiente.NavigateUrl = String.Format("/Inventarios/RepVentasXSurtir.aspx?CvePS={0}", CvePS)
- End If
+ ObjInventarios.Dispose()
+ GV.DataBind()
- If ObjInventarios.DtResultados.Rows.Count > 0 Then
- GV.DataSource = ObjInventarios.DtResultados
- Else
- GV.DataSource = Nothing
- Dim Js = If(Tipo = 1, "", "window.setTimeout(Focus,200);")
- Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
- End If
+
+
+ UPDatos.Update()
+ TblBusqueda.Visible = True
+ Else
+ Alert("Seleccione un producto o servicio", TipoMensaje.MsgAdvertencia)
End If
-
- ObjInventarios.Dispose()
- GV.DataBind()
-
-
-
- UPDatos.Update()
- TblBusqueda.Visible = True
End Sub
Private Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -227,6 +232,7 @@ Partial Class Inventarios_Default
End Sub
Private Sub CargarDatosMedRin()
+
Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetExistenciasMedRin(DDlPS.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlRin.SelectedValue.ToEntero, DdlMedidas.SelectedValue.ToEntero) Then
GvMedRin.DataSource = ObjInventarios.DtResultados
@@ -236,4 +242,9 @@ Partial Class Inventarios_Default
UPDatos.Update()
End Sub
+ Private Function ValidarFiltrosSeleccionados() As Boolean
+ If DDlPS.SelectedValue.ToEntero > 0 Then Return True
+ Return False
+ End Function
+
End Class
diff --git a/OC/PopUpBuscarReq.aspx.vb b/OC/PopUpBuscarReq.aspx.vb
index 814797b58..043715c23 100644
--- a/OC/PopUpBuscarReq.aspx.vb
+++ b/OC/PopUpBuscarReq.aspx.vb
@@ -168,17 +168,23 @@ Partial Class OC_PopUpBuscarReq
Dim FI As Date = If(txtFechaI.Text.Trim = "", MinFecha, txtFechaI.Text.Trim.ToDate)
Dim guia As String = If(TxtGuia.Text.Trim = "", "-1", TxtGuia.Text)
'Cargar Datos
- Dim ObjOC As New ClsOC
- ObjOC.GetOrdenesCompraRep(DdlTipo.SelectedValue, CveProyecto, CveSubProyecto, -1, DdlEstatus.SelectedValue.ToEntero, FI, MaxFecha, -1, DdlProveedor.SelectedValue.ToEntero, If(TxtFolio.Text.ToEntero <= 0, -1, TxtFolio.Text.ToEntero), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Guia:=guia,
- SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False))
- Dim DtOC = ObjOC.DtResultados ' tipotermino, esattus inicial
- ObjOC.Dispose()
- GV.DataSource = DtOC
- GV.DataBind()
- LtlTotalRegistros.Text = GV.Rows.Count.ToString
- LblTotalRegistros.Text = "Número de registros: "
- UPDatos.Update()
+ If ValidarFiltrosSeleccionado() Then
+ Dim ObjOC As New ClsOC
+ ObjOC.GetOrdenesCompraRep(DdlTipo.SelectedValue, CveProyecto, CveSubProyecto, -1, DdlEstatus.SelectedValue.ToEntero, FI, MaxFecha, -1, DdlProveedor.SelectedValue.ToEntero,
+ If(TxtFolio.Text.ToEntero <= 0, -1, TxtFolio.Text.ToEntero), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Guia:=guia,
+ SoloSubProyectosConPermiso:=If(UsuarioActual.Empresa.Funcionalidad(530) = "1", True, False))
+ Dim DtOC = ObjOC.DtResultados ' tipotermino, esattus inicial
+ ObjOC.Dispose()
+
+ GV.DataSource = DtOC
+ GV.DataBind()
+ LtlTotalRegistros.Text = GV.Rows.Count.ToString
+ LblTotalRegistros.Text = "Número de registros: "
+ UPDatos.Update()
+ Else
+ Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
+ End If
End Sub
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
@@ -245,6 +251,17 @@ Partial Class OC_PopUpBuscarReq
End If
End Sub
+
+ Private Function ValidarFiltrosSeleccionado() As Boolean
+ If DdlTipo.SelectedValue.ToEntero > 0 Then Return True
+ If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True
+ If DdlProveedor.SelectedValue.ToEntero > 0 Then Return True
+ If TxtFolio.Text.ToEntero > 0 Then Return True
+ If DdlSubProyectos.SelectedValue.ToEntero > 0 Then Return True
+ If DdlProyectos.SelectedValue.ToEntero > 0 Then Return True
+ Return False
+ End Function
+
#End Region
#Region " VINCULA CON COMPRAS "
diff --git a/OS/PopUpBuscarOS.aspx.vb b/OS/PopUpBuscarOS.aspx.vb
index eca09e56b..3e288a7f4 100644
--- a/OS/PopUpBuscarOS.aspx.vb
+++ b/OS/PopUpBuscarOS.aspx.vb
@@ -35,16 +35,19 @@ Partial Class OS_PopUpBuscarOS
'If TxtFechaRecibido.Text.Trim <> String.Empty Then FechaRecibido.ToString()
If DdlEstatusOrdenServicio.SelectedValue <> String.Empty Then CveEstatusOrdenServicio = DdlEstatusOrdenServicio.SelectedValue.ToEntero
-
- If ObjOS.GetOrdenesServicios(-1, CveCliente, Folio, CveUsuarioRecibio, CveEstatusOrdenServicio, UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
- If ObjOS.DtResultados.Rows.Count > 0 Then
- LtlTotalRegistros.Text = ObjOS.DtResultados.Rows.Count.ToString.FormatoNumero(0)
- GV.DataSource = ObjOS.DtResultados
- Else
- LtlTotalRegistros.Text = "0"
- GV.DataSource = Nothing
- Alert("No se encontraron registros con losparámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
+ If ValidarUnFiltroSeleccionado() Then
+ If ObjOS.GetOrdenesServicios(-1, CveCliente, Folio, CveUsuarioRecibio, CveEstatusOrdenServicio, UsuarioActual.CveEmpresa, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero) Then
+ If ObjOS.DtResultados.Rows.Count > 0 Then
+ LtlTotalRegistros.Text = ObjOS.DtResultados.Rows.Count.ToString.FormatoNumero(0)
+ GV.DataSource = ObjOS.DtResultados
+ Else
+ LtlTotalRegistros.Text = "0"
+ GV.DataSource = Nothing
+ Alert("No se encontraron registros con losparámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
+ End If
End If
+ Else
+ Alert("Seleccione un criterio de búsqueda", TipoMensaje.MsgAdvertencia)
End If
ObjOS.Dispose()
@@ -108,4 +111,13 @@ Partial Class OS_PopUpBuscarOS
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
+ Private Function ValidarUnFiltroSeleccionado() As Boolean
+ If TxtFolio.Text.Trim <> String.Empty Then Return True
+ If DdlCliente.SelectedValue.ToEntero > 0 Then Return True
+ If DdlUsuarioRecibio.SelectedValue.ToEntero > 0 Then Return True
+ 'If TxtFechaRecibido.Text.Trim <> String.Empty Then FechaRecibido.ToString()
+ If DdlEstatusOrdenServicio.SelectedValue.ToEntero > 0 Then Return True
+ Return False
+ End Function
+
End Class
diff --git a/RH/PopUpBuscarPersonal.aspx.vb b/RH/PopUpBuscarPersonal.aspx.vb
index e9d5cab16..06a779f57 100644
--- a/RH/PopUpBuscarPersonal.aspx.vb
+++ b/RH/PopUpBuscarPersonal.aspx.vb
@@ -142,7 +142,6 @@ Partial Class RH_PopUpBuscarPersonal
End Sub
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
- Dim ObjPersonal As New ClsRH()
Dim Codigo As String = "-1"
Dim Nombre As String = "-1"
@@ -161,26 +160,32 @@ Partial Class RH_PopUpBuscarPersonal
Dim StrFiltroCaracteristica As String = GeneraFiltroCaracteristicas()
- If ObjPersonal.GetPersonal2(-1, Codigo, Nombre, NSS, RFC, DdlTurnos.SelectedValue.ToEntero, DdlPuestos.SelectedValue.ToEntero, DdlDepartamentos.SelectedValue.ToEntero,
+ If ValidarFiltrosSeleccionado() Then
+
+ Dim ObjPersonal As New ClsRH()
+ If ObjPersonal.GetPersonal2(-1, Codigo, Nombre, NSS, RFC, DdlTurnos.SelectedValue.ToEntero, DdlPuestos.SelectedValue.ToEntero, DdlDepartamentos.SelectedValue.ToEntero,
DdlRuta.SelectedValue.ToEntero, DdlEscolaridad.SelectedValue.ToEntero, DdlEstadoCivil.SelectedValue.ToEntero, DdlGenero.SelectedValue.ToEntero,
DdlEstatus.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlClienteAsignado.SelectedValue.ToEntero, Horario, CveSupervisor,
-1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", StrFiltroCaracteristica, 1, UsuarioActual.CveEmpresa) Then
- If ObjPersonal.DtResultados.Rows.Count > 0 Then
- LtlTotalRegistros.Text = ObjPersonal.DtResultados.Rows.Count.ToString.FormatoNumero(0)
- GV.DataSource = ObjPersonal.DtResultados
- Else
- LtlTotalRegistros.Text = "0"
- GV.DataSource = Nothing
- Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
+ If ObjPersonal.DtResultados.Rows.Count > 0 Then
+ LtlTotalRegistros.Text = ObjPersonal.DtResultados.Rows.Count.ToString.FormatoNumero(0)
+ GV.DataSource = ObjPersonal.DtResultados
+ Else
+ LtlTotalRegistros.Text = "0"
+ GV.DataSource = Nothing
+ Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
+ End If
End If
+
+ ObjPersonal.Dispose()
+ GV.DataBind()
+
+ UPDatos.Update()
+
+ TblBusqueda.Visible = True
+ Else
+ Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
End If
-
- ObjPersonal.Dispose()
- GV.DataBind()
-
- UPDatos.Update()
-
- TblBusqueda.Visible = True
End Sub
Private Function GeneraFiltroCaracteristicas() As String
@@ -383,4 +388,26 @@ Partial Class RH_PopUpBuscarPersonal
End If
End Sub
+
+ Private Function ValidarFiltrosSeleccionado() As Boolean
+ If TxtCodigo.Text.Trim <> String.Empty Then Return True
+ If TxtNombre.Text.Trim <> String.Empty Then Return True
+ If TxtNSS.Text.Trim <> String.Empty Then Return True
+ If TxtRFC.Text.Trim <> String.Empty Then Return True
+ If TxtHorarioDe.Text.Trim <> String.Empty Then Return True
+
+ If DdlTurnos.SelectedValue.ToEntero > 0 Then Return True
+ If DdlPuestos.SelectedValue.ToEntero > 0 Then Return True
+ If DdlDepartamentos.SelectedValue.ToEntero > 0 Then Return True
+ If DdlRuta.SelectedValue.ToEntero > 0 Then Return True
+ If DdlEscolaridad.SelectedValue.ToEntero > 0 Then Return True
+ If DdlEstadoCivil.SelectedValue.ToEntero > 0 Then Return True
+ If DdlGenero.SelectedValue.ToEntero > 0 Then Return True
+ If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True
+ If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True
+ If DdlClienteAsignado.SelectedValue.ToEntero > 0 Then Return True
+
+ Return False
+ End Function
+
End Class
diff --git a/Ventas/PopUpBuscarClientes.aspx.vb b/Ventas/PopUpBuscarClientes.aspx.vb
index b1d247a43..96af8f67b 100644
--- a/Ventas/PopUpBuscarClientes.aspx.vb
+++ b/Ventas/PopUpBuscarClientes.aspx.vb
@@ -54,7 +54,6 @@ Partial Class PopUpBuscarClientes
End Sub
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
- Dim ObjClientes As New ClsClientes()
Dim Nombre As String = "-1"
Dim Codigo As String = "-1"
@@ -70,30 +69,37 @@ Partial Class PopUpBuscarClientes
If TxtTelefono.Text.Trim <> String.Empty Then Telefono = TxtTelefono.Text.Trim
If TxtMail.Text.Trim <> String.Empty Then Mail = TxtMail.Text.Trim
- If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente) Then
- If ObjClientes.DtResultados.Rows.Count > 0 Then
- LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0)
- GV.DataSource = ObjClientes.DtResultados
- If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 Then
- GV.DataSource = ObjClientes.DtResultados.FiltraParametros("CveCliente IN (10450, 10460, 10458)")
- LtlTotalRegistros.Text = "0"
- ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 Then
- GV.DataSource = ObjClientes.DtResultados.FiltraParametros("CveCliente IN (27448)")
+ If ValidarUnFiltroSeleccionado() Then
+
+ Dim ObjClientes As New ClsClientes()
+ If ObjClientes.GetClientes(-1, Nombre, Codigo, NombreCorto, RFC, Telefono, Mail, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
+ DdlEstatus.SelectedValue.ToEntero, TipoCliente:=TipoCliente) Then
+ If ObjClientes.DtResultados.Rows.Count > 0 Then
+ LtlTotalRegistros.Text = ObjClientes.DtResultados.Rows.Count.ToString.FormatoNumero(0)
+ GV.DataSource = ObjClientes.DtResultados
+ If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 Then
+ GV.DataSource = ObjClientes.DtResultados.FiltraParametros("CveCliente IN (10450, 10460, 10458)")
+ LtlTotalRegistros.Text = "0"
+ ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 Then
+ GV.DataSource = ObjClientes.DtResultados.FiltraParametros("CveCliente IN (27448)")
+ LtlTotalRegistros.Text = "0"
+ End If
+ Else
LtlTotalRegistros.Text = "0"
+ GV.DataSource = Nothing
+ Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If
- Else
- LtlTotalRegistros.Text = "0"
- GV.DataSource = Nothing
- Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If
+
+ ObjClientes.Dispose()
+ GV.DataBind()
+
+ UPDatos.Update()
+
+ TblBusqueda.Visible = True
+ Else
+ Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
End If
-
- ObjClientes.Dispose()
- GV.DataBind()
-
- UPDatos.Update()
-
- TblBusqueda.Visible = True
End Sub
Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound
@@ -127,4 +133,17 @@ Partial Class PopUpBuscarClientes
e.Row.FCLiteral("LtlMail").Text = String.Format("
{0}{1}
", Liga, e.Row.DBCampo("Mail"))
End If
End Sub
+
+ Private Function ValidarUnFiltroSeleccionado() As Boolean
+ If TxtNombre.Text.Trim <> String.Empty Then Return True
+ If TxtCodigo.Text.Trim <> String.Empty Then Return True
+ If TxtNombreCorto.Text.Trim <> String.Empty Then Return True
+ If TxtRFC.Text.Trim <> String.Empty Then Return True
+ If TxtTelefono.Text.Trim <> String.Empty Then Return True
+ If TxtMail.Text.Trim <> String.Empty Then Return True
+ If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True
+ If DdlEstatus.SelectedValue.ToEntero > 0 Then Return True
+ Return False
+ End Function
+
End Class
diff --git a/Ventas/PopUpBuscarFolio.aspx.vb b/Ventas/PopUpBuscarFolio.aspx.vb
index f5dc1d44e..e2c6711cd 100644
--- a/Ventas/PopUpBuscarFolio.aspx.vb
+++ b/Ventas/PopUpBuscarFolio.aspx.vb
@@ -88,7 +88,6 @@ Partial Class PopUpBuscarFolio
Protected Sub BtnBuscar_Click(sender As Object, e As System.EventArgs) Handles BtnBuscar.Click
- Dim ObjVentas As New ClsVentas()
Dim Serie As String = "-1"
Dim Folio As Integer = -1
@@ -123,23 +122,31 @@ Partial Class PopUpBuscarFolio
PeidoContrato = If(TxtPedidoContrato.Text.Length = 0, "-1", TxtPedidoContrato.Text.Trim)
OrdenCompra = If(TxtOrdenCompra.Text.Length = 0, "-1", TxtOrdenCompra.Text.Trim)
- If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Serie, Folio, Codigo, Cliente.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlEstatusFactura.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, FolioFiscal, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedValue.ToEntero, -1), DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
- If ObjVentas.DtResultados.Rows.Count > 0 Then
- LtlTotalRegistros.Text = ObjVentas.DtResultados.Rows.Count.ToString.FormatoNumero(0)
- GV.DataSource = ObjVentas.DtResultados
- Else
- LtlTotalRegistros.Text = "0"
- GV.DataSource = Nothing
- Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
+ If ValidarUnFiltroSeleccionado() Then
+
+ Dim ObjVentas As New ClsVentas()
+ If ObjVentas.GetVentas(UsuarioActual.CveEmpresa, DdlTipoDocto.SelectedValue, Serie, Folio, Codigo, Cliente.ToEntero, DdlSubProyecto.SelectedValue.ToEntero,
+ DdlEstatusFactura.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, FechaI, FechaF, FolioFiscal, If(DdlSucursalCliente.Visible, DdlSucursalCliente.SelectedValue.ToEntero, -1),
+ DdlPS.SelectedValue.ToEntero, PedidoContrato:=PeidoContrato, OrdenCompra:=OrdenCompra, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then
+ If ObjVentas.DtResultados.Rows.Count > 0 Then
+ LtlTotalRegistros.Text = ObjVentas.DtResultados.Rows.Count.ToString.FormatoNumero(0)
+ GV.DataSource = ObjVentas.DtResultados
+ Else
+ LtlTotalRegistros.Text = "0"
+ GV.DataSource = Nothing
+ Alert("No se encontraron registros con los parámetros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
+ End If
End If
+
+ ObjVentas.Dispose()
+ GV.DataBind()
+
+ UPDatos.Update()
+
+ TblBusqueda.Visible = True
+ Else
+ Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
End If
-
- ObjVentas.Dispose()
- GV.DataBind()
-
- UPDatos.Update()
-
- TblBusqueda.Visible = True
End Sub
Protected Sub GV_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GV.RowDataBound
@@ -271,4 +278,20 @@ Partial Class PopUpBuscarFolio
DdlEstatusFactura.Items.Add(New ListItem("Todos", "-1"))
DdlEstatusFactura.DataBind()
End Sub
+
+ Private Function ValidarUnFiltroSeleccionado() As Boolean
+ If DdlTipoDocto.SelectedValue.ToEntero > 0 Then Return True
+ If DdlSubProyecto.SelectedValue.ToEntero > 0 Then Return True
+ If DdlEstatusFactura.SelectedValue.ToEntero > 0 Then Return True
+ If DdlUsuario.SelectedValue.ToEntero > 0 Then Return True
+ If DdlPS.SelectedValue.ToEntero > 0 Then Return True
+
+ If DdlNombre.SelectedValue.ToEntero > 0 Then Return True
+ If TxtFolioFiscal.Text.Trim.Length > 0 Then Return True
+ If TxtPedidoContrato.Text.Length > 0 Then Return True
+ If TxtOrdenCompra.Text.Length > 0 Then Return True
+
+ Return False
+
+ End Function
End Class
diff --git a/Ventas/PopUpBuscarPs.aspx.vb b/Ventas/PopUpBuscarPs.aspx.vb
index f5baa1e9e..44825d642 100644
--- a/Ventas/PopUpBuscarPs.aspx.vb
+++ b/Ventas/PopUpBuscarPs.aspx.vb
@@ -64,18 +64,24 @@ Partial Class PopUpBuscarPs
If TxtCodigoBarras.Text.Trim = "" Then CodigoBarras = "-1" Else CodigoBarras = TxtCodigoBarras.Text.Trim
If TxtNombre.Text = "" Then Nombre = "-1" Else Nombre = TxtNombre.Text.ToUpper
- Dim ObjPS As New ClsProductosServicios
- If ObjPS.GetPS(-1, Ddlclasificacion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Codigo:=Codigo, CodigoBarras:=CodigoBarras, PS:=Nombre, pEstado:=DdlEstado.SelectedValue.ToEntero, CveTipoPS:=DdlCveTipoPS.SelectedValue.ToEntero, pAplicaParaVenta:=DdlAplicaVenta.SelectedValue.ToEntero, CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero) Then
- GvDatos.DataSource = ObjPS.DtResultados
- dvbusqueda.Visible = True
- Else
- GvDatos.DataSource = Nothing
- dvbusqueda.Visible = False
- End If
- ObjPS.Dispose()
+ If ValidarUnFiltroSeleccionado() Then
+ Dim ObjPS As New ClsProductosServicios
+ If ObjPS.GetPS(-1, Ddlclasificacion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Codigo:=Codigo, CodigoBarras:=CodigoBarras, PS:=Nombre,
+ pEstado:=DdlEstado.SelectedValue.ToEntero, CveTipoPS:=DdlCveTipoPS.SelectedValue.ToEntero, pAplicaParaVenta:=DdlAplicaVenta.SelectedValue.ToEntero,
+ CveCompuesto:=DdlCompuesto.SelectedValue.ToEntero) Then
+ GvDatos.DataSource = ObjPS.DtResultados
+ dvbusqueda.Visible = True
+ Else
+ GvDatos.DataSource = Nothing
+ dvbusqueda.Visible = False
+ End If
+ ObjPS.Dispose()
- GvDatos.DataBind()
- GvDatos.UseAccessibleHeader = True
+ GvDatos.DataBind()
+ GvDatos.UseAccessibleHeader = True
+ Else
+ Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
+ End If
End Sub
#End Region
@@ -91,6 +97,17 @@ Partial Class PopUpBuscarPs
End Sub
#End Region
+ Private Function ValidarUnFiltroSeleccionado() As Boolean
+ If TxtCodigo.Text.Trim <> String.Empty Then Return True
+ If TxtCodigoBarras.Text.Trim <> String.Empty Then Return True
+ If TxtNombre.Text.Trim <> String.Empty Then Return True
+
+ If DdlCveTipoPS.SelectedValue.ToEntero > 0 Then Return True
+ If DdlAplicaVenta.SelectedValue.ToEntero > 0 Then Return True
+ If DdlCompuesto.SelectedValue.ToEntero > 0 Then Return True
+
+ Return False
+ End Function
End Class
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index 212a0069d..f59b0d4b3 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -18371,6 +18371,10 @@ Partial Class Ventas
DtTemporal.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
End If
+ If Not DtTemporal.Columns.Contains("Serie") Then
+ DtTemporal.Columns.Add("Serie", Type.GetType("System.String"))
+ End If
+
GvInv.Columns(4).Visible = DtTemporal.MAX("Serie", "Serie <> ''") <> "" Or CveVenta <= 0
GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
GvInv.Columns(6).Visible = DtTemporal.MAX("FechaCaducidad").ToDate > MinFecha