Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="Ventas - Facturación" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Ventas.aspx.vb" Inherits="Ventas" EnableEventValidation="false" %>
|
||||
<%@ Page Title="Ventas - Facturación" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Ventas.aspx.vb" Inherits="Ventas" EnableEventValidation="false" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
||||
<%@ Register Src="~/UserControl/AddMedico.ascx" TagPrefix="UserControl" TagName="AddMedico" %>
|
||||
|
||||
@@ -2898,6 +2898,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
TxtFechaOS.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm").Replace(" ", "T")
|
||||
|
||||
@@ -10770,8 +10771,9 @@ Partial Class Ventas
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, "", UsarDescargaDesdePopUpVerFactura:=False)
|
||||
Else
|
||||
Dim capturedContext = HttpContext.Current
|
||||
Dim strURLHOST As String = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST, EsHilo:=True, Contexto:=capturedContext))
|
||||
Hilo.Start()
|
||||
End If
|
||||
Catch ex As Exception
|
||||
@@ -16307,7 +16309,14 @@ Partial Class Ventas
|
||||
''' <param name="strURLHOST"></param>
|
||||
''' <param name="CorreoCRM"></param>
|
||||
''' <param name="UsarDescargaDesdePopUpVerFactura"></param>
|
||||
Private Sub GeneraPDFFactura(EnviaCorreo As Boolean, Factura As Modelos.Factura, UsuarioActual As Usuario, strURLHOST As String, Optional CorreoCRM As String = "", Optional UsarDescargaDesdePopUpVerFactura As Boolean = True)
|
||||
Private Sub GeneraPDFFactura(EnviaCorreo As Boolean, Factura As Modelos.Factura, UsuarioActual As Usuario, strURLHOST As String, Optional CorreoCRM As String = "", Optional UsarDescargaDesdePopUpVerFactura As Boolean = True,
|
||||
Optional EsHilo As Boolean = False, Optional Contexto As HttpContext = Nothing)
|
||||
|
||||
If EsHilo Then
|
||||
HttpContext.Current = Contexto
|
||||
HttpContext.Current.Session("UsuarioSIG") = UsuarioActual
|
||||
End If
|
||||
|
||||
'GUARDA PDF
|
||||
Dim LocalSerieFolio As String = String.Empty
|
||||
Dim LocalTipoDocto As String = String.Empty
|
||||
@@ -16368,6 +16377,8 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub GeneraPDFCotizacion(EnviaCorreo As Boolean, Optional CorreoContactoCRM As String = "", Optional pdfCRM As Byte() = Nothing,
|
||||
Optional SerieFolioCRM As String = "", Optional TipoDoctoCRM As String = "")
|
||||
@@ -17278,9 +17289,10 @@ Partial Class Ventas
|
||||
'IMPRESION
|
||||
Try
|
||||
'MANDA CORREO
|
||||
Dim capturedContext = HttpContext.Current
|
||||
Dim strURLHOST As String = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||
Dim Factura As New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, EsCancelacion:=False, CargaDTDetalle:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False, VerificaAlmacen:=False)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() GeneraPDFFactura(ChkEnviarFactura.Checked, Factura, UsuarioActual, strURLHOST, EsHilo:=True, Contexto:=capturedContext))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al enviar el PDF", ex)
|
||||
@@ -38113,5 +38125,10 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user