Error al enviar correo de factura al obtener el serie folio
This commit is contained in:
@@ -12625,7 +12625,7 @@ Partial Class Ventas
|
||||
|
||||
Try
|
||||
' BytesPdfCotizacion(CveVenta)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar Mail", ex)
|
||||
@@ -12667,7 +12667,7 @@ Partial Class Ventas
|
||||
|
||||
Try
|
||||
' BytesPdfCotizacion(CveVenta)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar Mail", ex)
|
||||
@@ -12706,7 +12706,7 @@ Partial Class Ventas
|
||||
|
||||
Try
|
||||
' BytesPdfCotizacion(CveVenta)
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Dim Hilo As New System.Threading.Thread(Sub() MandaMails(CveVenta, DdlTipoComprobante.SelectedValue.ToString(), LocalSerieFolio, ChkEnviarFactura.Checked, ArchivoXML, ArchivoPDF))
|
||||
Hilo.Start()
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió error al mandar Mail", ex)
|
||||
@@ -17757,7 +17757,7 @@ Partial Class Ventas
|
||||
#End Region
|
||||
|
||||
#Region " MANDA CORREO "
|
||||
Private Sub MandaMails(CveVenta As Integer, EnviarFactura As Boolean, XML As String, PDF As String)
|
||||
Private Sub MandaMails(CveVenta As Integer, TipoDocto As String, SerieFolio As String, EnviarFactura As Boolean, XML As String, PDF As String)
|
||||
|
||||
Dim ObjMail As New ClsSisMail()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
@@ -17770,12 +17770,12 @@ Partial Class Ventas
|
||||
|
||||
Dim TipoComprobante = ""
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.ToString() = "Ing" Then TipoComprobante = "Factura"
|
||||
If DdlTipoComprobante.SelectedValue.ToString() = "Egs" Then TipoComprobante = "Nota de Crédito"
|
||||
If DdlTipoComprobante.SelectedValue.ToString() = "Dev" Then TipoComprobante = "Nota de Devolución"
|
||||
If DdlTipoComprobante.SelectedValue.ToString() = "Rem" Then TipoComprobante = "Remisión"
|
||||
If DdlTipoComprobante.SelectedValue.ToString() = "Cot" Then TipoComprobante = "Cotización"
|
||||
If DdlTipoComprobante.SelectedValue.ToString() = "Ant" Then TipoComprobante = "Anticipo"
|
||||
If TipoDocto = "Ing" Then TipoComprobante = "Factura"
|
||||
If TipoDocto = "Egs" Then TipoComprobante = "Nota de Crédito"
|
||||
If TipoDocto = "Dev" Then TipoComprobante = "Nota de Devolución"
|
||||
If TipoDocto = "Rem" Then TipoComprobante = "Remisión"
|
||||
If TipoDocto = "Cot" Then TipoComprobante = "Cotización"
|
||||
If TipoDocto = "Ant" Then TipoComprobante = "Anticipo"
|
||||
|
||||
If UsuarioActual.Empresa.PlantillaMailVenta.Trim.Length > 0 Then
|
||||
Cuerpo = UsuarioActual.Empresa.PlantillaMailVenta
|
||||
@@ -17785,14 +17785,14 @@ Partial Class Ventas
|
||||
Cuerpo = Cuerpo.Replace("{""Fecha""}", TxtFecha.Text)
|
||||
Cuerpo = Cuerpo.Replace("{""Total""}", TxtTotal.Text)
|
||||
Cuerpo = Cuerpo.Replace("{""FechaVencimiento""}", TxtFechaPago.Text)
|
||||
Cuerpo = Cuerpo.Replace("{""SerieFolio""}", ObjFactura.SerieFolio)
|
||||
Cuerpo = Cuerpo.Replace("{""SerieFolio""}", SerieFolio)
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then
|
||||
Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta
|
||||
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
|
||||
Asunto = Asunto.Replace("{""Sucursal""}", DdlSubProyectoDatos.SelectedItem.Text)
|
||||
Asunto = Asunto.Replace("{""SerieFolio""}", ObjFactura.SerieFolio)
|
||||
Asunto = Asunto.Replace("{""SerieFolio""}", SerieFolio)
|
||||
End If
|
||||
|
||||
If Not EnviarFactura Then
|
||||
|
||||
Reference in New Issue
Block a user