cambios en filtro de Categoría en
repentradassalidas reputilidadventas
This commit is contained in:
@@ -1730,7 +1730,7 @@ Public Class ClsInventarios
|
||||
|
||||
|
||||
Public Function RepMovimientos(CveEmpresa As Integer, CveMoneda As Integer, FechaI As String, FechaF As String, CveConcepto As Integer, CveProveedor As Integer, Almacenes As String,
|
||||
CveFamilia As Integer, CveSubFamilia As Integer, CvePS As Integer, CveClasificacion As Integer, Tipo As Integer, Optional CveMarca As Integer = -1, Optional CvePersonal As Integer = -1,
|
||||
CveCategoria As Integer, CveClasificacion As Integer, CvePS As Integer, Tipo As Integer, Optional CveMarca As Integer = -1, Optional CvePersonal As Integer = -1,
|
||||
Optional CveClasificacion2 As Integer = -1, Optional CveTipoAlmacen As String = "-1", Optional Modalidad As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1745,8 +1745,8 @@ Public Class ClsInventarios
|
||||
.Add("@CveConcepto", SqlDbType.Int).Value = CveConcepto
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@Almacenes", SqlDbType.VarChar).Value = Almacenes
|
||||
.Add("@CveFamilia", SqlDbType.Int).Value = CveFamilia
|
||||
.Add("@CveSubFamilia", SqlDbType.Int).Value = CveSubFamilia
|
||||
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
|
||||
' .Add("@CveSubFamilia", SqlDbType.Int).Value = CveSubFamilia
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
|
||||
@@ -2482,19 +2482,29 @@ Public Class ClsPaginas
|
||||
|
||||
#Region "***********************************************************************DT GENERALES**************************************************************************************"
|
||||
Property GlobalDTGralCategorias(CveEmpresa As Integer) As DataTable
|
||||
|
||||
Get
|
||||
If CveEmpresa <> -1 Then
|
||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTGralCategorias"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
||||
GlobalDTGralCategorias = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
Else
|
||||
GlobalDTGralCategorias = DirectCast(Application("GlobalDTGralCategorias"), DataTable)
|
||||
Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa)
|
||||
'sino existe, recarga los datos
|
||||
If DirectCast(Application(AppNombre), DataTable) Is Nothing Then
|
||||
Dim ObjGenerales As New ClsGenerales
|
||||
If ObjGenerales.GetCategorias(CveEmpresa) Then Application(AppNombre) = ObjGenerales.DtResultados Else Application(AppNombre) = Nothing
|
||||
ObjGenerales.Dispose()
|
||||
End If
|
||||
|
||||
Dim filtro As New StringBuilder
|
||||
'If CveMarca > 0 Then
|
||||
' filtro.AppendFormat(" CveMarca={0} ", CveMarca)
|
||||
'End If
|
||||
|
||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), filtro.ToString, "", DataViewRowState.CurrentRows)
|
||||
GlobalDTGralCategorias = Dv.ToTable
|
||||
Dv.Dispose()
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Application("GlobalDTGralCategorias") = value
|
||||
Dim AppNombre As String = String.Format("GlobalDTGralCategorias-{0}", CveEmpresa)
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
|
||||
End Property
|
||||
Property GlobalDTGralCategorias2(CveEmpresa As Integer) As DataTable
|
||||
|
||||
|
||||
@@ -2845,7 +2845,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetReporteVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean
|
||||
Public Function GetReporteVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUtilidadGet")
|
||||
|
||||
@@ -2857,6 +2857,7 @@ Public Class ClsVentas
|
||||
.Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
End With
|
||||
@@ -2873,7 +2874,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetReporteVentasUtilidadDetalle(CveVendedor As String, CveVenta As Integer, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean
|
||||
Public Function GetReporteVentasUtilidadDetalle(CveVendedor As String, CveVenta As Integer, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUtilidadDetalleGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -2885,6 +2886,7 @@ Public Class ClsVentas
|
||||
.Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
End With
|
||||
@@ -2904,7 +2906,7 @@ Public Class ClsVentas
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetReportePadreVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Gpo As Integer, CvePS As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean
|
||||
Public Function GetReportePadreVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Gpo As Integer, CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_RepVentasUtilidadGet")
|
||||
|
||||
@@ -2917,6 +2919,7 @@ Public Class ClsVentas
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Gpo", SqlDbType.Int).Value = Gpo
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||
End With
|
||||
|
||||
@@ -235,7 +235,7 @@
|
||||
'If ObjGenerales.GetGralMunicipios Then Application("GlobalDTGralMunicipios") = ObjGenerales.DtResultados Else Application("GlobalDTGralMunicipios") = Nothing
|
||||
'If ObjGenerales.GetGralPoblaciones Then Application("GlobalDTGralPoblaciones") = ObjGenerales.DtResultados Else Application("GlobalDTGralPoblaciones") = Nothing
|
||||
If ObjGenerales.GetEscolaridades Then Application("GlobalDTGralEscolaridades") = ObjGenerales.DtResultados Else Application("GlobalDTGralEscolaridades") = Nothing
|
||||
If ObjGenerales.GetCategorias Then Application("GlobalDTGralCategorias") = ObjGenerales.DtResultados Else Application("GlobalDTGralCategorias") = Nothing
|
||||
'If ObjGenerales.GetCategorias Then Application("GlobalDTGralCategorias") = ObjGenerales.DtResultados Else Application("GlobalDTGralCategorias") = Nothing
|
||||
If ObjGenerales.GetCategorias(-1, 2) Then Application("GlobalDTFamilias") = ObjGenerales.DtResultados Else Application("GlobalDTFamilias") = Nothing
|
||||
If ObjGenerales.GetCategorias(-1, 3) Then Application("GlobalDTCategoriasPresupuestos") = ObjGenerales.DtResultados Else Application("GlobalDTCategoriasPresupuestos") = Nothing
|
||||
If ObjGenerales.GetCategorias(-1, 4) Then Application("GlobalDTCategorias2") = ObjGenerales.DtResultados Else Application("GlobalDTCategorias2") = Nothing
|
||||
|
||||
@@ -105,9 +105,9 @@
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlMoneda" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataTextField="Moneda" DataValueField="CveMoneda"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" style="width:150px !important">Solo con Movimientos</div>
|
||||
<div class="col-md-1 truncate">Opción</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlMovs" CssClass="form-control input-sm select2me" runat="server" Width="250" DataValueField="CveAlmacen" DataTextField="Almacen">
|
||||
<asp:DropDownList ID="DdlMovs" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataValueField="CveAlmacen" DataTextField="Almacen">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Con Movimientos" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Sin Movimientos" Value="5"></asp:ListItem>
|
||||
@@ -121,17 +121,24 @@
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProveedor" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveProveedor" DataTextField="RazonSocial"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Categoría</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCategoria" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlCategoria_SelectedIndexChanged" Width="100%" DataTextField="Categoria" DataValueField="CveCategoria"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Clasificación</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClasificacion" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlClasificacion_SelectedIndexChanged" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" style="width:50px !important" >PS</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 truncate" >Producto</div>
|
||||
<div class="col-md-2">
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS" CssClassDdl="select2me " DataTextField="PSCodigo" DataValueField="CvePS" />
|
||||
<%--<asp:DropDownList ID="DdlPS" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataTextField="PS" DataValueField="CvePS"></asp:DropDownList>--%>
|
||||
</div>
|
||||
<div runat="Server" id="DivMarca">
|
||||
<div class="col-md-1 truncate" style="width:50px !important" >Marca</div>
|
||||
<div class="col-md-1 truncate" >Marca</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlMarca" runat="server" CssClass="form-control input-sm select2me" Width="100%" DataValueField="CveMarca" DataTextField="Marca"></asp:DropDownList>
|
||||
</div>
|
||||
@@ -164,10 +171,7 @@
|
||||
|
||||
</div>
|
||||
<div id="DivFamiliaSubFamilia" style="display:none" class="row" runat="server" visible="false">
|
||||
<div class="col-md-1 truncate">Familia</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlFamilia" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlFamilia_SelectedIndexChanged" Width="100%" DataTextField="Categoria" DataValueField="CveCategoria"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate" >SubFamilia</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubFamilia" CssClass="form-control input-sm select2me" runat="server" Width="100%" DataTextField="Clasificacion" DataValueField="CveClasificacion"></asp:DropDownList>
|
||||
|
||||
@@ -59,10 +59,6 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DivFamiliaSubFamilia.Visible = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||
LnkFormatoInventario.Visible = True
|
||||
End If
|
||||
@@ -144,26 +140,25 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlFamilia.DataSource = GlobalDTFamilias(UsuarioActual.CveEmpresa)
|
||||
DdlFamilia.DataBind()
|
||||
End If
|
||||
DdlFamilia.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
||||
DdlCategoria.DataBind()
|
||||
|
||||
DdlCategoria.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
DdlSubFamilia.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
'Carga Productos
|
||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
DdlPS.setEsWebService(True)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
DdlPS.SelectedText = ""
|
||||
DdlPS.SelectedValue = "-1"
|
||||
Else
|
||||
DdlPS.ddl.Items.Clear()
|
||||
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||
DdlPS.ddl.DataBind()
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
End If
|
||||
'If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
DdlPS.SelectedText = ""
|
||||
DdlPS.SelectedValue = "-1"
|
||||
'Else
|
||||
' DdlPS.ddl.Items.Clear()
|
||||
' DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||
' DdlPS.ddl.DataBind()
|
||||
' DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
'End If
|
||||
|
||||
DdlMovs.SelectedValue = "2"
|
||||
|
||||
@@ -190,12 +185,10 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
DdlTipoAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
End Sub
|
||||
Protected Sub DdlFamilia_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlSubFamilia.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa, DdlFamilia.SelectedValue.ToEntero)
|
||||
DdlSubFamilia.DataBind()
|
||||
DdlSubFamilia.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
|
||||
|
||||
Protected Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveCategoria:=DdlCategoria.SelectedValue.ToEntero)
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
End Sub
|
||||
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
|
||||
CargaDatos()
|
||||
@@ -218,7 +211,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
End If
|
||||
|
||||
If Reporte.RepMovimientos(UsuarioActual.CveEmpresa, DdlMoneda.SelectedValue.ToEntero, FechaInicial, FechaFinal, DdlTipoMovimiento.SelectedValue.ToEntero, DdlProveedor.SelectedValue.ToEntero,
|
||||
Almacenes, DdlFamilia.SelectedValue.ToEntero, DdlSubFamilia.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero,
|
||||
Almacenes, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero,
|
||||
DdlMovs.SelectedValue.ToEntero, CveMarca, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero, CveTipoAlmacen:=TipoAlmacen,
|
||||
Modalidad:=DdlModalidadFiltro.SelectedValue.ToEntero) Then
|
||||
dt = Reporte.DtResultados
|
||||
@@ -353,7 +346,7 @@ Partial Class Inventarios_ReporteEntradasSalidas
|
||||
Dim SoloConMov = If(DdlMovs.SelectedValue = "-1", "", $" <b>Solo Movimientos:</b> {DdlMovs.SelectedItem.Text}")
|
||||
Dim Proveedor = If(DdlProveedor.SelectedValue = "-1", "", $" <b>Proveedor:</b> {DdlProveedor.SelectedItem.Text}")
|
||||
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" <b>Clasificación:</b> {DdlClasificacion.SelectedItem.Text}")
|
||||
Dim Familia = If(DdlFamilia.SelectedValue = "-1", "", $" <b>Familia:</b> {DdlFamilia.SelectedItem.Text}")
|
||||
Dim Familia = If(DdlCategoria.SelectedValue = "-1", "", $" <b>Categoria:</b> {DdlCategoria.SelectedItem.Text}")
|
||||
Dim SubFamilia = If(DdlSubFamilia.SelectedValue = "-1", "", $" <b>SubFamilia:</b> {DdlSubFamilia.SelectedItem.Text}")
|
||||
Dim PS = If(DdlPS.SelectedValue = "-1", "", $" <b>PS:</b> {DdlPS.SelectedText}")
|
||||
Dim FechaIn As String = $" <b>Fecha Inicio:</b> {TxtFechaI.Text}"
|
||||
|
||||
@@ -177,6 +177,10 @@
|
||||
</asp:DropDownList>--%>
|
||||
<asp:ListBox ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Categoría</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCategoria" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlCategoria_SelectedIndexChanged" Width="100%" DataTextField="Categoria" DataValueField="CveCategoria"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Clasificación:
|
||||
</div>
|
||||
|
||||
@@ -38,7 +38,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
txtFechaF.Text = Now.LastDayOfMonth.ToShortDateString
|
||||
|
||||
'Carga Clientes
|
||||
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
Dim EsWS As Boolean = True
|
||||
If EsWS Then
|
||||
DdlClientes.setEsWebService(True)
|
||||
DdlClientes.SelectedValue = "-1"
|
||||
@@ -63,6 +63,11 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
'Cargo categorias
|
||||
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
||||
DdlCategoria.DataBind()
|
||||
|
||||
|
||||
'Cargo Clasificaciones
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
@@ -133,6 +138,14 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
txtFechaF.Text = CveGpo
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveCategoria:=DdlCategoria.SelectedValue.ToEntero)
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " CARGA DATOS "
|
||||
@@ -151,7 +164,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
DtVentas = ObjVentas.DtResultados
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
GvDatos.DataBind()
|
||||
@@ -302,7 +315,7 @@ Partial Class Ventas_RepVentasUtilidad
|
||||
Dim Sucursales As String = IIf(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM).ToString
|
||||
Dim Vendedores As String = IIf(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM).ToString
|
||||
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
If ObjVentas.GetReporteVentasUtilidad(Vendedores, DdlClientes.SelectedValue.ToEntero, Sucursales, FechaI, FechaF, UsuarioActual.CveEmpresa, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlMarcas.SelectedValue.ToEntero) Then
|
||||
|
||||
Dim FechaInicio As String = txtFechaI.Text
|
||||
Dim FechaFin As String = txtFechaF.Text
|
||||
|
||||
@@ -79,24 +79,16 @@
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">Grupo:</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Año Venta" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Año/Mes Venta" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Fecha Venta" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Cliente" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Sucursal" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Vendedor" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Producto/Servicio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Clasificación" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Marca" Value="9"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Sucursal:
|
||||
</div>
|
||||
<div class="col-md-1 " style="min-width:135px !important">
|
||||
<asp:ListBox ID="DdlSubProyecto" SelectionMode="Multiple" data-text="Todas" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-1" style="min-width:120px !important">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
@@ -113,7 +105,7 @@
|
||||
<div class="col-md-1 truncate">
|
||||
Fecha Fin:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="col-md-1" style="min-width:120px !important">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
@@ -127,17 +119,27 @@
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">Grupo:</div>
|
||||
<div class="col-md-1 truncate">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Año Venta" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Año/Mes Venta" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Fecha Venta" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Cliente" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Sucursal" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Vendedor" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Producto/Servicio" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Clasificación" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Marca" Value="9"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Sucursal:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:ListBox ID="DdlSubProyecto" SelectionMode="Multiple" data-text="Todas" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Cliente:
|
||||
</div>
|
||||
@@ -150,6 +152,10 @@
|
||||
<div class="col-md-2 ">
|
||||
<asp:ListBox ID="DdlVendedor" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:ListBox>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">Categoría</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCategoria" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlCategoria_SelectedIndexChanged" Width="100%" DataTextField="Categoria" DataValueField="CveCategoria"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Clasificación:
|
||||
</div>
|
||||
|
||||
@@ -68,6 +68,10 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
'Cargo categorias
|
||||
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
||||
DdlCategoria.DataBind()
|
||||
|
||||
'Cargo Clasificaciones
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
@@ -94,6 +98,12 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
LblPorNeto.Text = "0"
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveCategoria:=DdlCategoria.SelectedValue.ToEntero)
|
||||
DdlClasificacion.DataBind()
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If DdlPS.UsaWebService Then
|
||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
@@ -114,7 +124,7 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetReportePadreVentasUtilidad(If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM), DdlClientesWS.SelectedValue.ToEntero,
|
||||
If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM), txtFechaI.Text.ToDate, txtFechaF.Text.ToDate,
|
||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero,
|
||||
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero,
|
||||
DdlMarcas.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
DtDatos = ObjVentas.DtResultados
|
||||
|
||||
Reference in New Issue
Block a user