RegPrePolzias reporte detallado
This commit is contained in:
@@ -2048,13 +2048,14 @@ Public Class ClsContabilidad
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetPrePolizasDetalleResumen(CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean 'Editado por charlie
|
||||
Public Function GetPrePolizasDetalleResumen(CvePrePoliza As Integer, CveEmpresa As Integer, Optional Opcion As Integer = 1) As Boolean 'Editado por charlie
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Conta_PrePolizasDetalleResumenGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -1059,7 +1059,7 @@
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12 ">
|
||||
<div class="portlet light bordered">
|
||||
<div class="portlet light bordered xspadding">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<%--<i class="fa fa-users font-green"></i>--%>
|
||||
@@ -1071,8 +1071,10 @@
|
||||
<i class="fa fa-commenting font-green"></i>
|
||||
<span class="caption-subject bold">Agregar</span>
|
||||
</div>--%>
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' ></i>Agendar" Visible="false" Style="font-weight: 700 !important; cursor: pointer;" ToolTip="Agendar"></asp:HyperLink>
|
||||
|
||||
|
||||
<asp:HyperLink ID="ImgAddObs" CssClass="caption-subject bold" data-toggle="modal" data-target="#ModalBitacora" runat="server" Text=" <i class='fa fa-commenting font-green' ></i><span class='caption-subject bold font-green'>Agregar</span>" Style="font-weight: 700 !important; cursor: pointer;" ToolTip="Observaciones"></asp:HyperLink><br />
|
||||
<asp:HyperLink ID="HlEvento" CssClass="thickbox caption-subject bold" runat="server" Text=" <i class='fa fa-calendar-plus-o font-green' ></i><span class='caption-subject bold font-green'>Agendar</span>" Visible="false" Style="font-weight: 700 !important; cursor: pointer;" ToolTip="Agendar"></asp:HyperLink>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
BIN
Bin/GoCfdi.dll
BIN
Bin/GoCfdi.dll
Binary file not shown.
@@ -81,18 +81,25 @@
|
||||
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="true" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
|
||||
</li>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
|
||||
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" ><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImprimePDFResumen" runat="server" Visible="false" OnClick="LnkImprimePDFResumen_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir PDF Resumen</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCrearAPartirDe" runat="server" Visible="false" OnClick="LnkCrearAPartirDe_Click" Style="color: #686868;"><i class="fa fa-plus" style="color:#686868;" ></i>Crear a partir de</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkImprimeExcelResumen" runat="server" Visible="false" OnClick="LnkImprimeExcelResumen_Click" Style="color: #686868;"><i class="fa fa-file-excel-o" style="color:#686868;"></i> Imprimir Excel Resumen</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
|
||||
<asp:LinkButton ID="LnkAddConcepto" runat="server" OnClick="LnkAddConcepto_Click" ><i class="fa fa-plus" ></i> Agregar Concepto</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCrearAPartirDe" runat="server" Visible="false" OnClick="LnkCrearAPartirDe_Click" Style="color: #686868;"><i class="fa fa-plus" style="color:#686868;" ></i>Crear a partir de</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Net.NetworkInformation
|
||||
Imports Extensiones
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
@@ -249,6 +250,12 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(282).ToEntero > 0 Then
|
||||
LnkImprimePDFResumen.Visible = True
|
||||
LnkImprimeExcelResumen.Visible = True
|
||||
End If
|
||||
|
||||
Tick = DateTime.Now.Ticks.ToString
|
||||
|
||||
CveMoneda = 1
|
||||
@@ -360,6 +367,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
GvMov.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -2717,25 +2726,15 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
ImprimirPolizaPDF(IdPoliza)
|
||||
End Sub
|
||||
Private Function ImprimirPolizaPDF(IdPoliza As Integer) As String
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
|
||||
'Dim ObjPoliza As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Polizas.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Bytes As Byte() = Nothing
|
||||
|
||||
Dim ImpresionPersonalizada As Integer = UsuarioActual.Empresa.Funcionalidad(282).ToEntero
|
||||
|
||||
|
||||
If ImpresionPersonalizada = 0 Then
|
||||
|
||||
ElseIf ImpresionPersonalizada.Contiene(1, 2) Then
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
|
||||
If ObjConta.GetPrePolizasDetalle(CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
@@ -2755,8 +2754,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
|
||||
|
||||
'params.Add(New ReportParameter("Nombre", dr("Cuenta").ToString))
|
||||
'params.Add(New ReportParameter("Cuenta", dr("Codigo").ToString))
|
||||
|
||||
params.Add(New ReportParameter("Numero", dr("FolioPoliza").ToString))
|
||||
params.Add(New ReportParameter("Moneda", ""))
|
||||
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||
@@ -2777,12 +2775,22 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Return String.Format("{0}\{1}\{2}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, IdPoliza.ToString)
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Crear A Partier de"
|
||||
@@ -3211,5 +3219,78 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Private Sub TxtAbonoE_TextChanged(sender As Object, e As EventArgs) Handles TxtAbonoE.TextChanged
|
||||
If TxtAbonoE.Text.ToDecimal <> 0 Then CargaModalConceptoTipoTransaccion("Egs")
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub ImprimePrePolizasDetalleResumen(Optional Tipo As String = "PDF")
|
||||
|
||||
Dim Archivo As System.IO.FileInfo
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Bytes As Byte() = Nothing
|
||||
|
||||
Dim ImpresionPersonalizada As Integer = UsuarioActual.Empresa.Funcionalidad(282).ToEntero
|
||||
|
||||
|
||||
Archivo = New System.IO.FileInfo(String.Format("{0}Formatos/PolizasResumen.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim Logo As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
|
||||
|
||||
|
||||
Dim ObjConta As New ClsContabilidad
|
||||
'If ObjPoliza.GetPoliza(IdPoliza, -1, -1, -1, -1) AndAlso ObjPoliza.DtResultados.Rows.Count > 0 Then
|
||||
If ObjConta.GetPrePolizasDetalleResumen(CvePrePoliza, UsuarioActual.CveEmpresa, ImpresionPersonalizada) AndAlso ObjConta.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtVC As DataTable
|
||||
Dim dr As DataRow
|
||||
|
||||
dtVC = ObjConta.DtResultados '.FiltraParametros("Contabilizable = 1", "Orden")
|
||||
dr = dtVC.Rows(0)
|
||||
|
||||
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("TipoPoliza", DdlTipoPoliza.SelectedItem.Text))
|
||||
params.Add(New ReportParameter("Finicio", TxtFechaDocumento.Text))
|
||||
params.Add(New ReportParameter("FFin", TxtFechaDocumento.Text))
|
||||
|
||||
params.Add(New ReportParameter("Fecha", TxtFechaDocumento.Text))
|
||||
|
||||
params.Add(New ReportParameter("Numero", TxtFolio.Text))
|
||||
params.Add(New ReportParameter("Moneda", If(CveMoneda = 2, "Dolar", "Peso Mexicano")))
|
||||
params.Add(New ReportParameter("CodigoPostal", ""))
|
||||
|
||||
params.Add(New ReportParameter("UsuarioRegistro", TxtUsuarioElaboro.Text))
|
||||
|
||||
|
||||
If Logo.Exists Then
|
||||
params.Add(New ReportParameter("pImg", $"file://{Logo.FullName}"))
|
||||
Else
|
||||
params.Add(New ReportParameter("pImg", ""))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim RutaReprote As String
|
||||
If Archivo.Exists Then
|
||||
RutaReprote = Archivo.FullName
|
||||
Else
|
||||
RutaReprote = $"{DirectorioEmpresas}Grales\Formatos\PolizasResumen.rdlc"
|
||||
End If
|
||||
|
||||
ImprimirbytesPDF(StreamPDF(RutaReprote, dtVC, params, "PrePoliza", Formato:=Tipo), "PrePoliza", Formato:=Tipo, Descarga:=True)
|
||||
|
||||
End If
|
||||
ObjConta.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkImprimePDFResumen_Click(sender As Object, e As EventArgs)
|
||||
ImprimePrePolizasDetalleResumen("PDF")
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkImprimeExcelResumen_Click(sender As Object, e As EventArgs)
|
||||
ImprimePrePolizasDetalleResumen("Excel")
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user