Limpieza modulos
This commit is contained in:
@@ -921,31 +921,6 @@ Public Class ClsCompras
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
'Reporte de Perioricidad
|
||||
Public Function GetRepComprasPerioricidad(CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer,
|
||||
FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Comp_ComprasPerioricidadRep")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el Reporte de Perioricidad.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
'Reporte de Productos y Servicios
|
||||
Public Function GetRepProductosServicios(CveProyecto As Integer, CveSubProyecto As String, CveCategoria As String, CveClasificacion As Integer, CvePS As Integer, FechaI As Date,
|
||||
|
||||
@@ -4729,7 +4729,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Compras/RepNotasCredito.aspx".ToUpper(), 337)
|
||||
PaginaDict.Add("/Compras/ReembolsosComprobaciones.aspx".ToUpper(), 350)
|
||||
PaginaDict.Add("/Compras/RepProductosServicios.aspx".ToUpper(), 97)
|
||||
PaginaDict.Add("/Compras/RepPerioricidad.aspx".ToUpper(), 126)
|
||||
|
||||
PaginaDict.Add("/Compras/PopUpFacturasPendientesAutorizar.aspx".ToUpper(), 559)
|
||||
PaginaDict.Add("/Compras/RepEvaluacionProveedor.aspx".ToUpper(), 564)
|
||||
PaginaDict.Add("/Compras/RepRembolsoComprobaciones.aspx".ToUpper(), 591)
|
||||
@@ -5517,7 +5517,6 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Ventas/RepVentasResumen.aspx".ToUpper(), 674)
|
||||
PaginaDict.Add("/Ventas/RepAnticiposEspeciales.aspx".ToUpper(), 678)
|
||||
|
||||
PaginaDict.Add("/Ventas/RepArqueosDetalle.aspx".ToUpper(), 680)
|
||||
PaginaDict.Add("/Ventas/RepCotizacionesxFacturar.aspx".ToUpper(), 686)
|
||||
PaginaDict.Add("/Ventas/RepRemisionesNC.aspx".ToUpper(), 687)
|
||||
PaginaDict.Add("/Ventas/CatCobranzaEstatus.aspx".ToUpper(), 7003)
|
||||
|
||||
@@ -4806,24 +4806,7 @@ Public Class ClsVentas
|
||||
Return retorno
|
||||
'compila
|
||||
End Function
|
||||
Public Function GetRepArqueosDetalle(Fecha As DateTime, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Dataset = New DataSet()
|
||||
DataAdapter("PA_Vta_RepArqueosDetalleGet")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@Fecha", SqlDbType.DateTime).Value = Fecha
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Dataset)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el reporte de arqueos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
'compila
|
||||
End Function
|
||||
|
||||
Public Function GetRepVentasMensuales(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, Optional CveSubProyecto As Integer = -1, Optional CveClasificacion As Integer = -1,
|
||||
Optional CveVendedor As Integer = -1, Optional CveMarca As Integer = -1, Optional Modalidad As Integer = 0) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
|
||||
@@ -1,153 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPerioricidad.aspx.vb" Inherits="Compras_RepPerioricidad" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||
Reporte Perioricidad de Compra
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" Runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" >
|
||||
<div class="portlet-title portlet-filterT smalltitle" >
|
||||
<div class="tools" >
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" CssClass="btn btn-primary"/>
|
||||
<a href="javascript;" class="expand" data-original-title="" title=""></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption " >
|
||||
<div class="row">
|
||||
<div class="col-md-1 " ><label class="truncate text-size-12">Proyecto:</label></div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlProyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="Proyecto" DataValueField="CveProyecto" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<%--<asp:UpdatePanel ID="UPPSubProyecto" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate> --%>
|
||||
<div class="col-md-1 " ><label class="truncate text-size-12">Sub-Proyecto:</label></div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<%-- </ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
<div class="col-md-1 " ><label class="truncate text-size-12">Clasificación:</label></div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlClasificacion" CssClass="form-control input-sm select2me" runat="server" DataTextField="Clasificacion" DataValueField="CveClasificacion" AutoPostBack="true">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" id="divfiltros" runat="server" >
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate text-size-12">Producto Servicio:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlPS" CssClass="form-control input-sm select2me" runat="server" DataTextField="PSCodigo" DataValueField="CvePS">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate text-size-12">Fecha Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width:100% !important; padding:0px;" >
|
||||
<asp:TextBox Width="100%" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ></asp:TextBox>
|
||||
<span class="input-group-btn "> <asp:LinkButton ID="imgCalendarioI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarioI" TargetControlID="txtFechaI" PopupButtonID="imgCalendarioI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-md-1 truncate text-size-12">Fecha Final:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width:100% !important; padding:0px;" >
|
||||
<asp:TextBox Width="100%" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" ></asp:TextBox>
|
||||
<span class="input-group-btn "> <asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarioF" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UPPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="Gv" ClientIDMode="Static" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Registros" CssClass="table table-advance Widthall" Style="text-align: center;" GridLines="None"
|
||||
DataKeyNames="TipoRenglon">
|
||||
<Columns>
|
||||
<%--<asp:BoundField DataField="Clasificacion" HeaderText="Clasificacion" />--%>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left"><%--ItemStyle-Width="20px"--%>
|
||||
<HeaderTemplate>
|
||||
<table style="width:100%">
|
||||
<tr>
|
||||
<td style="width:46%">Concepto</td>
|
||||
<td style="width:10%; text-align:center;">Fecha</td>
|
||||
<td style="width:10%; text-align:center;">Unidad Medida</td>
|
||||
<td style="width:10%; text-align:center;">Cantidad</td>
|
||||
<td style="width:10%; text-align:center;">Importe</td>
|
||||
<td style="width:7%; text-align:center;">OC</td>
|
||||
<td style="width:7%; text-align:center;">Activo Fijo</td>
|
||||
</tr>
|
||||
</table>
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<table style="width:100%">
|
||||
<tr id="tr1" runat="server">
|
||||
<td colspan="3" style="width:66%">
|
||||
<asp:Literal ID="LblAgrupador" runat="server" Text='<%# Eval("Agrupador").ToString %>'></asp:Literal>
|
||||
</td>
|
||||
<td style="width:10%; text-align:center;">
|
||||
<asp:Literal ID="LblCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:N2}").ToString%>'></asp:Literal>
|
||||
</td>
|
||||
<td style="width:10%; text-align:center;">
|
||||
<asp:Literal ID="LblPU" runat="server" Text='<%# Eval("PU", "{0:N2}").ToString%>'></asp:Literal>
|
||||
</td>
|
||||
<td style="width:7%; text-align:center;">
|
||||
<asp:Literal ID="LblFolioOC" runat="server" Text='<%# Eval("FolioOC").ToString%>'></asp:Literal>
|
||||
</td>
|
||||
<td style="width:7%; text-align:center;">
|
||||
<asp:Literal ID="LblCodigoAF" runat="server" Text='<%# Eval("CodigoAF").ToString%>'></asp:Literal>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="tr2" runat="server">
|
||||
<td style="width:46%"></td>
|
||||
<td style="width:10%; text-align:center;">
|
||||
<asp:Literal ID="LblFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}").ToString%>'></asp:Literal>
|
||||
</td>
|
||||
<td style="width:10%; text-align:center;">
|
||||
<asp:Literal ID="LblUM" runat="server" Text='<%# Eval("UnidadMedida").ToString%>'></asp:Literal>
|
||||
</td>
|
||||
<td style="width:10%; text-align:center;">
|
||||
<asp:Literal ID="LblCantidad2" runat="server" Text='<%# Eval("Cantidad", "{0:N2}").ToString%>'></asp:Literal>
|
||||
</td>
|
||||
<td style="width:10%; text-align:center;">
|
||||
<asp:Literal ID="LblPU2" runat="server" Text='<%# Eval("PU", "{0:N2}").ToString%>'></asp:Literal>
|
||||
</td>
|
||||
<td style="width:7%; text-align:center;">
|
||||
<asp:Literal ID="LblFolioOC2" runat="server" Text='<%# Eval("FolioOC").ToString%>'></asp:Literal>
|
||||
</td>
|
||||
<td style="width:7%; text-align:center;">
|
||||
<asp:Literal ID="LblCodigoAF2" runat="server" Text='<%# Eval("CodigoAF").ToString%>'></asp:Literal>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />--%>
|
||||
<%--<asp:BoundField DataField="UnidadMedida" HeaderText="Unidad de Medida" />--%>
|
||||
<%--<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" />--%>
|
||||
<%--<asp:BoundField DataField="PU" HeaderText="Importe" />--%>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" Runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class Compras_RepPerioricidad
|
||||
Inherits ClsPaginas
|
||||
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
Return CType(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
'divfiltros.Attributes.CssStyle.Add("display", "none")
|
||||
RegistraScript(String.Format("$('#{0}').css({{'display':'none'}});", divfiltros.ClientID))
|
||||
|
||||
txtFechaI.Text = Now.AddMonths(-6).ToShortDateString
|
||||
txtFechaF.Text = Now.ToShortDateString
|
||||
CargaCombos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
Dim ObjCompras As New ClsCompras
|
||||
If ObjCompras.GetRepComprasPerioricidad(DdlSubProyecto.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
DtDatos = ObjCompras.DtResultados
|
||||
Gv.DataSource = DtDatos
|
||||
Else
|
||||
Gv.DataSource = Nothing
|
||||
End If
|
||||
ObjCompras.Dispose()
|
||||
Gv.DataBind()
|
||||
UPPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub Gv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles Gv.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DataKey("TipoRenglon").ToEntero = 1 Then
|
||||
'e.Row.FindControl("LblSpace").Visible = False
|
||||
e.Row.FindControl("tr2").Visible = False
|
||||
e.Row.CssClass = "Totales"
|
||||
ElseIf e.Row.DataKey("TipoRenglon").ToEntero = 2 Then
|
||||
'e.Row.FCLiteral("LblAgrupador").Text = String.Format(" {0}", e.Row.DBCampo("Agrupador"))
|
||||
e.Row.FindControl("tr2").Visible = False
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
'e.Row.FindControl("tdConcepto")
|
||||
e.Row.Cells(0).Style.Add("padding-left", "15px;")
|
||||
Else
|
||||
e.Row.FindControl("tr1").Visible = False
|
||||
'e.Row.BackColor = Drawing.Color.LightSkyBlue
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.CveEmpresa)
|
||||
DdlProyecto.DataBind()
|
||||
If DdlProyecto.Items.Count > 0 Then
|
||||
DdlProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
DdlPS.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
'DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
'DdlClasificacion.DataBind()
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion")
|
||||
Else
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion")
|
||||
End If
|
||||
DdlClasificacion.DataBind()
|
||||
|
||||
If DdlClasificacion.Items.Count > 0 Then
|
||||
DdlClasificacion.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPS(CveClasificacion As Integer)
|
||||
|
||||
DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion)
|
||||
DdlPS.DataBind()
|
||||
|
||||
If DdlPS.Items.Count > 0 Then
|
||||
DdlPS.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
If DdlSubProyecto.Items.Count > 0 Then
|
||||
DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||
CargaPS(DdlClasificacion.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
End Class
|
||||
@@ -1,117 +0,0 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepArqueosDetalle.aspx.vb" Inherits="Ventas_RepArqueosDetalle" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
<asp:Literal ID="LtlTitulo" runat="server"></asp:Literal>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" runat="server" OnClick="LnkPdf_Click"><i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExportar" runat="server" OnClick="LnkExportar_Click"><i class="fa fa-ad-excel"></i> Generar Excel</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<span class="caption-subject bold uppercase" style="line-height: 2;">Ventas</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusqueda1" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda1','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron facturas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Serie Folio" Target="_blank" DataTextField="SerieFolio" ItemStyle-Width="90px" DataTextFormatString="{0:N2}" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Cliente" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Sucursal" DataField="Sucursal" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Ret. IVA" DataField="RetIVA" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Ret ISR" DataField="RetISR" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="90px" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<span class="caption-subject bold uppercase" style="line-height: 2;">CUENTAS</span>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<div class="btn-group">
|
||||
</div>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body rowpadding">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
|
||||
<div style="margin-right: 15px">
|
||||
<input type="text" id="TxtBusqueda2" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda2','{0}')", GvCuentas.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvCuentas.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<asp:GridView ID="GvCuentas" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron solicitudes de cancelación"
|
||||
DataKeyNames=""
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" data-sort="true" GridLines="None" Width="99%">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Folio" Target="_blank" DataTextField="Folio" ItemStyle-Width="25%" DataTextFormatString="{0:N2}" DataNavigateUrlFields="CveIE" DataNavigateUrlFormatString="/Bancos/IE.aspx?CveIE={0}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Numero de Cuenta" DataField="NumCuenta" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="50%" ItemStyle-HorizontalAlign="Right" />
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -1,108 +0,0 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Data
|
||||
|
||||
Partial Class Ventas_RepArqueosDetalle
|
||||
Inherits ClsPaginas
|
||||
#Region "P R O P I E D A D E S"
|
||||
Private Property DtVentas As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtVentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtVentas") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property DtCuentas As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtCuentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtCuentas") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
Dim CveSubProyecto As Integer = -1
|
||||
Dim Fecha As DateTime = Now
|
||||
If Request("CveSubProyecto") IsNot Nothing Then
|
||||
CveSubProyecto = Request("CveSubProyecto").ToString().ToEntero()
|
||||
End If
|
||||
If Request("Fecha") IsNot Nothing Then
|
||||
Fecha = Request("Fecha").ToString().ToDate()
|
||||
End If
|
||||
CargaDatos(Fecha, CveSubProyecto)
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaDatos(Fecha As DateTime, CveSubProyecto As Integer)
|
||||
LtlTitulo.Text = String.Format("Reporte de Arqueos Detalle: Fecha {0:dd/MM/yyyy}", Fecha)
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.GetRepArqueosDetalle(Fecha, CveSubProyecto, UsuarioActual.CveEmpresa) Then
|
||||
DtVentas = ObjVentas.DataSetResultados.Tables(0).Copy()
|
||||
DtCuentas = ObjVentas.DataSetResultados.Tables(1).Copy()
|
||||
End If
|
||||
ObjVentas.Dispose()
|
||||
GvDatos.DataSource = DtVentas
|
||||
GvCuentas.DataSource = DtCuentas
|
||||
GvDatos.DataBind()
|
||||
GvCuentas.DataBind()
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("SerieFolio") = "Total" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GvCuentas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCuentas.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.DBCampo("Folio") = "Total" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub GeneraPDF(Formato As String)
|
||||
Dim params As List(Of ReportParameter) = New List(Of ReportParameter)()
|
||||
Dim Imagen As System.IO.FileInfo = New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString()))
|
||||
|
||||
params.Add(New ReportParameter("Encabezado", String.Format("Fecha:{0}", Request("Fecha").ToString().ToDate().ToString("dd/MM/yyyy"))))
|
||||
|
||||
|
||||
Dim lrds As List(Of ReportDataSource) = New List(Of ReportDataSource)()
|
||||
Dim rds As ReportDataSource = New ReportDataSource()
|
||||
rds.Name = "DataSet1"
|
||||
rds.Value = DtVentas
|
||||
|
||||
Dim rds2 As ReportDataSource = New ReportDataSource()
|
||||
rds2.Name = "DataSet2"
|
||||
rds2.Value = DtCuentas
|
||||
|
||||
lrds.Add(rds)
|
||||
lrds.Add(rds2)
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepArqueosDetalle.rdlc", lrds, params, "Rep Arqueos Detalle", Formato)
|
||||
End Sub
|
||||
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs)
|
||||
GeneraPDF("PDF")
|
||||
End Sub
|
||||
Protected Sub LnkExportar_Click(sender As Object, e As EventArgs)
|
||||
GeneraPDF("EXCEL")
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user