208 lines
9.9 KiB
Plaintext
208 lines
9.9 KiB
Plaintext
<%@ Page Title="Reporte de Top de Ventas por Cliente" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepTopClientesVentas.aspx.vb" Inherits="Ventas_RepTopClientesVentas" %>
|
|
|
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
|
<style>
|
|
.btnopaco {
|
|
background-color: rgba(0,0,0,0.2);
|
|
color: #FFF;
|
|
}
|
|
|
|
.btnopaco:hover {
|
|
background-color: rgba(0,0,0,0.4);
|
|
color: #FFF;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.select2 .select2-selection__rendered {
|
|
line-height: 1;
|
|
color: #111;
|
|
}
|
|
|
|
.select2 .select2-selection--multiple {
|
|
box-sizing: border-box;
|
|
cursor: pointer;
|
|
display: block;
|
|
min-height: 20px;
|
|
user-select: none;
|
|
-webkit-user-select: none;
|
|
}
|
|
|
|
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.select2-selection__rendered {
|
|
margin-top: 0px;
|
|
height: 25px;
|
|
}
|
|
|
|
.select2-selection {
|
|
margin-top: 0px;
|
|
height: 31px;
|
|
}
|
|
|
|
.select2-container--default.select2-container--focus .select2-selection--multiple {
|
|
border: none;
|
|
outline: 0;
|
|
}
|
|
|
|
#chartdiv {
|
|
width: 100%;
|
|
height: 700px;
|
|
}
|
|
</style>
|
|
</asp:Content>
|
|
<asp:Content ID="Content8" ContentPlaceHolderID="HA" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
|
<li>
|
|
<asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
|
</li>
|
|
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<li>
|
|
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Grafica</asp:LinkButton>
|
|
</li>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</asp:Content>
|
|
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
|
Reporte de Top de Ventas por Cliente
|
|
</asp:Content>
|
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
</asp:Content>
|
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
|
<div class="portlet-title portlet-filterT smalltitle">
|
|
<div class="tools">
|
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
|
<a href="javascript:;" class="expand"></a>
|
|
</div>
|
|
<div class="titlefiltros caption">
|
|
<div class="row" style="height: 32px;">
|
|
<label class="col-md-1">Mes: </label>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlMes" runat="server" AutoPostBack="false">
|
|
<asp:ListItem Selected="True" Text="Enero" Value="1"></asp:ListItem>
|
|
<asp:ListItem Text="Febrero" Value="2"></asp:ListItem>
|
|
<asp:ListItem Text="Marzo" Value="3"></asp:ListItem>
|
|
<asp:ListItem Text="Abril" Value="4"></asp:ListItem>
|
|
<asp:ListItem Text="Mayo" Value="5"></asp:ListItem>
|
|
<asp:ListItem Text="Junio" Value="6"></asp:ListItem>
|
|
<asp:ListItem Text="Julio" Value="7"></asp:ListItem>
|
|
<asp:ListItem Text="Agosto" Value="8"></asp:ListItem>
|
|
<asp:ListItem Text="Septiembre" Value="9"></asp:ListItem>
|
|
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
|
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
|
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
|
</asp:DropDownList>
|
|
</div>
|
|
<label class="col-md-1">Año: </label>
|
|
<div class="col-md-2">
|
|
<asp:DropDownList CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" ID="DdlAño" DataValueField="idAño" DataTextField="Año" runat="server" AutoPostBack="false">
|
|
</asp:DropDownList>
|
|
</div>
|
|
|
|
<label class="col-md-1 ">Sucursal:</label>
|
|
<div class="col-md-1">
|
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
|
</asp:DropDownList>
|
|
</div>
|
|
|
|
<label class="col-md-1 " style="margin-left: 40px">Top:</label>
|
|
<div class="col-md-1">
|
|
<asp:TextBox runat="server" ID="TxtTop" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 50%"></asp:TextBox>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
<asp:UpdatePanel ID="UppGrid" runat="server" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<asp:GridView ID="GvM" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCliente,NombreComercial,ImporteAcumulado" EmptyDataText="No se encontraron Motivo de Baja Registrados"
|
|
ToolTip="Listado de Top de Clientes" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" Style="text-align: center; width: 100%" GridLines="None">
|
|
<Columns>
|
|
<asp:HyperLinkField DataTextField='NombreComercial' HeaderText="Cliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataNavigateUrlFields="CveCliente" ItemStyle-HorizontalAlign="Left" />
|
|
<asp:BoundField HeaderText="Importe" DataField="ImporteAcumulado" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:C2}" />
|
|
</Columns>
|
|
</asp:GridView>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
|
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
|
<ContentTemplate>
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
<h4 class="modal-title">
|
|
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
|
|
</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<br />
|
|
<div id="chartdiv"></div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
|
</div>
|
|
</div>
|
|
</ContentTemplate>
|
|
</asp:UpdatePanel>
|
|
</div>
|
|
</asp:Content>
|
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
|
<script src="//www.amcharts.com/lib/4/core.js"></script>
|
|
<script src="//www.amcharts.com/lib/4/charts.js"></script>
|
|
|
|
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
|
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
|
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
|
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
|
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
|
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
|
|
|
<script>
|
|
|
|
function CargaGraficaBarras(data) {
|
|
|
|
var chart = am4core.createFromConfig({
|
|
"data": data,
|
|
"xAxes": [{
|
|
"type": "CategoryAxis",
|
|
"dataFields": {
|
|
"category": "Cliente"
|
|
},
|
|
"renderer": {
|
|
"minGridDistance":10,
|
|
"labels": {
|
|
"rotation": 90,
|
|
"verticalCenter": "middle",
|
|
"horizontalCenter": "left",
|
|
"truncate": true,
|
|
"maxWidth": 200
|
|
}
|
|
}
|
|
}],
|
|
"yAxes": [{
|
|
"type": "ValueAxis"
|
|
}],
|
|
"series": [{
|
|
"type": "ColumnSeries",
|
|
"dataFields": {
|
|
"valueY": "Importe",
|
|
"categoryX": "Cliente"
|
|
}
|
|
}]
|
|
}, "chartdiv", am4charts.XYChart);
|
|
|
|
</script>
|
|
</asp:Content>
|