diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx b/Acumuladores/RepEntradasUsadosClientes.aspx
index 36a2fb0f6..c2da0c83c 100644
--- a/Acumuladores/RepEntradasUsadosClientes.aspx
+++ b/Acumuladores/RepEntradasUsadosClientes.aspx
@@ -72,15 +72,77 @@
-
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ | Cliente: |
+
+ |
+
+
+ | TamaƱo: |
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Acumuladores/RepEntradasUsadosClientes.aspx.vb b/Acumuladores/RepEntradasUsadosClientes.aspx.vb
index 8925785f9..75e36daaf 100644
--- a/Acumuladores/RepEntradasUsadosClientes.aspx.vb
+++ b/Acumuladores/RepEntradasUsadosClientes.aspx.vb
@@ -49,7 +49,7 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
Dim Acum As New ClsAcumuladores
If Acum.EntradasUsadosClientesRep(CveAlmacen, FechaI, FechaF, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
- GvDatos.DataSource = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") 'los renglones generados con esta caracteriztica son con un grouping set en la consulta, se pueden quitar
+ GvDatos.DataSource = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'") 'los renglones generados con esta caracteriztica son con un grouping set en la consulta, se pueden quitar
DatosEntradasUsadosClientes = Acum.DtResultados.FiltraParametros("Codigo_Clientes <> 'Total:'")
End If
@@ -61,18 +61,11 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
- 'If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then
- ' e.Row.CssClass = "SubTotales2"
- 'End If
- If e.Row.DBCampo("TipoHeader").ToString = "1" Then
- e.Row.CssClass = "Totales"
- ElseIf e.Row.DBCampo("TipoHeader").ToString = "2" Then
- e.Row.CssClass = "SubTotales"
- ElseIf e.Row.DBCampo("TipoHeader").ToString = "3" Then
- e.Row.CssClass = "SubTotales2"
- End If
- End If
+ If e.Row.DBCampo("EsHeader").ToString = "-1" Or e.Row.DBCampo("Codigo").ToString = "" Then
+ e.Row.CssClass = "SubTotales2"
+ End If
+ End If
End Sub
Protected Sub BtnImprimir_Click(sender As Object, e As EventArgs)
@@ -96,4 +89,19 @@ Partial Class Acumuladores_RepEntradasUsadosClientes
End Sub
+ Public Sub CargarVentasGrupo(sender As Object, e As EventArgs)
+ Dim tempLink As LinkButton = CType(sender, LinkButton)
+ Dim renglon As GridViewRow = CType(tempLink.NamingContainer, GridViewRow)
+
+ LbCliente.Text = renglon.DataKey("NombreComercial")
+ LbTam.Text = renglon.DataKey("Codigo")
+ Dim ObjAcum As New ClsAcumuladores
+ If ObjAcum.GetUsadosClasificacionVentas(renglon.DataKey("CveCliente"), renglon.DataKey("Codigo"), TxtFechaI.Text, TxtFechaF.Text) Then
+ GvVentas.DataSource = ObjAcum.DtResultados
+ End If
+ ObjAcum.Dispose()
+ GvVentas.DataBind()
+
+ RegistraScript("$('#ModalVentasAvance').modal('show');RecargaAvances = true;")
+ End Sub
End Class
diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb
index 0a9418855..3720d4918 100644
--- a/App_Code/ClsAcumuladores.vb
+++ b/App_Code/ClsAcumuladores.vb
@@ -1039,6 +1039,29 @@ Public Class ClsAcumuladores
Return Retorno
End Function
+ Public Function GetUsadosClasificacionVentas(CveCliente As Integer, Codigo As String, FechaInicio As String, FechaFin As String) As Boolean
+
+ Dim Retorno As Boolean = False
+
+ SqlDataAdapter("PA_Acum_UsadosClasificacionVentas")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
+ .Add("@Codigo", SqlDbType.VarChar).Value = Codigo
+ .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
+ .Add("@FechaFin", SqlDbType.Date).Value = FechaFin
+ End With
+
+ Try
+ SqlAdapter.Fill(Data)
+ Retorno = True
+ Catch ex As SqlException
+ OnError("Ocurrió un error al consultar los datos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+ End Try
+
+ Return Retorno
+ End Function
+
#Region " IDisposable Support "