agregando agrupadores vendedor, sucursal y total

This commit is contained in:
Antonio Gonzalez
2020-03-12 18:19:26 -07:00
parent 3fe79bdf95
commit f1e240086c
3 changed files with 16 additions and 6 deletions

View File

@@ -4359,7 +4359,8 @@ Public Class ClsVentas
Return retorno
End Function
Public Function GetRepMetasVendedores(FechaMesActual As String, CveEmpresa As Integer, CveVendedor As Integer, CveCategoria As Integer, CveClasificacion As Integer,
CveClasificacion2 As Integer, CveMarca As Integer, CveSubProyecto As Integer, CveCliente As Integer) As Boolean
CveClasificacion2 As Integer, CveMarca As Integer, CveSubProyecto As Integer, CveCliente As Integer,
Optional GrupoSuperior As Integer = 0) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Vta_MetasVendedores", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
@@ -4372,6 +4373,7 @@ Public Class ClsVentas
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@GrupoSuperior", SqlDbType.Int).Value = GrupoSuperior
End With
Try
SqlAdapter.Fill(Data)

View File

@@ -37,12 +37,12 @@
padding-right: 4px !important;
padding-left: 4px !important;
}
.Vendedor{
.GrupoSuperior{
background-color:#000077;
color:white;
font-weight:bold;
}
.Vendedor:hover{
.GrupoSuperior:hover{
background-color:#000077;
}
</style>
@@ -121,6 +121,14 @@
<div class="col-md-3">
<asp:DropDownList ID="DdlCliente" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%" DataValueField="CveCliente" DataTextField="NombreComercial"></asp:DropDownList>
</div>
<label class="col-md-1 text-right">Grupo: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%">
<asp:ListItem Value="0" Text="Por Vendedor"></asp:ListItem>
<asp:ListItem Value="1" Text="Por Sucursal"></asp:ListItem>
<asp:ListItem Value="2" Text="General"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>

View File

@@ -60,7 +60,7 @@ Partial Class MetasVendedores
Dim ObjVentas As New ClsVentas
If ObjVentas.GetRepMetasVendedores(TxtFechaMes.Text, UsuarioActual.CveEmpresa, DdlVendedorFiltro.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero,
DdlClasificaciones.SelectedValue.ToEntero, DdlClasificacion2.SelectedValue.ToEntero, DdlMarcaFiltro.SelectedValue.ToEntero,
DdlSubProyectoFiltro.SelectedValue.ToEntero, DdlCliente.SelectedValue.ToEntero) Then
DdlSubProyectoFiltro.SelectedValue.ToEntero, DdlCliente.SelectedValue.ToEntero, DdlGrupo.SelectedValue.ToEntero) Then
GV.DataSource = ObjVentas.DtResultados
DtDatos = ObjVentas.DtResultados
End If
@@ -78,8 +78,8 @@ Partial Class MetasVendedores
e.Row.FCLabel("lblRealMesPorcentaje").Text = String.Format("{0}{1}", e.Row.FCLabel("lblRealMesPorcentaje").Text, "%")
e.Row.FCLabel("lblVarVSAAPerc").Text = String.Format("{0}{1}", e.Row.FCLabel("lblVarVSAAPerc").Text, "%")
Select Case e.Row.DataKey("Etiqueta")
Case "Vendedor"
e.Row.CssClass = "Vendedor"
Case "GrupoSuperior"
e.Row.CssClass = "GrupoSuperior"
e.Row.FCLabel("lblRealMes").Text = ""
e.Row.FCLabel("lblVtaMesAA").Text = ""
e.Row.FCLabel("lblObjMes").Text = ""