RepOrigen Aplicacion , seleimina PolizasImpresion.aspx de contabilidad 2

This commit is contained in:
rakcsle
2022-03-07 18:28:41 -07:00
parent 25944ea00d
commit 3ec957fb77
7 changed files with 85 additions and 239 deletions

View File

@@ -6629,6 +6629,30 @@ Public Class ClsContabilidad
End Function
Public Function GetRepOrigenAplicacion(FechaFin As Date, CveEmpresa As Integer) As Boolean
Dim Respuesta As Boolean = False
DataAdapter("PA_Conta_RepOrigenAplicacionGet2")
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Respuesta = True
Catch ex As Exception
Me.OnError("Ocurrió un error al obtener el reporte", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Respuesta
End Function
#Region "IDisposable Support"
' IDisposable
Protected Overridable Sub Dispose(disposing As Boolean)

View File

@@ -4863,7 +4863,6 @@ Public Class ClsPaginas
'PaginaDict.Add("/Contabilidad2/RepBalanceGeneral.aspx".ToUpper(), 530)
PaginaDict.Add("/Contabilidad2/CatCuentasAsignaciones.aspx".ToUpper(), 724)
PaginaDict.Add("/Contabilidad2/CatContaEjercicios.aspx".ToUpper(), 725)
PaginaDict.Add("/Contabilidad2/PolizasImpresion.aspx".ToUpper(), 726)
PaginaDict.Add("/Contabilidad2/RepEstadoResultadosHorizontal.aspx".ToUpper(), 420)
PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoMensualHorizontal.aspx".ToUpper(), -1)

View File

@@ -1,6 +1,16 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepOrigenAplicacion.aspx.vb" Inherits="Contabilidad_RepOrigenAplicacion" %>
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel runat="server" ID="UpAcciones">
<ContentTemplate>
<li>
<asp:LinkButton runat="server" ID="LnkExcel" data-toggle="tooltip" OnClick="LnkExcel_Click" data-placement="left" title="Excel" Text="<i class='fa fa-file-excel-o'></i> Excel" Visible="false"></asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExcel" />
</Triggers>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>

View File

@@ -81,6 +81,16 @@ Partial Class Contabilidad_RepOrigenAplicacion
TabContainer_ActiveTabChanged(TabContainer, EventArgs.Empty)
If UsuarioActual.Empresa.UsaContabilidadSIG Then
TabMensual.Enabled = False
TabAnual.Enabled = False
TdFI.Visible = False
tdTipoReporte.Visible = False
End If
End If
End Sub
@@ -139,23 +149,48 @@ Partial Class Contabilidad_RepOrigenAplicacion
#Region " NORMAL "
Private Sub CargaDatos()
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
If ObjConta.GetOrigenAplicacion(FechaInicio, FechaFin) Then
DtDatos = ObjConta.DtResultados
LnkExcel.Visible = False
If UsuarioActual.Empresa.UsaContabilidadSIG Then
Dim ObjConta As New ClsContabilidad
If ObjConta.GetRepOrigenAplicacion(TxtFechaAl.Text.ToDate, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjConta.DtResultados
If ObjConta.DtResultados.Rows.Count > 0 Then
LnkExcel.Visible = True
End If
Else
GvDatos.DataSource = Nothing
End If
ObjConta.Dispose()
GvDatos.DataBind()
Else
DtDatos = Nothing
Alert("Ocurrio un error al cargar los datos de origen y aplicación", TipoMensaje.MsgError)
End If
ObjConta.Dispose()
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
Dim FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", Date.Now, TxtFechaDel.Text.ToDate)
Dim FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", Date.Now, TxtFechaAl.Text.ToDate)
If ObjConta.GetOrigenAplicacion(FechaInicio, FechaFin) Then
DtDatos = ObjConta.DtResultados
If DtDatos IsNot Nothing Then
CargaGrid()
Else
DtDatos = Nothing
Alert("Ocurrio un error al cargar los datos de origen y aplicación", TipoMensaje.MsgError)
End If
ObjConta.Dispose()
If DtDatos IsNot Nothing Then
CargaGrid()
End If
End If
End Sub
Private Sub CargaGrid()
@@ -334,4 +369,7 @@ Partial Class Contabilidad_RepOrigenAplicacion
#End Region
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs)
GvDatos.ExportToExcel2("RepOrigenAplicacion.xlsx")
End Sub
End Class

View File

@@ -1,116 +0,0 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PolizasImpresion.aspx.vb" Inherits="Contabilidad2_PolizasImpresion" %>
<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: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:Panel ID="Panel1" runat="server" DefaultButton="BtnConsultar">
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 49px;">
<div class="tools">
<asp:Button ID="BtnConsultar" CssClass="btn btn-default" runat="server" Text="Generar" />
</div>
<div class="titlefiltros caption ">
<div class="row" style="padding-top: 1px;">
<label class="col-md-1 truncate">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: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaInicio" PopupButtonID="ImgFechaInicio" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVEFechaInicio" runat="server" ControlToValidate="TxtFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VcoFechaInicio1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaInicio" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VcoFechaInicio2" runat="server" HighlightCssClass="vco" TargetControlID="CVEFechaInicio" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1 truncate">Fecha Fin:</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: 120px !important; padding: 0px;">
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 118px" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFecha" TargetControlID="TxtFechaFin" PopupButtonID="ImgFechaFin" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaFin" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaFin1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaFin2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFin" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<label class="col-md-1 truncate">Tipo Póliza:</label>
<div class="col-md-2">
<asp:DropDownList ID="ddlTipoPoliza" DataTextField="TipoPoliza" DataValueField="CveTipoPoliza" CssClass="form-control input-sm select2-me" runat="server"></asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body">
<div class="row">
<label class="col-md-1 truncate">Folio Inicio:</label>
<div class="col-md-2">
<asp:TextBox ID="FolioInicio" CssClass="form-control input-sm" runat="server" Width="60px"></asp:TextBox>
</div>
<label class="col-md-1 truncate">Folio Fin:</label>
<div class="col-md-2 ">
<asp:TextBox ID="FolioFin" CssClass="form-control input-sm" runat="server" Width="60px"></asp:TextBox>
</div>
<label class="col-md-1 truncate">Registró:</label>
<div class="col-md-2 ">
<asp:DropDownList ID="DdlUsuarioRegistro" DataTextField="Nombre" DataValueField="CveUsuario" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
</div>
<label class="col-md-1 truncate" data-toggle="tooltip" data-placement="top" title="Centro de Costo">Centro de costo:</label>
<div class="col-md-2 ">
<asp:DropDownList ID="DdlSubProyectos" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-1 truncate" data-toggle="tooltip" data-placement="top" title="Segmento de Negocio">Cuenta:</label>
<div class="col-md-2 ">
<asp:DropDownList ID="DdlCuenta" DataValueField="CveCuenta" DataTextField="CtaCodigo" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
</div>
<label class="col-md-1 truncate" data-toggle="tooltip" data-placement="top" title="Grupo Plantilla">Grupo Plantilla:</label>
<div class="col-md-2 ">
<asp:DropDownList ID="DdlGrupoPlantilla" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Compras" Value="1"></asp:ListItem>
<asp:ListItem Text="Ventas" Value="2"></asp:ListItem>
<asp:ListItem Text="Pago Compra" Value="3"></asp:ListItem>
<asp:ListItem Text="Pago Venta" Value="4"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Tipo Proveedor:</label>
<div class="col-md-3">
<asp:DropDownList ID="DdlTipoProveedor" CssClass="form-control input-sm select2me" Width="260px" runat="server">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Proveedor" Value="1"></asp:ListItem>
<asp:ListItem Text="Acreedor" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
</asp:Panel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -1,111 +0,0 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports Extensiones
Imports System.Activities.Statements
Imports Microsoft.Reporting.WebForms
Partial Class Contabilidad2_PolizasImpresion
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.LoadComplete
If Not IsPostBack Then
TxtFechaInicio.Text = Now.AddDays(-1).ToShortDateString
TxtFechaFin.Text = Now.ToShortDateString
DdlUsuarioRegistro.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa)
DdlUsuarioRegistro.DataBind()
cargaddlpolizas()
CargaSubProyectos()
CargaCuentas()
End If
End Sub
Private Sub BtnConsultar_click(sender As Object, args As EventArgs) Handles BtnConsultar.Click
Dim foli As Integer = -1
Dim folf As Integer = -1
If Not FolioInicio.Text = "" Then
foli = FolioInicio.Text.ToEntero()
End If
If Not FolioFin.Text = "" Then
folf = FolioFin.Text.ToEntero()
End If
Dim ArchivoReporte As String = "Empresas/Grales/Formatos/Polizas.rdlc"
If IO.File.Exists(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)) Then
ArchivoReporte = String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta)
End If
Dim ObjConta As New ClsContabilidad
If ObjConta.GetPrePolizasImpresion(UsuarioActual.CveEmpresa, TxtFechaInicio.Text.ToDate, TxtFechaFin.Text.ToDate, CveTipoPoliza:=ddlTipoPoliza.SelectedValue.ToEntero, FolioI:=foli,
FolioF:=folf, CveUsuario:=DdlUsuarioRegistro.SelectedValue.ToEntero, CveSubProyecto:=DdlSubProyectos.SelectedValue.ToEntero,
CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CvePlantillaPoliza:=DdlGrupoPlantilla.SelectedValue.ToEntero,
CveTipoProveedor:=DdlTipoProveedor.SelectedValue.ToEntero) Then
If ObjConta.DtResultados.Rows.Count < 10000 Then
If ObjConta.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow
dr = ObjConta.DtResultados.Rows(0)
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString))
params.Add(New ReportParameter("Finicio", TxtFechaInicio.Text))
params.Add(New ReportParameter("FFin", TxtFechaFin.Text))
params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString))
'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString))
'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString))
params.Add(New ReportParameter("Numero", dr("Folio").ToString))
params.Add(New ReportParameter("Moneda", ""))
params.Add(New ReportParameter("CodigoPostal", ""))
If UsuarioActual.CveEmpresa = 119 Then
params.Add(New ReportParameter("UsuarioRegistro", dr("NombreUsuario").ToString))
End If
ImprimirPDF(ArchivoReporte, ObjConta.DtResultados, params)
Else
Alert("Los Filtros Actuales no contienen datos")
End If
Else
Alert("Los Filtros Actuales contienen muchos datos")
End If
End If
ObjConta.Dispose()
End Sub
Private Sub cargaddlpolizas()
Dim objcont As New ClsContabilidad
If objcont.GetTiposPoliza(-1, "-1", UsuarioActual.CveEmpresa) Then
ddlTipoPoliza.DataSource = objcont.DtResultados
ddlTipoPoliza.DataBind()
ddlTipoPoliza.Items.Insert(0, New ListItem("Todos", "-1"))
End If
objcont.Dispose()
DdlUsuarioRegistro.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
Private Sub CargaSubProyectos()
DdlSubProyectos.DataSource = GlobalDTSubProyectos(UsuarioActual.CveEmpresa)
DdlSubProyectos.DataBind()
DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSubProyectos.Items.Insert(1, New ListItem("Sin Asignar", "-2"))
End Sub
Private Sub CargaCuentas()
Dim objconta As New ClsContabilidad
If objconta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then
DdlCuenta.DataSource = objconta.DtResultados
End If
objconta.Dispose()
DdlCuenta.DataBind()
DdlCuenta.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
End Class

View File

@@ -440,6 +440,8 @@