diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index 82bb1cb39..ad0cdcd60 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -1075,7 +1075,7 @@ Public Class ClsPaginas
End Get
Set(ByVal value As DataTable)
- Dim AppNombre As String = String.Format("GlobalDTSubProyectosUsuarios-{0}", CveEmpresa)
+ Dim AppNombre As String = String.Format("GlobalDTProyectosUsuarios-{0}", CveEmpresa)
Application(AppNombre) = value
End Set
End Property
@@ -6714,6 +6714,17 @@ Public Class ClsPaginas
params.Add(New ReportParameter("ClienteDatoExtra1", DatosCliente))
End If
+ 'ECONOLLANTAS - AGREGAR QR DE DESCARGA
+ If UsuarioActual.CveEmpresa = 141 Then
+ Dim QRDescarga As String = ""
+
+ Dim cfdi As New RVCFDI33.GeneraCFDI()
+ Dim b As Byte() = cfdi.ConvertirQrCode($"http://econollantas.adssistemas.mx/Ashx/E141.ashx?P={Encripta($"File={Vta.SerieFolio}.pdf")}")
+ QRDescarga = Convert.ToBase64String(b)
+
+ params.Add(New ReportParameter("QRDescarga", QRDescarga))
+ End If
+
'INE COMPLEMENTOS
If UsuarioActual.CveEmpresa.Contiene(72, 1) Then
Dim INETipoProceso As String = ""
diff --git a/Ashx/E141.ashx b/Ashx/E141.ashx
new file mode 100644
index 000000000..1afdca0b9
--- /dev/null
+++ b/Ashx/E141.ashx
@@ -0,0 +1,135 @@
+<%@ WebHandler Language="VB" Class="E141" %>
+
+Imports System
+Imports System.Web
+Imports System.Data
+Imports System.Net.Http
+Imports Newtonsoft.Json
+Imports Newtonsoft.Json.Linq
+Imports Extensiones
+Imports System.IO
+
+Public Class E141 : Implements IHttpHandler
+
+ Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
+ Get
+ Return False
+ End Get
+ End Property
+
+ Private ReadOnly Property CveEmpresa As Integer = 141
+
+ Public ReadOnly Property EsProduccion As Boolean
+ Get
+ If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
+ Return False
+ Else
+ Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1")
+ End If
+ End Get
+ End Property
+
+ Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
+ Dim retorno As String = "no se encontro la variable"
+ Try
+ Dim Params = If(context.Request("P") = Nothing, "", context.Request("P").ToString())
+
+ If Not String.IsNullOrEmpty(Params) Then
+ Dim UrlParametros As Hashtable = Parametros(Decripta(Params))
+
+ Dim File As String = UrlParametros("FILE").ToString()
+ If Not String.IsNullOrEmpty(File) Then
+ ImprimirbytesPDF(context, DescargarFactura(File), File)
+ End If
+
+ End If
+ Catch ex As Exception
+ retorno = ex.ToString()
+ ex.GuardaLog(ex.ToString())
+ context.Response.Write(retorno)
+ End Try
+
+ End Sub
+
+
+ 'Private Function DescargarFactura(CveVenta As Integer) As Byte()
+ ' Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", ClsPaginas.UrlSitio, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=0", CveVenta))))
+ ' Dim File As Byte() = Nothing
+ ' Try
+ ' Using httpClient = New HttpClient()
+ ' httpClient.Timeout = New TimeSpan(0, 15, 0)
+ ' Using request = New HttpRequestMessage(HttpMethod.Get, Url)
+ ' request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO=100", CveEmpresa, DateTime.UtcNow.Ticks)))
+ ' Dim response = httpClient.SendAsync(request).Result
+ ' If response.StatusCode = Net.HttpStatusCode.OK Then
+ ' File = response.Content.ReadAsByteArrayAsync().Result
+ ' End If
+ ' End Using
+ ' End Using
+ ' Catch ex As Exception
+ ' File = Nothing
+ ' OnError("Ocurrió un error al descargar la factura", ex)
+ ' End Try
+
+ ' Return File
+ 'End Function
+
+ Private Function DescargarFactura(FilePDF As String) As Byte()
+ Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?TipoDocto=Ing&File={1}&TipoArchivo=PDF", "http://localhost/", FilePDF))
+ Dim File As Byte() = Nothing
+ Try
+ Using httpClient = New HttpClient()
+ httpClient.Timeout = New TimeSpan(0, 1, 0)
+ Using request = New HttpRequestMessage(HttpMethod.Get, Url)
+ request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CVEUSUARIO=100", CveEmpresa, DateTime.UtcNow.Ticks)))
+ Dim response = httpClient.SendAsync(request).Result
+ If response.StatusCode = Net.HttpStatusCode.OK Then
+ File = response.Content.ReadAsByteArrayAsync().Result
+ End If
+ End Using
+ End Using
+ Catch ex As Exception
+ File = Nothing
+ OnError("Ocurrió un error al descargar la factura", ex)
+ End Try
+
+ Return File
+ End Function
+
+ Public Sub ImprimirbytesPDF(ByVal context As HttpContext, bytes As Byte(), NombreArchivo As String)
+ 'limpio ReportViwer
+ Dim mimeType As String = Nothing
+ Dim extension As String = Nothing
+
+ Try
+
+ bytes = bytes
+ context.Response.Buffer = True
+ context.Response.Clear()
+ context.Response.ContentType = mimeType
+ context.Response.AddHeader("content-disposition", String.Format("attachment; filename={0}", NombreArchivo))
+ context.Response.BinaryWrite(bytes) ' create the file
+ context.Response.Flush() ' send it to the client to download
+ context.Response.SuppressContent = True
+ context.ApplicationInstance.CompleteRequest()
+ context.Response.End()
+
+ Catch ex As Exception
+ End Try
+ End Sub
+
+ Private Function Parametros(Cadena As String) As Hashtable
+ Dim P1() As String = Cadena.Split("&"c)
+ Dim Tmp As String
+ Dim P2() As String
+
+ Dim URLParametros As New Hashtable
+
+ For Each Tmp In P1
+ P2 = Tmp.Replace("%26%", "&").Split("="c)
+ URLParametros.Add(P2(0).ToString.ToUpper, P2(1))
+ Next
+ Return URLParametros
+ End Function
+
+End Class
\ No newline at end of file
diff --git a/Empresas/141/Formatos/Factura.rdlc b/Empresas/141/Formatos/Factura.rdlc
index cd8da5b44..76daa0c7d 100644
--- a/Empresas/141/Formatos/Factura.rdlc
+++ b/Empresas/141/Formatos/Factura.rdlc
@@ -361,7 +361,7 @@
Sello Digital del CFDI:
@@ -373,7 +373,7 @@
=Parameters!SelloCFDI.Value
@@ -386,7 +386,7 @@
Sello Digital del SAT:
@@ -399,7 +399,7 @@
=Parameters!SelloSAT.Value
@@ -412,7 +412,7 @@
Cadena Original del complemento de certificación digital del SAT:
@@ -425,7 +425,7 @@
=Parameters!CadenaOriginal.Value
@@ -438,7 +438,7 @@
RFC del Proveedor de Certificación:
@@ -451,7 +451,7 @@
Este documento es una representación impresa de un CFDI
@@ -479,7 +479,7 @@
true
6.06618in
0.06752in
- 1.60919in
+ 1.42169in
8.23953in
@@ -2289,10 +2289,10 @@
Textbox60
- 11.08689cm
- 15.67443cm
- 0.50299cm
- 5.42547cm
+ 19.12502cm
+ 0.28014cm
+ 0.6882cm
+ 20.71217cm
18
-
- Embedded
- ECONO_Marcas
- FitProportional
- 11.08689cm
- 0.22108cm
- 1.5cm
- 15.34658cm
- 34
-
-
-
-
true
true
@@ -3018,7 +3003,7 @@
- < ** Toda corrección de los datos del comprobante debera efectuarse a más tardar tres dias despues de su expedición. ** >
+ < ** Toda corrección de los datos del comprobante debera efectuarse a más tardar tres dias despues de su expedición. ** >
@@ -3048,14 +3033,341 @@
2pt
+
+ Database
+ =System.Convert.FromBase64String(Parameters!QRDescarga.Value)
+ image/png
+ FitProportional
+ 8.0685in
+ 6.67743in
+ 0.6035in
+ 0.78275in
+ 35
+
+
+
+
+
+ true
+ true
+
+
+
+
+ Puedes encontrarla en Appstore o Google play
+
+
+
+
+
+
+
+
+ como Econollantas:
+
+
+
+
+
+
+ Textbox60
+ 19.5698cm
+ 0.28014cm
+ 1.49135cm
+ 5.37042cm
+ 36
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox5
+ 19.10915cm
+ 0.14007cm
+ 0.05496cm
+ 20.88652cm
+ 37
+
+
+ Black
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+ Textbox5
+ 22.48903cm
+ 0.28014cm
+ 0.05496cm
+ 20.88652cm
+ 38
+
+
+ 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
+ 19.5698cm
+ 7.45145cm
+ 2.45709cm
+ 6.56105cm
+ 39
+
+
+ 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
+ 19.56002cm
+ 14.67145cm
+ 1.46939cm
+ 6.32076cm
+ 40
+
+
+ 2pt
+ 2pt
+ 2pt
+ 2pt
+
+
+
+ Embedded
+ rockblade
+ FitProportional
+ 11.19428cm
+ 5.58835cm
+ 0.86918cm
+ 4.08628cm
+ 41
+
+
+
+
+
+ Embedded
+ yokohama2
+ FitProportional
+ 11.33186cm
+ 0.58737cm
+ 0.65751cm
+ 4.35272cm
+ 42
+
+
+
+
+
+ Embedded
+ mastercraft
+ FitProportional
+ 11.30011cm
+ 17.06617cm
+ 0.93972cm
+ 3.99634cm
+ 43
+
+
+
+
+
+ Embedded
+ coopertires
+ FitProportional
+ 11.33186cm
+ 10.33489cm
+ 0.65751cm
+ 6.09184cm
+ 44
+
+
+
+
- 19.49544cm
+ 22.57045cm