This commit is contained in:
2024-09-12 18:12:06 -07:00
15 changed files with 117 additions and 46 deletions

View File

@@ -2094,6 +2094,7 @@ Public Class ClsCompras
.Add("@CveCompraActual", SqlDbType.Int).Value = CveCompraActual .Add("@CveCompraActual", SqlDbType.Int).Value = CveCompraActual
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Tipo", SqlDbType.Int).Value = Tipo .Add("@Tipo", SqlDbType.Int).Value = Tipo
.Add("@MsgSalida", SqlDbType.VarChar, 500).Direction = ParameterDirection.Output
End With End With
Try Try

View File

@@ -3059,12 +3059,13 @@ Public Class ClsGenerales
End Function End Function
Public Function GetSATLocalidad(Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1) As Boolean Public Function GetSATLocalidad(Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CodigoPostal As String = "-1") As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Gral_SAT_LocalidadGet") DataAdapter("PA_Gral_SAT_LocalidadGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveEstado", SqlDbType.VarChar).Value = CveEstado .Add("@CveEstado", SqlDbType.VarChar).Value = CveEstado
.Add("@CveMunicipio", SqlDbType.VarChar).Value = CveMunicipio .Add("@CveMunicipio", SqlDbType.VarChar).Value = CveMunicipio
.Add("@CodigoPostal", SqlDbType.VarChar).Value = CodigoPostal
End With End With
Try Try
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)

View File

@@ -589,25 +589,20 @@ Public Class ClsPaginas
End Set End Set
End Property End Property
Property GlobalDTLocalidad(Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1) As DataTable Property GlobalDTLocalidad(Optional CveEstado As Integer = -1, Optional CveMunicipio As Integer = -1, Optional CodigoPostal As String = "-1") As DataTable
Get Get
If Application("GlobalDTLocalidad") Is Nothing Then If Application("GlobalDTLocalidad") Is Nothing Then
Dim ObjGrales As New ClsGenerales Dim ObjGrales As New ClsGenerales
If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados If ObjGrales.GetSATLocalidad(-1, -1) Then Application("GlobalDTLocalidad") = ObjGrales.DtResultados
ObjGrales.Dispose() ObjGrales.Dispose()
End If End If
Dim StrFiltro As String = "" Dim filtros As New List(Of String)
If CveEstado > 0 And CveMunicipio > 0 Then If CveEstado > 0 And CveMunicipio > 0 Then filtros.Add($" CveEstado = '{CveEstado}' AND CveMunicipio = '{CveMunicipio}'")
StrFiltro = $" CveEstado = '{CveEstado}' AND CveMunicipio = '{CveMunicipio}'" If CveEstado > 0 Then filtros.Add($" CveEstado = '{CveEstado}'")
ElseIf CveEstado > 0 Then If CveMunicipio > 0 Then filtros.Add($" CveMunicipio = '{CveMunicipio}'")
StrFiltro = $" CveEstado = '{CveEstado}'" If CodigoPostal <> "-1" Then filtros.Add($" CP = '{CodigoPostal}'")
ElseIf CveMunicipio > 0 Then
StrFiltro = $" CveMunicipio = '{CveMunicipio}'"
Else
StrFiltro = ""
End If
Dim Dv As New DataView(DirectCast(Application("GlobalDTLocalidad"), DataTable), StrFiltro, "", DataViewRowState.CurrentRows) Dim Dv As New DataView(DirectCast(Application("GlobalDTLocalidad"), DataTable), String.Join(" AND ", filtros), "", DataViewRowState.CurrentRows)
GlobalDTLocalidad = Dv.ToTable GlobalDTLocalidad = Dv.ToTable
Dv.Dispose() Dv.Dispose()

View File

@@ -3385,7 +3385,7 @@ Public Class ClsVentas
Public Function GetReportePadreVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Gpo As Integer, Public Function GetReportePadreVentasUtilidad(CveVendedor As String, CveCliente As Integer, CveSubProyecto As String, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Gpo As Integer,
CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer, EsFilial As Integer) As Boolean CvePS As Integer, CveCategoria As Integer, CveClasificacion As Integer, CveMarca As Integer, EsGarantia As Integer, EsFilial As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_RepVentasUtilidadGetOIC") DataAdapter("PA_Vta_RepVentasUtilidadGet")
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@FechaI", SqlDbType.Date).Value = FechaInicio .Add("@FechaI", SqlDbType.Date).Value = FechaInicio

View File

@@ -1955,11 +1955,8 @@ Partial Class Compras_Compras
If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso Not UsuarioActual.CveUsuario.Contiene(1719, 1721) Then BtnGuardar.Enabled = False '' solo se activa para el usuario Sara.JAM If UsuarioActual.CveEmpresa.Contiene(119, 158) AndAlso Not UsuarioActual.CveUsuario.Contiene(1719, 1721) Then BtnGuardar.Enabled = False '' solo se activa para el usuario Sara.JAM
BtnGuardar.ToolTip = "No se permite registrar facturas con conceptos con código '01010101'. Solicite al proveedor un nuevo comprobante." BtnGuardar.ToolTip = "No se permite registrar facturas con conceptos con código '01010101'. Solicite al proveedor un nuevo comprobante."
End If End If
End If End If
Dim SbValRet As New StringBuilder Dim SbValRet As New StringBuilder
For Each concepto As XmlNode In nodeconceptos For Each concepto As XmlNode In nodeconceptos
' Obtener la descripción del concepto ' Obtener la descripción del concepto
@@ -1992,6 +1989,34 @@ Partial Class Compras_Compras
SbValRet.Append($"Producto: {descripcion} La base e importe del impuesto {impuesto} no coincide Base: {baseValue.ToString()}, Importe Producto: {importeValue.ToString()} <br>") SbValRet.Append($"Producto: {descripcion} La base e importe del impuesto {impuesto} no coincide Base: {baseValue.ToString()}, Importe Producto: {importeValue.ToString()} <br>")
End If End If
Next Next
If UsuarioActual.CveEmpresa = 119 Then
Dim BaseIEPS As Decimal = 0
Dim BaseIVA As Decimal = 0
Dim TasaIEPS As String = ""
Dim traslados As XmlNodeList = impuestosNode.SelectNodes("cfdi:Traslados/cfdi:Traslado", namespaces)
For Each traslado As XmlNode In traslados
' Obtener los valores de los atributos Base e Importe
Dim baseValue As Decimal = Decimal.Parse(ValorXML(traslado, "Base")).RoundSQL(2)
Dim impuesto As String = ValorXML(traslado, "Impuesto")
If impuesto = "001" Then
impuesto = "ISR"
ElseIf impuesto = "002" Then
impuesto = "IVA"
BaseIVA += baseValue
ElseIf impuesto = "003" Then
impuesto = "IEPS"
TasaIEPS = ValorXML(traslado, "TasaOCuota")
BaseIEPS += baseValue
End If
Next
' Validar si Base coincide con Importe
If BaseIVA <> BaseIEPS AndAlso BaseIEPS > 0 Then
'SbValRet.Append($"La base e importe de la retención del impuesto {impuesto} no coinciden para {descripcion}. Base: {baseValue.ToString()}, Importe: {importeValue.ToString()} <br>")
SbValRet.Append($"Producto: {descripcion} La base del IEPS es no coincide con el subtotal, favor de desglosarlo en una base : {BaseIEPS.ToString()}, Tasa: {TasaIEPS} <br>")
End If
End If
End If End If
Next Next

View File

@@ -548,11 +548,11 @@ Partial Class Inventarios_CartaPorteManual
If Tipo = 1 Then If Tipo = 1 Then
CveDireccionOrigen = ObjClientes.DireccionEnvioAdd(-1, EnvioDireccion, EnvioNoExt, EnvioNoInt, "", "", "", EnvioCP, "", UsuarioActual.CveUsuario, 1, -1, "", CveDireccionOrigen = ObjClientes.DireccionEnvioAdd(-1, EnvioDireccion, EnvioNoExt, EnvioNoInt, "", "", "", EnvioCP, "", UsuarioActual.CveUsuario, 1, -1, "",
CvePais:=CvePais, CveEstado:=CveEstado, CveMunicipio:=CveMunicipio, CveLocalidad:=CveLocalidad, CveColonia:=CveColonia) CvePais:=CvePais, CveEstado:=CveEstado, CveMunicipio:=CveMunicipio, CveLocalidad:=CveLocalidad, CveColonia:=CveColonia, CveEmpresa:=UsuarioActual.CveEmpresa)
Else Else
CveDireccionDestino = ObjClientes.DireccionEnvioAdd(-1, EnvioDireccion, EnvioNoExt, EnvioNoInt, "", "", "", EnvioCP, "", UsuarioActual.CveUsuario, 1, -1, "", CveDireccionDestino = ObjClientes.DireccionEnvioAdd(-1, EnvioDireccion, EnvioNoExt, EnvioNoInt, "", "", "", EnvioCP, "", UsuarioActual.CveUsuario, 1, -1, "",
CvePais:=CvePais, CveEstado:=CveEstado, CveMunicipio:=CveMunicipio, CveLocalidad:=CveLocalidad, CveColonia:=CveColonia) CvePais:=CvePais, CveEstado:=CveEstado, CveMunicipio:=CveMunicipio, CveLocalidad:=CveLocalidad, CveColonia:=CveColonia, CveEmpresa:=UsuarioActual.CveEmpresa)
End If End If
Next Next
@@ -1081,12 +1081,10 @@ Partial Class Inventarios_CartaPorteManual
DdlDirClienteLocalidad.Items.Clear() DdlDirClienteLocalidad.Items.Clear()
If DdlDirClienteEstado.SelectedValue.ToEntero > 0 Then If DdlDirClienteEstado.SelectedValue.ToEntero > 0 Then
DdlDirClienteLocalidad.DataSource = GlobalDTLocalidad(DdlDirClienteEstado.SelectedValue.ToEntero, DdlDirClienteMunicipio.SelectedValue.ToEntero) DdlDirClienteLocalidad.DataSource = GlobalDTLocalidad(DdlDirClienteEstado.SelectedValue.ToEntero, DdlDirClienteMunicipio.SelectedValue.ToEntero, CodigoPostal:=TxtEnvioCP.Text.Trim)
DdlDirClienteLocalidad.DataBind() DdlDirClienteLocalidad.DataBind()
End If End If
DdlDirClienteLocalidad.Items.Insert(0, New ListItem("-", "-1"))
DdlDirClienteLocalidad.Items.Insert(0, New ListItem("Seleccione una", "-1"))
End Sub End Sub

View File

@@ -984,7 +984,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
DdlDirClienteLocalidad.Items.Clear(); DdlDirClienteLocalidad.Items.Clear();
if (DdlDirClienteEstado.SelectedValue.ToEntero() > 0) if (DdlDirClienteEstado.SelectedValue.ToEntero() > 0)
{ {
DdlDirClienteLocalidad.DataSource = get_GlobalDTLocalidad(DdlDirClienteEstado.SelectedValue.ToEntero(), DdlDirClienteMunicipio.SelectedValue.ToEntero()); DdlDirClienteLocalidad.DataSource = get_GlobalDTLocalidad(DdlDirClienteEstado.SelectedValue.ToEntero(), DdlDirClienteMunicipio.SelectedValue.ToEntero(), CodigoPostal:TxtEnvioCP.Text.Trim());
DdlDirClienteLocalidad.DataBind(); DdlDirClienteLocalidad.DataBind();
} }

View File

@@ -872,11 +872,11 @@ Partial Class CatSubProyectos
DdlLocalidad.Items.Clear() DdlLocalidad.Items.Clear()
If DdlEstado.SelectedValue.ToEntero > 0 Then If DdlEstado.SelectedValue.ToEntero > 0 Then
DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero) DdlLocalidad.DataSource = GlobalDTLocalidad(DdlEstado.SelectedValue.ToEntero, DdlMunicipio.SelectedValue.ToEntero, CodigoPostal:=TxtCP.Text.Trim)
DdlLocalidad.DataBind() DdlLocalidad.DataBind()
End If End If
DdlLocalidad.Items.Insert(0, New ListItem("Seleccione una", "-1")) DdlLocalidad.Items.Insert(0, New ListItem("-", "-1"))
End Sub End Sub

View File

@@ -248,7 +248,7 @@
<div class="col-md-8"> <div class="col-md-8">
<div class="input-group"> <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%" Width="100%"
type="number"></asp:TextBox> type="number"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros" <asp:RequiredFieldValidator ID="RFVCantidadPasajeros" runat="server" ControlToValidate="TxtCantidadPasajeros"

View File

@@ -312,14 +312,18 @@ public partial class Ventas_RepProductosServiciosPeriodo : ClsPaginas
StringBuilder SBJSScript = new StringBuilder(); StringBuilder SBJSScript = new StringBuilder();
if (DTDatos.Rows.Count > 0) if (DTDatos.Rows.Count > 0)
{ {
foreach (DataRow DbRow in DTDatos.Rows) foreach (DataRow DbRow in DTDatos.Rows)
{ {
string moneda = DbRow["Moneda"].ToString(); string moneda = DbRow["Moneda"].ToString();
string total = DbRow["GPO"].ToString(); string total = DbRow["GPO"].ToString();
if (total != "Total Peso Mexicano") 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) if(Info.Length > 0)
{ {

View File

@@ -98,11 +98,9 @@
<li> <li>
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Grafica</asp:LinkButton> <asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Grafica</asp:LinkButton>
</li> </li>
<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> <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> </li>
</ContentTemplate> </ContentTemplate>
<Triggers> <Triggers>
<asp:PostBackTrigger ControlID="LnkDescargaCartaPorte" /> <asp:PostBackTrigger ControlID="LnkDescargaCartaPorte" />
@@ -365,7 +363,7 @@
<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" 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> <Columns>
<%--0--%> <%--0--%>
<asp:TemplateField HeaderText="Grupo" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left"> <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" /> <asp:BoundField HeaderText="Tot. Mínimo" DataField="MIN_Total" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
<%--18--%> <%--18--%>
<asp:BoundField HeaderText="Tot. Refacturado" DataField="TotalRefacturado" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" /> <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> </Columns>
<RowStyle CssClass="Texto" /> <RowStyle CssClass="Texto" />
<HeaderStyle CssClass="Titulos" /> <HeaderStyle CssClass="Titulos" />

View File

@@ -513,7 +513,18 @@ Partial Class Ventas_RepVentas
End If End If
End If 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 If
End Sub End Sub
#End Region #End Region

View File

@@ -396,14 +396,18 @@ Partial Class RepVentasPeriodo
Dim moneda As String = DbRow("Moneda").ToString Dim moneda As String = DbRow("Moneda").ToString
Dim total As String = DbRow("GPO").ToString Dim total As String = DbRow("GPO").ToString
If total <> "Total Peso Mexicano" Then 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) Info = String.Format("{2}['{1}',{0}],", DbRow(ColValue), DbRow(ColTitle), Info)
End If End If
End If End If
Next Next
Info = Info.Remove(Info.Length - 1, 1) If Info.Length > 0 Then
SBJSScript.AppendFormat("graficahighcharts('{0}','{1}','{2}','{3}',[{4}],1,'{5}');", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, Info, XReferencia) 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 Else
SBJSScript.AppendFormat("graficahighcharts('{0}','{1}','{2}','{3}',[{4}],1,'{5}');", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, " ", XReferencia) SBJSScript.AppendFormat("graficahighcharts('{0}','{1}','{2}','{3}',[{4}],1,'{5}');", divcontainer.ClientID, Titulo, SubTitulo, YReferencia, " ", XReferencia)
End If End If

View File

@@ -238,14 +238,27 @@
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas" <asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas Utilidad con los filtros especificados" ToolTip="Listado de Ventas"
DataKeyNames="" 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> <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: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="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="% 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="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="%" DataField="ProcentajeVentas" DataFormatString="{0:N2}" ItemStyle-Width="30px" />
<asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" /> <asp:BoundField ItemStyle-HorizontalAlign="Right" HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" />

View File

@@ -32,10 +32,10 @@ Partial Class Ventas_RepVentasUtilidadPadre
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
If UsuarioActual.Empresa.Funcionalidad(382) <> "1" Then 'If UsuarioActual.Empresa.Funcionalidad(382) <> "1" Then
GvDatos.Columns(3).Visible = False ' GvDatos.Columns(3).Visible = False
GvDatos.Columns(5).Visible = False ' GvDatos.Columns(5).Visible = False
End If 'End If
CargaCombos() CargaCombos()
End If End If
@@ -264,6 +264,10 @@ Partial Class Ventas_RepVentasUtilidadPadre
End If 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 If
End Sub End Sub