Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
471
Ventas/DashboardVentas.aspx
Normal file
471
Ventas/DashboardVentas.aspx
Normal file
@@ -0,0 +1,471 @@
|
||||
<%@ Page Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="DashboardVentas.aspx.vb" Inherits="Ventas_DashboardVentas" %>
|
||||
|
||||
<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>
|
||||
.dataTables_scrollHead {
|
||||
background-color: #95A5A6;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Dashboard Ventas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" 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" OnClick="BtnConsultar_Click" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||
<div runat="server" id="DivProyecto" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
||||
</div>
|
||||
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
||||
<div runat="server" id="DivSubProyecto" class="col-md-2">
|
||||
<asp:DropDownList ID="DdlSubProyecto" SelectionMode="Multiple" data-text="Todos" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 ">Agrupador:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlAgrupador" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Linea" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Cliente" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Marca" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none">
|
||||
<div class="row">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:GridView ID="GvVentas" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun dato"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" Width="100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Mes" HeaderText="Mes" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="TotalAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalAno3" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalAno3Presupuesto" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="CumplimientaRealVSPPTO" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="PorcentajeUtilidad" HeaderText="% DE UTILIDAD" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="PorcentajeContado" HeaderText="% CONTADO" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="PorcentajeCredito" HeaderText="% CRÉDITO" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<asp:GridView ID="GvVentasAcumulado" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun dato"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" Width="100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Mes" HeaderText="Mes" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Ano3xAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Ano3xAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Ano3xPPTO" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="DvGraficas" visible="true" runat="server">
|
||||
<div id="DvGraVentas" runat="server" class="col-md-6 col-sm-6" style="width: 100%">
|
||||
<!-- BEGIN REGIONAL STATS PORTLET-->
|
||||
<div class="portlet light ">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="icon-graph font-red-sunglo"></i>
|
||||
<span class="caption-subject font-red-sunglo bold uppercase">Grafica</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="reload" data-original-title="" title=""></a>
|
||||
<a href="javascript:;" class="remove" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div id="chartdiv" style="text-align: center; height: 600px!important">
|
||||
</div>
|
||||
<div id="div_ventas" runat="server" style="text-align: center;">
|
||||
<%--<img src="/Metronic/assets/admin/layout/img/loading.gif" alt="loading" />--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END REGIONAL STATS PORTLET-->
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<asp:GridView ID="GvVentasClasificacion" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun dato"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" Width="100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Agrupador" HeaderText="Linea" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="TotalAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="PorcentajeVenta" HeaderText="% / T. VENTA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalAno2Presupuesto" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Ano2xAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="Ano2xPPTO" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="container">
|
||||
<%--<table class="table Widthall">
|
||||
<tr>
|
||||
<td style="width: 200px;"></td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Enero</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Febrero</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Marzo</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Abril</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Mayo</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Junio</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Julio</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Agosto</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Septiembre</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Octubre</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Noviembre</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 160px; border-right: 3px solid white;">Diciembre</td>
|
||||
</tr>
|
||||
</table>--%>
|
||||
<asp:GridView ID="GvVentasClasificacionxMes" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun dato"
|
||||
CssClass="table table-striped table-advance table-hover Widthall"
|
||||
data-sort="true" Width="100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Agrupador" HeaderText="Linea" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="TotalEneAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalEneAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalFebAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalFebAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalMarAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalMarAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalAbrAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalAbrAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalMayAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalMayAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalJunAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalJunAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalJulAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalJulAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalAgoAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalAgoAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalSepAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalSepAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalOctAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalOctAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalNovAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalNovAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalDicAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField DataField="TotalDicAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="container">
|
||||
<table class="table Widthall">
|
||||
<tr>
|
||||
<td style="width: 360px;"></td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Enero</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Febrero</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Marzo</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Abril</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Mayo</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Junio</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Julio</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Agosto</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Septiembre</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Octubre</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Noviembre</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 300px; border-right: 3px solid white;">Diciembre</td>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun dato"
|
||||
CssClass="table table-striped table-advance table-hover Widthall"
|
||||
data-sort="true" Width="100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Clasificacion" HeaderText="Linea" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="360px" />
|
||||
<asp:BoundField DataField="TotalEneAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="360px" />
|
||||
<asp:BoundField DataField="TotalEneAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalFebAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalFebAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalMarAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalMarAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalAbrAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalAbrAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalMayAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalMayAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalJunAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalJunAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalJulAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalJulAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalAgoAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalAgoAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalSepAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px"/>
|
||||
<asp:BoundField DataField="TotalSepAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalOctAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalOctAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalNovAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalNovAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalDicAno2" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
<asp:BoundField DataField="TotalDicAno1" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="150px" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>--%>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<%-- <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 CargaGrafica(data) {
|
||||
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataLoader": {
|
||||
"url": "https://s3-us-west-2.amazonaws.com/s.cdpn.io/t-160/SO-58530378.json",
|
||||
"format": "json",
|
||||
"complete": function (chart) {
|
||||
//get potential valueFields after filtering out the categoryField
|
||||
var valueFields = Object.keys(chart.dataProvider[0]).filter(function (value) {
|
||||
return value !== chart.categoryField;
|
||||
})
|
||||
//create the graphs
|
||||
valueFields.forEach(function (valueField) {
|
||||
chart.graphs.push({
|
||||
"valueField": valueField,
|
||||
"title": valueField,
|
||||
"type": "line",
|
||||
"balloonText": "[[category]]: <b>[[value]]</b>",
|
||||
"lineAlphas": 0.2
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
"valueAxes": [{
|
||||
"gridColor": "#FFFFFF",
|
||||
"gridAlpha": 0.2,
|
||||
"dashLength": 0
|
||||
}],
|
||||
"gridAboveGraphs": true,
|
||||
"startDuration": 1,
|
||||
"graphs": [],
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Mes",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"gridAlpha": 0
|
||||
},
|
||||
"legend": {},
|
||||
"export": {
|
||||
"enabled": true
|
||||
},
|
||||
"menu": [{
|
||||
"class": "export-main",
|
||||
"menu": ["PNG", "JPG", "CSV"]
|
||||
}]
|
||||
});
|
||||
|
||||
//var chart = AmCharts.makeChart("chartdiv", {
|
||||
// "type": "serial",
|
||||
// "theme": "light",
|
||||
// "dataProvider": data,
|
||||
// "startDuration": 2,
|
||||
// "valueAxes": [{
|
||||
// "position": "left",
|
||||
// "title": "Ventas"
|
||||
// }],
|
||||
// "graphs": [{
|
||||
// "balloonText": "[[category]]: <b>[[value]]</b>",
|
||||
// "colorField": "Color",
|
||||
// "fillAlphas": 1,
|
||||
// "lineAlpha": 0.1,
|
||||
// "type": "line",
|
||||
// "valueField": "Valor"
|
||||
// }],
|
||||
// "depth3D": 20,
|
||||
// "angle": 30,
|
||||
// "chartCursor": {
|
||||
// "categoryBalloonEnabled": false,
|
||||
// "cursorAlpha": 0,
|
||||
// "zoomable": false
|
||||
// },
|
||||
// "categoryField": "Texto",
|
||||
// "categoryAxis": {
|
||||
// "gridPosition": "start",
|
||||
// "labelRotation": 90
|
||||
// },
|
||||
// "export": {
|
||||
// "enabled": true
|
||||
// }
|
||||
//});
|
||||
}--%>
|
||||
|
||||
|
||||
<!--Librería principal de amCharts 4-->
|
||||
<script src="https://cdn.amcharts.com/lib/4/core.js"></script>
|
||||
|
||||
<!-- Módulo de gráficos de XYChart -->
|
||||
<script src="https://cdn.amcharts.com/lib/4/charts.js"></script>
|
||||
|
||||
<!-- Tema animado de amCharts 4 -->
|
||||
<script src="https://cdn.amcharts.com/lib/4/themes/animated.js"></script>
|
||||
|
||||
<!-- Paquete de idioma español -->
|
||||
<script src="https://cdn.amcharts.com/lib/4/lang/es_ES.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
// Función para crear series dinámicamente
|
||||
function createSeries(field, name) {
|
||||
var series = chart.series.push(new am4charts.LineSeries());
|
||||
series.dataFields.valueY = field;
|
||||
series.dataFields.categoryX = "mes";
|
||||
series.name = name;
|
||||
series.strokeWidth = 2;
|
||||
|
||||
// Añadir bullets a la serie
|
||||
var bullet = series.bullets.push(new am4charts.CircleBullet());
|
||||
bullet.circle.radius = 4;
|
||||
bullet.circle.fill = am4core.color("#fff");
|
||||
bullet.circle.strokeWidth = 2;
|
||||
|
||||
// Configurar el tooltip para cada serie
|
||||
series.tooltipText = "{name}: [bold]{valueY}[/]";
|
||||
series.tooltip.pointerOrientation = "vertical";
|
||||
series.tooltip.background.cornerRadius = 5;
|
||||
series.tooltip.background.fillOpacity = 0.8;
|
||||
series.tooltip.label.padding(10, 10, 10, 10);
|
||||
|
||||
// Asegurar que el label del tooltip sea visible
|
||||
series.tooltip.label.fill = am4core.color("#000"); // Texto en negro
|
||||
|
||||
// Mostrar el tooltip solo al pasar el cursor sobre la serie
|
||||
series.tooltip.showInViewport = false;
|
||||
|
||||
// Habilitar interacciones en la serie
|
||||
series.interactionsEnabled = true;
|
||||
}
|
||||
|
||||
|
||||
function generaGrafico(dtGrafico, dtseries) {
|
||||
|
||||
// Importar las librerías de amCharts
|
||||
am4core.useTheme(am4themes_animated);
|
||||
|
||||
// Crear el gráfico
|
||||
var chart = am4core.create("chartdiv", am4charts.XYChart);
|
||||
|
||||
// Ejemplo de datos dinámicos
|
||||
chart.data = dtGrafico; //[
|
||||
|
||||
var categoryAxis = chart.xAxes.push(new am4charts.CategoryAxis());
|
||||
categoryAxis.dataFields.category = "mes";
|
||||
categoryAxis.renderer.grid.template.location = 0;
|
||||
categoryAxis.renderer.minGridDistance = 30;
|
||||
|
||||
// Configuración del eje Y (Importe)
|
||||
var valueAxis = chart.yAxes.push(new am4charts.ValueAxis());
|
||||
valueAxis.title.text = "Importe";
|
||||
|
||||
for (var i = 0; i < dtseries.length; i++) {
|
||||
var item = dtseries[i];
|
||||
var key = Object.keys(item)[0];
|
||||
var value = item[key];
|
||||
|
||||
var series = chart.series.push(new am4charts.LineSeries());
|
||||
series.dataFields.valueY = key;
|
||||
series.dataFields.categoryX = "mes";
|
||||
series.name = value;
|
||||
series.strokeWidth = 2;
|
||||
|
||||
// Añadir bullets a la serie
|
||||
var bullet = series.bullets.push(new am4charts.CircleBullet());
|
||||
bullet.circle.radius = 4;
|
||||
bullet.circle.fill = am4core.color("#fff");
|
||||
bullet.circle.strokeWidth = 2;
|
||||
|
||||
// Configurar el tooltip para cada serie
|
||||
series.tooltipText = "{name}: [bold]{valueY}[/]";// "{" + value + "}: [bold]{" + key +"}[/]";
|
||||
series.tooltip.pointerOrientation = "vertical";
|
||||
series.tooltip.background.cornerRadius = 5;
|
||||
series.tooltip.background.fillOpacity = 0.8;
|
||||
series.tooltip.label.padding(10, 10, 10, 10);
|
||||
|
||||
// Asegurar que el label del tooltip sea visible
|
||||
series.tooltip.label.fill = am4core.color("#000"); // Texto en negro
|
||||
|
||||
// Mostrar el tooltip solo al pasar el cursor sobre la serie
|
||||
series.tooltip.showInViewport = false;
|
||||
|
||||
// Habilitar interacciones en la serie
|
||||
series.interactionsEnabled = true;
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Habilitar el cursor pero deshabilitar su tooltip
|
||||
chart.cursor = new am4charts.XYCursor();
|
||||
chart.cursor.behavior = "none"; // Deshabilitar pan o zoom
|
||||
chart.cursor.lineX.disabled = true;
|
||||
chart.cursor.lineY.disabled = true;
|
||||
chart.cursor.tooltipEnabled = false; // Deshabilitar el tooltip del cursor
|
||||
|
||||
// Leyenda
|
||||
chart.legend = new am4charts.Legend();
|
||||
|
||||
// Exportar el gráfico
|
||||
chart.exporting.menu = new am4core.ExportMenu();
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
243
Ventas/DashboardVentas.aspx.vb
Normal file
243
Ventas/DashboardVentas.aspx.vb
Normal file
@@ -0,0 +1,243 @@
|
||||
|
||||
Imports System.Activities.Statements
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Newtonsoft.Json.Linq
|
||||
|
||||
Partial Class Ventas_DashboardVentas
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtVentasClasificacion As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtVentasClasificacion"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVentasClasificacion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtVentas As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtVentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVentas") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtVentasClasificacionxMes As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtVentasClasificacionxMes"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVentasClasificacionxMes") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtVentasGrafica As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtVentasGrafica"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVentasGrafica") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto, AplicaTodos:="Seleccione")
|
||||
DdlSubProyecto.Items(0).Text = "Seleccione"
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||
CargaDatos()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub CargaDatos()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
If ObjVentas.GetDashboardVentasGet(UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, DdlAgrupador.SelectedValue.ToEntero) Then
|
||||
Dim DsDatos = ObjVentas.DataSetResultados.Copy()
|
||||
If DsDatos IsNot Nothing Then
|
||||
'DESGLOSE
|
||||
DtVentasClasificacion = DsDatos.Tables(0)
|
||||
DtVentas = DsDatos.Tables(1)
|
||||
DtVentasClasificacionxMes = DsDatos.Tables(2)
|
||||
DtVentasGrafica = DsDatos.Tables(3)
|
||||
|
||||
DtVentasClasificacion.Columns.Add("PorcentajeVenta", GetType(Decimal))
|
||||
DtVentasClasificacion.Columns.Add("Ano2xAno1", GetType(Decimal))
|
||||
DtVentasClasificacion.Columns.Add("Ano2xPPTO", GetType(Decimal))
|
||||
|
||||
DtVentas.Columns.Add("Ano3xAno1", GetType(Decimal))
|
||||
DtVentas.Columns.Add("Ano3xAno2", GetType(Decimal))
|
||||
DtVentas.Columns.Add("CumplimientaRealVSPPTO", GetType(Decimal))
|
||||
DtVentas.Columns.Add("Ano3xPPTO", GetType(Decimal))
|
||||
|
||||
Dim AcumuladoAno1 As Decimal = 0
|
||||
Dim AcumuladoAno2 As Decimal = 0
|
||||
Dim AcumuladoAno3 As Decimal = 0
|
||||
Dim AcumuladoPPTO As Decimal = 0
|
||||
For Each Row As DataRow In DtVentas.Rows
|
||||
AcumuladoAno1 += Row("TotalAno1").ToString().ToDecimal()
|
||||
AcumuladoAno2 += Row("TotalAno2").ToString().ToDecimal()
|
||||
AcumuladoAno3 += Row("TotalAno3").ToString().ToDecimal()
|
||||
AcumuladoPPTO += Row("TotalAno3Presupuesto").ToString().ToDecimal()
|
||||
|
||||
Row("Ano3xAno1") = (AcumuladoAno3 / AcumuladoAno1) - 1
|
||||
Row("Ano3xAno2") = (AcumuladoAno3 / AcumuladoAno2) - 1
|
||||
|
||||
Row("CumplimientaRealVSPPTO") = (Row("TotalAno3").ToString().ToDecimal() * 100) / Row("TotalAno3Presupuesto").ToString().ToDecimal() / 100
|
||||
|
||||
Row("Ano3xPPTO") = (AcumuladoAno3 / AcumuladoPPTO) - 1
|
||||
Next
|
||||
|
||||
For Each Row As DataRow In DtVentasClasificacion.Rows
|
||||
Row("Ano2xAno1") = If(Row("TotalAno1").ToString().ToDecimal() = 0, 0, (Row("TotalAno2").ToString().ToDecimal() - Row("TotalAno1").ToString().ToDecimal()) / Row("TotalAno1").ToString().ToDecimal())
|
||||
|
||||
Row("Ano2xPPTO") = (Row("TotalAno2").ToString().ToDecimal() - Row("TotalAno2Presupuesto").ToString().ToDecimal()) / Row("TotalAno2Presupuesto").ToString().ToDecimal()
|
||||
|
||||
Row("PorcentajeVenta") = If(DtVentasClasificacion.SUMD("TotalAno2") = 0, 0, Row("TotalAno2").ToString().ToDecimal() / DtVentasClasificacion.SUMD("TotalAno2"))
|
||||
Next
|
||||
|
||||
GvVentasClasificacion.DataSource = DtVentasClasificacion
|
||||
GvVentas.DataSource = DtVentas
|
||||
GvVentasClasificacionxMes.DataSource = DtVentasClasificacionxMes
|
||||
GvVentasAcumulado.DataSource = DtVentas
|
||||
End If
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvVentasClasificacion.Columns(1).HeaderText = Now.Year.ToString()
|
||||
GvVentasClasificacion.Columns(2).HeaderText = (Now.Year - 1).ToString()
|
||||
GvVentasClasificacion.Columns(4).HeaderText = $"PRESUPUESTO {Now.Year}"
|
||||
GvVentasClasificacion.Columns(5).HeaderText = $"{Now.Year} VS {Now.Year - 1}"
|
||||
GvVentasClasificacion.Columns(6).HeaderText = $"{Now.Year} VS PPTO"
|
||||
|
||||
GvVentasClasificacionxMes.Columns(1).HeaderText = $"{Now.Year}-Enero"
|
||||
GvVentasClasificacionxMes.Columns(2).HeaderText = $"{(Now.Year - 1)}-Enero"
|
||||
GvVentasClasificacionxMes.Columns(3).HeaderText = $"{Now.Year}-Febrero"
|
||||
GvVentasClasificacionxMes.Columns(4).HeaderText = $"{(Now.Year - 1)}-Febrero"
|
||||
GvVentasClasificacionxMes.Columns(5).HeaderText = $"{Now.Year}-Marzo"
|
||||
GvVentasClasificacionxMes.Columns(6).HeaderText = $"{(Now.Year - 1)}-Marzo"
|
||||
GvVentasClasificacionxMes.Columns(7).HeaderText = $"{Now.Year}-Abril"
|
||||
GvVentasClasificacionxMes.Columns(8).HeaderText = $"{(Now.Year - 1)}-Abril"
|
||||
GvVentasClasificacionxMes.Columns(9).HeaderText = $"{Now.Year}-Mayo"
|
||||
GvVentasClasificacionxMes.Columns(10).HeaderText = $"{(Now.Year - 1)}-Mayo"
|
||||
GvVentasClasificacionxMes.Columns(11).HeaderText = $"{Now.Year}-Junio"
|
||||
GvVentasClasificacionxMes.Columns(12).HeaderText = $"{(Now.Year - 1)}-Junio"
|
||||
GvVentasClasificacionxMes.Columns(13).HeaderText = $"{Now.Year}-Julio"
|
||||
GvVentasClasificacionxMes.Columns(14).HeaderText = $"{(Now.Year - 1)}-Julio"
|
||||
GvVentasClasificacionxMes.Columns(15).HeaderText = $"{Now.Year}-Agosto"
|
||||
GvVentasClasificacionxMes.Columns(16).HeaderText = $"{(Now.Year - 1)}-Agosto"
|
||||
GvVentasClasificacionxMes.Columns(17).HeaderText = $"{Now.Year}-Septiembre"
|
||||
GvVentasClasificacionxMes.Columns(18).HeaderText = $"{(Now.Year - 1)}-Septiembre"
|
||||
GvVentasClasificacionxMes.Columns(19).HeaderText = $"{Now.Year}-Octubre"
|
||||
GvVentasClasificacionxMes.Columns(20).HeaderText = $"{(Now.Year - 1)}-Octubre"
|
||||
GvVentasClasificacionxMes.Columns(21).HeaderText = $"{Now.Year}-Noviembre"
|
||||
GvVentasClasificacionxMes.Columns(22).HeaderText = $"{(Now.Year - 1)}-Noviembre"
|
||||
GvVentasClasificacionxMes.Columns(23).HeaderText = $"{Now.Year}-Diciembre"
|
||||
GvVentasClasificacionxMes.Columns(24).HeaderText = $"{(Now.Year - 1)}-Diciembre"
|
||||
|
||||
'GvVentasClasificacionxMes.Columns(1).HeaderText = $"{Now.Year}"
|
||||
'GvVentasClasificacionxMes.Columns(2).HeaderText = $"{(Now.Year - 1)}"
|
||||
'GvVentasClasificacionxMes.Columns(3).HeaderText = $"{Now.Year}"
|
||||
'GvVentasClasificacionxMes.Columns(4).HeaderText = $"{(Now.Year - 1)}"
|
||||
'GvVentasClasificacionxMes.Columns(5).HeaderText = $"{Now.Year}"
|
||||
'GvVentasClasificacionxMes.Columns(6).HeaderText = $"{(Now.Year - 1)}"
|
||||
'GvVentasClasificacionxMes.Columns(7).HeaderText = $"{Now.Year}"
|
||||
'GvVentasClasificacionxMes.Columns(8).HeaderText = $"{(Now.Year - 1)}"
|
||||
'GvVentasClasificacionxMes.Columns(9).HeaderText = $"{Now.Year}"
|
||||
'GvVentasClasificacionxMes.Columns(10).HeaderText = $"{(Now.Year - 1)}"
|
||||
'GvVentasClasificacionxMes.Columns(11).HeaderText = $"{Now.Year}"
|
||||
'GvVentasClasificacionxMes.Columns(12).HeaderText = $"{(Now.Year - 1)}"
|
||||
'GvVentasClasificacionxMes.Columns(13).HeaderText = $"{Now.Year}"
|
||||
'GvVentasClasificacionxMes.Columns(14).HeaderText = $"{(Now.Year - 1)}"
|
||||
'GvVentasClasificacionxMes.Columns(15).HeaderText = $"{Now.Year}"
|
||||
'GvVentasClasificacionxMes.Columns(16).HeaderText = $"{(Now.Year - 1)}"
|
||||
'GvVentasClasificacionxMes.Columns(17).HeaderText = $"{Now.Year}"
|
||||
'GvVentasClasificacionxMes.Columns(18).HeaderText = $"{(Now.Year - 1)}"
|
||||
'GvVentasClasificacionxMes.Columns(19).HeaderText = $"{Now.Year}"
|
||||
'GvVentasClasificacionxMes.Columns(20).HeaderText = $"{(Now.Year - 1)}"
|
||||
'GvVentasClasificacionxMes.Columns(21).HeaderText = $"{Now.Year}"
|
||||
'GvVentasClasificacionxMes.Columns(22).HeaderText = $"{(Now.Year - 1)}"
|
||||
'GvVentasClasificacionxMes.Columns(23).HeaderText = $"{Now.Year}"
|
||||
'GvVentasClasificacionxMes.Columns(24).HeaderText = $"{(Now.Year - 1)}"
|
||||
|
||||
GvVentas.Columns(1).HeaderText = (Now.Year - 2).ToString()
|
||||
GvVentas.Columns(2).HeaderText = (Now.Year - 1).ToString()
|
||||
GvVentas.Columns(3).HeaderText = Now.Year.ToString()
|
||||
GvVentas.Columns(4).HeaderText = $"PRESUPUESTO {Now.Year}"
|
||||
GvVentas.Columns(5).HeaderText = $"CUMPLIMIENTO REAL VS PPTO {Now.Year}"
|
||||
|
||||
GvVentasAcumulado.Columns(1).HeaderText = $"{Now.Year} VS {Now.Year - 2}"
|
||||
GvVentasAcumulado.Columns(2).HeaderText = $"{Now.Year} VS {Now.Year - 1}"
|
||||
GvVentasAcumulado.Columns(3).HeaderText = $"{Now.Year} VS PPTO"
|
||||
|
||||
GvVentasClasificacion.DataBind()
|
||||
GvVentas.DataBind()
|
||||
GvVentasClasificacionxMes.DataBind()
|
||||
GvVentasAcumulado.DataBind()
|
||||
|
||||
CargaGraficaNEW(DtVentasGrafica)
|
||||
|
||||
'Dim Ano3 = DateTime.Now.Year.ToString()
|
||||
'Dim Ano2 = (DateTime.Now.Year - 1).ToString()
|
||||
'Dim Ano1 = (DateTime.Now.Year - 2).ToString()
|
||||
|
||||
'Dim Dt As New DataTable()
|
||||
'Dt.Columns.Add("Mes")
|
||||
'Dt.Columns.Add(DateTime.Now.Year.ToString())
|
||||
'Dt.Columns.Add((DateTime.Now.Year - 1).ToString())
|
||||
'Dt.Columns.Add((DateTime.Now.Year - 2).ToString())
|
||||
'Dt.Columns.Add("Presupuesto")
|
||||
|
||||
'For Each Dr As DataRow In DtVentas.Rows
|
||||
' Dim Row As DataRow = Dt.NewRow()
|
||||
' Row("Mes") = Dr("Mes").ToString()
|
||||
' Row(DateTime.Now.Year.ToString()) = Dr("TotalAno3").ToString().FormatoNumero
|
||||
' Row((DateTime.Now.Year - 1).ToString()) = Dr("TotalAno2").ToString().FormatoNumero
|
||||
' Row((DateTime.Now.Year - 2).ToString()) = Dr("TotalAno1").ToString().FormatoNumero
|
||||
' Row("Presupuesto") = Dr("TotalAno3Presupuesto").ToString().FormatoNumero
|
||||
' Dt.Rows.Add(Row)
|
||||
'Next
|
||||
|
||||
'Dim json As String = Newtonsoft.Json.JsonConvert.SerializeObject(Dt)
|
||||
|
||||
'RegistraScript($"CargaGrafica({json});console.log({json})", "22")
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGraficaNEW(ByVal D_T_Datos As DataTable)
|
||||
Dim jsonData As JArray = New JArray()
|
||||
|
||||
For x As Integer = 1 To 12
|
||||
Dim Mes As String = D_T_Datos.Columns(x).ColumnName
|
||||
Dim obj As JObject = New JObject()
|
||||
obj.Add(New JProperty("mes", Mes))
|
||||
|
||||
For y As Integer = 0 To D_T_Datos.Rows.Count - 1
|
||||
obj.Add(New JProperty(D_T_Datos.Rows(y)(0).ToString(), D_T_Datos.Rows(y)(x).ToString()))
|
||||
Next
|
||||
|
||||
jsonData.Add(obj)
|
||||
Next
|
||||
|
||||
Dim jsonSeries As JArray = New JArray()
|
||||
|
||||
For y As Integer = 0 To D_T_Datos.Rows.Count - 1
|
||||
Dim obj As JObject = New JObject(New JProperty(D_T_Datos.Rows(y)(0).ToString(), D_T_Datos.Rows(y)(0).ToString()))
|
||||
jsonSeries.Add(obj)
|
||||
Next
|
||||
|
||||
Dim jsdatos As String = jsonData.ToString()
|
||||
Dim jsseries As String = jsonSeries.ToString()
|
||||
RegistraScript($"generaGrafico({jsdatos},{jsseries});")
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -17488,10 +17488,12 @@ Partial Class Ventas
|
||||
Case "3", "295"
|
||||
importeMovimiento = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal - ((gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal / gvr.DataKey("TotalAnticipo").ToDecimal) * gvr.DataKey("IVAAnticipo").ToDecimal)
|
||||
|
||||
importeMN = gvr.FCTextBox("TxtAnticipo" & gvr.RowIndex).Text.ToDecimal
|
||||
|
||||
If importeMovimiento <> 0 Then
|
||||
|
||||
Dim Pago As New VentaPago
|
||||
Pago.ImportePagoVenta = importeMovimiento
|
||||
Pago.ImportePagoVenta = importeMN
|
||||
Pago.ImportePago = importeMovimiento
|
||||
Pago.CveIE = CveIEAnticipo
|
||||
Pago.CveMonedaPago = gvr.DataKey("CveMoneda").ToEntero()
|
||||
@@ -17501,6 +17503,7 @@ Partial Class Ventas
|
||||
Pago.TCPago = gvr.DataKey("TipoCambio").ToDecimal
|
||||
Pago.AplicaTraslado = gvr.DataKey("RegresarImpuesto") = "1"
|
||||
Pago.Referencia = gvr.DataKey("Folio")
|
||||
Pago.AplicaConceptoImpuestoPendiente = (Not gvr.DataKey("RegresarImpuesto") = "1") AndAlso (VentaActual.IVA > 0 OrElse VentaActual.IEPS > 0)
|
||||
|
||||
ErrorConta = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
||||
|
||||
@@ -17622,7 +17625,7 @@ Partial Class Ventas
|
||||
ObjConta.Commit()
|
||||
BtnAceptarAnticipos.Enabled = False
|
||||
|
||||
Alert(Msg.ToString(), TipoMensaje.MsgInformacion)
|
||||
Alert(Msg.ToString(), TipoMensaje.MsgInformacion, JSBtnAceptar:="BtnRefrescarPagina();", ShowCloseButton:=False)
|
||||
End If
|
||||
|
||||
ObjConta.Dispose()
|
||||
|
||||
Reference in New Issue
Block a user