diff --git a/Contabilidad/FiltraPolizas.aspx b/Contabilidad/FiltraPolizas.aspx index 8e3013f59..32e4f7f93 100644 --- a/Contabilidad/FiltraPolizas.aspx +++ b/Contabilidad/FiltraPolizas.aspx @@ -33,12 +33,12 @@
- +
- + @@ -56,7 +56,7 @@
- + diff --git a/Contabilidad/RegPrePoliza.aspx.vb b/Contabilidad/RegPrePoliza.aspx.vb index 63b45e73e..978b2029a 100644 --- a/Contabilidad/RegPrePoliza.aspx.vb +++ b/Contabilidad/RegPrePoliza.aspx.vb @@ -189,7 +189,14 @@ Partial Class ContabilidadC_RegPrePoliza End Set End Property - + Public Property TipoPoliza As String + Get + Return CType(ViewState("TipoPoliza"), String) + End Get + Set(value As String) + ViewState("TipoPoliza") = value + End Set + End Property #End Region Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load @@ -441,6 +448,9 @@ Partial Class ContabilidadC_RegPrePoliza TxtFechaDocumento.Text = dr("Fecha") TxtConcepto.Text = dr("Concepto") DivDatosPoliza.Visible = True + TipoPoliza = DdlTipoPoliza.SelectedItem.Text + Folio = dr("FolioPoliza").ToString + If UsuarioActual.CveRol = 1 OrElse UsuarioActual.TienePermisoProceso(221) Then DivAgregarConceptos.Visible = True @@ -538,7 +548,6 @@ Partial Class ContabilidadC_RegPrePoliza LnkImprimirPDF.Visible = True LnkComprobante.Visible = True CveIE = e.Row.DBCampo("CveIE").ToString.ToEntero - End If 'e.Row.FCHyperLink("HlReferencia").NavigateUrl = CveConceptoContable @@ -840,6 +849,8 @@ Partial Class ContabilidadC_RegPrePoliza dr("MultipleSubProyecto") = drt("MultipleSubProyecto") dr("PorcentajeImpuesto") = drt("PorcentajeImpuesto") dr("CveCuenta") = drt("CveCuenta") + dr("FolioPoliza") = drt("FolioPoliza") + DtMovimientos.Rows.Add(dr) @@ -1804,7 +1815,7 @@ Partial Class ContabilidadC_RegPrePoliza End If End If End If - If Row("CveConceptoContable").ToString.ToEntero.Contiene(17, 309, 312) Then + If Row("CveConceptoContable").ToString.ToEntero.Contiene(17, 309, 312, 308) Then If ObjCompra.GetCompras(Row("CveCompra").ToString.ToEntero, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then If ObjCompra.DtResultados IsNot Nothing AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then Dim dr As DataRow = ObjCompra.DtResultados.Rows(0) @@ -1864,7 +1875,7 @@ Partial Class ContabilidadC_RegPrePoliza Dim ruta As String = "" params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("TipoPoliza", dr("CveTipoPoliza").ToString)) + params.Add(New ReportParameter("TipoPoliza", dr("TipoPoliza").ToString)) params.Add(New ReportParameter("Finicio", dr("Fecha").ToString.ToDate.ToShortDateString)) params.Add(New ReportParameter("FFin", dr("Fecha").ToString.ToDate.ToShortDateString)) params.Add(New ReportParameter("Fecha", dr("Fecha").ToString.ToDate.ToShortDateString)) @@ -1920,7 +1931,7 @@ Partial Class ContabilidadC_RegPrePoliza reader = New iTextSharp.text.pdf.PdfReader(fileName) pageCount = reader.NumberOfPages pdfDoc = New iTextSharp.text.Document(reader.GetPageSizeWithRotation(1), 18, 18, 18, 18) - writer = PdfWriter.GetInstance(pdfDoc, New FileStream(String.Format("{0}\{1}\Salida.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick), FileMode.Create)) + writer = PdfWriter.GetInstance(pdfDoc, New FileStream(String.Format("{0}\{1}\{2}-{3}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, TipoPoliza, Folio), FileMode.Create)) With pdfDoc .Open() @@ -1953,7 +1964,7 @@ Partial Class ContabilidadC_RegPrePoliza pdfDoc.Close() - Dim Archivo As New System.IO.FileInfo(String.Format("{0}\{1}\Salida.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick)) + Dim Archivo As New System.IO.FileInfo(String.Format("{0}\{1}\{2}-{3}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, TipoPoliza, Folio)) If Archivo.Exists Then HttpContext.Current.Response.Clear() @@ -1961,7 +1972,7 @@ Partial Class ContabilidadC_RegPrePoliza HttpContext.Current.Response.ContentType = "application/octet-stream" HttpContext.Current.Response.AppendHeader("Content-disposition", String.Format("attachment; filename={0}", Archivo.Name)) HttpContext.Current.Response.AddHeader("Content-Length", Archivo.Length.ToString()) - HttpContext.Current.Response.TransmitFile(String.Format("{0}\{1}\Salida.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick)) + HttpContext.Current.Response.TransmitFile(String.Format("{0}\{1}\{2}-{3}.pdf", AppDomain.CurrentDomain.BaseDirectory, Tick, TipoPoliza, Folio)) Response.Flush() ' send it to the client to download HttpContext.Current.Response.SuppressContent = True HttpContext.Current.ApplicationInstance.CompleteRequest()