Reportes Ventas
This commit is contained in:
@@ -248,7 +248,7 @@
|
||||
<div class="col-md-8">
|
||||
<div class="input-group">
|
||||
|
||||
<asp:TextBox ID="Uti" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
<asp:TextBox ID="TxtCantidadPasajeros" runat="server" CssClass="form-control" CausesValidation="True"
|
||||
Width="100%"
|
||||
type="number"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"
|
||||
|
||||
@@ -312,14 +312,18 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
|
||||
StringBuilder SBJSScript = new StringBuilder();
|
||||
|
||||
if (DTDatos.Rows.Count > 0)
|
||||
{
|
||||
{
|
||||
foreach (DataRow DbRow in DTDatos.Rows)
|
||||
{
|
||||
string moneda = DbRow["Moneda"].ToString();
|
||||
string total = DbRow["GPO"].ToString();
|
||||
if (total != "Total Peso Mexicano")
|
||||
{
|
||||
if (moneda == "Peso Mexicano")
|
||||
{
|
||||
if (moneda.ToUpper().Contains("PESO"))
|
||||
{
|
||||
Info = String.Format("{2}['{1}',{0}],", DbRow[ColValue], DbRow[ColTitle], Info);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(Info.Length > 0)
|
||||
{
|
||||
|
||||
@@ -98,11 +98,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Grafica</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDescargaCartaPorte" OnClick="LnkDescargaCartaPorte_Click" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Descarga Carta Porte</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkDescargaCartaPorte" />
|
||||
@@ -365,7 +363,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="99%" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None">
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<%--0--%>
|
||||
<asp:TemplateField HeaderText="Grupo" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
|
||||
@@ -413,8 +411,25 @@
|
||||
<asp:BoundField HeaderText="Tot. Mínimo" DataField="MIN_Total" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--18--%>
|
||||
<asp:BoundField HeaderText="Tot. Refacturado" DataField="TotalRefacturado" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Sub. Crédito" DataField="SubTotalCredito" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Sub. Contado" DataField="SubTotalContado" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
|
||||
<%--<asp:BoundField HeaderText="Sub. Crédito" DataField="SubTotalCredito" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Sub. Contado" DataField="SubTotalContado" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />--%>
|
||||
|
||||
<%--19--%>
|
||||
<asp:TemplateField HeaderText="Sub. Crédito" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblCredito" runat="server" Text='<%# Eval("SubtotalCredito", "{0:N0}") %>'></asp:Label>
|
||||
<asp:Label ID="LblCreditoPorcentaje" runat="server" Text='<%# String.Format("{0:###,###,###.00}%", Eval("SubTotalCreditoPorcentaje")) %>' Font-Italic="True" Font-Size="10px" Visible="false" ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--20--%>
|
||||
<asp:TemplateField HeaderText="Sub. Contado" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblContado" runat="server" Text='<%# Eval("SubTotalContado", "{0:N0}") %>'></asp:Label>
|
||||
<asp:Label ID="LblContadoPorcentaje" runat="server" Text='<%# String.Format("{0:###,###,###.00}%", Eval("SubTotalContadoPorcentaje")) %>' Font-Italic="True" Font-Size="10px" Visible="false" ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
|
||||
@@ -513,7 +513,18 @@ Partial Class Ventas_RepVentas
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
e.Row.FCLabel("LblCreditoPorcentaje").Visible = True
|
||||
e.Row.FCLabel("LblContadoPorcentaje").Visible = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -396,14 +396,18 @@ Partial Class RepVentasPeriodo
|
||||
Dim moneda As String = DbRow("Moneda").ToString
|
||||
Dim total As String = DbRow("GPO").ToString
|
||||
If total <> "Total Peso Mexicano" Then
|
||||
If moneda = "Peso Mexicano" Then
|
||||
If moneda.ToUpper.Contains("PESO") Then
|
||||
Info = String.Format("{2}['{1}',{0}],", DbRow(ColValue), DbRow(ColTitle), Info)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Info = Info.Remove(Info.Length - 1, 1)
|
||||
SBJSScript.AppendFormat("graficahighcharts('{0}','{1}','{2}','{3}',[{4}],1,'{5}');", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia)
|
||||
If Info.Length > 0 Then
|
||||
Info = Info.Remove(Info.Length - 1, 1)
|
||||
SBJSScript.AppendFormat("graficahighcharts('{0}','{1}','{2}','{3}',[{4}],1,'{5}');", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia)
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
SBJSScript.AppendFormat("graficahighcharts('{0}','{1}','{2}','{3}',[{4}],1,'{5}');", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, " ", XReferencia)
|
||||
End If
|
||||
|
||||
@@ -238,14 +238,27 @@
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas"
|
||||
DataKeyNames=""
|
||||
CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" Width="99%" OnRowDataBound="GvDatos_RowDataBound">
|
||||
CssClass="table table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" Width="100%" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:HyperLinkField ItemStyle-HorizontalAlign="Left" Target="_blank" HeaderText="Grupo" DataTextField="GPO" DataNavigateUrlFields="FechaI,FechaF,CveSubProyecto,CveCliente,CveVendedor,Grupo,GPO,CvePS,CveClasificacion,CveMarca,CveCategoria" DataNavigateUrlFormatString="RepVentasUtilidad.aspx?FechaI={0}&FechaF={1}&CveSubProyecto={2}&CveCliente={3}&CveVendedor={4}&Gpo={5}&CveGpo={6}&CvePS={7}&CveClasificacion={8}&CveMarca={9}&CveCategoria={10}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Ventas" DataField="Ventas" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Crédito" DataField="Credito" DataFormatString="{0:N2}" />
|
||||
<%--<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Crédito" DataField="Credito" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="% Crédito" DataField="PorcentajeCredito" ItemStyle-Width="30px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Contado" DataField="Contado" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="% Contado" DataField="PorcentajeContado" ItemStyle-Width="30px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="% Contado" DataField="PorcentajeContado" ItemStyle-Width="30px" />--%>
|
||||
|
||||
<asp:TemplateField HeaderText="Sub. Crédito" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblCredito" runat="server" Text='<%# Eval("Credito", "{0:N0}") %>'></asp:Label>
|
||||
<asp:Label ID="LblPorcentajeCredito" runat="server" Text='<%# String.Format("{0:###,###,###.00}%", Eval("PorcentajeCredito")) %>' Font-Italic="True" Font-Size="10px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Sub. Contado" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblContado" runat="server" Text='<%# Eval("Contado", "{0:N0}") %>'></asp:Label>
|
||||
<asp:Label ID="LblPorcentajeContado" runat="server" Text='<%# String.Format("{0:###,###,###.00}%", Eval("PorcentajeContado")) %>' Font-Italic="True" Font-Size="10px" Visible="false"></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="%" DataField="ProcentajeVentas" DataFormatString="{0:N2}" ItemStyle-Width="30px" />
|
||||
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" />
|
||||
|
||||
@@ -32,10 +32,10 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) <> "1" Then
|
||||
GvDatos.Columns(3).Visible = False
|
||||
GvDatos.Columns(5).Visible = False
|
||||
End If
|
||||
'If UsuarioActual.Empresa.Funcionalidad(382) <> "1" Then
|
||||
' GvDatos.Columns(3).Visible = False
|
||||
' GvDatos.Columns(5).Visible = False
|
||||
'End If
|
||||
|
||||
CargaCombos()
|
||||
End If
|
||||
@@ -264,6 +264,10 @@ Partial Class Ventas_RepVentasUtilidadPadre
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
||||
e.Row.FCLabel("LblPorcentajeCredito").Visible = True
|
||||
e.Row.FCLabel("LblPorcentajeContado").Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user