Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -301,7 +301,7 @@ Public Class ClsSisUsuarios
|
||||
Retorno.CveTipoDocumento = "-1"
|
||||
End If
|
||||
|
||||
|
||||
Retorno.ListaPersonalizacion = CargaPersonalizacionUsuario(Retorno.CveUsuario)
|
||||
|
||||
End If
|
||||
|
||||
@@ -313,6 +313,21 @@ Public Class ClsSisUsuarios
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function CargaPersonalizacionUsuario(CveUsuarioParamerto As Integer) As Hashtable
|
||||
|
||||
Dim Retorno As New Hashtable
|
||||
If GetUsuariosPersonalizaciones(CveUsuarioParamerto) Then
|
||||
|
||||
For Each drow As DataRow In Data.Rows
|
||||
Retorno.Add(drow("PersonalizacionNombre").ToString, drow("PersonalizacionValor").ToString)
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function ValidaUsuarioAsignacion(CveUsuario As Integer, CveEmpresa As Integer) As Usuario
|
||||
Dim Retorno As Usuario = Nothing
|
||||
|
||||
@@ -2951,6 +2966,56 @@ Public Class ClsSisUsuarios
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "PERSONALIZACIÓN COLUMNAS USUARIO"
|
||||
Public Function GetUsuariosPersonalizaciones(ByVal CveUsuario As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Sis_UsuariosPersonalizacionesGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener la personalización.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Retorno = False
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Public Function AddUsuariosPersonalizaciones(ByRef UsuarioActual As Usuario, PersonalizacionNombre As String, PersonalizacionValor As String) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Sis_UsuariosPersonalizacionesAdd")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = UsuarioActual.CveUsuario
|
||||
.Add("@PersonalizacionNombre", SqlDbType.VarChar).Value = PersonalizacionNombre
|
||||
.Add("@PersonalizacionValor", SqlDbType.VarChar).Value = PersonalizacionValor
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
UsuarioActual.ListaPersonalizacion = CargaPersonalizacionUsuario(UsuarioActual.CveUsuario)
|
||||
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar la personalización.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
Retorno = False
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "IDisposable Support"
|
||||
Protected Overridable Sub Dispose(disposing As Boolean)
|
||||
If Not Me.disposedValue Then
|
||||
|
||||
@@ -47,7 +47,7 @@ Public Class Usuario
|
||||
Public Property NombreAbreviatura As String
|
||||
Public Property SessionId As String
|
||||
Private Property ListaSesion As Hashtable
|
||||
Private Property ListaPersonalizacion As Hashtable
|
||||
Public Property ListaPersonalizacion As Hashtable
|
||||
Public Property Acceso As Integer
|
||||
Public Property TipoControl As Integer
|
||||
|
||||
|
||||
@@ -669,7 +669,7 @@
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cantidad" HeaderStyle-Width="100px" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" Visible="false" Width="60px" runat="server" Text="0"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCantidad" Visible="false" Width="60px" runat="server" Text="0" style="text-align:right"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -1576,6 +1576,14 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
e.Row.FCTextBox("TxtSerie").ReadOnly = True
|
||||
|
||||
'If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
If UsuarioActual.CveEmpresa = 141 Then
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||
e.Row.FCTextBox("TxtCantidad").Text = e.Row.DataKey("Cantidad").ToDecimal.ToString("#,###.######")
|
||||
e.Row.FCCheckBox("Chk").Enabled = False
|
||||
e.Row.FCCheckBox("Chk").Checked = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||
@@ -1587,12 +1595,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||
e.Row.FCTextBox("TxtCantidad").Text = e.Row.DataKey("Cantidad")
|
||||
e.Row.FCCheckBox("Chk").Enabled = False
|
||||
e.Row.FCCheckBox("Chk").Checked = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +60,8 @@
|
||||
<asp:LinkButton ID="ImgExcelPersonalizado" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel Personalizado</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar Columnas</asp:HyperLink>
|
||||
<%--<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar Columnas</asp:HyperLink>--%>
|
||||
<asp:LinkButton ID="LnkPersonalizar" OnClick="LnkPersonalizar_Click" runat="server"><i class="fa fa-pencil"></i>Personalizar Columnas</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="BtnDescargarPDF" runat="server"> <i class="fa fa-download"></i> Descarga PDFs</asp:LinkButton>
|
||||
@@ -332,178 +333,226 @@
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" data-sort="true" Width="99%" DataKeyNames="CveVenta,TipoDocumento,SerieFolio" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<%-- 0--%>
|
||||
<asp:TemplateField HeaderText="Tipo Docto">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipo" runat="server" Text='<%# Eval("TipoDocumento") %>'></asp:Literal>
|
||||
<asp:HiddenField ID="HdnTipo" runat="server" Value='<%# Eval("TipoDocumento") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 1--%>
|
||||
<asp:TemplateField HeaderText="Folio" ItemStyle-Width="100px">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFolio" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Literal>
|
||||
<asp:HiddenField ID="HdnFolio" runat="server" Value='<%# Eval("SerieFolio") %>' />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 2--%>
|
||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 3--%>
|
||||
<asp:TemplateField HeaderText="Cliente" Visible="True">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCliente" runat="server" Text='<%# Eval("Nombre", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 4--%>
|
||||
<asp:TemplateField HeaderText="SubTotal" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSubTotal" runat="server" Text='<%# Eval("SubTotal", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 5--%>
|
||||
<asp:TemplateField HeaderText="Descuento" Visible="True" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDescuento" runat="server" Text='<%# Eval("Descuento", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 6--%>
|
||||
<asp:TemplateField HeaderText="Motivo Descuento" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMotivoDescuento" runat="server" Text='<%# Eval("MotivoDescuento", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 7--%>
|
||||
<asp:TemplateField HeaderText="Amortización" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlAmortizacion" runat="server" Text='<%# Eval("Amortizacion", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 8--%>
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlIVA" runat="server" Text='<%# Eval("IVA", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 9--%>
|
||||
<asp:TemplateField HeaderText="IEPS" Visible="false" ItemStyle-HorizontalAlign="Right" >
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlIEPS" runat="server" Text='<%# Eval("IEPS", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 10--%>
|
||||
<asp:TemplateField HeaderText="Ret. IVA" Visible="false" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlRetIVA" runat="server" Text='<%# Eval("RetIVA", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 11--%>
|
||||
<asp:TemplateField HeaderText="Ret. ISR" Visible="false" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlRetISR" runat="server" Text='<%# Eval("RetISR", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 12--%>
|
||||
<asp:TemplateField HeaderText="Imp. Locales" Visible="false" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlImpLocales" runat="server" Text='<%# Eval("TotalImpuestos", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 13--%>
|
||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 14--%>
|
||||
<asp:TemplateField HeaderText="Mon">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMon" runat="server" Text='<%# Eval("Abreviatura") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 15--%>
|
||||
<asp:TemplateField HeaderText="Sucursal" Visible="True">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSucursal" runat="server" Text='<%# Eval("SubProyecto", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 16--%>
|
||||
<asp:TemplateField HeaderText="Suc Ejecución" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSucursalE" runat="server" Text='<%# Eval("SubProyectoEjecucion", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 17--%>
|
||||
<asp:TemplateField HeaderText="Código Cliente" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodCliente" runat="server" Text='<%# Eval("Codigo", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 18--%>
|
||||
<asp:TemplateField HeaderText="Sucursal Cliente" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSucCliente" runat="server" Text='<%# Eval("SucursalCliente", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 19--%>
|
||||
<asp:TemplateField HeaderText="Suc Cobranza" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSucCobranza" runat="server" Text='<%# Eval("SubProyectoCobranza", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 20--%>
|
||||
<asp:TemplateField HeaderText="Sucursal Ejecución" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSucServicio" runat="server" Text='<%# Eval("SubProyectoEjecucion", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 21--%>
|
||||
<asp:TemplateField HeaderText="Vendedor" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlVendedor" runat="server" Text='<%# Eval("Vendedor", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 22--%>
|
||||
<asp:TemplateField HeaderText="Estatus">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatusFactura" runat="server" Text='<%# Eval("EstatusFactura", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 23--%>
|
||||
<asp:TemplateField HeaderText="Motivo Cancelación" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMotivoCancelacion" runat="server" Text='<%# Eval("MotivoCancelacion", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 24--%>
|
||||
<asp:TemplateField Visible="false" HeaderText="Se Timbró">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSeTimbro" runat="server" Text='<%# Eval("SeTimbro") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 25--%>
|
||||
<asp:TemplateField Visible="false" HeaderText="Se envió Mail">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSeEnvioMail" runat="server" Text='<%# Eval("EnvioMail") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 26--%>
|
||||
<asp:TemplateField HeaderText="Cuenta Contable" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCtaContable" runat="server" Text='<%# Eval("CuentaContable") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 27--%>
|
||||
<asp:TemplateField HeaderText="Usuario" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 28--%>
|
||||
<asp:TemplateField HeaderText="Observaciones" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlObservaciones" runat="server" Text='<%# Eval("Observaciones", "{0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 29--%>
|
||||
<asp:TemplateField HeaderText="Folio Fiscal (UUID)" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFolioFiscal" runat="server" Text='<%# Eval("FolioFiscal") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 30--%>
|
||||
<asp:TemplateField HeaderText="Mail Cliente" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMailCliente" runat="server" Text='<%# Eval("MailCliente") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 31--%>
|
||||
<asp:TemplateField HeaderText="Estatus Facturación" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlEstatusFacturacion" runat="server" Text='<%# Eval("EstatusCot") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 32--%>
|
||||
<asp:TemplateField HeaderText="Factura de Cotización" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFacturaCotizacion" runat="server" Text='<%# Eval("FolioVenta") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 33--%>
|
||||
<asp:TemplateField HeaderText="Saldo" Visible="false" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<%-- 34--%>
|
||||
<asp:TemplateField HeaderText="Orden Compra" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lTLOrdenCompra" runat="server" Text='<%# Eval("OrdenCompra") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%-- 35--%>
|
||||
<asp:TemplateField HeaderText="Pedido Contrato" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lTLPedidoContrato" runat="server" Text='<%# Eval("PedidoContrato") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
@@ -576,102 +625,90 @@
|
||||
<table class="table table-striped nobordertop table-advance table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFolio" runat="server" Text="Folio" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSubTotal" runat="server" Text="SubTotal" Checked="true" /></td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChlMotivoDescuento" runat="server" Text="Motivo Descuento" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkTipoDocto" runat="server" Text="*Tipo Documento" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursal" runat="server" Text="*Sucursal" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalCobranza" runat="server" Text="Sucursal Cobranza" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkAmortizacion" runat="server" Text="Amortización" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIVA" runat="server" Text="IVA" Checked="true" /></td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" /></td>
|
||||
</tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkFolio" runat="server" Text="*Folio" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkEstatusFactura" runat="server" Text="*Estatus de Factura" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalEjecucion" runat="server" Text="Sucursal Ejecución" /></td>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTotal" runat="server" Text="Total" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFecha" runat="server" Text="Fecha" Checked="true" /></td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursal" runat="server" Text="Sucursal" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalEjecucion" runat="server" Text="Sucursal Ejecución" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalCobranza" runat="server" Text="Sucursal Cobranza" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkFecha" runat="server" Text="*Fecha" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkVendedor" runat="server" Text="Vendedor" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkMotivoCancelacion" runat="server" Text="Motivo Cancelacion" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSubTotal" runat="server" Text="*SubTotal" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkCodigo" runat="server" Text="Código Cliente" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkUsuario" runat="server" Text="Usuario" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkDescuento" runat="server" Text="*Descuento" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkCliente" runat="server" Text="*Cliente" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkEstatusFacturacion" runat="server" Text="Estatus Facturación" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkIVA" runat="server" Text="*IVA" Checked="true" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkMailCliente" runat="server" Text="Mail Cliente" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkFolioFacturacion" runat="server" Text="Factura Cotización" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkIEPS" runat="server" Text="*IEPS" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkCuentaContable" runat="server" Text="Cuenta Contable" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkObservaciones" runat="server" Text="Observaciones" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSucursalCliente" runat="server" Text="Sucursal Cliente" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkOrdenCompra" runat="server" Text="OrdenCompra" /></td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalCliente" runat="server" Text="Sucursal Cliente" /></td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkVendedor" runat="server" Text="Vendedor" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkEstatusFactura" runat="server" Text="Estatus de Factura" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMotivoCancelacion" runat="server" Text="Motivo Cancelacion" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSeTimbro" runat="server" Text="Se Timbró" /></td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text="Se envió Mail" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCuentaContable" runat="server" Text="Cuenta Contable" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSaldo" runat="server" Text="Saldo" Checked="false" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkPedidoContrato" runat="server" Text="Pedido Contrato" /></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkUsuario" runat="server" Text="Usuario" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkObservaciones" runat="server" Text="Observaciones" /></td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFolioFiscal" runat="server" Text="Folio Fiscal (UUID)" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMailCliente" runat="server" Text="Mail Cliente" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkTotalImpuestos" runat="server" Text="Impuestos Locales" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkFolioFiscal" runat="server" Text="Folio Fiscal (UUID)" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChlMotivoDescuento" runat="server" Text="Motivo Descuento" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkEstatusFacturacion" runat="server" Text="Estatus Facturación" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFolioFacturacion" runat="server" Text="Factura Cotización" /></td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCliente" runat="server" Text="Cliente" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCodigo" runat="server" Text="Código Cliente" /></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkTotal" runat="server" Text="*Total" Checked="true" /></td>
|
||||
<td style="text-align: left;"></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkAmortizacion" runat="server" Text="Amortización" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkMoneda" runat="server" Text="*Moneda" Checked="true" /></td>
|
||||
<td style="text-align: left;"></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSeTimbro" runat="server" Text="Se Timbró" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTotalImpuestos" runat="server" Text="Impuestos Locales" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text="IEPS" /></td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMoneda" runat="server" Text="Moneda" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSaldo" runat="server" Text="Saldo" Checked="false" /></td>
|
||||
</td>
|
||||
<td style="text-align: left;"></td>
|
||||
<td style="text-align: left;"></td>
|
||||
<td style="text-align: left;"><asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text="Se envió Mail" /></td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal" onclick="$('#BtnPersonalizar').click();">Personalizar</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="text-align:left">
|
||||
<asp:CheckBox ID="ChkGuardarPersonalizacion" runat="server" Text=" Guarda Personalización" TextAlign="Right" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal" onclick="$('#BtnPersonalizar').click();">Personalizar</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -28,6 +28,9 @@ Partial Class RepVentaDetalle
|
||||
End Property
|
||||
Private Property DtVentas As DataTable
|
||||
Get
|
||||
If ViewState("DtVentas") Is Nothing Then
|
||||
ViewState("DtVentas") = New DataTable
|
||||
End If
|
||||
Return DirectCast(ViewState("DtVentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
@@ -94,6 +97,20 @@ Partial Class RepVentaDetalle
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property Primeracontsulta As Boolean
|
||||
Get
|
||||
If ViewState("Primeracontsulta") Is Nothing Then
|
||||
ViewState("Primeracontsulta") = True
|
||||
End If
|
||||
Return Boolean.Parse(ViewState("Primeracontsulta").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Primeracontsulta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
'pRivate ReadOnly Property ColumnasVisibles As
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
@@ -111,6 +128,8 @@ Partial Class RepVentaDetalle
|
||||
DVServicioDomicilio.Visible = True
|
||||
|
||||
End If
|
||||
PrePersonalizacion()
|
||||
CargaPersonalizacion()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -407,6 +426,16 @@ Partial Class RepVentaDetalle
|
||||
ImgImprimir.Enabled = True
|
||||
GvDatos.DataSource = AddRows(ObjVentas.DtResultados)
|
||||
GvVsh.DataSource = ObjVentas.DtResultados.FiltraParametros("CveVenta > 0")
|
||||
|
||||
If DtVentas.SUMD("Descuento") <= 0 Then
|
||||
GvDatos.Columns(5).Visible = False ' se oculta descuentos, si está vac+io
|
||||
Else
|
||||
If Primeracontsulta Then
|
||||
GvDatos.Columns(5).Visible = True
|
||||
ChkDescuento.Checked = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
GvVsh.DataSource = Nothing
|
||||
@@ -416,8 +445,19 @@ Partial Class RepVentaDetalle
|
||||
If DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 AndAlso DtVentas.SUMD("Descuento") <= 0 Then GvDatos.Columns(5).Visible = False ' se oculta descuentos, si está vac+io
|
||||
Agrupador = DdlGrupo.SelectedItem.Text
|
||||
|
||||
GvDatos.DataBind()
|
||||
GvDatosDataBind()
|
||||
GvVsh.DataBind()
|
||||
|
||||
Primeracontsulta = False
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvDatosDataBind()
|
||||
|
||||
GvDatos.DataSource = DtVentas
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -526,8 +566,388 @@ Partial Class RepVentaDetalle
|
||||
|
||||
#Region "PERSONALIZAR COLUMNAS"
|
||||
|
||||
Private Sub PrePersonalizacion()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
|
||||
ChkIEPS.Visible = True
|
||||
Else
|
||||
ChkIEPS.Visible = False
|
||||
GvDatos.Columns(9).Visible = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PersonalizaDefault()
|
||||
|
||||
ChkTipoDocto.Checked = True
|
||||
ChkFolio.Checked = True
|
||||
ChkFecha.Checked = True
|
||||
ChkSubTotal.Checked = True
|
||||
|
||||
If DtVentas.Rows.Count > 0 AndAlso DtVentas.SUMD("Descuento") > 0 Then
|
||||
ChkDescuento.Checked = True
|
||||
End If
|
||||
|
||||
ChkIVA.Checked = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
|
||||
ChkIEPS.Checked = True
|
||||
End If
|
||||
|
||||
ChkTotal.Checked = True
|
||||
ChkMoneda.Checked = True
|
||||
ChkSucursal.Checked = True
|
||||
ChkEstatusFactura.Checked = True
|
||||
ChkCliente.Checked = True
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPersonalizar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
ChkGuardarPersonalizacion.Checked = False
|
||||
RegistraScript("$('#DivPersonalizar').modal('show')")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
|
||||
If ChkGuardarPersonalizacion.Checked Then
|
||||
GuardaPersonalizacion()
|
||||
End If
|
||||
|
||||
Personaliza()
|
||||
GvDatosDataBind()
|
||||
UPDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GuardaPersonalizacion()
|
||||
|
||||
Dim objUsuario As New ClsSisUsuarios
|
||||
Dim ListPersonalizada As New List(Of String)
|
||||
|
||||
If ChkOrdenCompra.Checked Then
|
||||
ListPersonalizada.Add("OrdenCompra")
|
||||
End If
|
||||
|
||||
If ChkFolio.Checked Then
|
||||
ListPersonalizada.Add("Folio")
|
||||
End If
|
||||
|
||||
If ChkPedidoContrato.Checked Then
|
||||
ListPersonalizada.Add("PedidoContrato")
|
||||
End If
|
||||
|
||||
|
||||
If ChkFolio.Checked Then
|
||||
ListPersonalizada.Add("Folio")
|
||||
End If
|
||||
|
||||
If ChkFecha.Checked Then
|
||||
ListPersonalizada.Add("Fecha")
|
||||
End If
|
||||
|
||||
If ChkCliente.Checked Then
|
||||
ListPersonalizada.Add("Cliente")
|
||||
End If
|
||||
|
||||
If ChkSubTotal.Checked Then
|
||||
ListPersonalizada.Add("SubTotal")
|
||||
End If
|
||||
|
||||
If ChkDescuento.Checked Then
|
||||
ListPersonalizada.Add("Descuento")
|
||||
End If
|
||||
|
||||
If ChlMotivoDescuento.Checked Then
|
||||
ListPersonalizada.Add("MotivoDescuento")
|
||||
End If
|
||||
|
||||
If ChkAmortizacion.Checked Then
|
||||
ListPersonalizada.Add("Amortizacion")
|
||||
End If
|
||||
|
||||
If ChkIVA.Checked Then
|
||||
ListPersonalizada.Add("IVA")
|
||||
End If
|
||||
|
||||
If ChkIEPS.Checked Then
|
||||
ListPersonalizada.Add("IEPS")
|
||||
End If
|
||||
|
||||
If ChkRetIVA.Checked Then
|
||||
ListPersonalizada.Add("RetIVA")
|
||||
End If
|
||||
|
||||
If ChkRetISR.Checked Then
|
||||
ListPersonalizada.Add("RetISR")
|
||||
End If
|
||||
|
||||
If ChkTotalImpuestos.Checked Then
|
||||
ListPersonalizada.Add("TotalImpuestos")
|
||||
End If
|
||||
|
||||
If ChkTotal.Checked Then
|
||||
ListPersonalizada.Add("Total")
|
||||
End If
|
||||
|
||||
If ChkMoneda.Checked Then
|
||||
ListPersonalizada.Add("Moneda")
|
||||
End If
|
||||
|
||||
If ChkSucursal.Checked Then
|
||||
ListPersonalizada.Add("Sucursal")
|
||||
End If
|
||||
|
||||
If ChkSucursalEjecucion.Checked Then
|
||||
ListPersonalizada.Add("SucursalEjecucion")
|
||||
End If
|
||||
|
||||
If ChkCodigo.Checked Then
|
||||
ListPersonalizada.Add("Codigo")
|
||||
End If
|
||||
|
||||
If ChkSucursalCliente.Checked Then
|
||||
ListPersonalizada.Add("SucursalCliente")
|
||||
End If
|
||||
|
||||
If ChkSucursalCobranza.Checked Then
|
||||
ListPersonalizada.Add("SucursalCobranza")
|
||||
End If
|
||||
|
||||
If ChkVendedor.Checked Then
|
||||
ListPersonalizada.Add("Vendedor")
|
||||
End If
|
||||
|
||||
If ChkEstatusFactura.Checked Then
|
||||
ListPersonalizada.Add("EstatusFactura")
|
||||
End If
|
||||
|
||||
If ChkMotivoCancelacion.Checked Then
|
||||
ListPersonalizada.Add("MotivoCancelacion")
|
||||
End If
|
||||
|
||||
If ChkSeTimbro.Checked Then
|
||||
ListPersonalizada.Add("SeTimbro")
|
||||
End If
|
||||
|
||||
If ChkSeEnvioMail.Checked Then
|
||||
ListPersonalizada.Add("SeEnvioMail")
|
||||
End If
|
||||
|
||||
If ChkCuentaContable.Checked Then
|
||||
ListPersonalizada.Add("CuentaContable")
|
||||
End If
|
||||
|
||||
If ChkUsuario.Checked Then
|
||||
ListPersonalizada.Add("Usuario")
|
||||
End If
|
||||
|
||||
If ChkObservaciones.Checked Then
|
||||
ListPersonalizada.Add("Observaciones")
|
||||
End If
|
||||
|
||||
If ChkFolioFiscal.Checked Then
|
||||
ListPersonalizada.Add("FolioFiscal")
|
||||
End If
|
||||
|
||||
If ChkMailCliente.Checked Then
|
||||
ListPersonalizada.Add("MailCliente")
|
||||
End If
|
||||
|
||||
If ChkEstatusFacturacion.Checked Then
|
||||
ListPersonalizada.Add("EstatusFacturacion")
|
||||
End If
|
||||
|
||||
If ChkFolioFacturacion.Checked Then
|
||||
ListPersonalizada.Add("FolioFacturacion")
|
||||
End If
|
||||
|
||||
If ChkSaldo.Checked Then
|
||||
ListPersonalizada.Add("Saldo")
|
||||
End If
|
||||
|
||||
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentaDetalles.aspx", String.Join("|", ListPersonalizada)) Then
|
||||
'Alert("Personalizacion guardada")
|
||||
End If
|
||||
|
||||
objUsuario.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaPersonalizacion()
|
||||
|
||||
Dim strBasePersonalizacion As String = UsuarioActual.Personalizaciones("RepVentaDetalles.aspx")
|
||||
|
||||
If strBasePersonalizacion.Trim.Length > 0 Then
|
||||
|
||||
ChkTipoDocto.Checked = False
|
||||
ChkOrdenCompra.Checked = False
|
||||
ChkPedidoContrato.Checked = False
|
||||
|
||||
ChkFolio.Checked = False
|
||||
ChkFecha.Checked = False
|
||||
ChkCliente.Checked = False
|
||||
ChkSubTotal.Checked = False
|
||||
ChkDescuento.Checked = False
|
||||
ChlMotivoDescuento.Checked = False
|
||||
ChkAmortizacion.Checked = False
|
||||
ChkIVA.Checked = False
|
||||
ChkIEPS.Checked = False
|
||||
ChkRetIVA.Checked = False
|
||||
ChkRetISR.Checked = False
|
||||
ChkTotalImpuestos.Checked = False
|
||||
ChkTotal.Checked = False
|
||||
ChkMoneda.Checked = False
|
||||
ChkSucursal.Checked = False
|
||||
ChkSucursalEjecucion.Checked = False
|
||||
ChkCodigo.Checked = False
|
||||
ChkSucursalCliente.Checked = False
|
||||
ChkSucursalCobranza.Checked = False
|
||||
ChkSucursalEjecucion.Checked = False
|
||||
ChkVendedor.Checked = False
|
||||
ChkEstatusFactura.Checked = False
|
||||
ChkMotivoCancelacion.Checked = False
|
||||
ChkSeTimbro.Checked = False
|
||||
ChkSeEnvioMail.Checked = False
|
||||
ChkCuentaContable.Checked = False
|
||||
ChkUsuario.Checked = False
|
||||
ChkObservaciones.Checked = False
|
||||
ChkFolioFiscal.Checked = False
|
||||
ChkMailCliente.Checked = False
|
||||
ChkEstatusFacturacion.Checked = False
|
||||
ChkFolioFacturacion.Checked = False
|
||||
ChkSaldo.Checked = False
|
||||
|
||||
Dim Personalizaciones As String() = strBasePersonalizacion.Split("|"c)
|
||||
|
||||
For Each personalizacion As String In Personalizaciones
|
||||
Select Case personalizacion
|
||||
Case "TipoDocto"
|
||||
ChkTipoDocto.Checked = True
|
||||
Exit Select
|
||||
Case "OrdenCompra"
|
||||
ChkOrdenCompra.Checked = True
|
||||
Exit Select
|
||||
Case "PedidoContrato"
|
||||
ChkPedidoContrato.Checked = True
|
||||
Exit Select
|
||||
Case "Folio"
|
||||
ChkFolio.Checked = True
|
||||
Exit Select
|
||||
Case "Fecha"
|
||||
ChkFecha.Checked = True
|
||||
Exit Select
|
||||
Case "Cliente"
|
||||
ChkCliente.Checked = True
|
||||
Exit Select
|
||||
Case "SubTotal"
|
||||
ChkSubTotal.Checked = True
|
||||
Exit Select
|
||||
Case "Descuento"
|
||||
ChkDescuento.Checked = True
|
||||
Exit Select
|
||||
Case "MotivoDescuento"
|
||||
ChlMotivoDescuento.Checked = True
|
||||
Exit Select
|
||||
Case "Amortizacion"
|
||||
ChkAmortizacion.Checked = True
|
||||
Exit Select
|
||||
Case "IVA"
|
||||
ChkIVA.Checked = True
|
||||
Exit Select
|
||||
Case "IEPS"
|
||||
ChkIEPS.Checked = True
|
||||
Exit Select
|
||||
Case "RetIVA"
|
||||
ChkRetIVA.Checked = True
|
||||
Exit Select
|
||||
Case "RetISR"
|
||||
ChkRetISR.Checked = True
|
||||
Exit Select
|
||||
Case "TotalImpuestos"
|
||||
ChkTotalImpuestos.Checked = True
|
||||
Exit Select
|
||||
Case "Total"
|
||||
ChkTotal.Checked = True
|
||||
Exit Select
|
||||
Case "Moneda"
|
||||
ChkMoneda.Checked = True
|
||||
Exit Select
|
||||
Case "Sucursal"
|
||||
ChkSucursal.Checked = True
|
||||
Exit Select
|
||||
Case "SucursalEjecucion"
|
||||
ChkSucursalEjecucion.Checked = True
|
||||
Exit Select
|
||||
Case "Codigo"
|
||||
ChkCodigo.Checked = True
|
||||
Exit Select
|
||||
Case "SucursalCliente"
|
||||
ChkSucursalCliente.Checked = True
|
||||
Exit Select
|
||||
Case "SucursalCobranza"
|
||||
ChkSucursalCobranza.Checked = True
|
||||
Exit Select
|
||||
Case "SucursalEjecucion"
|
||||
ChkSucursalEjecucion.Checked = True
|
||||
Exit Select
|
||||
Case "Vendedor"
|
||||
ChkVendedor.Checked = True
|
||||
Exit Select
|
||||
Case "EstatusFactura"
|
||||
ChkEstatusFactura.Checked = True
|
||||
Exit Select
|
||||
Case "MotivoCancelacion"
|
||||
ChkMotivoCancelacion.Checked = True
|
||||
Exit Select
|
||||
Case "SeTimbro"
|
||||
ChkSeTimbro.Checked = True
|
||||
Exit Select
|
||||
Case "SeEnvioMail"
|
||||
ChkSeEnvioMail.Checked = True
|
||||
Exit Select
|
||||
Case "CuentaContable"
|
||||
ChkCuentaContable.Checked = True
|
||||
Exit Select
|
||||
Case "Usuario"
|
||||
ChkUsuario.Checked = True
|
||||
Exit Select
|
||||
Case "Observaciones"
|
||||
ChkObservaciones.Checked = True
|
||||
Exit Select
|
||||
Case "FolioFiscal"
|
||||
ChkFolioFiscal.Checked = True
|
||||
Exit Select
|
||||
Case "MailCliente"
|
||||
ChkMailCliente.Checked = True
|
||||
Exit Select
|
||||
Case "EstatusFacturacion"
|
||||
ChkEstatusFacturacion.Checked = True
|
||||
Exit Select
|
||||
Case "FolioFacturacion"
|
||||
ChkFolioFacturacion.Checked = True
|
||||
Exit Select
|
||||
Case "Saldo"
|
||||
ChkSaldo.Checked = True
|
||||
Exit Select
|
||||
Case Else
|
||||
Exit Select
|
||||
End Select
|
||||
Next
|
||||
|
||||
Personaliza()
|
||||
Else
|
||||
PersonalizaDefault()
|
||||
End If
|
||||
|
||||
UPPersonalizar.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub Personaliza()
|
||||
|
||||
GvDatos.Columns(0).Visible = ChkTipoDocto.Checked
|
||||
GvDatos.Columns(1).Visible = ChkFolio.Checked
|
||||
GvDatos.Columns(2).Visible = ChkFecha.Checked
|
||||
GvDatos.Columns(3).Visible = ChkCliente.Checked
|
||||
@@ -561,6 +981,8 @@ Partial Class RepVentaDetalle
|
||||
GvDatos.Columns(31).Visible = ChkEstatusFacturacion.Checked
|
||||
GvDatos.Columns(32).Visible = ChkFolioFacturacion.Checked
|
||||
GvDatos.Columns(33).Visible = ChkSaldo.Checked
|
||||
GvDatos.Columns(34).Visible = ChkOrdenCompra.Checked
|
||||
GvDatos.Columns(35).Visible = ChkPedidoContrato.Checked
|
||||
|
||||
Personalizo = 1
|
||||
If Personalizo = 1 Then
|
||||
@@ -568,7 +990,7 @@ Partial Class RepVentaDetalle
|
||||
Else
|
||||
ImgExcelPersonalizado.Visible = False
|
||||
End If
|
||||
UPDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -871,4 +1293,6 @@ Partial Class RepVentaDetalle
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -69,10 +69,19 @@
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
||||
<asp:LinkButton ID="ImgExcelPersonalizado" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel Personalizado</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPErsonalizar" OnClick="LnkPErsonalizar_Click" runat="server"><i class="fa fa-pencil"></i>Personalizar Columnas</asp:LinkButton>
|
||||
<%--<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>--%>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpLnkHP" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
@@ -344,34 +353,51 @@
|
||||
<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">
|
||||
<Columns>
|
||||
<%--0--%>
|
||||
<asp:TemplateField HeaderText="Grupo" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--1--%>
|
||||
<asp:TemplateField HeaderText="Cantidad" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:N0}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--2--%>
|
||||
<asp:BoundField HeaderText="Sub Total" DataField="SubTotal" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--3--%>
|
||||
<asp:BoundField HeaderText="Descuento" DataField="Descuento" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--4--%>
|
||||
<asp:BoundField HeaderText="Amortización" DataField="Amortizacion" Visible="false" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<%--5--%>
|
||||
<asp:BoundField HeaderText="Sub Total 2" DataField="SubTotal2" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
<%--6--%>
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--7--%>
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--8--%>
|
||||
<asp:BoundField HeaderText="Ret. IVA" DataField="RetIVA" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--9--%>
|
||||
<asp:BoundField HeaderText="Ret. ISR" DataField="RetISR" ItemStyle-Width="7.5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--10--%>
|
||||
<asp:BoundField HeaderText="Imp. Locales" DataField="TotalImpuestos" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--11--%>
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" ItemStyle-Width="10%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--12--%>
|
||||
<asp:BoundField HeaderText="Sub. Máximo" DataField="MAX_SubTotal" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--13--%>
|
||||
<asp:BoundField HeaderText="Sub. Promedio" DataField="AVG_SubTotal" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--14--%>
|
||||
<asp:BoundField HeaderText="Sub. Mínimo" DataField="MIN_SubTotal" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--15--%>
|
||||
<asp:BoundField HeaderText="Tot. Máximo" DataField="MAX_Total" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--16--%>
|
||||
<asp:BoundField HeaderText="Tot. Promedio" DataField="AVG_Total" ItemStyle-Width="5%" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||
<%--17--%>
|
||||
<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" />
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
@@ -397,46 +423,121 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></td>
|
||||
<asp:CheckBox ID="ChkCantidad" runat="server" Text="*Cantidad" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMinSub" runat="server" Text="SubTotal Mínimo" /></td>
|
||||
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" /></td>
|
||||
<asp:CheckBox ID="ChkSubtotal" runat="server" Text="Sub total" /></td>
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMaxTot" runat="server" Text="Total Máximo" /></td>
|
||||
<asp:CheckBox ID="ChkAVGSub" runat="server" Text="SubTotal Promedio" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMaxSub" runat="server" Text="SubTotal Máximo" /></td>
|
||||
<asp:CheckBox ID="ChkDescuentos" runat="server" Text="*Descuentos" /></td>
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkAvgTot" runat="server" Text="Total Promedio" /></td>
|
||||
<asp:CheckBox ID="ChkMinSub" runat="server" Text="SubTotal Mínimo" />
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkAVGSub" runat="server" Text="SubTotal Promedio" /></td>
|
||||
<asp:CheckBox ID="ChkSubTotal2" runat="server" Text="*Subtotal 2" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMinTot" runat="server" Text="Total Mínimo" /></td>
|
||||
<asp:CheckBox ID="ChkMaxTot" runat="server" Text="Total Máximo" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkImpLoc" runat="server" Text="Impuestos Locales" /></td>
|
||||
<asp:CheckBox ID="ChkIVA" runat="server" Text="*IVA" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="CheckRefacturado" runat="server" Text="Refacturado" /></td>
|
||||
<asp:CheckBox ID="ChkAvgTot" runat="server" Text="Total Promedio" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSubTotal2" runat="server" Text="Subtotal 2" /></td>
|
||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text="*IEPS" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text="IEPS" /></td>
|
||||
<asp:CheckBox ID="ChkMinTot" runat="server" Text="Total Mínimo" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="CheckRefacturado" runat="server" Text="Refacturado" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkImpLoc" runat="server" Text="Impuestos Locales" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTotal" runat="server" Text="*Total" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal" onclick="$('#BtnPersonalizar').click();">Personalizar</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="text-align:left">
|
||||
<asp:CheckBox ID="ChkGuardarPersonalizacion" runat="server" Text=" Guarda Personalización" TextAlign="Right" />
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<button type="button" class="btn btn-success" data-dismiss="modal" onclick="$('#BtnPersonalizar').click();">Personalizar</button>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -61,6 +61,9 @@ Partial Class Ventas_RepVentas
|
||||
End Property
|
||||
Private Property DtVentas As DataTable
|
||||
Get
|
||||
If ViewState("DtVentas") Is Nothing Then
|
||||
ViewState("DtVentas") = New DataTable
|
||||
End If
|
||||
Return DirectCast(ViewState("DtVentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
@@ -68,6 +71,28 @@ Partial Class Ventas_RepVentas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property Personalizo As Integer
|
||||
Get
|
||||
Return ViewState("Personalizo").ToString.ToEntero
|
||||
End Get
|
||||
|
||||
Set(value As Integer)
|
||||
ViewState("Personalizo") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Primeracontsulta As Boolean
|
||||
Get
|
||||
If ViewState("Primeracontsulta") Is Nothing Then
|
||||
ViewState("Primeracontsulta") = True
|
||||
End If
|
||||
Return Boolean.Parse(ViewState("Primeracontsulta").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("Primeracontsulta") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
@@ -76,7 +101,8 @@ Partial Class Ventas_RepVentas
|
||||
If Not IsPostBack Then
|
||||
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
|
||||
TipoCambio = 1
|
||||
TCEspecifico = -1
|
||||
TCEspecifico = -1
|
||||
Personalizo = 0
|
||||
CargaCombos()
|
||||
ConfiguraEmpresa()
|
||||
|
||||
@@ -121,7 +147,10 @@ Partial Class Ventas_RepVentas
|
||||
DVServicioDomicilio.Visible = True
|
||||
DivLblDistr.Visible = True
|
||||
DivDistr.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
PrePersonalizacion()
|
||||
CargaPersonalizacion()
|
||||
|
||||
End If
|
||||
|
||||
@@ -254,12 +283,34 @@ Partial Class Ventas_RepVentas
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
If DtVentas.SUMD("Descuento") <= 0 Then GvDatos.Columns(3).Visible = False ' se oculta descuentos, si está vac+io
|
||||
If DtVentas.SUMD("Descuento") <= 0 Then
|
||||
GvDatos.Columns(3).Visible = False ' se oculta descuentos, si está vac+io
|
||||
'ChkDescuentos.Visible = False
|
||||
Else
|
||||
If Primeracontsulta Then
|
||||
GvDatos.Columns(3).Visible = True
|
||||
ChkDescuentos.Checked = True
|
||||
End If
|
||||
End If
|
||||
UPPersonalizar.Update()
|
||||
|
||||
Agrupador = DdlGrupo.SelectedItem.Text
|
||||
CveProyecto = DdlProyecto.SelectedValue.ToEntero
|
||||
ObjVentas.Dispose()
|
||||
GvDatos.DataBind()
|
||||
ObjVentas.Dispose()
|
||||
|
||||
|
||||
GvDatosDataBind()
|
||||
|
||||
|
||||
Primeracontsulta = False
|
||||
End Sub
|
||||
|
||||
Private Sub GvDatosDataBind()
|
||||
|
||||
GvDatos.DataSource = DtVentas
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
@@ -474,25 +525,261 @@ Partial Class Ventas_RepVentas
|
||||
#End Region
|
||||
|
||||
#Region " PERSONALIZAR "
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs)
|
||||
Personaliza()
|
||||
|
||||
|
||||
Private Sub PrePersonalizacion()
|
||||
'ChkDescuentos.Visible = False
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
|
||||
ChkIEPS.Visible = True
|
||||
Else
|
||||
ChkIEPS.Visible = False
|
||||
GvDatos.Columns(7).Visible = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPErsonalizar_Click(sender As Object, e As EventArgs)
|
||||
ChkGuardarPersonalizacion.Checked = False
|
||||
RegistraScript("$('#DivPersonalizar').modal('show')")
|
||||
End Sub
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs)
|
||||
|
||||
If ChkGuardarPersonalizacion.Checked Then
|
||||
GuardaPersonalizacion()
|
||||
End If
|
||||
|
||||
Personaliza()
|
||||
GvDatosDataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub GuardaPersonalizacion()
|
||||
|
||||
Dim objUsuario As New ClsSisUsuarios
|
||||
Dim ListPersonalizada As New List(Of String)
|
||||
|
||||
'ChkCantidad.Checked = False
|
||||
'ChkSubtotal.Checked = False
|
||||
'ChkDescuentos.Checked = False
|
||||
'ChkIVA.Checked = False
|
||||
'ChkTotal.Checked = False
|
||||
|
||||
If ChkCantidad.Checked Then
|
||||
ListPersonalizada.Add("Cantidad")
|
||||
End If
|
||||
|
||||
If ChkSubtotal.Checked Then
|
||||
ListPersonalizada.Add("Subtotal")
|
||||
End If
|
||||
|
||||
If ChkDescuentos.Checked Then
|
||||
ListPersonalizada.Add("Descuentos")
|
||||
End If
|
||||
|
||||
If ChkIVA.Checked Then
|
||||
ListPersonalizada.Add("IVA")
|
||||
End If
|
||||
|
||||
If ChkTotal.Checked Then
|
||||
ListPersonalizada.Add("Total")
|
||||
End If
|
||||
|
||||
If ChkSubTotal2.Checked Then
|
||||
ListPersonalizada.Add("SubTotal2")
|
||||
End If
|
||||
If ChkIEPS.Checked Then
|
||||
ListPersonalizada.Add("IEPS")
|
||||
End If
|
||||
If ChkRetIVA.Checked Then
|
||||
ListPersonalizada.Add("RetIVA")
|
||||
End If
|
||||
If ChkRetISR.Checked Then
|
||||
ListPersonalizada.Add("RetISR")
|
||||
End If
|
||||
If ChkImpLoc.Checked Then
|
||||
ListPersonalizada.Add("ImpLoc")
|
||||
End If
|
||||
If ChkMinSub.Checked Then
|
||||
ListPersonalizada.Add("MinSub")
|
||||
End If
|
||||
If ChkAVGSub.Checked Then
|
||||
ListPersonalizada.Add("AVGSub")
|
||||
End If
|
||||
If ChkMaxSub.Checked Then
|
||||
ListPersonalizada.Add("MaxSub")
|
||||
End If
|
||||
If ChkMaxTot.Checked Then
|
||||
ListPersonalizada.Add("MaxTot")
|
||||
End If
|
||||
If ChkAvgTot.Checked Then
|
||||
ListPersonalizada.Add("AvgTot")
|
||||
End If
|
||||
If ChkMinTot.Checked Then
|
||||
ListPersonalizada.Add("MinTot")
|
||||
End If
|
||||
If CheckRefacturado.Checked Then
|
||||
ListPersonalizada.Add("CheckRefacturado")
|
||||
End If
|
||||
|
||||
If ChkCantidad.Checked Then
|
||||
ListPersonalizada.Add("Cantidad")
|
||||
End If
|
||||
|
||||
|
||||
If objUsuario.AddUsuariosPersonalizaciones(UsuarioActual, "RepVentas.aspx", String.Join("|", ListPersonalizada)) Then
|
||||
'Alert("Personalizacion guardada")
|
||||
End If
|
||||
|
||||
objUsuario.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaPersonalizacion()
|
||||
|
||||
|
||||
Dim strBasePersonalizacion As String = UsuarioActual.Personalizaciones("RepVentas.aspx")
|
||||
|
||||
If strBasePersonalizacion.Trim.Length > 0 Then
|
||||
|
||||
ChkCantidad.Checked = False
|
||||
ChkSubtotal.Checked = False
|
||||
ChkDescuentos.Checked = False
|
||||
ChkIVA.Checked = False
|
||||
ChkTotal.Checked = False
|
||||
|
||||
ChkSubTotal2.Checked = False
|
||||
ChkIEPS.Checked = False
|
||||
ChkRetIVA.Checked = False
|
||||
ChkRetISR.Checked = False
|
||||
ChkImpLoc.Checked = False
|
||||
ChkMinSub.Checked = False
|
||||
ChkAVGSub.Checked = False
|
||||
ChkMaxSub.Checked = False
|
||||
ChkMaxTot.Checked = False
|
||||
ChkAvgTot.Checked = False
|
||||
ChkMinTot.Checked = False
|
||||
CheckRefacturado.Checked = False
|
||||
|
||||
Dim Personalizaciones As String() = strBasePersonalizacion.Split("|"c)
|
||||
|
||||
For Each personalizacion As String In Personalizaciones
|
||||
|
||||
Select Case personalizacion
|
||||
|
||||
Case "Cantidad"
|
||||
ChkCantidad.Checked = True
|
||||
Exit Select
|
||||
Case "Subtotal"
|
||||
ChkSubtotal.Checked = True
|
||||
Exit Select
|
||||
Case "Descuentos"
|
||||
ChkDescuentos.Checked = True
|
||||
Exit Select
|
||||
Case "IVA"
|
||||
ChkIVA.Checked = True
|
||||
Exit Select
|
||||
Case "Total"
|
||||
ChkTotal.Checked = True
|
||||
Exit Select
|
||||
Case "SubTotal2"
|
||||
ChkSubTotal2.Checked = True
|
||||
Exit Select
|
||||
Case "IEPS"
|
||||
ChkIEPS.Checked = True
|
||||
Exit Select
|
||||
Case "RetIVA"
|
||||
ChkRetIVA.Checked = True
|
||||
Exit Select
|
||||
Case "RetISR"
|
||||
ChkRetISR.Checked = True
|
||||
Exit Select
|
||||
Case "ImpLoc"
|
||||
ChkImpLoc.Checked = True
|
||||
Exit Select
|
||||
Case "MinSub"
|
||||
ChkMinSub.Checked = True
|
||||
Exit Select
|
||||
Case "AVGSub"
|
||||
ChkAVGSub.Checked = True
|
||||
Exit Select
|
||||
Case "MaxSub"
|
||||
ChkMaxSub.Checked = True
|
||||
Exit Select
|
||||
Case "MaxTot"
|
||||
ChkMaxTot.Checked = True
|
||||
Exit Select
|
||||
Case "AvgTot"
|
||||
ChkAvgTot.Checked = True
|
||||
Exit Select
|
||||
Case "MinTot"
|
||||
ChkMinTot.Checked = True
|
||||
Exit Select
|
||||
Case "CheckRefacturado"
|
||||
CheckRefacturado.Checked = True
|
||||
Exit Select
|
||||
Case Else
|
||||
Exit Select
|
||||
End Select
|
||||
|
||||
Next
|
||||
|
||||
|
||||
Personaliza()
|
||||
Else
|
||||
PersonalizaDefault()
|
||||
End If
|
||||
UPPersonalizar.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub PersonalizaDefault()
|
||||
ChkCantidad.Checked = True
|
||||
'ChkSubtotal.Checked = True
|
||||
|
||||
If DtVentas.Rows.Count > 0 AndAlso DtVentas.SUMD("Descuento") > 0 Then
|
||||
ChkDescuentos.Checked = True
|
||||
End If
|
||||
|
||||
ChkSubTotal2.Checked = True
|
||||
ChkIVA.Checked = True
|
||||
If UsuarioActual.Empresa.Funcionalidad(713) = "1" Then
|
||||
ChkIEPS.Checked = True
|
||||
End If
|
||||
'ChkRetIVA.Checked = True
|
||||
'ChkRetISR.Checked = True
|
||||
'ChkImpLoc.Checked = True
|
||||
ChkTotal.Checked = True
|
||||
End Sub
|
||||
|
||||
Private Sub Personaliza()
|
||||
|
||||
|
||||
GvDatos.Columns(1).Visible = ChkCantidad.Checked
|
||||
GvDatos.Columns(2).Visible = ChkSubtotal.Checked
|
||||
GvDatos.Columns(3).Visible = ChkDescuentos.Checked
|
||||
GvDatos.Columns(6).Visible = ChkIVA.Checked
|
||||
GvDatos.Columns(11).Visible = ChkTotal.Checked
|
||||
|
||||
GvDatos.Columns(5).Visible = ChkSubTotal2.Checked
|
||||
GvDatos.Columns(7).Visible = ChkIEPS.Checked
|
||||
GvDatos.Columns(8).Visible = ChkRetIVA.Checked
|
||||
GvDatos.Columns(9).Visible = ChkRetISR.Checked
|
||||
GvDatos.Columns(10).Visible = ChkImpLoc.Checked
|
||||
GvDatos.Columns(12).Visible = ChkMinSub.Checked
|
||||
GvDatos.Columns(12).Visible = ChkMaxSub.Checked
|
||||
GvDatos.Columns(13).Visible = ChkAVGSub.Checked
|
||||
GvDatos.Columns(14).Visible = ChkMaxSub.Checked
|
||||
|
||||
GvDatos.Columns(14).Visible = ChkMinSub.Checked
|
||||
|
||||
GvDatos.Columns(15).Visible = ChkMaxTot.Checked
|
||||
GvDatos.Columns(16).Visible = ChkAvgTot.Checked
|
||||
GvDatos.Columns(17).Visible = ChkMinTot.Checked
|
||||
GvDatos.Columns(18).Visible = CheckRefacturado.Checked
|
||||
|
||||
Personalizo = 1
|
||||
If Personalizo = 1 Then
|
||||
ImgExcelPersonalizado.Visible = True
|
||||
Else
|
||||
ImgExcelPersonalizado.Visible = False
|
||||
End If
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
@@ -510,7 +797,7 @@ Partial Class Ventas_RepVentas
|
||||
Private Sub GenerarPDF(Optional Formato As String = "PDF")
|
||||
If DtVentas IsNot Nothing Then
|
||||
Dim StrFiltro As New StringBuilder
|
||||
StrFiltro.AppendFormat(" <b>Agrupado por</b>: {0}", DdlGrupo.SelectedItem.Text)
|
||||
StrFiltro.AppendFormat(" <b>Agrupado por</b>: {0}", DdlGrupo.SelectedItem.Text)
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepVentas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim ruta As String = ""
|
||||
|
||||
@@ -743,5 +1030,13 @@ Partial Class Ventas_RepVentas
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click
|
||||
'GvVsh.Visible = True
|
||||
'GvVsh.ExportToExcel("DetalleVentas_" & Now.ToShortDateString)
|
||||
'GvVsh.Visible = False
|
||||
GvDatos.ExportToExcel("Ventas_" & Now.ToShortDateString & ".xls")
|
||||
'GvDatos.ExportToExcelG("DetalleVentas_" & Now.ToShortDateString & ".xlsx")
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user