From 99efc415b3195bfa2afb086d87f9030657e8f5f7 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Wed, 13 May 2020 18:35:33 -0700 Subject: [PATCH] =?UTF-8?q?nueva=20consulta=20para=20RepIEPS=20y=20se=20re?= =?UTF-8?q?par=C3=B3=20el=20uso=20del=20logo=20en=20Reportes.aspx?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsContabilidad.vb | 18 ++++++++++++++++++ Bancos/RepIE.aspx.vb | 3 ++- Bancos/Reportes.aspx.vb | 8 ++++++-- Contabilidad/RepIEPS.aspx.vb | 18 +++++++++++++++--- 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 50bd8cd30..024b4fe5f 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -5869,6 +5869,22 @@ Public Class ClsContabilidad End Try Return Retorno End Function + Public Function GetProductosSinIEPS(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Conta_ProductosSinIEPS") + With SqlAdapter.SelectCommand.Parameters + .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 productos sin IEPS.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function Public Function GetRepIEPSLayoutAnual(Ano As Integer, Tipo As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta_RepIEPSLayoutAnual") @@ -6568,4 +6584,6 @@ Public Class ClsContabilidad End Function #End Region + + End Class \ No newline at end of file diff --git a/Bancos/RepIE.aspx.vb b/Bancos/RepIE.aspx.vb index 0f11dd4a5..280292a78 100644 --- a/Bancos/RepIE.aspx.vb +++ b/Bancos/RepIE.aspx.vb @@ -535,8 +535,9 @@ Partial Class Bancos_RepIE End Sub Private Sub Imprimir(Formato As String) + Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa) + Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica)) Dim Imagen As 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) Dim params As New List(Of ReportParameter) diff --git a/Bancos/Reportes.aspx.vb b/Bancos/Reportes.aspx.vb index 1f22c766f..5d0cb6b33 100644 --- a/Bancos/Reportes.aspx.vb +++ b/Bancos/Reportes.aspx.vb @@ -146,8 +146,12 @@ Partial Class Bancos_Reportes Dim paramList As New List(Of ReportParameter) With paramList - Dim Imagen As 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) + 'Dim Imagen As 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) + + Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa) + Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica)) + Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)) .Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) .Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) .Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) diff --git a/Contabilidad/RepIEPS.aspx.vb b/Contabilidad/RepIEPS.aspx.vb index 4d66be0a7..4dcb8bfbb 100644 --- a/Contabilidad/RepIEPS.aspx.vb +++ b/Contabilidad/RepIEPS.aspx.vb @@ -30,6 +30,18 @@ Partial Class Contabilidad_RepIEPS Dim ObjConta As New ClsContabilidad() If ObjConta.GetRepIEPS(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlTipoOperacion.SelectedValue, DdlModalidad.SelectedValue.ToEntero(), DdlLimite.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then DtDatos = ObjConta.DtResultados.Copy() + + If ObjConta.GetProductosSinIEPS(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa) Then + Dim DtProductos As DataTable = ObjConta.DtResultados.Copy + If DtProductos.Rows.Count > 0 Then + Dim ProductosIEPS As String = "Los siguientes productos o servicios no tienen especificado alguno de los siguientes campos en relación al IEPS: Empaque, presentación o toxicidad

" + For Each producto As DataRow In DtProductos.Rows + ProductosIEPS = String.Format("{0}
{1}", ProductosIEPS, producto("CodigoPS")) + Next + Alert(ProductosIEPS, TipoMensaje.MsgAdvertencia) + End If + End If + End If ObjConta.Dispose() If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then @@ -40,9 +52,9 @@ Partial Class Contabilidad_RepIEPS DtDatos = DtDatos.FiltraParametros("TipoDato in (1,2)") End If GvDatos.DataSource = DtDatos - GvDatos.DataBind() - Else - Alert("No se encontraron resultados en la consulta") + GvDatos.DataBind() + Else + Alert("No se encontraron resultados en la consulta") End If UpDatos.Update() UpLnkAcciones.Update()