This commit is contained in:
2020-03-21 12:24:31 -07:00
6 changed files with 103 additions and 77 deletions

View File

@@ -1899,7 +1899,8 @@ Public Class ClsVentas
End Function End Function
#Region " PROMOCIONES " #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 Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesGet") DataAdapter("PA_Vta_PromocionesGet")
@@ -1911,6 +1912,7 @@ Public Class ClsVentas
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
End With End With
Try Try
@@ -1922,7 +1924,9 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function 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 Dim Retorno = -1
DataAdapter("PA_Vta_PromocionesAdd") DataAdapter("PA_Vta_PromocionesAdd")
@@ -1939,6 +1943,7 @@ Public Class ClsVentas
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@TipoAplicacion", SqlDbType.VarChar).Value = TipoAplicacion .Add("@TipoAplicacion", SqlDbType.VarChar).Value = TipoAplicacion
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CvePromocion", SqlDbType.Int).Direction = ParameterDirection.Output .Add("@CvePromocion", SqlDbType.Int).Direction = ParameterDirection.Output
End With End With
@@ -1951,7 +1956,8 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function 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 Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesUpdate") DataAdapter("PA_Vta_PromocionesUpdate")
@@ -1967,6 +1973,7 @@ Public Class ClsVentas
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CvePromocion", SqlDbType.Float).Value = CvePromocion .Add("@CvePromocion", SqlDbType.Float).Value = CvePromocion
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
End With End With
Try 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, 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, 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, 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 Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesDetalleAdd") DataAdapter("PA_Vta_PromocionesDetalleAdd")
@@ -2067,6 +2074,7 @@ Public Class ClsVentas
.Add("@HoraFin", SqlDbType.DateTime).Value = HoraFin .Add("@HoraFin", SqlDbType.DateTime).Value = HoraFin
.Add("@CantidadMinima", SqlDbType.Int).Value = CantidadMinima .Add("@CantidadMinima", SqlDbType.Int).Value = CantidadMinima
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveRinTamaño", SqlDbType.Int).Value = CveRinTamaño
End With End With
Try 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, 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, 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, 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 Dim Retorno As Boolean = False
DataAdapter("PA_Vta_PromocionesDetalleUpdate") DataAdapter("PA_Vta_PromocionesDetalleUpdate")
@@ -2106,6 +2114,7 @@ Public Class ClsVentas
.Add("@CvePromocionDetalle", SqlDbType.Int).Value = CvePromocionDetalle .Add("@CvePromocionDetalle", SqlDbType.Int).Value = CvePromocionDetalle
.Add("@CantidadMinima", SqlDbType.Int).Value = CantidadMinima .Add("@CantidadMinima", SqlDbType.Int).Value = CantidadMinima
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveRinTamaño", SqlDbType.Int).Value = CveRinTamaño
End With End With
Try Try
@@ -4290,7 +4299,7 @@ Public Class ClsVentas
End Try End Try
Return retorno Return retorno
End Function 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 Dim retorno As Boolean = False
DataAdapter("PA_Vta_MetasVendedoresAdd", CommandType.StoredProcedure) DataAdapter("PA_Vta_MetasVendedoresAdd", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -4300,6 +4309,7 @@ Public Class ClsVentas
.Add("@MetaCantidad", SqlDbType.Int).Value = MetaCantidad .Add("@MetaCantidad", SqlDbType.Int).Value = MetaCantidad
.Add("@MetaImporte", SqlDbType.Decimal).Value = MetaImporte .Add("@MetaImporte", SqlDbType.Decimal).Value = MetaImporte
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveClasificacionSup", SqlDbType.Int).Value = CveClasificacionSup
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
@@ -4338,7 +4348,7 @@ Public Class ClsVentas
Return retorno Return retorno
End Function End Function
Public Function UpdateMetasVendedores(CveMeta As Integer, CveVendedor As Integer, MesAño As String, CveMarca As Integer, MetaCantidad As Integer, MetaImporte As Decimal, 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 Dim retorno As Boolean = False
DataAdapter("PA_Vta_MetasVendedoresUpdate", CommandType.StoredProcedure) DataAdapter("PA_Vta_MetasVendedoresUpdate", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
@@ -4349,6 +4359,7 @@ Public Class ClsVentas
.Add("@MetaCantidad", SqlDbType.Int).Value = MetaCantidad .Add("@MetaCantidad", SqlDbType.Int).Value = MetaCantidad
.Add("@MetaImporte", SqlDbType.Decimal).Value = MetaImporte .Add("@MetaImporte", SqlDbType.Decimal).Value = MetaImporte
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveClasificacionSup", SqlDbType.Int).Value = CveClasificacionSup
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -22,7 +22,7 @@
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMeta,CveVendedor,CveMarca,CveClasificacion,Vendedor,MesAño,Marca,Clasificacion,MetaCantidad,MetaImporte" EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;width:100%" GridLines="None"> <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMeta,CveVendedor,CveMarca,CveClasificacion,CveClasificacionSup,Vendedor,MesAño,Marca,Clasificacion,MetaCantidad,MetaImporte" EmptyDataText="No se encontraron Motivo de Baja Registrados" ToolTip="Listado de Metas Vendedor" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;width:100%" GridLines="None">
<Columns> <Columns>
<asp:TemplateField HeaderText ="Vendedor" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField HeaderText ="Vendedor" ItemStyle-HorizontalAlign="Left">
<ItemTemplate> <ItemTemplate>
@@ -34,14 +34,14 @@
<ajax:ValidatorCalloutExtender ID="VCVendedor" runat="server" HighlightCssClass="vco" TargetControlID="RFVVendedor" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCVendedor" runat="server" HighlightCssClass="vco" TargetControlID="RFVVendedor" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText ="Marca" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField HeaderText ="Clasificación superior">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlMarca" runat="server" Text='<%# Eval("Marca", "&nbsp;{0}") %>'></asp:Literal> <asp:Literal ID="LtlClasificacionSup" runat="server" Text='<%# Eval("ClasificacionSup", "&nbsp;{0}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
<EditItemTemplate> <EditItemTemplate>
<asp:TextBox ID="TxtMarca" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Marca") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox> <asp:TextBox ID="TxtClasificacionSup" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("ClasificacionSup") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVMarca" runat="server" ControlToValidate="TxtMarca" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marca''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVClasificacionSup" runat="server" ControlToValidate="TxtClasificacionSup" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Clasificacion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCMarca" runat="server" HighlightCssClass="vco" TargetControlID="RFVMarca" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCClasificacionSup" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacionSup" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText ="Clasificacion"> <asp:TemplateField HeaderText ="Clasificacion">
@@ -54,6 +54,16 @@
<ajax:ValidatorCalloutExtender ID="VCClasificacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacion" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCClasificacion" runat="server" HighlightCssClass="vco" TargetControlID="RFVClasificacion" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate> </EditItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText ="Marca" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Literal ID="LtlMarca" runat="server" Text='<%# Eval("Marca", "&nbsp;{0}") %>'></asp:Literal>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="TxtMarca" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Marca") %>' ValidationGroup="GrpGV" Width="234px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVMarca" runat="server" ControlToValidate="TxtMarca" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Marca''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGV"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCMarca" runat="server" HighlightCssClass="vco" TargetControlID="RFVMarca" Width="300px"></ajax:ValidatorCalloutExtender>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText ="MesAño"> <asp:TemplateField HeaderText ="MesAño">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlMesAño" runat="server" Text='<%# Eval("MesAño", "&nbsp;{0}") %>'></asp:Literal> <asp:Literal ID="LtlMesAño" runat="server" Text='<%# Eval("MesAño", "&nbsp;{0}") %>'></asp:Literal>
@@ -120,6 +130,11 @@
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="TxtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CEFechaI" TargetControlID="TxtFechaI" PopupButtonID="ImgFechaI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div> </div>
<div class="form-group form-md-line-input input-iconright">
<label for="DdlMarcas">Clasificacion Superior:</label>
<asp:DropDownList ID="DdlClasificacionSup" runat="server" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me"></asp:DropDownList>
<i></i>
</div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<label for="DdlMarcas">Clasificacion:</label> <label for="DdlMarcas">Clasificacion:</label>
<asp:DropDownList ID="DdlClasificacion" runat="server" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me"></asp:DropDownList> <asp:DropDownList ID="DdlClasificacion" runat="server" DataTextField="Clasificacion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me"></asp:DropDownList>

View File

@@ -45,6 +45,10 @@ Partial Class CatMetasVendedores
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlClasificacion.DataBind() DdlClasificacion.DataBind()
DdlClasificacion.Items.Insert(0, New ListItem("Todos", "-1")) 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 End Sub
Protected Sub LnkAgregar_Click() Handles LnkAgregar.Click 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 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 Dim ObjVentas As New ClsVentas
If BtnAgregarMetaVendedor.Text = "Agregar" Then If BtnAgregarMetaVendedor.Text = "Agregar" Then
If ObjVentas.AddMetasVendedores(DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text, DdlMarcas.SelectedValue.ToEntero, TxtMetaCantidad.Text.ToEntero, 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") Alert("Se agregó la meta al vendedor")
Else Else
Alert("No se pudo agregar la meta al vendedor", TipoMensaje.MsgError) Alert("No se pudo agregar la meta al vendedor", TipoMensaje.MsgError)
End If End If
ElseIf BtnAgregarMetaVendedor.Text = "Actualizar" Then ElseIf BtnAgregarMetaVendedor.Text = "Actualizar" Then
If ObjVentas.UpdateMetasVendedores(CveMetaVendedor, DdlVendedores.SelectedValue.ToEntero, TxtFechaI.Text, DdlMarcas.SelectedValue.ToEntero, 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") Alert("Se actualizó la información de la meta del vendedor")
Else Else
Alert("No se pudo actualizar la meta del vendedor", TipoMensaje.MsgError) Alert("No se pudo actualizar la meta del vendedor", TipoMensaje.MsgError)
End If End If
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, "))) 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 End If
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD")) RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarTiposD"))
@@ -94,6 +100,7 @@ Partial Class CatMetasVendedores
CveMetaVendedor = GvRow.DataKey("CveMeta").ToEntero CveMetaVendedor = GvRow.DataKey("CveMeta").ToEntero
DdlVendedores.SelectedValue = GvRow.DataKey("CveVendedor") DdlVendedores.SelectedValue = GvRow.DataKey("CveVendedor")
TxtFechaI.Text = GvRow.DataKey("MesAño") TxtFechaI.Text = GvRow.DataKey("MesAño")
DdlClasificacionSup.SelectedValue = GvRow.DataKey("CveClasificacionSup")
DdlClasificacion.SelectedValue = GvRow.DataKey("CveClasificacion") DdlClasificacion.SelectedValue = GvRow.DataKey("CveClasificacion")
DdlMarcas.SelectedValue = GvRow.DataKey("CveMarca") DdlMarcas.SelectedValue = GvRow.DataKey("CveMarca")
TxtMetaCantidad.Text = GvRow.DataKey("MetaCantidad") TxtMetaCantidad.Text = GvRow.DataKey("MetaCantidad")

View File

@@ -37,14 +37,16 @@
padding-right: 4px !important; padding-right: 4px !important;
padding-left: 4px !important; padding-left: 4px !important;
} }
.GrupoSuperior{
background-color:#000077; .GrupoSuperior {
color:white; background-color: #000077;
font-weight:bold; color: white;
} font-weight: bold;
.GrupoSuperior:hover{
background-color:#000077;
} }
.GrupoSuperior:hover {
background-color: #000077;
}
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
@@ -63,16 +65,15 @@
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel runat="server" ID="UpFiltros"> <asp:UpdatePanel runat="server" ID="UpFiltros">
<ContentTemplate> <ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter" style=""> <div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 122px; position: relative;"> <div class="portlet-title portlet-filterT smalltitle" style="min-height: 45px; position: relative;">
<div class="tools"> <div class="tools">
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td> <asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td>
<a href="javascript:;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a> <a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" /> <asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div> </div>
<div class="titlefiltros caption magindate"> <div class="titlefiltros caption magindate">
<div class="row"> <div class="row">
<div class="col-md-1 truncate text-right">Fecha del mes: </div> <div class="col-md-1 truncate text-right">Fecha del mes: </div>
<div class="col-md-3 col-sm-2"> <div class="col-md-3 col-sm-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;"> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
@@ -83,44 +84,12 @@
</div> </div>
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaMes" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaMes" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaMes" PopupButtonID="ImgFechaMes" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender> <ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaMes" PopupButtonID="ImgFechaMes" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div> </div>
<div class="col-md-1 text-right">Sucursal: </div> <div class="col-md-1 text-right">Sucursal: </div>
<div class="col-md-3"> <div class="col-md-3">
<asp:DropDownList ID="DdlSubProyectoFiltro" runat="server" CssClass="form-control input-sm select2me" Width="50%" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList> <asp:DropDownList ID="DdlSubProyectoFiltro" runat="server" CssClass="form-control input-sm select2me" Width="50%" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList>
</div> </div>
<label class="col-md-1 text-right">Marca: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlMarcaFiltro" runat="server" DataTextField="Marca" DataValueField="CveMarca" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%"></asp:DropDownList>
</div>
</div>
<div class="row" style="margin-top: 10px">
<label class="col-md-1 text-right">Vendedor: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlVendedorFiltro" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%" DataValueField="CveVendedor" DataTextField="Vendedor"></asp:DropDownList>
</div>
<label class="col-md-1 text-right">Categoria: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlCategoria" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%" DataValueField="CveCategoria" DataTextField="Categoria"></asp:DropDownList>
</div>
<label class="col-md-1 text-right">Clasificaciones: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlClasificaciones" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
</div>
</div>
<div class="row" style="margin-top: 10px">
<label class="col-md-1 text-right">Sub Clasificaciones: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlClasificacion2" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
</div>
<label class="col-md-1 text-right">Cliente: </label>
<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> <label class="col-md-1 text-right">Grupo: </label>
<div class="col-md-3"> <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:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%">
@@ -130,13 +99,37 @@
</asp:DropDownList> </asp:DropDownList>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>> <div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row"> <div class="row">
<label class="col-md-1 text-right">Vendedor: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlVendedorFiltro" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%" DataValueField="CveVendedor" DataTextField="Vendedor"></asp:DropDownList>
</div>
<label class="col-md-1 text-right">Categoria: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlCategoria" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%" DataValueField="CveCategoria" DataTextField="Categoria"></asp:DropDownList>
</div>
<label class="col-md-1 text-right">Clasificaciones: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlClasificaciones" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
</div>
</div> </div>
<div class="row"> <div class="row">
<label class="col-md-1 text-right">Sub Clasificaciones: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlClasificacion2" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
</div>
<label class="col-md-1 text-right">Cliente: </label>
<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">Marca: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlMarcaFiltro" runat="server" DataTextField="Marca" DataValueField="CveMarca" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%"></asp:DropDownList>
</div>
</div> </div>
<div id="DivFamiliaSubFamilia" class="row" runat="server" visible="false"> <div id="DivFamiliaSubFamilia" class="row" runat="server" visible="false">
</div> </div>
@@ -148,7 +141,7 @@
<asp:UpdatePanel ID="UPDatos" runat="server" RenderMode="Inline" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPDatos" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GV" runat="server" GridLines="None" BorderWidth="0" UseAccessibleHeader="true" DataKeyNames="Titulo,Etiqueta,RealMes,VtaMesAA,RealAcumulado,RealMesPorcentaje" <asp:GridView ID="GV" runat="server" GridLines="None" BorderWidth="0" UseAccessibleHeader="true" DataKeyNames="Titulo,Etiqueta,RealMes,VtaMesAA,RealAcumulado,RealMesPorcentaje"
CssClass="table table-striped table-advance Widthall ScrollAD" data-sort="true" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true" CssClass="table table-advance Widthall ScrollAD" data-sort="true" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"> AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns> <Columns>
<asp:TemplateField HeaderText="Grupo" ItemStyle-HorizontalAlign="Left"> <asp:TemplateField HeaderText="Grupo" ItemStyle-HorizontalAlign="Left">

View File

@@ -80,16 +80,16 @@ Partial Class MetasVendedores
Select Case e.Row.DataKey("Etiqueta") Select Case e.Row.DataKey("Etiqueta")
Case "GrupoSuperior" Case "GrupoSuperior"
e.Row.CssClass = "GrupoSuperior" e.Row.CssClass = "GrupoSuperior"
e.Row.FCLabel("lblRealMes").Text = "" ' e.Row.FCLabel("lblRealMes").Text = ""
e.Row.FCLabel("lblVtaMesAA").Text = "" ' e.Row.FCLabel("lblVtaMesAA").Text = ""
e.Row.FCLabel("lblObjMes").Text = "" ' e.Row.FCLabel("lblObjMes").Text = ""
e.Row.FCLabel("lblRealAcumulado").Text = "" ' e.Row.FCLabel("lblRealAcumulado").Text = ""
e.Row.FCLabel("lblRealMesPorcentaje").Text = "" ' e.Row.FCLabel("lblRealMesPorcentaje").Text = ""
e.Row.FCLabel("lblAAntAcumulado").Text = "" ' e.Row.FCLabel("lblAAntAcumulado").Text = ""
e.Row.FCLabel("lblObjAcumulado").Text = "" ' e.Row.FCLabel("lblObjAcumulado").Text = ""
e.Row.FCLabel("lblVarVSAAPerc").Text = "" ' e.Row.FCLabel("lblVarVSAAPerc").Text = ""
e.Row.FCLabel("lblVarVSAA").Text = "" ' e.Row.FCLabel("lblVarVSAA").Text = ""
e.Row.FCLabel("lblVarVSObjAcum").Text = "" ' e.Row.FCLabel("lblVarVSObjAcum").Text = ""
Case "Categoria" Case "Categoria"
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"
Case "Clasificacion" Case "Clasificacion"

View File

@@ -144,10 +144,10 @@ Partial Class Ventas_RepIngresos
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) 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 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 = "", "", $"&emsp;<b>Fecha Inicio:</b>&nbsp;{TxtFechaInicio.Text}") Dim FI As String = If(TxtFechaInicio.Text = "", "", $"Fecha Inicio: {TxtFechaInicio.Text} ")
Dim FF As String = If(TxtFechaFin.Text = "", "", $"&emsp;<b>Fecha Fin:</b>&nbsp;{TxtFechaFin.Text}") Dim FF As String = If(TxtFechaFin.Text = "", "", $"Fecha Fin: {TxtFechaFin.Text} ")
Dim Tipo As String = If(DdlTipoDocto.SelectedValue = "-1", "", $"&emsp;<b>Tipo Docto.:</b>&nbsp;{DdlTipoDocto.SelectedItem.Text}") Dim Tipo As String = If(DdlTipoDocto.SelectedValue = "", "", $"Tipo Docto: {DdlTipoDocto.GetSelectedText} ")
Dim subProy As String = If(DdlSubProyecto.SelectedValue = "-1", "", $"&emsp;<b>SubProyecto:</b>&nbsp;{DdlSubProyecto.SelectedItem.Text}") Dim subProy As String = If(DdlSubProyecto.SelectedValue = "", "", $"SubProyecto: {DdlSubProyecto.GetSelectedText} ")
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then 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("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("AgrupadoPor", $"{FI}{FF}{Tipo}{subProy}")) params.Add(New ReportParameter("AgrupadoPor", $"{FI}{FF}{Tipo}{subProy}"))
params.Add(New ReportParameter("FechaImpresion", DateAndTime.Now))
If Imagen.Exists Then If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri)) params.Add(New ReportParameter("LogoPath", logouri))
Else Else