OC rdl 189
This commit is contained in:
@@ -7808,59 +7808,60 @@ Public Class ClsPaginas
|
||||
|
||||
End If
|
||||
|
||||
If Not Archivo.Exists Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa = 197) Then
|
||||
' If Not Archivo.Exists Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa.Contiene(197, 189)) Then
|
||||
|
||||
Dim SBDomicilioSucursal As New StringBuilder()
|
||||
Dim CiudadSucursal As String = ""
|
||||
Dim ObjClientes As New ClsClientes
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
|
||||
|
||||
If ObjOC.GetSucursalOC(ObjOC.CveOrdenCompra) AndAlso ObjOC.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
params.Add(New ReportParameter("Proyecto", ObjOC.SucSubProyecto.ToString))
|
||||
params.Add(New ReportParameter("Telefono", ObjOC.SucTelefono.ToString))
|
||||
|
||||
CiudadSucursal = String.Format("{0},{1}", ObjOC.SucMunicipio, ObjOC.SucEstado)
|
||||
|
||||
SBDomicilioSucursal.AppendFormat("{0}", ObjOC.SucCalle)
|
||||
If ObjOC.SucNoExt.Length > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", ObjOC.SucNoExt)
|
||||
If ObjOC.SucNoInt.Length > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", ObjOC.SucNoInt)
|
||||
If ObjOC.SucColonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", ObjOC.SucColonia)
|
||||
If ObjOC.SucCP.Length > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", ObjOC.SucCP)
|
||||
If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
||||
If ObjOC.SucPais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", ObjOC.SucPais)
|
||||
|
||||
DomicilioSucursal = SBDomicilioSucursal.ToString
|
||||
Dim SBDomicilioSucursal As New StringBuilder()
|
||||
Dim CiudadSucursal As String = ""
|
||||
Dim ObjClientes As New ClsClientes
|
||||
|
||||
|
||||
Dim DirecconSubProyectoEntrega As String = ""
|
||||
Dim CveSubProyectoEntrega As Integer = dtOC(0)("CveSubProyectoEntrega").ToString.ToEntero
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
|
||||
|
||||
If CveSubProyectoEntrega > 0 Then
|
||||
If ObjOC.GetSucursalOC(ObjOC.CveOrdenCompra) AndAlso ObjOC.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
Dim DTSubProyectoEntrega As DataTable = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyectoEntrega)
|
||||
params.Add(New ReportParameter("Proyecto", ObjOC.SucSubProyecto.ToString))
|
||||
params.Add(New ReportParameter("Telefono", ObjOC.SucTelefono.ToString))
|
||||
|
||||
params.Add(New ReportParameter("SubProyectoEntrega", DTSubProyectoEntrega(0)("SubProyecto").ToString))
|
||||
CiudadSucursal = String.Format("{0},{1}", ObjOC.SucMunicipio, ObjOC.SucEstado)
|
||||
|
||||
Dim SubProyectoEntregaDir As String = $"Calle {DTSubProyectoEntrega(0)("Calle").ToString}"
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir} No. {DTSubProyectoEntrega(0)("NoExt").ToString()}"
|
||||
SBDomicilioSucursal.AppendFormat("{0}", ObjOC.SucCalle)
|
||||
If ObjOC.SucNoExt.Length > 0 Then SBDomicilioSucursal.AppendFormat(" No.Ext: {0}", ObjOC.SucNoExt)
|
||||
If ObjOC.SucNoInt.Length > 0 Then SBDomicilioSucursal.AppendFormat(", No.Int: {0}", ObjOC.SucNoInt)
|
||||
If ObjOC.SucColonia.Length > 0 Then SBDomicilioSucursal.AppendFormat(", Col: {0}", ObjOC.SucColonia)
|
||||
If ObjOC.SucCP.Length > 0 Then SBDomicilioSucursal.AppendFormat(", CP: {0}", ObjOC.SucCP)
|
||||
If CiudadSucursal.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", CiudadSucursal)
|
||||
If ObjOC.SucPais.Length > 0 Then SBDomicilioSucursal.AppendFormat(", {0}", ObjOC.SucPais)
|
||||
|
||||
If DTSubProyectoEntrega(0)("NoInt").ToString().Trim.Length > 0 Then
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir} No. int.{DTSubProyectoEntrega(0)("NoInt").ToString()}"
|
||||
End If
|
||||
DomicilioSucursal = SBDomicilioSucursal.ToString
|
||||
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir}{vbCrLf}"
|
||||
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir}{DTSubProyectoEntrega(0)("Colonia").ToString()} C.P. {DTSubProyectoEntrega(0)("CP").ToString()}{vbCrLf}"
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir}{DTSubProyectoEntrega(0)("Municipio").ToString()},{DTSubProyectoEntrega(0)("Estado").ToString()}{vbCrLf}Tel. { DTSubProyectoEntrega(0)("Telefono").ToString()}"
|
||||
Dim DirecconSubProyectoEntrega As String = ""
|
||||
Dim CveSubProyectoEntrega As Integer = dtOC(0)("CveSubProyectoEntrega").ToString.ToEntero
|
||||
|
||||
params.Add(New ReportParameter("SubProyectoEntregaDir", SubProyectoEntregaDir))
|
||||
If CveSubProyectoEntrega > 0 Then
|
||||
|
||||
Dim DTSubProyectoEntrega As DataTable = GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveSubProyectoEntrega)
|
||||
|
||||
params.Add(New ReportParameter("SubProyectoEntrega", DTSubProyectoEntrega(0)("SubProyecto").ToString))
|
||||
|
||||
Dim SubProyectoEntregaDir As String = $"Calle {DTSubProyectoEntrega(0)("Calle").ToString}"
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir} No. {DTSubProyectoEntrega(0)("NoExt").ToString()}"
|
||||
|
||||
If DTSubProyectoEntrega(0)("NoInt").ToString().Trim.Length > 0 Then
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir} No. int.{DTSubProyectoEntrega(0)("NoInt").ToString()}"
|
||||
End If
|
||||
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir}{vbCrLf}"
|
||||
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir}{DTSubProyectoEntrega(0)("Colonia").ToString()} C.P. {DTSubProyectoEntrega(0)("CP").ToString()}{vbCrLf}"
|
||||
SubProyectoEntregaDir = $"{SubProyectoEntregaDir}{DTSubProyectoEntrega(0)("Municipio").ToString()},{DTSubProyectoEntrega(0)("Estado").ToString()}{vbCrLf}Tel. { DTSubProyectoEntrega(0)("Telefono").ToString()}"
|
||||
|
||||
params.Add(New ReportParameter("SubProyectoEntregaDir", SubProyectoEntregaDir))
|
||||
|
||||
End If
|
||||
End If
|
||||
'End If
|
||||
|
||||
Dim CveUsuarioSol As Integer = dtOC(0)("CveUsuarioSolicito").ToString.ToEntero
|
||||
Dim CveUsuarioAut As Integer = dtOC(0)("CveUsuarioAutorizo").ToString.ToEntero
|
||||
@@ -7984,16 +7985,17 @@ Public Class ClsPaginas
|
||||
params.Add(New ReportParameter("FirmaAutorizo", If(FirmaAut.Exists, ImageToBase64(Drawing.Image.FromFile(FirmaAut.FullName), Drawing.Imaging.ImageFormat.Png), "")))
|
||||
|
||||
|
||||
If Not Archivo.Exists Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa = 197) Then
|
||||
'If Not Archivo.Exists Or (UsuarioActual.Empresa.Funcionalidad(382) = "1" AndAlso UsuarioActual.CveEmpresa = 197) Then
|
||||
|
||||
Dim ObjProveedor As New ClsCompProveedores
|
||||
Dim ObjProveedor As New ClsCompProveedores
|
||||
If ObjProveedor.GetProveedores(ClsCompProveedores.TipoConsulta.ParaUsoEnEmpresa, ObjOC.CveProveedor, "-1", "-1", "-1", "-1", "-1", "-1", "-1", -1, EmpresaActual.CveEmpresa) Then
|
||||
If ObjProveedor.DtResultados.Rows.Count > 0 Then
|
||||
params.Add(New ReportParameter("PlazoPago", ObjProveedor.PlazoPago.ToString))
|
||||
End If
|
||||
End If
|
||||
ObjProveedor.Dispose()
|
||||
|
||||
End If
|
||||
'End If
|
||||
|
||||
If Archivo.Exists Then
|
||||
bytes = StreamPDF(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta), DtDetalle, params, $"OC_{ObjOC.Folio.ToString}", RDSName:="DsOC", MR:=MR)
|
||||
|
||||
@@ -4462,11 +4462,14 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(121) And Not (CveImportacion > 0 Or CveFlete > 0) Then 'valida que de salida, pero sino es importación o costoindirecto
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||
|
||||
If Not NCDevolucion And Not ChkNCInvNC.Checked Then
|
||||
Alert("Favor de seleccionar un producto en la pestaña de almacen", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
ValidaFechaDeAlamacen()
|
||||
Else
|
||||
Dim x As Integer = 0
|
||||
For Each Dr As GridViewRow In GvInv.Rows
|
||||
@@ -4480,11 +4483,13 @@ Partial Class Compras_Compras
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If Not ValidaFechaDeAlamacen() Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(538) = "1" Then
|
||||
@@ -7820,13 +7825,37 @@ Partial Class Compras_Compras
|
||||
'FechaCompra
|
||||
Dim FechaMinima As DateTime = TxtFecha.Text.ToDate
|
||||
|
||||
|
||||
Dim CveAlmacenMov As Integer = ddlAlmacenAdd.SelectedValue.ToEntero
|
||||
Dim DTAlamcen As New DataTable
|
||||
|
||||
|
||||
If DDLDevolucion.SelectedValue.ToEntero > 0 Then
|
||||
Dim objcompras As New ClsCompras()
|
||||
If objcompras.GetCompraDetalleAlmacen(UsuarioActual.CveEmpresa, DDLDevolucion.SelectedValue.ToEntero) Then
|
||||
GVDevolucion.DataSource = objcompras.DtResultados
|
||||
End If
|
||||
objcompras.Dispose()
|
||||
GVDevolucion.DataBind()
|
||||
|
||||
For Each GvRow As GridViewRow In GVDevolucion.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
CveAlmacenMov = GvRow.DataKey("CveAlmacen").ToString.ToEntero
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If DtInv IsNot Nothing Then
|
||||
For Each Dr As DataRow In TmpDT.Rows
|
||||
|
||||
Dim CveTipoPS As Integer = Dr("CveTipoPS").ToString.ToEntero
|
||||
|
||||
If CveTipoPS = 2 Then
|
||||
If objInventario.GetValidaFechaAlmacen(CveEmpresa:=UsuarioActual.CveEmpresa, CveAlmacen:=ddlAlmacenAdd.SelectedValue.ToEntero, CvePS:=Dr("CvePS").ToString.ToEntero) Then
|
||||
If objInventario.GetValidaFechaAlmacen(CveEmpresa:=UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenMov, CvePS:=Dr("CvePS").ToString.ToEntero) Then
|
||||
|
||||
If objInventario.DtResultados IsNot Nothing AndAlso objInventario.DtResultados.Rows.Count > 0 Then
|
||||
Dim FechamoMovimiento As DateTime = objInventario.DtResultados(0)("FechaMovto").ToString.ToDate
|
||||
@@ -7845,8 +7874,9 @@ Partial Class Compras_Compras
|
||||
objInventario.Dispose()
|
||||
|
||||
If FechaMinima > TxtFecha.Text.ToDate Then
|
||||
Alert($"Los productos tienen movientos, la fecha minima que se puede aplicar es {FechaMinima.ToString("dd/MM/yyyy HH:mm")}", TipoMensaje.MsgAdvertencia)
|
||||
respuesta = False
|
||||
Alert($"Los productos tienen movientos, la fecha minima que se cambio la fecha de compra as {FechaMinima.ToString("dd/MM/yyyy HH:mm")}", TipoMensaje.MsgAdvertencia)
|
||||
'respuesta = False
|
||||
TxtFecha.Text = FechaMinima.ToString("dd/MM/yyyy")
|
||||
Else
|
||||
respuesta = True
|
||||
End If
|
||||
|
||||
@@ -375,14 +375,18 @@
|
||||
</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" />
|
||||
<%--<img src="/Metronic/assets/admin/layout/img/loading.gif" alt="loading" />--%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- END REGIONAL STATS PORTLET-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>
|
||||
@@ -396,50 +400,51 @@
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
function CargaGrafica() { }
|
||||
function CargaGrafica3() { }
|
||||
function filldata() {
|
||||
//function CargaGrafica() { }
|
||||
//function CargaGrafica3() { }
|
||||
//function filldata() {
|
||||
|
||||
// CargaGrafica();
|
||||
// CargaGrafica3();
|
||||
// if ($('#C_DivIndicadores')) {
|
||||
// $('#C_DivIndicadores').slick({
|
||||
// lazyLoad: 'ondemand',
|
||||
// slidesToShow: 3,
|
||||
// slidesToScroll: 1,
|
||||
// dots: true,
|
||||
// infinite: true,
|
||||
// autoplay: true,
|
||||
// autoplaySpeed: 5000,
|
||||
// responsive: [
|
||||
// {
|
||||
// breakpoint: 1024,
|
||||
// settings: {
|
||||
// slidesToShow: 2,
|
||||
// slidesToScroll: 1,
|
||||
// infinite: true,
|
||||
// dots: true
|
||||
// }
|
||||
// }, {
|
||||
// breakpoint: 600,
|
||||
// settings: {
|
||||
// slidesToShow: 1,
|
||||
// slidesToScroll: 1,
|
||||
// infinite: true,
|
||||
// dots: true
|
||||
// }
|
||||
// }]
|
||||
// });
|
||||
// $('#C_DivIndicadores').show();
|
||||
// $('#C_chartcheckboxes').hide();
|
||||
// }
|
||||
//}
|
||||
|
||||
CargaGrafica();
|
||||
CargaGrafica3();
|
||||
if ($('#C_DivIndicadores')) {
|
||||
$('#C_DivIndicadores').slick({
|
||||
lazyLoad: 'ondemand',
|
||||
slidesToShow: 3,
|
||||
slidesToScroll: 1,
|
||||
dots: true,
|
||||
infinite: true,
|
||||
autoplay: true,
|
||||
autoplaySpeed: 5000,
|
||||
responsive: [
|
||||
{
|
||||
breakpoint: 1024,
|
||||
settings: {
|
||||
slidesToShow: 2,
|
||||
slidesToScroll: 1,
|
||||
infinite: true,
|
||||
dots: true
|
||||
}
|
||||
}, {
|
||||
breakpoint: 600,
|
||||
settings: {
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
infinite: true,
|
||||
dots: true
|
||||
}
|
||||
}]
|
||||
});
|
||||
$('#C_DivIndicadores').show();
|
||||
$('#C_chartcheckboxes').hide();
|
||||
}
|
||||
}
|
||||
$(document).ready(function () {
|
||||
|
||||
filldata();
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
filldata()
|
||||
});
|
||||
//filldata();
|
||||
//Sys.Application.add_load(function (s, e) {
|
||||
// filldata()
|
||||
//});
|
||||
});
|
||||
function CargaDia(pFecha) {
|
||||
__doPostBack('txtFecha', pFecha);
|
||||
@@ -465,5 +470,127 @@
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- 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>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
@@ -280,14 +280,19 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
|
||||
CveClienteClasificacion: DdlClienteClasificacion.SelectedValue.ToEntero(), ModalidadContable: !ChkLecturaAdmin.Checked))
|
||||
{
|
||||
GvDatos.DataSource = ObjVentas.DtResultados;
|
||||
DtVentas = ObjVentas.DtResultados;
|
||||
}
|
||||
DtVentas = ObjVentas.DtResultados;
|
||||
}
|
||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero();
|
||||
ObjVentas.Dispose();
|
||||
GvDatos.DataBind();
|
||||
if (GvDatos.Rows.Count > 0)
|
||||
{
|
||||
//CargaGraficas(DtVentas);
|
||||
//this.DvGraficas.Visible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.DvGraficas.Visible = false;
|
||||
}
|
||||
UPDatos.Update();
|
||||
|
||||
@@ -298,6 +303,37 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region GRAFICA
|
||||
|
||||
private void CargaGraficas(DataTable DtVentas)
|
||||
{
|
||||
MuestraGrafica(div_ventas, DtVentas, "GPO", "Total", "", "", "gh2", "");
|
||||
}
|
||||
private void CargaGraficaNEW(DataTable D_T_Datos)
|
||||
{
|
||||
JArray jsonData = new JArray();
|
||||
for (int x=24; x <= 35 ; x++)
|
||||
{
|
||||
string Mes = D_T_Datos.Columns[x].ColumnName;
|
||||
|
||||
|
||||
JObject obj = new JObject();
|
||||
obj.Add(new JProperty("mes", Mes));
|
||||
for (int y = 1; y <= D_T_Datos.Rows.Count - 1; y++) // y Empiesa en 1 para no agregar el total
|
||||
{
|
||||
obj.Add(new JProperty(D_T_Datos.Rows[y][4].ToString(), D_T_Datos.Rows[y][x].ToString()));
|
||||
}
|
||||
jsonData.Add(obj);
|
||||
}
|
||||
|
||||
JArray jsonSeries = new JArray();
|
||||
for (int y = 1; y <= D_T_Datos.Rows.Count - 1; y++) // y Empiesa en 1 para no agregar el total
|
||||
{
|
||||
JObject obj = new JObject(
|
||||
new JProperty(D_T_Datos.Rows[y][4].ToString(), D_T_Datos.Rows[y][4].ToString())
|
||||
);
|
||||
jsonSeries.Add(obj);
|
||||
}
|
||||
string jsdatos = jsonData.ToString();
|
||||
string jsseries = jsonSeries.ToString();
|
||||
|
||||
Reference in New Issue
Block a user