This commit is contained in:
HECTOR RODRIGUEZ
2021-05-06 19:09:09 -07:00
parent 582e6b576b
commit a3b0d208c9
9 changed files with 5739 additions and 4660 deletions

View File

@@ -7290,12 +7290,11 @@ Public Class ClsContPAQi
StrSQL.Append(" FROM [dbo].[Polizas] P ")
StrSQL.Append(" LEFT JOIN TiposPolizas T ON T.Id = P.TipoPol ")
StrSQL.Append(" LEFT JOIN MovimientosPoliza M ON M.IdPoliza = P.Id ")
StrSQL.Append(" LEFT JOIN [SERVIDOR].[Ventas].dbo.Conta_PrePolizas PP on P.Id = PP.IdPoliza")
StrSQL.Append(" LEFT JOIN [SERVIDOR].[Ventas].dbo.Conta_PrePolizas PP on P.Id = PP.IdPoliza AND YEAR(PP.Fecha) = @Ejercicio AND MONTH(PP.Fecha) = @Periodo AND PP.CveEmpresa = @CveEmpresa")
StrSQL.Append(" WHERE P.Ejercicio = @Ejercicio ")
StrSQL.Append(" AND P.Periodo = @Periodo ")
StrSQL.Append(" AND (@TipoPoliza = -1 OR P.TipoPol = @TipoPoliza) ")
StrSQL.Append(" AND (@SegmentoNegocio = -1 OR M.IdSegNeg = @SegmentoNegocio) ")
StrSQL.Append(" AND (PP.CveEmpresa = @CveEmpresa) ")
StrSQL.Append(" GROUP BY P.Id, P.Fecha, T.Nombre, P.Concepto, P.Cargos, P.Abonos, P.Folio, PP.CvePrepoliza ")
StrSQL.Append(" ORDER BY P.Folio ")

View File

@@ -1843,7 +1843,6 @@ Partial Class ContabilidadC_RegPrePoliza
dt = DtMovimientos.FiltraParametros("", "", filtroComplemento)
For Each Row As DataRow In dt.Rows
If ObjCompra.GetCompraComplementoPago(-1, UsuarioActual.CveEmpresa, Row("CveIE").ToString.ToEntero) Then
Console.WriteLine(Row("CveIE").ToString)
If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then
Dim dr As DataRow = ObjCompra.DtResultados.Rows(0)
Dim RFC As String = dr("RFCde").ToString
@@ -1860,17 +1859,20 @@ Partial Class ContabilidadC_RegPrePoliza
End If
Next
MergePdfFiles(Pathpdf.ToArray)
If File.Exists(pathPoliza) Then
Directory.Delete(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
End If
Else
Alert("No se tiene cargado comprobante de pago", TipoMensaje.MsgAdvertencia)
End If
Catch ex As Exception
Alert("Error al descargar el paquete", TipoMensaje.MsgError)
If File.Exists(pathPoliza) Then
Directory.Delete(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
End If
End Try
If Directory.Exists(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick)) Then
Directory.Delete(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
End If
ObjCompra.Dispose()
ObjIE.Dispose()
End Sub
@@ -1989,6 +1991,9 @@ Partial Class ContabilidadC_RegPrePoliza
End If
result = True
If Directory.Exists(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick)) Then
Directory.Delete(String.Format("{0}/{1}", AppDomain.CurrentDomain.BaseDirectory, Tick), True)
End If
End If
Catch ex As Exception
End Try

View File

@@ -69,13 +69,13 @@
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="far fa-file-excel" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
<asp:LinkButton ID="LnkExcel" runat="server" Visible="true" data-target="#DivCargaExcel"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Cargar Excel</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkComplementoPago" runat="server" Visible="false" OnClick="LnkComplementoPago_Click" Style="color: #686868;"><i class="fa fa-money" style="color:#686868;"></i> Crear Complemento de Pago</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkImprimirPDF" runat="server" Visible="false" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
<asp:LinkButton ID="LnkImprimirPDF" runat="server" OnClick="LnkImprimirPDF_Click" Style="color: #686868;"><i class="fa fa-file-pdf-o" style="color:#686868;"></i> Imprimir Poliza</asp:LinkButton>
</li>

View File

@@ -517,11 +517,6 @@ Partial Class ContabilidadC_RegPrePolizaS
If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 234, 235, 240) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra"))
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
If CveConceptoContable.Contiene(30, 204) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
If CveConceptoContable.Contiene(30) Then
LnkImprimirPDF.Visible = True
CveIE = e.Row.DBCampo("CveIE").ToString.ToEntero
End If
'e.Row.FCHyperLink("HlReferencia").NavigateUrl = CveConceptoContable

View File

@@ -55,6 +55,9 @@
Catálogo de Cuentas Contables
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="LnkImprimirExcel" runat="server" OnClick="LnkImprimirExcel_Click" Style="color: #686868;"><i class="fa fa-file-excel-o" style="color:#686868;"></i> Imprimir Cuentas</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="upcuentas" runat="server" UpdateMode="Conditional">

View File

@@ -1,5 +1,6 @@
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class Contabilidad2_CatCuentas
Inherits ClsPaginas
@@ -673,5 +674,19 @@ Partial Class Contabilidad2_CatCuentas
End Select
End If
End Sub
Protected Sub LnkImprimirExcel_Click(sender As Object, e As EventArgs)
Imprime("Excel")
End Sub
Private Sub Imprime(Formato As String)
If DtDatos IsNot Nothing Then
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
ImprimirPDF("Empresas/Grales/Formatos/Cuentas.rdlc", DtDatos, params, "Cuentas", Formato)
Else
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia)
End If
End Sub
End Class

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
<AutoRefresh>0</AutoRefresh>
<DataSources>
<DataSource Name="DataSet">
@@ -950,6 +950,7 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<rd:Selected>true</rd:Selected>
</CellContents>
</TablixCell>
<TablixCell>
@@ -1610,7 +1611,49 @@
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<ReportParametersLayout>
<GridLayoutDefinition>
<NumberOfColumns>2</NumberOfColumns>
<NumberOfRows>4</NumberOfRows>
<CellDefinitions>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>0</RowIndex>
<ParameterName>NombreEmpresa</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>1</ColumnIndex>
<RowIndex>0</RowIndex>
<ParameterName>FechaInicio</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>1</RowIndex>
<ParameterName>FechaFin</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>1</ColumnIndex>
<RowIndex>1</RowIndex>
<ParameterName>UsuarioImprimio</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>2</RowIndex>
<ParameterName>LogoPath</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>1</ColumnIndex>
<RowIndex>2</RowIndex>
<ParameterName>Filtros</ParameterName>
</CellDefinition>
<CellDefinition>
<ColumnIndex>0</ColumnIndex>
<RowIndex>3</RowIndex>
<ParameterName>FechaImprimio</ParameterName>
</CellDefinition>
</CellDefinitions>
</GridLayoutDefinition>
</ReportParametersLayout>
<rd:ReportUnitType>Cm</rd:ReportUnitType>
<rd:ReportID>40c94aad-a12a-44fb-ab0d-ea36a9656792</rd:ReportID>
</Report>