From fd35d51e47e24edec86fa139ba9e7ff23a93f743 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 20 Mar 2020 11:15:32 -0700 Subject: [PATCH 1/5] . --- Ventas/RepIngresos.aspx.vb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Ventas/RepIngresos.aspx.vb b/Ventas/RepIngresos.aspx.vb index 467609afe..e82b64b60 100644 --- a/Ventas/RepIngresos.aspx.vb +++ b/Ventas/RepIngresos.aspx.vb @@ -144,10 +144,10 @@ Partial Class Ventas_RepIngresos Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - Dim FI As String = If(TxtFechaInicio.Text = "", "", $" Fecha Inicio: {TxtFechaInicio.Text}") - Dim FF As String = If(TxtFechaFin.Text = "", "", $" Fecha Fin: {TxtFechaFin.Text}") - Dim Tipo As String = If(DdlTipoDocto.SelectedValue = "-1", "", $" Tipo Docto.: {DdlTipoDocto.SelectedItem.Text}") - Dim subProy As String = If(DdlSubProyecto.SelectedValue = "-1", "", $" SubProyecto: {DdlSubProyecto.SelectedItem.Text}") + Dim FI As String = If(TxtFechaInicio.Text = "", "", $"Fecha Inicio: {TxtFechaInicio.Text} ") + Dim FF As String = If(TxtFechaFin.Text = "", "", $"Fecha Fin: {TxtFechaFin.Text} ") + Dim Tipo As String = If(DdlTipoDocto.SelectedValue = "", "", $"Tipo Docto: {DdlTipoDocto.GetSelectedText} ") + Dim subProy As String = If(DdlSubProyecto.SelectedValue = "", "", $"SubProyecto: {DdlSubProyecto.GetSelectedText} ") If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then @@ -156,7 +156,7 @@ Partial Class Ventas_RepIngresos params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("AgrupadoPor", $"{FI}{FF}{Tipo}{subProy}")) - + params.Add(New ReportParameter("FechaImpresion", DateAndTime.Now)) If Imagen.Exists Then params.Add(New ReportParameter("LogoPath", logouri)) Else From 89db1021391df4287d56a9cdc5d0ef3239fd25f9 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 20 Mar 2020 12:14:21 -0700 Subject: [PATCH 2/5] actualizando el catalogo de metas vendedores --- App_Code/ClsVentas.vb | 6 ++++-- Ventas/CatMetasVendedores.aspx | 17 ++++++++++++++++- Ventas/CatMetasVendedores.aspx.vb | 15 +++++++++++---- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 5c98d9754..04145d92c 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -4290,7 +4290,7 @@ Public Class ClsVentas End Try Return retorno End Function - Public Function AddMetasVendedores(CveVendedor As Integer, MesAño As Date, CveMarca As Integer, MetaCantidad As Integer, MetaImporte As Decimal, CveClasificacion As Integer) As Boolean + Public Function AddMetasVendedores(CveVendedor As Integer, MesAño As Date, CveMarca As Integer, MetaCantidad As Integer, MetaImporte As Decimal, CveClasificacion As Integer, CveClasificacionSup As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Vta_MetasVendedoresAdd", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters @@ -4300,6 +4300,7 @@ Public Class ClsVentas .Add("@MetaCantidad", SqlDbType.Int).Value = MetaCantidad .Add("@MetaImporte", SqlDbType.Decimal).Value = MetaImporte .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion + .Add("@CveClasificacionSup", SqlDbType.Int).Value = CveClasificacionSup End With Try SqlAdapter.Fill(Data) @@ -4338,7 +4339,7 @@ Public Class ClsVentas Return retorno End Function Public Function UpdateMetasVendedores(CveMeta As Integer, CveVendedor As Integer, MesAño As String, CveMarca As Integer, MetaCantidad As Integer, MetaImporte As Decimal, - CveClasificacion As Integer) As Boolean + CveClasificacion As Integer, CveClasificacionSup As Integer) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Vta_MetasVendedoresUpdate", CommandType.StoredProcedure) With SqlAdapter.SelectCommand.Parameters @@ -4349,6 +4350,7 @@ Public Class ClsVentas .Add("@MetaCantidad", SqlDbType.Int).Value = MetaCantidad .Add("@MetaImporte", SqlDbType.Decimal).Value = MetaImporte .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion + .Add("@CveClasificacionSup", SqlDbType.Int).Value = CveClasificacionSup End With Try SqlAdapter.Fill(Data) diff --git a/Ventas/CatMetasVendedores.aspx b/Ventas/CatMetasVendedores.aspx index cdc2accf6..d3dbf0c60 100644 --- a/Ventas/CatMetasVendedores.aspx +++ b/Ventas/CatMetasVendedores.aspx @@ -22,7 +22,7 @@ - + @@ -54,6 +54,16 @@ + + + + + + + + + + @@ -125,6 +135,11 @@ +
+ + + +
diff --git a/Ventas/CatMetasVendedores.aspx.vb b/Ventas/CatMetasVendedores.aspx.vb index dcc77690f..0f1e9f8f5 100644 --- a/Ventas/CatMetasVendedores.aspx.vb +++ b/Ventas/CatMetasVendedores.aspx.vb @@ -45,6 +45,10 @@ Partial Class CatMetasVendedores DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) DdlClasificacion.DataBind() DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1")) + + DdlClasificacionSup.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) + DdlClasificacionSup.DataBind() + DdlClasificacionSup.Items.Insert(0, New ListItem("Todos", "-1")) End Sub Protected Sub LnkAgregar_Click() Handles LnkAgregar.Click @@ -53,24 +57,26 @@ Partial Class CatMetasVendedores Protected Sub BtnAgregarMetaVendedor_Click(sender As Object, e As EventArgs) Handles BtnAgregarMetaVendedor.Click - If DdlVendedores.SelectedValue.ToEntero > 0 AndAlso TxtFechaI.Text <> "" AndAlso DdlMarcas.SelectedValue.ToEntero > 0 Then + If DdlVendedores.SelectedValue.ToEntero > 0 AndAlso TxtFechaI.Text <> "" AndAlso DdlMarcas.SelectedValue.ToEntero > 0 AndAlso DdlClasificacionSup.SelectedValue.ToEntero > 0 Then + Dim ObjVentas As New ClsVentas If BtnAgregarMetaVendedor.Text = "Agregar" Then If ObjVentas.AddMetasVendedores(DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text, DdlMarcas.SelectedValue.ToEntero, TxtMetaCantidad.Text.ToEntero, - TxtMetaImporte.Text.ToDecimal, DdlClasificacion.SelectedValue.ToEntero) Then + TxtMetaImporte.Text.ToDecimal, DdlClasificacion.SelectedValue.ToEntero, DdlClasificacionSup.SelectedValue.ToEntero) Then Alert("Se agregó la meta al vendedor") Else Alert("No se pudo agregar la meta al vendedor", TipoMensaje.MsgError) End If ElseIf BtnAgregarMetaVendedor.Text = "Actualizar" Then If ObjVentas.UpdateMetasVendedores(CveMetaVendedor, DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text, DdlMarcas.SelectedValue.ToEntero, - TxtMetaCantidad.TextMode.ToEntero, TxtMetaImporte.Text.ToDecimal, DdlClasificacion.SelectedValue.ToEntero) Then + TxtMetaCantidad.Text.ToEntero, TxtMetaImporte.Text.ToDecimal, DdlClasificacion.SelectedValue.ToEntero, + DdlClasificacionSup.SelectedValue.ToEntero) Then Alert("Se actualizó la información de la meta del vendedor") Else Alert("No se pudo actualizar la meta del vendedor", TipoMensaje.MsgError) End If End If - Else + Else Alert(String.Format("Falta Seleccionar {0}{1}{2}", If(DdlVendedores.SelectedValue.ToEntero > 0, "", "Vendedor, "), If(DdlMarcas.SelectedValue.ToEntero > 0, "", "Marca, "), If(TxtFechaI.Text <> "", "", "Fecha, "))) End If RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD")) @@ -94,6 +100,7 @@ Partial Class CatMetasVendedores CveMetaVendedor = GvRow.DataKey("CveMeta").ToEntero DdlVendedores.SelectedValue = GvRow.DataKey("CveVendedor") TxtFechaI.Text = GvRow.DataKey("MesAño") + DdlClasificacionSup.SelectedValue = GvRow.DataKey("CveClasificacionSup") DdlClasificacion.SelectedValue = GvRow.DataKey("CveClasificacion") DdlMarcas.SelectedValue = GvRow.DataKey("CveMarca") TxtMetaCantidad.Text = GvRow.DataKey("MetaCantidad") From 1f52e5c92ce014d8825bb11672d0fae18ed5a8fe Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 20 Mar 2020 12:25:47 -0700 Subject: [PATCH 3/5] acomodo --- Ventas/CatMetasVendedores.aspx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Ventas/CatMetasVendedores.aspx b/Ventas/CatMetasVendedores.aspx index d3dbf0c60..366e385c0 100644 --- a/Ventas/CatMetasVendedores.aspx +++ b/Ventas/CatMetasVendedores.aspx @@ -34,14 +34,14 @@ - + - + - - - + + + @@ -54,14 +54,14 @@ - + - + - - - + + + @@ -131,13 +131,13 @@
- - + +
- - + +
From 6a6fae6a965972019747c39316e3d18c232081c9 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 20 Mar 2020 17:58:12 -0700 Subject: [PATCH 4/5] =?UTF-8?q?acomodo=20en=20el=20tama=C3=B1o=20y=20escon?= =?UTF-8?q?der=20la=20opciones=20de=20filtro=20no=20requeridas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/MetasVendedores.aspx | 83 ++++++++++++++++------------------ Ventas/MetasVendedores.aspx.vb | 20 ++++---- 2 files changed, 48 insertions(+), 55 deletions(-) diff --git a/Ventas/MetasVendedores.aspx b/Ventas/MetasVendedores.aspx index b8b459039..efb1b7674 100644 --- a/Ventas/MetasVendedores.aspx +++ b/Ventas/MetasVendedores.aspx @@ -37,14 +37,16 @@ padding-right: 4px !important; padding-left: 4px !important; } - .GrupoSuperior{ - background-color:#000077; - color:white; - font-weight:bold; - } - .GrupoSuperior:hover{ - background-color:#000077; + + .GrupoSuperior { + background-color: #000077; + color: white; + font-weight: bold; } + + .GrupoSuperior:hover { + background-color: #000077; + } @@ -63,16 +65,15 @@ -
-
+
+
- "> + ">
-
Fecha del mes:
@@ -83,44 +84,12 @@
-
Sucursal:
- -
- -
-
-
- - -
- -
- - -
- -
- -
- -
-
-
- - -
- -
- -
- -
@@ -130,13 +99,37 @@
-
>
+ +
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
@@ -148,7 +141,7 @@ diff --git a/Ventas/MetasVendedores.aspx.vb b/Ventas/MetasVendedores.aspx.vb index a00223aec..41c71e9c0 100644 --- a/Ventas/MetasVendedores.aspx.vb +++ b/Ventas/MetasVendedores.aspx.vb @@ -80,16 +80,16 @@ Partial Class MetasVendedores Select Case e.Row.DataKey("Etiqueta") Case "GrupoSuperior" e.Row.CssClass = "GrupoSuperior" - e.Row.FCLabel("lblRealMes").Text = "" - e.Row.FCLabel("lblVtaMesAA").Text = "" - e.Row.FCLabel("lblObjMes").Text = "" - e.Row.FCLabel("lblRealAcumulado").Text = "" - e.Row.FCLabel("lblRealMesPorcentaje").Text = "" - e.Row.FCLabel("lblAAntAcumulado").Text = "" - e.Row.FCLabel("lblObjAcumulado").Text = "" - e.Row.FCLabel("lblVarVSAAPerc").Text = "" - e.Row.FCLabel("lblVarVSAA").Text = "" - e.Row.FCLabel("lblVarVSObjAcum").Text = "" + ' e.Row.FCLabel("lblRealMes").Text = "" + ' e.Row.FCLabel("lblVtaMesAA").Text = "" + ' e.Row.FCLabel("lblObjMes").Text = "" + ' e.Row.FCLabel("lblRealAcumulado").Text = "" + ' e.Row.FCLabel("lblRealMesPorcentaje").Text = "" + ' e.Row.FCLabel("lblAAntAcumulado").Text = "" + ' e.Row.FCLabel("lblObjAcumulado").Text = "" + ' e.Row.FCLabel("lblVarVSAAPerc").Text = "" + ' e.Row.FCLabel("lblVarVSAA").Text = "" + ' e.Row.FCLabel("lblVarVSObjAcum").Text = "" Case "Categoria" e.Row.CssClass = "Totales" Case "Clasificacion" From 806548fe2c7007f5bad9af855bf0488f4c60c839 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 20 Mar 2020 19:02:45 -0700 Subject: [PATCH 5/5] =?UTF-8?q?en=20promociones=20se=20agrego=20el=20campo?= =?UTF-8?q?=20"Marca"=20y=20en=20promocion=20detalle=20"CveRinTama=C3=B1o"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsVentas.vb | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 04145d92c..ce6cb92d0 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -1899,7 +1899,8 @@ Public Class ClsVentas End Function #Region " PROMOCIONES " - Public Function GetPromociones(CvePromocion As Integer, Fecha As String, CveVendedor As Integer, CveCliente As Integer, Estatus As Integer, CveEmpresa As Integer, CveSubProyecto As Integer) As Boolean + Public Function GetPromociones(CvePromocion As Integer, Fecha As String, CveVendedor As Integer, CveCliente As Integer, Estatus As Integer, CveEmpresa As Integer, + CveSubProyecto As Integer, Optional CveMarca As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_PromocionesGet") @@ -1911,6 +1912,7 @@ Public Class ClsVentas .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveMarca", SqlDbType.Int).Value = CveMarca End With Try @@ -1922,7 +1924,9 @@ Public Class ClsVentas Return Retorno End Function - Public Function AddPromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean, CveMoneda As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoAplicacion As String) As Integer + Public Function AddPromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean, + CveMoneda As Integer, CveUsuario As Integer, CveEmpresa As Integer, CveSubProyecto As Integer, TipoAplicacion As String, + Optional CveMarca As Integer = -1) As Integer Dim Retorno = -1 DataAdapter("PA_Vta_PromocionesAdd") @@ -1939,6 +1943,7 @@ Public Class ClsVentas .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@TipoAplicacion", SqlDbType.VarChar).Value = TipoAplicacion + .Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CvePromocion", SqlDbType.Int).Direction = ParameterDirection.Output End With @@ -1951,7 +1956,8 @@ Public Class ClsVentas Return Retorno End Function - Public Function UpdatePromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean, CveMoneda As Integer, CveUsuario As Integer, CvePromocion As Integer, CveSubProyecto As Integer) As Boolean + Public Function UpdatePromociones(Promocion As String, FechaInicio As Date, FechaFin As Date, CveVendedor As Integer, CveCliente As Integer, Estatus As Boolean, + CveMoneda As Integer, CveUsuario As Integer, CvePromocion As Integer, CveSubProyecto As Integer, Optional CveMarca As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_PromocionesUpdate") @@ -1967,6 +1973,7 @@ Public Class ClsVentas .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CvePromocion", SqlDbType.Float).Value = CvePromocion .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveMarca", SqlDbType.Int).Value = CveMarca End With Try @@ -2043,7 +2050,7 @@ Public Class ClsVentas Public Function AddPromocionesDetalle(CvePromocion As Integer, CvePS As Integer, TipoPromocion As Integer, Promocion As Double, PUAnterior As Double, PUPromocion As Double, AplicaRestriccion As Boolean, AplicaLunes As Boolean, AplicaMartes As Boolean, AplicaMiercoles As Boolean, AplicaJueves As Boolean, AplicaViernes As Boolean, AplicaSabado As Boolean, AplicaDomingo As Boolean, HoraInicio As DateTime, HoraFin As DateTime, Optional CantidadMinima As Integer = 1, - Optional CveClasificacion As Integer = -1) As Boolean + Optional CveClasificacion As Integer = -1, Optional CveRinTamaño As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_PromocionesDetalleAdd") @@ -2067,6 +2074,7 @@ Public Class ClsVentas .Add("@HoraFin", SqlDbType.DateTime).Value = HoraFin .Add("@CantidadMinima", SqlDbType.Int).Value = CantidadMinima .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion + .Add("@CveRinTamaño", SqlDbType.Int).Value = CveRinTamaño End With Try @@ -2081,7 +2089,7 @@ Public Class ClsVentas Public Function UpdatePromocionesDetalle(CvePromocionDetalle As Integer, CvePromocion As Integer, CvePS As Integer, TipoPromocion As Integer, Promocion As Double, PUAnterior As Double, PUPromocion As Double, AplicaRestriccion As Boolean, AplicaLunes As Boolean, AplicaMartes As Boolean, AplicaMiercoles As Boolean, AplicaJueves As Boolean, AplicaViernes As Boolean, AplicaSabado As Boolean, AplicaDomingo As Boolean, HoraInicio As DateTime, HoraFin As DateTime, - Optional CantidadMinima As Integer = 1, Optional CveClasificacion As Integer = -1) As Boolean + Optional CantidadMinima As Integer = 1, Optional CveClasificacion As Integer = -1, Optional CveRinTamaño As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_PromocionesDetalleUpdate") @@ -2106,6 +2114,7 @@ Public Class ClsVentas .Add("@CvePromocionDetalle", SqlDbType.Int).Value = CvePromocionDetalle .Add("@CantidadMinima", SqlDbType.Int).Value = CantidadMinima .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion + .Add("@CveRinTamaño", SqlDbType.Int).Value = CveRinTamaño End With Try