diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 5d751b497..e92fdf12d 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -1931,7 +1931,7 @@ Public Class ClsCompras #Region " REFACTURACION " - Public Function GetRefacturacion(CveProveedor As Integer, SubTotal As Double, IVA As Double, Total As Double, Opcion As Integer, CveEmpresa As Integer) As Boolean + Public Function GetRefacturacion(CveProveedor As Integer, SubTotal As Double, IVA As Double, Total As Double, Opcion As Integer, CveEmpresa As Integer, Optional Top As Integer = 100000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_RefacturacionGet") @@ -1942,6 +1942,7 @@ Public Class ClsCompras .Add("@Total", SqlDbType.Float).Value = Total .Add("@Opcion", SqlDbType.Int).Value = Opcion ' 1. Exácta, 2. Con diferencia .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@Top", SqlDbType.Int).Value = Top End With Try diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index fc35b6ae2..d61a22728 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -1016,22 +1016,24 @@ Public Class ClsContabilidad If ex1.Message.Contains("50015;") Then OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) ElseIf ex1.Message.Contains("50024; La Cuenta no fue detectada") Then - Dim Strr As String = "" - If HttpContext.Current.Application("GlobalDTContaConceptosContables") IsNot Nothing Then - Dim dr As Data.DataRow = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimero(String.Format("CveConceptoContable = {0}", CveConceptoContable)) - Strr = dr("ConceptoContable").ToString - 'If dr("AplicaClasificacion").ToString <> "No" Then - ' Strr = Strr + " - Clasificación: " + DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("", "") - 'End If + Dim dtt As DataTable = ClsPaginas.GlobalDTContaConceptosContables(CveConceptoContable) + Dim StrMsg As String = "" + If dtt IsNot Nothing Then + Dim dr As Data.DataRow = dtt.FiltroPrimero("") + If dr IsNot Nothing Then + StrMsg = dr("ConceptoContable").ToString + If dr("AplicaClasificacion").ToString = "True" Then + StrMsg = StrMsg + " - Clasificación: " + ClsPaginas.GlobalDTClasificaciones(CType(HttpContext.Current.Session("UsuarioSIG"), Usuario).CveEmpresa, CveClasificacion:=CveClasificacion).FiltroPrimeroValor("Clasificacion", "") + End If + End If End If - - OnError(String.Format("El concepto '{0}' no tiene especificada la cuenta. Favor de especificarla en la asignación de cuentas.", Strr), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + OnError(String.Format("El concepto '{0}' no tiene especificada la cuenta. Favor de especificarla en la asignación de cuentas.", StrMsg), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) ElseIf ex1.Message.Contains("Vw_Val_Conta_CuentasResultados_SubProyectos") Then - Dim Concepto2 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable)) - OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto2), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + Dim Concepto2 As String = ClsPaginas.GlobalDTContaConceptosContables(CveConceptoContable).FiltroPrimeroValor("ConceptoContable") + OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto2), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) ElseIf ex1.Message.Contains("UK_Vw_Val_Conta_CuentasResultados_SubProyectos") Then - Dim Concepto3 As String = DirectCast(HttpContext.Current.Application("GlobalDTContaConceptosContables"), DataTable).FiltroPrimeroValor("ConceptoContable", String.Format("CveConceptoContable = {0}", CveConceptoContable)) - OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto3), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + Dim Concepto3 As String = ClsPaginas.GlobalDTContaConceptosContables(CveConceptoContable).FiltroPrimeroValor("ConceptoContable") + OnError(String.Format("El concepto '{0}' requiere centro de costo", Concepto3), ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) ElseIf ex1.Message.Contains("50025;") Then OnError("La empresa no tiene un formato de cuenta asignado.", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) ElseIf ex1.Message.Contains("50026;") Then @@ -2048,13 +2050,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 diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index 77f4301c1..10c90cc59 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -3910,7 +3910,7 @@ Public Class ClsGenerales Public Function AddInvEntregaAlmacenRuta(CveSubProyecto As Integer, CveDireccionOrigen As Integer, CveDireccionDestino As Integer, CveMovimientoAlmacen As Integer, CveChofer As Integer, CveCamion As Integer, FechaEntrega As Date, FechaLlegada As DateTime, Tipo As String, FolioReferencia As String, Referencia As String, FechaLimite As Date, Orden As Integer, Estatus As Integer, Distancia As Integer, Optional CveConfigAutoTransporte As Integer = -1, - Optional CveCamionRemolque1 As Integer = -1, Optional CveCamionRemolque2 As Integer = -1) As Integer + Optional CveCamionRemolque1 As Integer = -1, Optional CveCamionRemolque2 As Integer = -1, Optional CveCliente As Integer = -1) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Inv_EntregaAlmacenRutaAdd") @@ -3936,6 +3936,7 @@ Public Class ClsGenerales .Add("@CveCamionRemolque1", SqlDbType.Int).Value = CveCamionRemolque1 .Add("@CveCamionRemolque2", SqlDbType.Int).Value = CveCamionRemolque2 .Add("@CveConfigAutoTransporte", SqlDbType.Int).Value = CveConfigAutoTransporte + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveEntregaAlmacen", SqlDbType.Int).Direction = ParameterDirection.Output End With diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 0cbfb0931..cfdf5421e 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -2,16 +2,17 @@ Option Explicit On Option Strict On +Imports System Imports System.Data Imports System.Data.SqlClient Imports Extensiones Public Class ClsMovimientos - Implements IDisposable - + Implements IDisposable + #Region "Campos" - - 'SQL + + 'SQL Private SqlConexion As SqlConnection Private SqlAdapter As SqlDataAdapter Private SqlTransacc As SqlTransaction @@ -20,12 +21,12 @@ Public Class ClsMovimientos Private DS As DataSet 'Atributos de la clase - Private disposedValue As Boolean = False ' Para detectar llamadas redundantes - 'REGISTRAR CONEXIONES ABIERTAS - Private CveConexion As Integer = 0 - + Private disposedValue As Boolean = False ' Para detectar llamadas redundantes + 'REGISTRAR CONEXIONES ABIERTAS + Private CveConexion As Integer = 0 + + #End Region - #Region "Propiedades" Public ReadOnly Property DtResultados() As DataTable Get @@ -36,12 +37,13 @@ Public Class ClsMovimientos Public ReadOnly Property DSResultados() As DataSet Get DSResultados = DS - End Get + End Get End Property - Public Property AlertaMensaje As New StringBuilder + Public Property AlertaMensaje As New StringBuilder + #End Region - + Sub New() SqlConexion = New SqlConnection SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString @@ -62,9 +64,10 @@ Public Class ClsMovimientos End With If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc Data = New DataTable - End Sub + End Sub + #Region "Conexiones" - + Private Sub ConexionAdd() If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then Try @@ -97,9 +100,9 @@ Public Class ClsMovimientos CveConexion = 0 End If - End Sub + End Sub #End Region - + Public Sub IniciaTransacSQL() SqlTransacc = SqlConexion.BeginTransaction() End Sub @@ -485,13 +488,13 @@ Public Class ClsMovimientos Retorno = True Catch ex As SqlException OnError("Ocurrió un error al descargar los segmentos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try + End Try Return Retorno - End Function - - + End Function + + + #End Region - #Region "Anticipos de Clientes" Public Function GetAnticiposCliente(CveCliente As Integer, Optional SelectTop As Integer = -1, Optional CveMoneda As Integer = 1) As Boolean Dim Retorno As Boolean = False @@ -569,12 +572,14 @@ Public Class ClsMovimientos End Try Return Retorno - End Function - + End Function + + + + #End Region - #Region "CxP" - + Public Function GetCxPEmpresa(CveProveedor As Integer, FechaVencimientoInicio As String, FechaVencimientoFin As String, CveSubProyecto As Integer, DiasVencidos As Integer, CveUsuarioRegistro As Integer, CveUsuarioProgramo As Integer, CveUsuarioResponsable As Integer, CveClasificacion As Integer, CveMoneda As Integer, CveTipoPagoProgramo As Integer, CveEstatusFactura As Integer, CveAplicaNC As Integer, CveEmpresa As Integer, Optional FechaVI As String = "-1", Optional FechaVF As String = "-1", Optional CodigoProgramacion As String = "-1", Optional CveTipoProveedor As Integer = 0, @@ -1201,6 +1206,29 @@ Public Class ClsMovimientos Return Retorno End Function + Public Function GetDocumentosxPagarDetalle(CveCliente As Integer, CveMoneda As Integer, Opcion As Integer, CveEmpresa As Integer) As Boolean + + Dim Retorno As Boolean = False + + DataAdapter("PA_Banc_DocumentosxPagarSaldosDetalle") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda + .Add("@Opcion", SqlDbType.Int).Value = Opcion + .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 documentos por pagar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function + Public Function GetCajaChicaDetalle(CveCajaChica As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -1462,9 +1490,9 @@ Public Class ClsMovimientos End Try Return Retorno - End Function + End Function #End Region - + #Region "Anticipos de Proveedores" Public Function GetAnticiposProveedor(CveProveedor As Integer, CveProveedorSucursal As Integer, Optional CveMoneda As Integer = -1, Optional SelectTop As Integer = -1, Optional FechaI As String = "-1", Optional FechaF As String = "-1", Optional TipoDocto As String = "-1") As Boolean Dim Retorno As Boolean = False @@ -1486,33 +1514,32 @@ Public Class ClsMovimientos Retorno = True Catch ex As SqlException OnError("Ocurrió un error al consultar los Anticipos del proveedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - - Return Retorno - End Function - - 'Public Function GetAnticiposClienteAuxiliar(CveCliente As Integer, CveVenta As Integer) As Boolean - ' Dim Retorno As Boolean = False - ' 'Data = New DataTable - ' 'SqlAdapter = New SqlDataAdapter("PA_ClienteAnticiposAuxiliar", SqlConexion) - ' 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure - ' DataAdapter("PA_ClienteAnticiposAuxiliar") - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@CveCliente", SqlDbType.Int).Value = CveCliente - ' .Add("@CveVenta", SqlDbType.Int).Value = CveVenta - ' End With - ' Try - ' SqlAdapter.Fill(Data) - ' Retorno = True - ' Catch ex As SqlException - ' OnError("Ocurrió un error al consultar el Auxiliar Contable de Anticipos del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - ' End Try - - ' Return Retorno - 'End Function - + End Try + Return Retorno + End Function + + + 'Public Function GetAnticiposClienteAuxiliar(CveCliente As Integer, CveVenta As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' 'Data = New DataTable + ' 'SqlAdapter = New SqlDataAdapter("PA_ClienteAnticiposAuxiliar", SqlConexion) + ' 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure + ' DataAdapter("PA_ClienteAnticiposAuxiliar") + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + ' .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + ' End With + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As SqlException + ' OnError("Ocurrió un error al consultar el Auxiliar Contable de Anticipos del Cliente.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + + ' Return Retorno + 'End Function + #End Region - #Region "REP RECUPERACION" Public Function GetRepRecuperacion(FechaI As Date, FechaF As Date, CveCliente As Integer, CveSubProyecto As Integer, CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String, @@ -1658,9 +1685,9 @@ Public Class ClsMovimientos End Try Return Retorno - End Function + End Function + #End Region - #Region "REP COBRADO" Public Function GetRepCobrado(FechaI As Date, FechaF As Date, CveProveedor As Integer, CveSubProyecto As Integer, CveUsuario As Integer, IVA As String, CveEmpresa As Integer, Gpo As Integer, CveResponsable As Integer, @@ -1730,11 +1757,13 @@ Public Class ClsMovimientos End Try Return Retorno - End Function + End Function + + + #End Region - #Region "EDITAR FECHA DE MOVIMIENTO" - + Public Function UpdateMovimientoFecha(Fecha As DateTime, CveMovimiento As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Mov_MovimientoFechaUpdate") @@ -1749,12 +1778,16 @@ Public Class ClsMovimientos OnError("Ocurrió un error al actualizar la fecha del movimiento.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno - End Function + End Function + + + + + #End Region - #Region "Registros Contables" - - + + Public Function AddMovimiento(CveConcepto As Integer, Tipo As String, Referencia1 As String, Referencia2 As String, CveMoneda As Integer, Cargo As Double, Abono As Double, Fecha As Date, FechaVencimiento As Date, Folio As String, IdCtaContable As Integer, CveUsuario As Integer, CveEmprea As Integer) As Boolean Dim Retorno As Boolean = False @@ -1828,14 +1861,14 @@ Public Class ClsMovimientos End Try Return Retorno - End Function - + End Function + + #End Region - #Region "IDisposable Support" - - - ' IDisposable + + + ' IDisposable Protected Overridable Sub Dispose(disposing As Boolean) If Not Me.disposedValue Then If disposing Then @@ -1868,9 +1901,10 @@ Public Class ClsMovimientos ConexionClose() Dispose(True) GC.SuppressFinalize(Me) - End Sub + End Sub + #End Region - + Public Function GetPersonalCajaChica(CveEmpresa As Integer, CveCompra As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_PersonalCajaChica") diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 7c3dfc1d2..ecbcd2ecf 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -872,14 +872,13 @@ Public Class ClsPaginas #End Region - - Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable + Public Shared Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveClasificacion As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa) 'sino existe, recarga los datos - If Application(AppNombre) Is Nothing Then + If HttpContext.Current.Application(AppNombre) Is Nothing Then Dim ObjClasificaciones As New ClsClasificaciones - If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then Application(AppNombre) = ObjClasificaciones.DtResultados + If ObjClasificaciones.GetClasificaciones(CveEmpresa) Then HttpContext.Current.Application(AppNombre) = ObjClasificaciones.DtResultados ObjClasificaciones.Dispose() End If If CveEmpresa <> -1 Then @@ -888,25 +887,20 @@ Public Class ClsPaginas If CveCategoria <> -1 Then Str.AppendFormat(" AND CveCategoria = {0}", CveCategoria) If UsoClasificacion <> -1 Then Str.AppendFormat(" AND UsoClasificacion IN ({0},3) ", UsoClasificacion) If CveClasificacion <> -1 Then Str.AppendFormat(" AND CveClasificacion = {0}", CveClasificacion) - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), Str.ToString(), "", DataViewRowState.CurrentRows) GlobalDTClasificaciones = Dv.ToTable Dv.Dispose() Else - GlobalDTClasificaciones = DirectCast(Application(AppNombre), DataTable) + GlobalDTClasificaciones = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If - - End Get Set(value As DataTable) Dim AppNombre As String = String.Format("GlobalDTClasificaciones-{0}", CveEmpresa) - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property - - - Property GlobalDTRHActividades(CveEmpresa As Integer) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTRHActividades-{0}", CveEmpresa) @@ -1475,7 +1469,6 @@ Public Class ClsPaginas Dim ObjSubProyectos As New ClsSubProyectos() If ObjSubProyectos.GetSubProyectosUsuarios(CveEmpresa:=CveEmpresa) Then Application(AppNombre) = ObjSubProyectos.DtResultados.FiltraParametros("", "", {"Proyecto", "CveProyecto", "CveUsuario", "CveEmpresa", "CveEstatusProyecto"}) Else Alert("Ocurrió un error al cargar los Proyectos. Por favor comuniquese con sistemas.", TipoMensaje.MsgError) ObjSubProyectos.Dispose() - GuardaLog("Se Cargo GlobalDTProyectosUsuarios") End If If CveUsuario <> -1 OrElse CveProyecto <> -1 OrElse CveEmpresa <> -1 OrElse CveEstatus <> -1 Then @@ -3543,28 +3536,26 @@ Public Class ClsPaginas - Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable + Public Shared Property GlobalDTContaConceptosContables(CveConceptoContable As Integer) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables") 'sino existe, recarga los datos - If Application(AppNombre) Is Nothing Then + If HttpContext.Current.Application(AppNombre) Is Nothing Then Using ObjContabilidad As New ClsContabilidad - If ObjContabilidad.GetConta_ConceptosContables() Then Application(AppNombre) = ObjContabilidad.DtResultados Else Application(AppNombre) = Nothing + If ObjContabilidad.GetConta_ConceptosContables() Then HttpContext.Current.Application(AppNombre) = ObjContabilidad.DtResultados Else HttpContext.Current.Application(AppNombre) = Nothing End Using - End If If CveConceptoContable <> -1 Then - Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveConceptoContable = {0}", CveConceptoContable), "", DataViewRowState.CurrentRows) + Dim Dv As New DataView(DirectCast(HttpContext.Current.Application(AppNombre), DataTable), String.Format("CveConceptoContable = {0}", CveConceptoContable), "", DataViewRowState.CurrentRows) GlobalDTContaConceptosContables = Dv.ToTable Dv.Dispose() Else - GlobalDTContaConceptosContables = DirectCast(Application(AppNombre), DataTable) + GlobalDTContaConceptosContables = DirectCast(HttpContext.Current.Application(AppNombre), DataTable) End If - End Get Set(value As DataTable) Dim AppNombre As String = String.Format("GlobalDTContaConceptosContables") - Application(AppNombre) = value + HttpContext.Current.Application(AppNombre) = value End Set End Property #End Region @@ -6150,7 +6141,12 @@ Public Class ClsPaginas rds.Value = DtDatos lrds.Add(rds) - ImprimirbytesPDF(StreamBytesStimulsoft("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:="PDF"), NombreArchivo, Formato, Content_Disposition:=Content_Disposition) + Dim Extension = "pdf" + If Formato.ToLower() = "excel" Then + Extension = "xlsx" + End If + + ImprimirbytesPDF(StreamBytesStimulsoft("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:=Formato), NombreArchivo, Formato, Content_Disposition:=Content_Disposition, Extension:=Extension) End Sub Public Sub ImprimirPDFMultiDS(RutaReporte As String, lrds As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing) ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR) @@ -6614,10 +6610,9 @@ Public Class ClsPaginas ''' ''' ''' - Public Sub ImprimirbytesPDF(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False, Optional Content_Disposition As String = "attachment") + Public Sub ImprimirbytesPDF(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False, Optional Content_Disposition As String = "attachment", Optional Extension As String = "") 'limpio ReportViwer Dim mimeType As String = Nothing - Dim extension As String = Nothing 'If Descarga Then ' Try @@ -6642,7 +6637,15 @@ Public Class ClsPaginas Response.ContentType = mimeType End If Response.ClearHeaders() - Response.AddHeader("content-disposition", String.Format("{0}; filename=""{1}.{2}""", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls"))) + + Dim fileExtension As String = "" + If Not String.IsNullOrEmpty(extension) Then + fileExtension = extension + Else + fileExtension = If(Formato = "PDF", "pdf", "xls") + End If + + Response.AddHeader("content-disposition", String.Format("{0}; filename=""{1}.{2}""", Content_Disposition, NombreArchivo, fileExtension)) Response.BinaryWrite(bytes) ' create the file Response.Flush() ' send it to the client to download bytes = Nothing diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index 9685028a6..63ff870df 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -145,6 +145,26 @@ Namespace Extensiones End If End Function + Public Function Truncate(value As String, length As Integer) As String + ' If argument is too big, return the original string. + ' ... Otherwise take a substring from the string's start index. + If length > value.Length Then + Return value + Else + Return value.Substring(0, length) + End If + End Function + + Public Function ValidFileName(name As String, Optional maxChars As Integer = -1) As String + For Each c As Char In System.IO.Path.GetInvalidFileNameChars() + name = name.Replace(c.ToString(), "_") + Next + If maxChars > 0 AndAlso maxChars < 256 Then + Return Truncate(name, maxChars) + End If + Return Truncate(name, 255) + End Function + Public Class RespuestaCancelacionSAT Public Property Verificado As Boolean = False Public Property CveEstatus As Integer = 0 @@ -2516,7 +2536,7 @@ Namespace Extensiones Dim sw As New StringWriter() Dim htw As New HtmlTextWriter(sw) Gv.RenderControl(htw) - GemBox.Spreadsheet.SpreadsheetInfo.SetLicense("ESWN-4QFD-26JF-1SZ8") + GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet) Dim excel As GemBox.Spreadsheet.ExcelFile Dim options = GemBox.Spreadsheet.LoadOptions.HtmlDefault @@ -2527,9 +2547,11 @@ Namespace Extensiones Dim TotalRowFooter As Integer = 2 Dim worksheet = excel.Worksheets(0) + worksheet.Name = ValidFileName(NombreArchivoXLSx, 31) worksheet.Rows.InsertEmpty(0, TotalRowHeader) Dim celdasConTexto = worksheet.GetUsedCellRange(True) celdasConTexto.Style.Font.Name = "Calibri Light" + celdasConTexto.Style.Borders = Nothing Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex) RangoNombreEmpresa.Merged = True @@ -2539,7 +2561,6 @@ Namespace Extensiones RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center - Dim RangoFiltros = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex) RangoFiltros.Merged = True RangoFiltros.Value = Filtros @@ -2548,27 +2569,28 @@ Namespace Extensiones RangoFiltros.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center - Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex) RangoTitulo.Merged = True RangoTitulo.Value = Titulo RangoTitulo.Style.Font.Size = 20 * 20 RangoTitulo.Style.Font.Name = "Calibri Light" RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center - RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + + Dim RangoColTitulos = worksheet.Cells.GetSubrangeAbsolute(8, celdasConTexto.FirstColumnIndex, 8, celdasConTexto.LastColumnIndex) + RangoColTitulos.Style.Font.Size = 12 * 20 + RangoColTitulos.Style.Font.Name = "Calibri" + RangoColTitulos.Style.Font.Weight = GemBox.Spreadsheet.ExcelFont.BoldWeight + RangoColTitulos.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center + RangoColTitulos.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + RangoColTitulos.Style.FillPattern.SetSolid(GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190)) + RangoColTitulos.Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255) For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex - worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20 - worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center - worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center - worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) - worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255) - If i > 0 Then - Try - worksheet.Columns(i).AutoFit(1) - Catch ex As Exception - End Try - End If + Try + worksheet.Columns(i).AutoFit(0.95) + Catch ex As Exception + End Try Next Dim IndexEndTable As Integer = Gv.Rows.Count + TotalRowHeader + TotalRowFooter @@ -2579,10 +2601,10 @@ Namespace Extensiones worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión" worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy") - Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", Usuario.Empresa.Ruta)) + Dim Imagen As New System.IO.FileInfo($"{Usuario.Empresa.Ruta}/Logo.png") If Imagen.Exists Then - Dim Ruta As String = String.Format("{0}/Logo.png", Usuario.Empresa.Ruta) + Dim Ruta As String = $"{Usuario.Empresa.Ruta}/Logo.png" Using sr As New StreamReader(Ruta) Dim ms As New MemoryStream() sr.BaseStream.CopyTo(ms) @@ -2597,6 +2619,96 @@ Namespace Extensiones excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx") End Sub + + + Public Sub ExportToExcelG(Dt As DataTable, NombreArchivoXLSx As String, Optional Titulo As String = "Reporte", Optional Usuario As Usuario = Nothing, Optional Filtros As String = "", Optional AlturaImagen As Double = 100, Optional AnchoImagen As Double = 100) + GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet) + If Dt.TableName Is Nothing Then Dt.TableName = NombreArchivoXLSx + + Dim excel As New GemBox.Spreadsheet.ExcelFile + Dim item = excel.Worksheets.Add(ValidFileName(Dt.TableName, 31)) + + item.InsertDataTable(Dt, New InsertDataTableOptions() With + { + .ColumnHeaders = True, + .StartRow = 0, + .StartColumn = 0 + }) + + If Usuario IsNot Nothing Then + Dim TotalRowHeader As Integer = 8 + Dim TotalRowFooter As Integer = 2 + + Dim worksheet = excel.Worksheets(0) + 'worksheet.Name = ValidFileName(NombreArchivoXLSx, 31) + worksheet.Rows.InsertEmpty(0, TotalRowHeader) + Dim celdasConTexto = worksheet.GetUsedCellRange(True) + celdasConTexto.Style.Font.Name = "Calibri Light" + celdasConTexto.Style.Borders = Nothing + + Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex) + RangoNombreEmpresa.Merged = True + RangoNombreEmpresa.Value = Usuario.Empresa.Empresa + RangoNombreEmpresa.Style.Font.Size = 18 * 20 + RangoNombreEmpresa.Style.Font.Name = "Calibri Light" + RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center + RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + + Dim RangoFiltros = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex) + RangoFiltros.Merged = True + RangoFiltros.Value = Filtros + RangoFiltros.Style.Font.Size = 15 * 20 + RangoFiltros.Style.Font.Name = "Calibri Light" + RangoFiltros.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left + RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + + Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex) + RangoTitulo.Merged = True + RangoTitulo.Value = Titulo + RangoTitulo.Style.Font.Size = 20 * 20 + RangoTitulo.Style.Font.Name = "Calibri Light" + RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center + RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + + Dim RangoColTitulos = worksheet.Cells.GetSubrangeAbsolute(8, celdasConTexto.FirstColumnIndex, 8, celdasConTexto.LastColumnIndex) + RangoColTitulos.Style.Font.Size = 12 * 20 + RangoColTitulos.Style.Font.Name = "Calibri" + RangoColTitulos.Style.Font.Weight = GemBox.Spreadsheet.ExcelFont.BoldWeight + RangoColTitulos.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center + RangoColTitulos.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center + RangoColTitulos.Style.FillPattern.SetSolid(GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190)) + RangoColTitulos.Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255) + + For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex + Try + worksheet.Columns(i).AutoFit(0.95) + Catch ex As Exception + End Try + Next + + Dim IndexEndTable As Integer = Dt.Rows.Count + TotalRowHeader + TotalRowFooter + + worksheet.Rows(IndexEndTable).Cells(2).Value = "Usuario Imprimió" + worksheet.Rows(IndexEndTable + 1).Cells(2).Value = Usuario.Nombre + + worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión" + worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy") + + Dim Imagen As New System.IO.FileInfo($"{Usuario.Empresa.Ruta}/Logo.png") + + If Imagen.Exists Then + Dim Ruta As String = $"{Usuario.Empresa.Ruta}/Logo.png" + Using sr As New StreamReader(Ruta) + Dim ms As New MemoryStream() + sr.BaseStream.CopyTo(ms) + worksheet.Pictures.Add(ms, ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, LengthUnit.Pixel) + End Using + End If + End If + + excel.Save(HttpContext.Current.Response, $"{NombreArchivoXLSx}.xlsx") + + End Sub Private Sub RecursivoLimpiaControlesExcel(Controls As ControlCollection) For Each c As Control In Controls diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 08241247b..d332bef65 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -1059,7 +1059,7 @@
-
+
<%----%> @@ -1071,8 +1071,10 @@ Agregar
--%> -
- + + +
+
diff --git a/Bancos/RepCxCCliente.aspx.vb b/Bancos/RepCxCCliente.aspx.vb index 960811766..15e89aa8f 100644 --- a/Bancos/RepCxCCliente.aspx.vb +++ b/Bancos/RepCxCCliente.aspx.vb @@ -69,13 +69,15 @@ Partial Class Bancos_RepCxCCliente Mov.Dispose() GvCxC.DataBind() - 'If (GvCxC.Rows.Count > 0) Then - GvCxC.UseAccessibleHeader = True - GvCxC.HeaderRow.TableSection = TableRowSection.TableHeader - RegistraScript("OrdenarGV();") - UPDatos.Update() + If (GvCxC.Rows.Count > 0) Then + GvCxC.UseAccessibleHeader = True + If GvCxC.HeaderRow IsNot Nothing Then + GvCxC.HeaderRow.TableSection = TableRowSection.TableHeader + End If + RegistraScript("OrdenarGV();") - 'End If + End If + UPDatos.Update() End Sub Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCxC.RowDataBound If e.Row.RowType = DataControlRowType.DataRow Then diff --git a/Bin/GoCfdi.dll b/Bin/GoCfdi.dll index e25ec6628..7dbd0787b 100644 Binary files a/Bin/GoCfdi.dll and b/Bin/GoCfdi.dll differ diff --git a/Compras/CatProveedores.aspx.vb b/Compras/CatProveedores.aspx.vb index 1c159186d..a46ae19af 100644 --- a/Compras/CatProveedores.aspx.vb +++ b/Compras/CatProveedores.aspx.vb @@ -280,114 +280,21 @@ Partial Class Compras_CatProveedores Protected Sub LnkCtasBancSinProveedor_Click(sender As Object, e As EventArgs) Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - Dim DtDatos As DataTable = Nothing + 'Dim GvDatosSC As New GridView With { .AutoGenerateColumns = True } Dim ObjComp As New ClsCompProveedores If ObjComp.GetProveedoresSinCuentas(UsuarioActual.CveEmpresa) Then - DtDatos = ObjComp.DtResultados.Copy() + DtDatos = ObjComp.DtResultados + 'GvDatosSC.DataBind() End If ObjComp.Dispose() If DtDatos IsNot Nothing Then DtDatos.TableName = "Proveedores" - GenerarReporteProveedoresSinCuentaExcel("Proveedores sin Cuentas Bancarias", DtDatos) + DtDatos.ExportToExcelG("Proveedores Sin Cuentas", "Proveedores sin Cuentas Bancarias", UsuarioActual) End If End Sub - Private Sub GenerarReporteProveedoresSinCuentaExcel(Titulo As String, DtDatos As DataTable) - Dim Retorno As New MemoryStream() - SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet) - - Dim excel As ExcelFile = New ExcelFile - - Dim item = excel.Worksheets.Add(DtDatos.TableName) - item.InsertDataTable(DtDatos, New InsertDataTableOptions() With - { - .ColumnHeaders = True, - .StartRow = 0, - .StartColumn = 0 - }) - item.Rows(0).Style.FillPattern.SetPattern(FillPatternStyle.Solid, SpreadsheetColor.FromArgb(75, 119, 190), SpreadsheetColor.FromArgb(255, 255, 255)) - item.Rows(0).Style.Font.Color = SpreadsheetColor.FromArgb(255, 255, 255) - - Dim columnCount = item.CalculateMaxUsedColumns() - For i = 0 To columnCount - item.Columns(i).AutoFit(1, item.Rows(i), item.Rows(item.Rows.Count - 1)) - Next - - Dim TotalRowHeader As Integer = 8 - Dim TotalRowFooter As Integer = 2 - - Dim worksheet = excel.Worksheets(0) - worksheet.Rows.InsertEmpty(0, TotalRowHeader) - Dim celdasConTexto = worksheet.GetUsedCellRange(True) - celdasConTexto.Style.Font.Name = "Calibri Light" - - Dim RangoNombreEmpresa = worksheet.Cells.GetSubrangeAbsolute(1, celdasConTexto.FirstColumnIndex, 1, celdasConTexto.LastColumnIndex) - RangoNombreEmpresa.Merged = True - RangoNombreEmpresa.Value = UsuarioActual.Empresa.Empresa - RangoNombreEmpresa.Style.Font.Size = 18 * 20 - RangoNombreEmpresa.Style.Font.Name = "Calibri Light" - RangoNombreEmpresa.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center - RangoNombreEmpresa.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center - - - 'Dim RangoFiltros = worksheet.Cells.GetSubrangeAbsolute(6, celdasConTexto.FirstColumnIndex, 6, celdasConTexto.LastColumnIndex) - 'RangoFiltros.Merged = True - 'RangoFiltros.Value = Filtros - 'RangoFiltros.Style.Font.Size = 15 * 20 - 'RangoFiltros.Style.Font.Name = "Calibri Light" - 'RangoFiltros.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Left - 'RangoFiltros.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center - - - Dim RangoTitulo = worksheet.Cells.GetSubrangeAbsolute(3, celdasConTexto.FirstColumnIndex, 3, celdasConTexto.LastColumnIndex) - RangoTitulo.Merged = True - RangoTitulo.Value = Titulo - RangoTitulo.Style.Font.Size = 20 * 20 - RangoTitulo.Style.Font.Name = "Calibri Light" - RangoTitulo.Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center - RangoTitulo.Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center - - For i = celdasConTexto.FirstColumnIndex To celdasConTexto.LastColumnIndex - worksheet.Rows(8).Cells(i).Style.Font.Size = 12 * 20 - worksheet.Rows(8).Cells(i).Style.HorizontalAlignment = GemBox.Spreadsheet.HorizontalAlignmentStyle.Center - worksheet.Rows(8).Cells(i).Style.VerticalAlignment = GemBox.Spreadsheet.VerticalAlignmentStyle.Center - worksheet.Rows(8).Cells(i).Style.FillPattern.SetPattern(GemBox.Spreadsheet.FillPatternStyle.Solid, GemBox.Spreadsheet.SpreadsheetColor.FromArgb(75, 119, 190), GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255)) - worksheet.Rows(8).Cells(i).Style.Font.Color = GemBox.Spreadsheet.SpreadsheetColor.FromArgb(255, 255, 255) - If i > 0 Then - Try - worksheet.Columns(i).AutoFit(1) - Catch ex As Exception - End Try - End If - Next - - Dim IndexEndTable As Integer = DtDatos.Rows.Count + TotalRowHeader + TotalRowFooter - - worksheet.Rows(IndexEndTable).Cells(2).Value = "Usuario Imprimió" - worksheet.Rows(IndexEndTable + 1).Cells(2).Value = UsuarioActual.Nombre - - worksheet.Rows(IndexEndTable).Cells(6).Value = "Fecha Impresión" - worksheet.Rows(IndexEndTable + 1).Cells(6).Value = DateTime.Now.ToString("dd/MM/yyyy") - - Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") - - If Imagen.Exists Then - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, UsuarioActual.CveEmpresa) - Using webClient As New Net.WebClient() - Dim imageBytes = webClient.DownloadData(logouri) - Dim stream As New MemoryStream(imageBytes) - worksheet.Pictures.Add(stream, ExcelPictureFormat.Png, "A1", 100, 100, LengthUnit.Pixel) - 'worksheet.Pictures.Add(stream, GemBox.Spreadsheet.ExcelPictureFormat.Png, "A1", AnchoImagen, AlturaImagen, GemBox.Document.LengthUnit.Pixel) - End Using - End If - - - excel.Save(Response, "Proveedores Sin Cuentas.xlsx", SaveOptions.XlsxDefault) - - End Sub End Class diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 8c2a90d53..def669f49 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1199,6 +1199,22 @@ Partial Class Compras_Compras End Set End Property + Private Property TipoCompraOriginal As Integer + Get + + If ViewState("TipoCompraOriginal") Is Nothing Then + ViewState("TipoCompraOriginal") = -1 + End If + + Return ViewState("TipoCompraOriginal").ToString.ToEntero + + End Get + Set(value As Integer) + ViewState("TipoCompraOriginal") = value + End Set + End Property + + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then @@ -2616,6 +2632,7 @@ Partial Class Compras_Compras CvePrePoliza = dr("CvePrePoliza").ToString.ToEntero EstatusAlmacen = dr("EstatusAlmacen").ToString.ToEntero DdlTipoCompra.SelectedValueExist(dr("CveTipoCompra")) + TipoCompraOriginal = dr("CveTipoCompra").ToString.ToEntero CveTipoConcepto = dr("CveTipoConcepto").ToString.ToEntero ChkEsNoDeducible.Checked = Boolean.Parse(dr("NoDeducible").ToString) @@ -6391,6 +6408,7 @@ Partial Class Compras_Compras 'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN 'SI LA COMPRA ES DE TIPO GASTO CON ALMACEN DEBE REGISTRAR MOVIMIENTO Dim AlmacenSoloExistencia As Boolean = False + If DdlTipoCompra.SelectedValue <> "10" Then For Each Dr As DataRow In DT.Rows If DtAlmacenes.FiltroPrimeroValor("Modalidad", $"CveAlmacen = {Dr("CveAlmacen").ToString.ToEntero}").ToString = "Solo Existencia" Then @@ -6400,6 +6418,7 @@ Partial Class Compras_Compras Dr.AcceptChanges() Next End If + DT.AcceptChanges() DT = DT.FiltraParametros("ISNULL(CveAlmacen,0) > 0") If DT.Rows.Count > 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then @@ -6462,6 +6481,7 @@ Partial Class Compras_Compras ' si agrego en almacen, ya no se ocupa algun concepto puente AgregaMercanciaInventario = False End If + Next End If End If @@ -9433,6 +9453,8 @@ Partial Class Compras_Compras Msg.Append("La Compra se actualizó correctamente") Alert(Msg.ToString()) + TipoCompraOriginal = DdlTipoCompra.SelectedValue.ToEntero + Else ObjCompra.RollBack() If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() @@ -9468,7 +9490,8 @@ Partial Class Compras_Compras (row1("CveActivoFijo").ToString.ToEntero <> row2("CveActivoFijo").ToString.ToEntero) Or (row1("AFMedida").ToString.ToEntero <> row2("AFMedida").ToString.ToEntero) Or (row1("TipoAF").ToString.ToEntero <> row2("TipoAF").ToString.ToEntero) Or - (row1("CvePS").ToString.ToEntero <> row2("CvePS").ToString.ToEntero) Then + (row1("CvePS").ToString.ToEntero <> row2("CvePS").ToString.ToEntero Or + DdlTipoCompra.SelectedValue.ToEntero <> TipoCompraOriginal) Then Return False End If End If @@ -9582,6 +9605,7 @@ Partial Class Compras_Compras 'Removemos los conceptos de la prepoliza If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 6, CveCompra, 1) Then ErrorPrepoliza = True 'GASTO If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 68, CveCompra, 1) Then ErrorPrepoliza = True 'ALMACEN + If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 95, CveCompra, 1) Then ErrorPrepoliza = True 'GASTO CON ALMACEN RELLENO If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 49, CveCompra, 1) Then ErrorPrepoliza = True 'AF If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 205, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 230, CveCompra, 1) Then ErrorPrepoliza = True 'PS YA RECIBIDO @@ -9590,6 +9614,15 @@ Partial Class Compras_Compras If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 228, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO If Not ObjConta.RemovePrePolizasDetalle(CvePrePoliza, 229, CveCompra, 1) Then ErrorPrepoliza = True 'PS NO RECIBIDO + + 'SI ES GASTO CON ALMACEN REGISTRA EL CONCEPTO 95 + If DdlTipoCompra.SelectedValue = "10" Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovimiento, importeMN, Referencia, 95, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CvePersonal:=CvePersonal, CveMovimientoAlmacen:=CveMovimientoInventario, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, Contabilizable:=False) Then + ErrorPrepoliza = True + End If + End If + + 'OBTIENE METODO DE CONTABILIZACIÓN AL GUARDAR Dim ConceptoContabilizacionAlmacen = 0 If ObjCompra.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjCompra.DtResultados.Rows.Count > 0 Then @@ -9622,7 +9655,7 @@ Partial Class Compras_Compras 'COSTO ALMACEN Dim DtAlmacenes = GlobalDTAlmacen(UsuarioActual.CveEmpresa) - If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen = 0 Then + If UsuarioActual.Empresa.UsaInventarios AndAlso Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen = 0 Or DdlTipoCompra.SelectedValue.ToEntero = 10 Then DT = TmpDT.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) > 0", "", {"CveAlmacen"}) 'RECORREMOS PARA DETECTAR LA MODALIDAD DEL ALMACEN, EN CASO DE SER SOLO EXISTENCIA LIMPIAMOS CVEALMACEN @@ -9659,8 +9692,11 @@ Partial Class Compras_Compras importeMovimiento = 0 IdCtaContable = 0 + + + 'INV [MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA) ] - If UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen.Contiene(176, 205) Then + If DdlTipoCompra.SelectedValue.ToEntero <> 10 AndAlso UsuarioActual.Empresa.UsaInventarios And Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen.Contiene(176, 205) Then importeMovimiento = TmpDT.SUM("Total", $"ISNULL(TipoAF,0) <> 2 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveTipoPS = 2").ToString.ToDecimal importeMN = importeMovimiento * tipoCambioActual * Multiplicador @@ -9713,18 +9749,29 @@ Partial Class Compras_Compras DT.AcceptChanges() DtAlmacenes.Dispose() - 'QUITA 1-[MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA)] 2-[NC CON PRODUCTOS] - If UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen > 0 Then - DT = DT.FiltraParametros("CveTipoPS <> 2") + + If DdlTipoCompra.SelectedValue.ToEntero <> 10 Then + 'QUITA 1-[MERCANCIA RECIBIDA POR ADELANTADO (OC) | MERCANCIA PENDIENTE POR RECIBIR (COMPRA)] 2-[NC CON PRODUCTOS] + If UsuarioActual.Empresa.UsaInventarios And Not UsuarioActual.Empresa.Funcionalidad(126) = "1" And ConceptoContabilizacionAlmacen > 0 Then + DT = DT.FiltraParametros("CveTipoPS <> 2") + End If End If + Dim DTDistinct = DT.Copy - If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then - DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"}) + + If DdlTipoCompra.SelectedValue.ToEntero = 10 Then + DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto", "CveAlmacen"}) Else - DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"}) + + If UsuarioActual.Empresa.Funcionalidad(126) = "1" Then + DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"}) + Else + DTDistinct = DTDistinct.FiltraParametros("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1", "", {"CveClasificacion", "Clasificacion", "SubProyecto", "CveSubProyecto", "CveTipoGasto", "TipoGasto"}) + End If End If + If DTDistinct.Rows.Count > 0 Then For Each Row2 As DataRow In DTDistinct.Rows @@ -9734,6 +9781,12 @@ Partial Class Compras_Compras Else importeMovimiento = DT.SUM("Total", String.Format("ISNULL(TipoAF,0) <> 2 AND ISNULL(CveAlmacen,0) = 0 AND ISNULL(AplicaCostoIndirecto,0) <> 1 AND CveClasificacion = {0} AND CveSubProyecto = {1} AND ISNULL(CveTipoGasto,0) = {2}", Row2("CveClasificacion").ToString.ToEntero, Row2("CveSubProyecto").ToString.ToEntero, Row2("CveTipoGasto").ToString.ToEntero)).ToString.ToDecimal End If + + If DdlTipoCompra.SelectedValue.ToEntero = 10 Then + importeMovimiento = DT.SUM(If(ListaDocumentos IsNot Nothing AndAlso ListaDocumentos.Count > 0 AndAlso ArrAnticipos IsNot Nothing AndAlso ArrAnticipos.Count > 0 AndAlso TxtTotal.Text.ToDecimal = 0, "ImporteSinImpuestos", "Total"), $"CveAlmacen > 0 ").ToString.ToDecimal + TmpDT.SUM("CostoIndirectoAlmacen", $"CveAlmacen > 0").ToString.ToDecimal + End If + + importeMN = importeMovimiento * tipoCambioActual * Multiplicador 'CLASIFICACION diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 26a459684..d6440f523 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -3834,6 +3834,8 @@ Partial Class Compras_Proveedores Private Sub ImprimirReporteCxPCrystal(Optional Formato As String = "PDF") Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepProveedorCxP.rpt", UsuarioActual.Empresa.Ruta)) + Dim RutaReporteGrales As New System.IO.FileInfo($"{DirectorioEmpresas}Grales\Formatos\RepProveedorCxP.rpt") + Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png") Dim DTCxPTempral As DataTable = Nothing @@ -3881,7 +3883,7 @@ Partial Class Compras_Proveedores If Archivo.Exists Then ImprimirbytesPDF(ImprimirSubRepPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepProveedorCxP.rpt", DTCxPTempral, lista, DTCxPTempral, dtnc, "Ing", "Ant", "Estado de cuenta", Formato), "Estado de cuenta", Formato) Else - ImprimirbytesPDF(ImprimirSubRepPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepProveedorCxP.rpt"), DTCxPTempral, lista, DTCxPTempral, dtnc, "Ing", "Ant", "Estado de cuenta", Formato), "Estado de cuenta", Formato) + ImprimirbytesPDF(ImprimirSubRepPDFCrystal(RutaReporteGrales.FullName, DTCxPTempral, lista, DTCxPTempral, dtnc, "Ing", "Ant", "Estado de cuenta", Formato), "Estado de cuenta", Formato) End If End If diff --git a/Compras/RepComprasDetalle.aspx b/Compras/RepComprasDetalle.aspx index 050c2e50b..7810abe27 100644 --- a/Compras/RepComprasDetalle.aspx +++ b/Compras/RepComprasDetalle.aspx @@ -310,6 +310,17 @@ + + + + Folio Fiscal + + + + + + + Cant. @@ -477,30 +488,32 @@ - + - + + - + + - + - + diff --git a/Compras/RepComprasDetalle.aspx.vb b/Compras/RepComprasDetalle.aspx.vb index cdd24ed20..69b15621a 100644 --- a/Compras/RepComprasDetalle.aspx.vb +++ b/Compras/RepComprasDetalle.aspx.vb @@ -165,8 +165,7 @@ Partial Class Compras_RepComprasDetalle ChkDesc.Checked = True ChkTotal.Checked = True ChkAbre.Checked = True - ChkRazon.Checked = True - ChkFolio.Checked = True + ChkRazon.Checked = True ChkFecha.Checked = True ChkObs.Checked = True @@ -596,18 +595,19 @@ Partial Class Compras_RepComprasDetalle #End Region Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click - GvDatos.Columns(4).Visible = ChkIVA.Checked - GvDatos.Columns(5).Visible = ChkIEPS.Checked - GvDatos.Columns(6).Visible = ChkDesc.Checked - GvDatos.Columns(7).Visible = Chkretiva.Checked - GvDatos.Columns(8).Visible = Chkretisr.Checked - GvDatos.Columns(9).Visible = ChkTotal.Checked - GvDatos.Columns(10).Visible = ChkAbre.Checked - GvDatos.Columns(11).Visible = ChkRazon.Checked - GvDatos.Columns(12).Visible = ChkFolio.Checked - GvDatos.Columns(13).Visible = ChkFecha.Checked - GvDatos.Columns(14).Visible = ChkObs.Checked - GvDatos.Columns(15).Visible = ChkDescripcion.Checked + GvDatos.Columns(2).Visible = ChkFolio.Checked + GvDatos.Columns(5).Visible = ChkIVA.Checked + GvDatos.Columns(6).Visible = ChkIEPS.Checked + GvDatos.Columns(7).Visible = ChkDesc.Checked + GvDatos.Columns(8).Visible = ChkRetIVA.Checked + GvDatos.Columns(9).Visible = ChkRetISR.Checked + GvDatos.Columns(10).Visible = ChkTotal.Checked + GvDatos.Columns(11).Visible = ChkAbre.Checked + GvDatos.Columns(12).Visible = ChkRazon.Checked + GvDatos.Columns(13).Visible = ChkFolioInv.Checked + GvDatos.Columns(14).Visible = ChkFecha.Checked + GvDatos.Columns(15).Visible = ChkObs.Checked + GvDatos.Columns(16).Visible = ChkDescripcion.Checked UPDatos.Update() End Sub diff --git a/Compras/RepProductosServiciosDetalle.aspx - copia.vb b/Compras/RepProductosServiciosDetalle.aspx - copia.vb deleted file mode 100644 index 9e308e6f7..000000000 --- a/Compras/RepProductosServiciosDetalle.aspx - copia.vb +++ /dev/null @@ -1,437 +0,0 @@ -Option Explicit On -Option Strict On - -Imports Microsoft.Reporting.WebForms -Imports Extensiones -Imports System.Data -Partial Class Compras_RepProductosServiciosDetalle - Inherits ClsPaginas - -#Region "PROPIEDADES" - Private Property DtDatos As DataTable - Get - Return CType(ViewState("DtDatos"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtDatos") = value - End Set - End Property - Private Property CveMoneda As Integer - Get - Return ViewState("CveMoneda").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("CveMoneda") = value - End Set - End Property -#End Region - - Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - If Not IsPostBack Then - If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx") - CargaCombos() - CargaTipoCentroCosto() - Dim Grupo, Proyecto, SubProyecto, Categoria, Clasificacion, PS, Proveedor, Estatus, Usuario, Familia, SubFamilia, TipoActivoFijo, SubTipoActivoFijo, ActivoFijo, TipoGasto As String - Dim Anio, Mes, AnioMes, Fecha, FechaI, FechaF As String - - Grupo = If(Request("GPO") IsNot Nothing AndAlso Request("GPO").ToEntero() > 0, Request("GPO").ToEntero(), -1).ToString - Proyecto = If(Request("CveProyecto") IsNot Nothing AndAlso Request("CveProyecto").ToEntero() > 0, Request("CveProyecto").ToEntero(), -1).ToString - SubProyecto = If(Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero() > 0, Request("CveSubProyecto").ToEntero(), -1).ToString - SubProyecto = If(Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero() = -2, "-2", SubProyecto) - Categoria = If(Request("CveCategoria") IsNot Nothing AndAlso Request("CveCategoria").ToEntero() > 0, Request("CveCategoria").ToEntero(), -1).ToString - Clasificacion = If(Request("CveClasificacion") IsNot Nothing AndAlso Request("CveClasificacion").ToEntero() > 0, Request("CveClasificacion").ToEntero(), -1).ToString - PS = If(Request("CvePS") IsNot Nothing AndAlso Request("CvePS").ToEntero() > 0, Request("CvePS").ToEntero(), -1).ToString - Proveedor = If(Request("CveProveedor") IsNot Nothing AndAlso Request("CveProveedor").ToEntero() > 0, Request("CveProveedor").ToEntero(), -1).ToString - Estatus = If(Request("CveEstatusFactura") IsNot Nothing AndAlso Request("CveEstatusFactura").ToEntero() > 0, Request("CveEstatusFactura").ToEntero(), -1).ToString - Usuario = If(Request("CveUsuario") IsNot Nothing AndAlso Request("CveUsuario").ToEntero() > 0, Request("CveUsuario").ToEntero(), -1).ToString - Familia = If(Request("CveFamilia") IsNot Nothing AndAlso Request("CveFamilia").ToEntero() > -3, Request("CveFamilia").ToEntero(), -1).ToString - SubFamilia = If(Request("CveSubFamilia") IsNot Nothing AndAlso Request("CveSubFamilia").ToEntero() > -3, Request("CveSubFamilia").ToEntero(), -1).ToString - TipoActivoFijo = If(Request("CveTipoAF") IsNot Nothing AndAlso Request("CveTipoAF").ToEntero() > 0, Request("CveTipoAF").ToEntero(), -1).ToString - SubTipoActivoFijo = If(Request("CveSubTipoAF") IsNot Nothing AndAlso Request("CveSubTipoAF").ToEntero() > 0, Request("CveSubTipoAF").ToEntero(), -1).ToString - ActivoFijo = If(Request("CveAF") IsNot Nothing AndAlso Request("CveAF").ToEntero() > 0, Request("CveAF").ToEntero(), -1).ToString - CveMoneda = If(Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero() > 0, Request("CveMoneda").ToEntero(), -1).ToString.ToEntero - TipoGasto = If(Request("CveTipoGasto") IsNot Nothing AndAlso Request("CveTipoGasto").ToEntero > 0, Request("CveTipoGasto").ToEntero(), -1).ToString - Anio = If(Request("Anio") IsNot Nothing, Request("Anio").ToString, "-1").ToString - Mes = If(Request("Mes") IsNot Nothing, Request("Mes").ToString, "-1").ToString - AnioMes = If(Request("AnioMes") IsNot Nothing, Request("AnioMes").ToString, "-1").ToString - Fecha = If(Request("Fecha") IsNot Nothing, Request("Fecha").ToString, "-1").ToString - FechaI = If(Request("FechaI") IsNot Nothing, Request("FechaI").ToString, "-1").ToString - FechaF = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString - - txtFechaI.Text = If(Anio <> "-1", String.Format("01/01/{0}", Anio), txtFechaI.Text) - txtFechaI.Text = If(Mes <> "-1", String.Format("01/{0}/0001", Mes), txtFechaI.Text) - txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 1).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text) - - If Fecha <> "-1" Then - txtFechaI.Text = Fecha - txtFechaF.Text = Fecha - Else - If FechaI <> "-1" Then - txtFechaI.Text = FechaI - End If - If FechaF <> "-1" Then - txtFechaF.Text = FechaF - End If - End If - - DdlCategoria.SelectedValue = Categoria - - If Clasificacion.ToEntero > 0 Then - CargaClasificaciones(DdlCategoria.SelectedValue.ToEntero) - DdlClasificacion.SelectedValueExist(Clasificacion) - End If - - DdlPS.SelectedValue = PS - DdlProyecto.SelectedValue = Proyecto - DdlSubProyecto.SelectedValue = SubProyecto - DdlFamilia.SelectedValue = Familia - DdlSubFamilia.SelectedValue = SubFamilia - DdlProveedor.SelectedValue = Proveedor - DdlEstatus.SelectedValue = Estatus - DdlUsuario.SelectedValue = Usuario - DdlTipoAF.SelectedValue = TipoActivoFijo - DdlTipoGasto.SelectedValueExist(TipoGasto) - DdlSubTipoAF.SelectedValue = SubTipoActivoFijo - DdlAF.SelectedValue = ActivoFijo - - CargaDatos(Proyecto.ToEntero, SubProyecto.ToEntero, Categoria.ToEntero, Clasificacion.ToEntero, PS.ToEntero, Proveedor.ToEntero, Usuario.ToEntero, Estatus.ToEntero, Grupo.ToEntero, Familia.ToEntero, SubFamilia.ToEntero, TipoActivoFijo.ToEntero, SubTipoActivoFijo.ToEntero, ActivoFijo.ToEntero, TipoGasto.ToEntero) - End If - End Sub - - Private Sub CargaTipoCentroCosto() - If UsuarioActual.Empresa.Tipo_CentroCosto = 1 Then - DdlSubProyecto.Items.Clear() - TdProyecto.Visible = False - TdProyecto2.Visible = False - LtSubProyecto.Text = "Sucursal:" - - DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) - DdlSubProyecto.DataBind() - - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 2 Then - DdlSubProyecto.Items.Clear() - TdProyecto.Visible = False - TdProyecto2.Visible = False - LtSubProyecto.Text = "Proyecto:" - - DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) - DdlSubProyecto.DataBind() - - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 4 Then - TdProyecto.InnerText = "Sucursal:" - LtSubProyecto.Text = "Proyecto:" - - - ElseIf UsuarioActual.Empresa.Tipo_CentroCosto = 5 Then - TdProyecto.InnerText = "Proyecto:" - LtSubProyecto.Text = "Sucursal:" - - End If - End Sub - Private Sub CargaCombos() - 'Cargo Proyectos - DdlProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) - DdlProyecto.DataBind() - - 'Cargo Categorias - DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa) - DdlCategoria.DataBind() - - DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa) - DdlTipoGasto.DataBind() - - 'CargaProveedor - DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) - DdlProveedor.DataBind() - - 'CargaUsuarios - DdlUsuario.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - DdlUsuario.DataBind() - - 'CargaEstatus - DdlEstatus.DataSource = GlobalDTCompEstatusFactura - DdlEstatus.DataBind() - - - 'CARGA COSTOS - If UsuarioActual.CveEmpresa = 66 Then - - 'COSTOS PROYECTO - RowCostos.Visible = True - - 'Carga Familias - DdlFamilia.DataSource = GlobalDTFamilias(66) - DdlFamilia.DataBind() - - 'Carga SubFamilias - DdlSubFamilia.DataSource = GlobalDTSubFamilias(66) - DdlSubFamilia.DataBind() - - 'COSTOS AF - RowActivoFijo.Visible = True - - 'Carga Tipos AF - DdlTipoAF.DataSource = GlobalDTTipoActivoFijo(66) - DdlTipoAF.DataBind() - - 'Carga SubTipos AF - DdlSubTipoAF.DataSource = GlobalDTSubTipoActivoFijo(66) - DdlSubTipoAF.DataBind() - - 'Carga AF - 'DdlAF.DataSource = GlobalDTActivoFijos().FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) - 'DdlAF.DataBind() - - End If - - If UsuarioActual.Empresa.GralSoloProyecto Then - TdProyecto.Visible = False - TdProyecto2.Visible = False - LtSubProyecto.Text = "Proyecto" - - DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) - DdlSubProyecto.DataBind() - End If - - End Sub - - Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click - CargaDatos() - End Sub - - Private Sub CargaDatos() - Dim ObjCompras As New ClsCompras() - - Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha) - Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha) - Dim TCEspecifico = If(TxtEspecifico.Text.Trim = "", -1, TxtEspecifico.Text.ToEntero) - If ObjCompras.GetRepProductosServiciosDetalle(DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, - DdlPS.SelectedValue.ToEntero, FechaI, FechaF, DdlProveedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, - UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlFamilia.SelectedValue.ToEntero, DdlSubFamilia.SelectedValue.ToEntero, DdlTipoAF.SelectedValue.ToEntero, DdlSubTipoAF.SelectedValue.ToEntero, DdlAF.SelectedValue.ToEntero, CveMoneda, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, TipoGasto:=DdlTipoGasto.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then - DtDatos = ObjCompras.DtResultados - Else - DtDatos = Nothing - End If - ObjCompras.Dispose() - CargaGrid("") - End Sub - - Private Sub CargaDatos(Proyecto As Integer, SubProyecto As Integer, Categoria As Integer, Clasificacion As Integer, PS As Integer, Proveedor As Integer, Usuario As Integer, Estatus As Integer, Grupo As Integer, Familia As Integer, SubFamilia As Integer, TipoActivoFijo As Integer, SubTipoActivoFijo As Integer, ActivoFijo As Integer, TipoGasto As Integer) - Dim ObjCompras As New ClsCompras() - - Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha) - Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha) - Dim TCEspecifico = If(TxtEspecifico.Text.Trim = "", -1, TxtEspecifico.Text.ToEntero) - - If ObjCompras.GetRepProductosServiciosDetalle(Proyecto, SubProyecto, Categoria, Clasificacion, PS, FechaI, FechaF, Proveedor, Usuario, Estatus, UsuarioActual.CveEmpresa, Grupo, Familia, SubFamilia, TipoActivoFijo, SubTipoActivoFijo, ActivoFijo, CveMoneda, RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, TipoGasto:=TipoGasto, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then - DtDatos = ObjCompras.DtResultados - Else - DtDatos = Nothing - End If - ObjCompras.Dispose() - CargaGrid("") - End Sub - - -#Region " D R O P - D O W N S | SELECT INDEX CHANGED" - Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged - DdlSubProyecto.Items.Clear() - If DdlProyecto.SelectedValue <> "-1" Then - DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero) - DdlSubProyecto.DataBind() - End If - DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) - End Sub - - Protected Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCategoria.SelectedIndexChanged - CargaClasificaciones(DdlCategoria.SelectedValue.ToEntero) - End Sub - - Private Sub CargaClasificaciones(CveCategoria As Integer) - DdlClasificacion.Items.Clear() - If DdlCategoria.SelectedValue <> "-1" Then - DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveCategoria:=CveCategoria) - DdlClasificacion.DataBind() - End If - DdlClasificacion.Items.Insert(0, New ListItem("Todas", "-1")) - End Sub - - Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged - DdlPS.Items.Clear() - If DdlClasificacion.SelectedValue <> "-1" Then - DdlPS.DataSource = GlobalDTProductosServicios(UsuarioActual.CveEmpresa) - DdlPS.DataBind() - End If - DdlSubFamilia.Items.Insert(0, New ListItem("Sin Asignar", "-2")) - DdlPS.Items.Insert(0, New ListItem("Todos", "-1")) - End Sub - Protected Sub DdlFamilia_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlFamilia.SelectedIndexChanged - DdlSubFamilia.Items.Clear() - - If DdlFamilia.SelectedValue <> "-1" Then - DdlSubFamilia.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa, DdlFamilia.SelectedValue.ToEntero) - DdlSubFamilia.DataBind() - Else - DdlSubFamilia.DataSource = GlobalDTSubFamilias(UsuarioActual.CveEmpresa) - DdlSubFamilia.DataBind() - End If - - DdlSubFamilia.Items.Insert(0, New ListItem("Todas", "-1")) - End Sub - Protected Sub DdlTipoAF_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoAF.SelectedIndexChanged - DdlSubTipoAF.Items.Clear() - - If DdlTipoAF.SelectedValue <> "-1" Then - DdlSubTipoAF.DataSource = GlobalDTSubTipoActivoFijo(66).FiltraParametros(String.Format("CveTipoActivoFijo = {0}", DdlTipoAF.SelectedValue.ToEntero)) - DdlSubTipoAF.DataBind() - Else - DdlSubTipoAF.DataSource = GlobalDTSubTipoActivoFijo(66) - DdlSubTipoAF.DataBind() - End If - - DdlSubTipoAF.Items.Insert(0, New ListItem("Todas", "-1")) - End Sub - Protected Sub DdlSubTipoAF_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlSubTipoAF.SelectedIndexChanged - DdlAF.Items.Clear() - - If DdlSubTipoAF.SelectedValue <> "-1" Then - DdlAF.DataSource = GlobalDTActivoFijos(UsuarioActual.CveEmpresa, DdlSubTipoAF.SelectedValue.ToEntero) - DdlAF.DataBind() - 'Else - ' DdlAF.DataSource = GlobalDTSubTipoActivoFijo(66) - ' DdlAF.DataBind() - End If - - DdlAF.Items.Insert(0, New ListItem("Todas", "-1")) - End Sub -#End Region - - Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("Orden") = "" AndAlso e.Row.DBCampo("RazonSocial") = "" Then - e.Row.CssClass = "Totales" - End If - e.Row.Cells(6).Width = Unit.Pixel(100) - e.Row.Cells(3).Width = Unit.Pixel(80) - End If - End Sub - -#Region "tipo Cambio" - Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged - If RblTipoCambio.SelectedValue.ToEntero = 3 Then - Dim TipoCambio As Double - LiEspecifico.Visible = True - TipoCambio = GlobalTipoCambio(Now) - TxtEspecifico.Text = TipoCambio.ToString - Else - LiEspecifico.Visible = False - End If - UpBodyTipoCambio.Update() - End Sub - - Private Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) Handles BtnTipoCambio.Click - CargaDatos() - RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio")) - UPDatos.Update() - End Sub -#End Region - - -#Region "O R D E N A M I E N T O" - Protected Sub LbOrden_Click(ByVal sender As Object, ByVal e As EventArgs) - Dim Orden As String = "" - Dim Campo As String = "" - Dim Literal As Literal = Nothing - Const OrdenInicial As String = "" - Dim Arg(2) As String - - Arg = CType(sender, LinkButton).CommandArgument().ToString.Split(";"c) - Campo = Arg(0) - Literal = CType(CType(sender, LinkButton).NamingContainer.FindControl("Img" & Campo.Replace(",", "_")), Literal) - - If ViewState(String.Format("O{0}", Campo)) IsNot Nothing AndAlso ViewState(String.Format("O{0}", Campo)).ToString = String.Format("{0} DESC", Campo) Then - ViewState(String.Format("O{0}", Campo)) = String.Format("{0} ASC", Campo) - Literal.Text = String.Format("") - Else - ViewState(String.Format("O{0}", Campo)) = String.Format("{0} DESC", Campo) - Literal.Text = String.Format("") - End If - Orden = OrdenInicial & ViewState(String.Format("O{0}", Campo)).ToString - ViewState("Orden") = Orden - CargaGrid(Orden) - End Sub - - Protected Sub CargaGrid(Orden As String) - Dim DV As DataView = Nothing - DV = New DataView(DtDatos, "", Orden, DataViewRowState.CurrentRows) - If Orden <> String.Empty Then - GvDatos.DataSource = DV.ToTable() - Else - GvDatos.DataSource = DtDatos - End If - - GvDatos.DataBind() - UPDatos.Update() - DV.Dispose() - End Sub -#End Region - - -#Region " IMPRESION - NUEVO " - Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click - GenerarPDF("EXCEL") - End Sub - - Private Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click - GenerarPDF() - End Sub - - Private Sub GenerarPDF(Optional Formato As String = "PDF") - - Dim FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim().ToDate, MinFecha) - Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha) - If txtFechaI.Text = "" Then FechaI = "-1".ToDate - If txtFechaF.Text = "" Then FechaF = "-1".ToDate - Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $" Grupo: {DdlGrupo.SelectedItem.Text}") - Dim Proyecto = If(DdlProyecto.SelectedValue = "-1", "", $" Proyecto: {DdlProyecto.SelectedItem.Text}") - Dim SubProyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $" SubProyecto: {DdlSubProyecto.SelectedItem.Text}") - Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $" Categoria: {DdlCategoria.SelectedItem.Text}") - Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $" Clasificación: {DdlClasificacion.SelectedItem.Text}") - Dim PS = If(DdlPS.SelectedValue = "-1", "", $" P.S: {DdlPS.SelectedItem.Text}") - Dim Proveedor = If(DdlProveedor.SelectedValue = "-1", "", $" Proveedor: {DdlProveedor.SelectedItem.Text}") - Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $" Estatus: {DdlEstatus.SelectedItem.Text}") - Dim TipoAF = If(DdlTipoAF.SelectedValue = "-1", "", $" Tipo AF: {DdlTipoAF.SelectedItem.Text}") - Dim FechaIn As String = $" Fecha Inicio: {txtFechaI.Text}" - Dim FechaFn As String = $" Fecha Fin: {txtFechaF.Text}" - If txtFechaI.Text = "" Then FechaIn = "" - If txtFechaF.Text = "" Then FechaFn = "" - - Dim TCEspecifico = If(TxtEspecifico.Text.Trim = "", -1, TxtEspecifico.Text.ToEntero) - - If DtDatos.Rows.Count > 0 Then - Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - - Dim params As New List(Of ReportParameter) - params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) - 'params.Add(New ReportParameter("FechaInicio", FechaI)) - 'params.Add(New ReportParameter("FechaFin", FechaF)) - params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) - params.Add(New ReportParameter("AgrupoPor", $"{Grupo}{Proyecto}{SubProyecto}{Categoria}{Clasificacion}{PS}{Proveedor}{Estatus}{TipoAF}{FechaIn}{FechaFn}")) - - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) - Else - params.Add(New ReportParameter("LogoPath", "")) - End If - ImprimirPDF("Empresas/Grales/Formatos/RepProductosServiciosDetalleCompra.rdlc", DtDatos, params, "ReportePSDetalle", Formato) - Else - Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) - End If - - End Sub -#End Region - -End Class diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index e6c8b6d2f..d509d224e 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -81,18 +81,25 @@ Imprimir Poliza - - -
  • - - Agregar Concepto + Imprimir PDF Resumen
  • - Crear a partir de + Imprimir Excel Resumen
  • -
    -
    + + + + +
  • + + Agregar Concepto +
  • +
  • + Crear a partir de +
  • +
    +
    diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index c17a2cb31..1d39150e5 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -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,7 +2726,7 @@ 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)) @@ -2725,6 +2734,7 @@ Partial Class ContabilidadC_RegPrePolizaS Dim Bytes As Byte() = Nothing + 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 @@ -2744,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", "")) @@ -2765,12 +2774,23 @@ Partial Class ContabilidadC_RegPrePolizaS ImprimirbytesPDF(StreamPDF(ruta, dtVC, params, "ppoliza"), String.Format("{0}-{1}", TipoPoliza, dr("FolioPoliza").ToString), "PDF", True) 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" @@ -3199,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 diff --git a/Documentacion/TableroMaterialidad.aspx.cs b/Documentacion/TableroMaterialidad.aspx.cs index ccf91f23e..fb1099367 100644 --- a/Documentacion/TableroMaterialidad.aspx.cs +++ b/Documentacion/TableroMaterialidad.aspx.cs @@ -14,7 +14,6 @@ using System.Text; using System.Text.RegularExpressions; using System.Xml; using System.Xml.Linq; -using iTextSharp.text.pdf; public partial class Documentacion_TableroMaterialidad : ClsPaginas @@ -286,8 +285,8 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas { XElement xfile = new XElement("archivo"); xfile.SetAttributeValue("URL", urfile); - xfile.SetAttributeValue("EXT", Path.GetExtension(urfile).ToLower()); - if (Path.GetExtension(urfile).ToLower() == ".xml") + xfile.SetAttributeValue("EXT",System.IO.Path.GetExtension(urfile).ToLower()); + if (System.IO.Path.GetExtension(urfile).ToLower() == ".xml") { var xmlobj = ADSistemaLibrary3.SatXml.XmlSatCFDI.readXML(urfile); @@ -372,7 +371,7 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas { try { - PdfReader reader = new PdfReader(urfile); + var reader = new iTextSharp.text.pdf.PdfReader(urfile); text = iTextSharp.text.pdf.parser.PdfTextExtractor.GetTextFromPage(reader, 1, new iTextSharp.text.pdf.parser.LocationTextExtractionStrategy()); foliofiscal = string.Empty; diff --git a/Empresas/1/Formatos/Factura.rdlc b/Empresas/1/Formatos/Factura.rdlc index 299067320..67cb0f92c 100644 --- a/Empresas/1/Formatos/Factura.rdlc +++ b/Empresas/1/Formatos/Factura.rdlc @@ -52,21 +52,13 @@ /* Local Query */ - - ImporteIEPS - System.Decimal + + CveOrdenCompraDetalle + System.Int64 - - ImporteIVA - System.Decimal - - - PorcentajeIEPS - System.Decimal - - - PorcentajeIVA - System.Decimal + + CveOrdenCompra + System.Int64 Cantidad @@ -156,6 +148,10 @@ SATClaveUM System.String + + PorcentajeIVA + System.String + CodigoObjetoImpuesto System.String @@ -343,945 +339,159 @@ - - true - - - - - Tipo - - - - - - - Textbox3 - 0.90692in - 5.662in - 0.5cm - 2.24597in - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Fecha y hora de emisión - - - - - - - - - - - - - - - - Textbox3 - 0.46414in - 5.662in - 0.5cm - 2.24597in - 1 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) - - - - - - - Textbox3 - 0.22455in - 5.662in - 0.60856cm - 2.24597in - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Folio - - - - - - - Textbox3 - 0.0412cm - 5.662in - 0.5cm - 2.24597in - 3 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - VSH VIGILANCIA Y PROTECCION SA DE CV - - - - - - - - - R.F.C. VVP091222RF5|Reg. Fed. DGSP/122-10/1558|Reg. Est. - - - - =IIF(UCase(Parameters!Sucursal.Value.ToString) ="TIJUANA" or UCase(Parameters!Sucursal.Value.ToString) = "MEXICALI" , "SSP-01PM20120309140", "LSP-R-2010-M-271" ) - - - - - - - - - |www.vsh-seguridad.com|ventas@vsh-seguridad.com| - - - - 0cm - 0cm - - - - Textbox4 - 1.93416in - 0.66099in - 3.62386in - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - Embedded - Logo - FitProportional - 0.30578cm - 0.03093cm - 2.88998cm - 4.56434cm - 5 - - - - - - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox3 - 0.66099in - 5.662in - 0.25114in - 2.24597in - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!Tipo.Value & Parameters!Ref.Value - - - - - - - Textbox3 - 1.10364in - 5.662in - 0.25635in - 2.24597in - 7 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Domicilio Fiscal - - - - - - - - - Calle Benito Juarez #32, Local 3, Col.: Hermosillo Centro C.P 83000 Hermosillo, Sonora, México Tel.:(662)210-64-00 - - - - - - - Textbox10 - 0.51102in - 1.93416in - 0.65513in - 1.79619in - 8 - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - Lugar de Expedición - - - - - - - - - =Parameters!DomicilioSucursal.Value - - - - - - - Textbox10 - 0.51102in - 3.77202in - 0.65513in - 1.786in - 9 - - - Top - - - - true - true - - - - - Nombre - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteNombre.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteDireccion.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Ciudad - - - - - - - #4f81bd - - 1.25pt - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!ClienteLugar.Value - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - + - + + External + =Parameters!QR.Value + FitProportional + 0.04167in + 1.37377in + 1.7524in + + + + + true + true true - P A G A R E con Folio + Sello Digital del CFDI: + + + + + + + + + + + + + + + + + + + + + - =Parameters!Serie.Value + VERSION - - + =Parameters!CFDIVersion.Value - - - =Parameters!Folio.Value - - - - Por éste pagare prometo (emos) pagar incondicionalmente a la orden de VSH Vigilancia y Proteccion, S.A de C.V, a su vencimiento el - - - - =Parameters!Vencimiento.Value - - - - , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ - - - - =Parameters!Total.Value - - - - SON: ( - - - - =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - ). Valor recibido a mi (nuestra) entera satisfacción. la falta de pago de éste documento a su vencimiento dará derecho a VSH Vigilancia y Proteccion, S.A de C.V o tenedor, desde el día siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionen. Lugar y Fecha de Suscripción: Hermosillo, Sonora a - - - - =CDATE(Parameters!Fecha.Value).ToString("dd/MM/yyyy") - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre: - - - - =Parameters!ClienteNombre.Value - - - - - - - =Parameters!ClienteDireccion.Value - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Acepto de conformidad - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - 1.25pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Area de Sello y Fecha Recepción - - - - - - - Textbox69 - 1.1706in - 2.94478in - 0.25in - 1.971in - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Éste documento es una representación impresa de un CFDi - - - - - - 2pt - 2pt - 2pt - 2pt - - true - 20.98246cm - 0.01861cm - 7.22972cm - 20.05706cm - 16 - - = (Parameters!AplicaPagare.Value="0" ORelse Parameters!AplicaPagare.Value="") - + 6.32868in + 0.06752in + 1.42169in + 8.23953in - + - 1.50708cm + 0.54014in - 1.53472cm + 0.59111in - 1.63629cm + 0.80359in - 9.22751cm + 0.66404in - 2.19617cm + 2.11562in - 1.8977cm + 0.6863in - 2.0429cm + 0.69852in + + + 0.6403in + + + 0.67895in + + + 0.80447in - 0.52063cm + 0.19645in - + + true true - Cantidad + # Cant. - + + - #4f81bd + + + 2pt + + + + 2pt + + White 2pt 2pt 2pt @@ -1539,70 +596,38 @@ - + true true - UM + Unidad - - - - Textbox14 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Codigo - - - - + + - #4f81bd + + Black + + 2pt + + + Black + + 2pt + 2pt 2pt 2pt @@ -1613,17 +638,17 @@ - + + true true - Descripción + Clave Pr./Se @@ -1632,13 +657,21 @@ - Textbox79 + Textbox29 + - #4f81bd + + Black + + 2pt + + + Black + + 2pt + 2pt 2pt 2pt @@ -1656,11 +689,10 @@ - Obj. Imp. + Clave U. @@ -1672,10 +704,16 @@ Textbox2 + - #4f81bd + + + 2pt + + + + 2pt + 2pt 2pt 2pt @@ -1686,32 +724,40 @@ - + + true true - P. Unitario + Nombre - Textbox84 + Textbox17 + - #4f81bd + + Black + + 2pt + + + Black + + 2pt + 2pt 2pt 2pt @@ -1722,17 +768,105 @@ - + + true true - Importe + Obj. Imp. + + + + + + Textbox26 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Precio + + + + + + + Textbox53 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Tasa IVA + @@ -1740,27 +874,110 @@ Center + + Textbox21 + + + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + - + Descto. - - Textbox87 + Textbox23 + - #4f81bd + + Black + + 2pt + + + Black + + 2pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + SubTotal + + + + + + + Textbox1 + + + + Black + + 2pt + + + Black + + 2pt + 2pt 2pt 2pt @@ -1772,12 +989,13 @@ - 0.4148cm + 0.16561in true + true true @@ -1785,8 +1003,10 @@ =Fields!Cantidad.Value @@ -1798,21 +1018,8 @@ Cantidad1 + - - - - - - - - #4f81bd - - - #4f81bd - 2pt 2pt 2pt @@ -1825,6 +1032,7 @@ true + true true @@ -1832,52 +1040,22 @@ =Fields!UM.Value - - - - - - - - - =Fields!SATClaveUM.Value - - - - UM + - - - - - - - - - - - #4f81bd - 2pt 2pt 2pt @@ -1890,6 +1068,7 @@ true + true true @@ -1897,7 +1076,9 @@ =Fields!SATClaveProdServ.Value @@ -1909,21 +1090,8 @@ SATClaveProdServ + - - - - - - - - - - - #4f81bd - 2pt 2pt 2pt @@ -1934,40 +1102,66 @@ - + true + true true - =Fields!PS.Value & " " & Fields!Obs.Value + =Fields!SATClaveUM.Value + + + + + + SATClaveUM + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + true + + + + + =Fields!PS.Value & IIF(Fields!Obs.Value <> "",System.Environment.NewLine &"Observaciones: ","") & Fields!Obs.Value + + - - - - - - - - - - - #4f81bd - 2pt 2pt 2pt @@ -1987,31 +1181,22 @@ =Fields!CodigoObjetoImpuesto.Value - CodigoObjetoImpuesto + - - - - - - - - - - - #4f81bd - 2pt 2pt 2pt @@ -2024,6 +1209,7 @@ true + true true @@ -2031,20 +1217,19 @@ =Fields!PU.Value - + 2pt @@ -2057,17 +1242,21 @@ - + true + true true - =Fields!Cantidad.Value*Fields!PU.Value + =Fields!PorcentajeIVA.Value @@ -2076,63 +1265,11 @@ - Textbox88 - - - - - - - - - - #4f81bd - - - #4f81bd - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - 0.08406cm - - - - - true - true - - - - - - - - #4f81bd - - 2pt 2pt 2pt @@ -2143,29 +1280,34 @@ - + true + true true - - - - Textbox17 + Descuento1 - - #4f81bd - - 2pt 2pt 2pt @@ -2176,166 +1318,34 @@ - + true + true true - - - - Textbox36 + TiempoEntrega - - #4f81bd - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #4f81bd - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #4f81bd - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #4f81bd - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - #4f81bd - - - - #4f81bd - - 1pt - 2pt 2pt 2pt @@ -2357,6 +1367,9 @@ + + + @@ -2365,742 +1378,53 @@ After - - - - Before + DsOC - 4.66273cm - 0.11469cm - 1.01949cm - 20.04237cm - 17 + 1.75278in + 0.09836in + 0.36206in + 8.22304in + 1 - + + true true - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - + + + - - - - - - - - - + Black 2pt 2pt 2pt 2pt - - - - External - =Parameters!QR.Value - FitProportional - 0.06275in - 0.02693in - 1.31152in - 1.73765in - - - - - - true - true - - - - - Regímen: Regímen General de Ley Personas Morales; Condiciones de pago: - - - - =IIF(Parameters!CondicionPago.Value.ToString="","No Identificado",Parameters!CondicionPago.Value) - - - - ; Método de Pago: - - - - =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) - - - - ; Num. Cta Pago: - - - - =IIF(Parameters!NumCta.Value="0" Orelse Parameters!NumCta.Value="","No Identificado",Parameters!NumCta.Value) - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 9.32053cm - - - 5.68277cm - - - - - 0.4721cm - - - - - true - true - - - - - Folio Fiscal: - - - - - - - Textbox9 - - - - White - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.52062cm - - - - - true - true - - - - - No. Serie del Certificado del SAT: - - - - - - - Textbox24 - - - - White - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!SerieCertificadoSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.49417cm - - - - - true - true - - - - - Fecha y Hora de certificación: - - - - - - - Textbox26 - - - - White - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FechaCertificacion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.49417cm - - - - - true - true - - - - - Certificado del Contribuyente: - - - - - - - Textbox28 - - - - White - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!CertificadoContribuyente.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - - - true - true - - - - - CFC - - - - CFDI RELACIONADOS - - - - - - - Textbox35 - - - White - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.41479cm - - - - - true - true - - - - - Tipo Relación: - - - - - - - Textbox37 - - - - White - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!TipoRelacionTexto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.46771cm - - - - - true - true - - - - - Folio Fiscal - - - - - - - Textbox39 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FolioFiscalRelacionado.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - - - =IIF(Parameters!TipoRelacionTexto.Value = "" OR Parameters!FolioFiscalRelacionado.Value = "", True,False) - - - - - =IIF(Parameters!TipoRelacionTexto.Value = "" OR Parameters!FolioFiscalRelacionado.Value = "", True,False) - - - - - =IIF(Parameters!TipoRelacionTexto.Value = "" OR Parameters!FolioFiscalRelacionado.Value = "", True,False) - - - - - DataSet1 - 0.15938cm - 5.04053cm - 3.33127cm - 15.0033cm - 2 - - - - - - true - 13.17821cm - 0.04629cm - 4.44266cm - 20.04383cm - 19 - - - - true true @@ -3108,7 +1432,1138 @@ - =Parameters!ClienteDatoExtra1.Value + =Parameters!Observaciones.Value + + + + + + + + =iif(Parameters!Kilometraje.Value = "-1", "","Kilometraje: "& Parameters!Kilometraje.Value) + + + + + + + + ="<br/><b>Próxima Rotación y Balanceo: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) & " <b>Próxima Alineación: </b>" & FormatDateTime(CDate(Parameters!Fecha.Value).AddMonths(6), DateFormat.ShortDate) + HTML + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + ID2 + FitProportional + 0.15875cm + 1.15361cm + 2.2881cm + 2.75323cm + 4 + + + + + + true + true + + + + + ECONOLLANTAS SERVICIOS Y ACCESORIOS SA DE CV + + + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Expedido en Sucursal: + + + + =Parameters!Sucursal.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =UCase(Parameters!TipoDocumento.Value) + + + + + + + Textbox8 + 18.23008cm + 0.96018cm + 2.79101cm + 7 + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!Serie.Value.ToString="",Parameters!Folio.Value,Parameters!Serie.Value & "-" &Parameters!Folio.Value) + + + + + + + Textbox8 + 0.97782cm + 18.23008cm + 0.6cm + 2.79101cm + 8 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y Hora: + + + + + + + + + =Parameters!Fecha.Value + + + + + + + Textbox8 + 1.57782cm + 18.23008cm + 0.86903cm + 2.79101cm + 9 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + Folio Fiscal: + + + + =Parameters!FolioFiscal.Value + + + + + + + + + Fecha y hora de certificacion: + + + + =Parameters!FechaCertificacion.Value + + + + + + + + + No. de Serie del Certificado del SAT: + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + + Textbox4 + 2.47332cm + 0.28014cm + 1.09007cm + 9.71199cm + 10 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + No. de Serie del Certificado del CSD: + + + + =Parameters!CertificadoContribuyente.Value + + + + + + + =Parameters!CiudadSucursal.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + =Parameters!ClienteColonia.Value + + + + + + + + =Parameters!ClienteCiudad.Value + + + + + + + + =Parameters!ClienteEstado.Value + + + + CP + + + + =Parameters!ClienteCP.Value + + + + + + + + =Parameters!ClientePais.Value + + + + + + + + + + + =Parameters!ClienteTelefono.Value + + + + + + + + =iif(Parameters!ClienteContactoMail.Value = "","","Correo: ") + + + + =Parameters!ClienteContactoMail.Value + + + + + + + =Parameters!ClienteRFC.Value + + + + + + + =Parameters!RegimenFiscalCodigo.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CondicionPago.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + Esta Póliza cubre cualquier daño que presente la llanta que no esté cubierta por el fabricante, Esta será reemplazada solo si el daño no es reparable, por una llanta nueva igual o equivalente, cargo al cliente el desgaste por el uso que presente la banda de rodamiento, paq. de serv. y póliza nueva. *NO APLICA EN DESGASTE, ROBO O INCENDIO. + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + Sonora: + + + + Rodríguez (662) 213-0388 - Camino del seri (662) 220-3070 - Colosio (662) 260-8088 - Colosio II (662) 118-9939 - Veracruz (662) 210-0041 - Monteverde (662) 688-1512 - Morelos (662) 211-0805 - Palo Verde (662) 436-3254 - Perisur (662) 254-4849 - Portillo (662) 688-5349 - Progreso (662) 310-5781 - Reforma (662) 213-8724 - Sahuaro (662) 216-1471 - Solidaridad (662) 216-0935 - Quiroga (662) 261-0838 - Guaymas (622) 222-2417 - Nogales (631) 319-0093 - San Luis Rio Colorado (653) 596-1799 - Agua Prieta (633) 688-0080 - Caborca (637) 372-4214 - Magdalena (632) 322-4080 - Cananea (645) 332-2040 - Obregón (644) 412-2002 - Obregón II (644) 413-1543 - Obregón III (644) 413-4501 - Navojoa (642) 422-9852 – + + + + Sinaloa: + + + + Mochis (668) 817-0209 - Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Guamúchil (673) 688-0108 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Sanalona (667) 713-6671 - Tres Ríos (667) 211-4696 - La Primavera (667) 304-2060 - Corredor Automotriz (667) 715-5004 - Del Valle (667) 721-5577 - Mazatlán (669) 910-2122 - + + + + Baja California + + + + : Tijuana (664) 622-5221 – Tijuana II (664) 626-2615 - Rosarito (661) 612-4461 - Mexicali (686) 567-6102 - Mexicali II (686) 326 02 79 - Tecate (665) 5212080 - Ensenada (646) 172-4075 – Ensenada II (646) 176-2703 - + + + + Baja California Sur + + + + : La Paz (612) 146-3656 - La Paz II (612) 121-3185 - Los Cabos (624) 688 3552 - San José del Cabo (624) 247-4739 + + + + + + + Textbox4 + 10.20293cm + 0.22108cm + 2.03224cm + 20.79751cm + 15 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + Embedded + ID3 + FitProportional + 24.6983cm + 0.28014cm + 0.93046cm + 5.37042cm + 17 + + + + + + true + true + + + + + DESCARGA NUESTRA NUEVA APLICACIÓN + + + + + + + Textbox60 + 22.36352cm + 0.28014cm + 0.6882cm + 20.71217cm + 18 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Ord. Compra: + + + + =IIf(Parameters!OrdenCompra.Value = "-1", "", Parameters!OrdenCompra.Value) + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tipo de Comprobante:I + + + + =UCase(Parameters!TipoDocumento.Value) + + + + ,Moneda: + + + + =Parameters!MonedaAbreviatura.Value + + + + , Uso de CFDI: + + + + =Parameters!UsoCFDI.Value + + + + , Forma de Pago: + + + + =Parameters!FormaPago.Value + + + + , Método de Pago: + + + + =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) + + + + + + + + + + + + - - - - - 3.15414cm - - - - - 0.6cm - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe - - - 2pt - 2pt - 2pt - 2pt - es-MX - - - - - - - - 0.6cm - - - - - true - true - - - - - =Replace(Parameters!Moneda.Value,"Pesos","Peso mexicano") - - - - - - - Textbox47 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - =Fields!ImpuestoLocal.Value - - - - 2.52863cm - - - true - true - - - - - =Fields!ImpuestoLocal.Value - - - - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - 2.52863cm - - - true - true - - - - - Moneda - - - - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - Before - - - - DataSet1 - 5.84097cm - 14.47429cm - 1.2cm - 5.68277cm + + true + true + + + + + Precio Total: + + + + + + + Textbox19 + 5.27553in + 6.21617in + 0.17608in + 0.94607in 21 + 2pt + 2pt + 2pt + 2pt - - - - - - 3.33075cm - - - 10.99712cm - - - - - 0.6cm - - - - - true - true - - - - - =Parameters!Observaciones.Value - - - - - - - Textbox128 - - - - - - - - - - - - - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - Importe con letra: - - - - - - - Textbox126 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - ="SON: " & Microsoft.VisualBasic.Strings.UCase(Replace(Parameters!ImporteLetra.Value,"M.N.","MXN")) - - - - - - - Textbox127 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Método de pago: - - - - - - - Textbox130 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - =IIF(Parameters!MetodoPago.Value.ToString="","No Identificado",Parameters!MetodoPago.Value) - - - - - - - Textbox131 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Forma de pago: - - - - - - - Textbox23 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FormaPago.Value - - - - - - - - - - - Textbox41 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.66668cm - - - - - true - true - - - - - Uso CFDI: - - - - - - - Textbox43 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!UsoCFDI.Value - - - - - - - Textbox44 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 1.8cm - - - - - true - true - - - - - Sello digital del CFDI: - - - - - - - Textbox132 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!SelloCFDI.Value - - - - - - - Textbox133 - - - Top - 2pt - 2pt - 2pt - 2pt - - - - - - - - 1.2cm - - - - - true - true - - - - - Sello del SAT: - - - - - - - Textbox134 - - - - - 1pt - - - - 1pt - - - - 1pt - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!SelloSAT.Value - - - - - - - Textbox135 - - - Top - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Cadena original del complemento de certificación digital del SAT: - - - - - - - Textbox136 - - - - - - - - - - - - - - 1pt - - #4f81bd - Middle - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - 0.6cm - - - - - true - true - - - - - =Parameters!CadenaOriginal.Value - - - - - - - Textbox6 - - - - - - - - - - - - - - 1pt - - Middle - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - DsOC - 5.84097cm - 0.10736cm - 7.26668cm - 14.32787cm + + + true + true + + + + + Descuento: + + + + + + + Textbox19 + 5.4305in + 6.21616in + 0.17608in + 0.94607in 22 + 2pt + 2pt + 2pt + 2pt - + + + true + true + + + + + Sub Total: + + + + + + + Textbox19 + 5.59199in + 6.21616in + 0.17608in + 0.94607in + 23 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + IVA: + + + + + + + Textbox19 + 5.76074in + 6.22658in + 0.17608in + 0.94607in + 24 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + T O T A L : + + + + + + + Textbox19 + 5.92637in + 6.237in + 0.19596in + 0.94607in + 25 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.IIF(Parameters!SubTotal.Value.ToString() = "", "-", Parameters!SubTotal.Value) + + + + + + + Textbox42 + 5.27553in + 7.16224in + 0.17608in + 0.98426in + 26 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.iif(Parameters!Descuento.Value.ToString() = "", "-", Parameters!Descuento.Value) + + + + + + + Textbox42 + 5.4305in + 7.16224in + 0.17608in + 0.98425in + 27 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.IIF(Parameters!SubTotal2.Value.ToString() = "", "-", Parameters!SubTotal2.Value) + + + + + + + Textbox42 + 5.59199in + 7.17266in + 0.17608in + 0.98425in + 28 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Microsoft.VisualBasic.Interaction.iif(Parameters!IVA.Value.ToString() = "", "-", Parameters!IVA.Value) + + + + + + + Textbox42 + 5.76074in + 7.17266in + 0.17608in + 0.98425in + 29 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Total.Value + + + + + + + Textbox42 + 5.92637in + 7.18308in + 0.19596in + 0.98425in + 30 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + www.econollantas.com + 01800 560-6757 + + + + + + + Textbox90 + 1.77125cm + 7.90108cm + 0.78cm + 4.3635cm + 31 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + true + + + + + ** SI LAS LLANTAS NO SON INSTALADAS EN ECONOLLANTAS PIERDE SU GARANTÍA DE FABRICA ** + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Database + =System.Convert.FromBase64String(Parameters!QRDescarga.Value) + image/png + FitProportional + 9.3435in + 6.67743in + 0.6035in + 0.78275in + 34 + + + + + + true + true + + + + + Puedes encontrarla en Appstore o Google play + + + + + + + + + como Econollantas: + + + + + + + Textbox60 + 22.8083cm + 0.28014cm + 1.49135cm + 5.37042cm + 35 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + Black + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Con tu aplicación el beneficio más + + + + + + + + + importante es poder escanear el código QR de tu póliza y siempre traerla contigo para + + + + + + + + + atenderte + + + + + + + + + MÁS RÁPIDO Y MEJOR. + + + + + + + Textbox60 + 22.8083cm + 7.45145cm + 2.45709cm + 6.56105cm + 38 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Una vez descargada la App utiliza la podrás agregar tu póliza escaneando el código QR + + + + + + + Textbox60 + 22.79852cm + 14.67145cm + 1.46939cm + 6.32076cm + 39 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + PARA UNA OPTIMA DURACIÓN DE SUS LLANTAS, ESTAS DEBEN ALINEARSE, BALANCEARSE Y ROTAR CADA 6 MESES O 1O MIL KILOMETROS. + + + + PARA HACER VÁLIDA UNA RECLAMACIÓN DEBERÁN CUMPLIR CON EL ANTERIOR REQUISITO + + + + + + 2pt + 2pt + 2pt + 2pt + + - + true true @@ -4131,7 +3431,7 @@ @@ -4142,15 +3442,15 @@ Textbox5 - 0.11382cm - 0.05336cm + 0.14926cm + 0.07193cm 0.54004cm - 20.00281cm + 20.7077cm - #4f81bd + Black 2pt 2pt 2pt @@ -4179,7 +3479,7 @@ Textbox29 0.83025cm - 4.33636cm + 4.78817cm 0.41981cm 5.31841cm 1 @@ -4193,7 +3493,7 @@ 2pt - + true true @@ -4212,7 +3512,7 @@ Textbox29 0.83025cm - 9.65477cm + 10.10658cm 0.41981cm 7.14985cm 2 @@ -4226,7 +3526,7 @@ 2pt - + @@ -4248,7 +3548,7 @@ - + true true @@ -4259,7 +3559,7 @@ @@ -4274,7 +3574,7 @@ - #4f81bd + Black 2pt 2pt 2pt @@ -4285,7 +3585,7 @@ - + true true @@ -4296,7 +3596,7 @@ @@ -4311,7 +3611,7 @@ - #4f81bd + Black 2pt 2pt 2pt @@ -4322,7 +3622,7 @@ - + true true @@ -4333,7 +3633,7 @@ @@ -4348,7 +3648,7 @@ - #4f81bd + Black 2pt 2pt 2pt @@ -4359,7 +3659,7 @@ - + true true @@ -4370,7 +3670,7 @@ @@ -4385,7 +3685,7 @@ - #4f81bd + Black 2pt 2pt 2pt @@ -4551,13 +3851,13 @@ After - + DataSet4 1.39643cm - 2.83462cm + 3.28643cm 0.85604cm 15.30142cm 3 @@ -4569,11 +3869,11 @@ true - 17.79725cm - 0.05538cm + 19.97297cm + 0.13424cm 2.25247cm - 20.1554cm - 23 + 20.89818cm + 41 =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) @@ -4583,26 +3883,92 @@ - + true true - VERSION + Acepto ajuste - =Parameters!CFDIVersion.Value + ____________________ + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + Embedded + LogoLlantas1 + FitProportional + 12.27878cm + 0.20617cm + 0.85359cm + 20.86494cm + 43 + + + + + + true + true + true + + + + + < ** Toda corrección de los datos del comprobante debera efectuarse a más tardar tres dias despues de su expedición. ** > + @@ -4611,12 +3977,12 @@ - Textbox5 - 20.12028cm - 16.52562cm - 0.65292cm - 3.68516cm - 24 + Textbox4 + 9.73684cm + 0.20617cm + 0.44183cm + 20.83436cm + 44 @@ -4627,103 +3993,109 @@ 2pt - - true - true - - - - - Reg.fiscal - - - - - - - #4f81bd - - 1.25pt - - 2pt - 2pt - 2pt - 2pt - - - - true - - - - - =Parameters!RegimenFiscalCodigo.Value - - - - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - 28.21218cm + 25.75074cm + + + + + + + =Globals!ExecutionTime + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario Imprimio: + + + + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + true true @@ -4733,6 +4105,7 @@ ="Página " & Globals.PageNumber & " de " & Globals.TotalPages @@ -4742,11 +4115,12 @@ - Textbox3 - 0.10583cm - 16.30721cm - 0.6cm - 3.95896cm + Textbox35 + 0.00882cm + 18.54098cm + 0.50624cm + 2.5cm + 2 @@ -4766,9 +4140,9 @@ 27.94cm 21.59cm - 0.5cm - 0.5cm - 1cm + 0cm + 0cm + 0.5cm 0.5cm 1.27cm + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.84237cm + 0.15558cm + 0cm + 19.84166cm + 1 + + + + + + + + + 5.28731cm + + + 3.31895cm + + + 3.00271cm + + + 2.76458cm + + + 2.31105cm + + + 2.5cm + + + + + 0.6cm + + + + + true + true + + + + + Proveedor + + + + + + + Textbox3 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Banco Nombre + + + + + + + Textbox5 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Cuenta + + + + + + + Textbox13 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CLABE + + + + + + + Textbox15 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + CIE + + + + + + + Textbox17 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Referencia + + + + + + + Textbox19 + + + Silver + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.57354cm + + + + + true + true + + + + + =Fields!RazonSocial.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!BancoNombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cuenta.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!CLABE.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!CIE.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Referencia.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet1 + 1.01876cm + 0.15558cm + 1.17354cm + 19.18461cm + 2 + + + + + + 0.86311in + + + + + + + Textbox1 + 0.18521cm + 3.21468cm + 0.6cm + 14.02238cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE CUENTAS BANCARIAS DE PROVEEDOR + + + + + + + Textbox2 + 1.10271cm + 3.21468cm + 0.52945cm + 14.02238cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 2.33715cm + 2 + + + + + + + + + + + 0.76376cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.08291cm + 17.90491cm + 0.68085cm + 2.09233cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + + Textbox10 + 0.08291cm + 8.20622cm + 0.68085cm + 2.92333cm + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Globals!ExecutionTime + + + + + + + Textbox11 + 0.08291cm + 11.11544cm + 0.68085cm + 4.32745cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.25cm + 0.25cm + 1cm + 1cm + 0.13cm +