--fix de envio de correo de factura

This commit is contained in:
2024-01-13 13:12:24 -07:00
parent c19159aadd
commit 95292f428b
2 changed files with 39 additions and 2 deletions

View File

@@ -2137,7 +2137,17 @@ Partial Class Clientes
Protected Sub BtnSendMail_Click(sender As Object, e As System.EventArgs) Handles BtnSendMail.Click
Try
If HdnCveVenta.Value <> "-1" AndAlso HdnFolioVenta.Value <> "-1" Then
If HdnCveVenta.Value <> "-1" AndAlso HdnFolioVenta.Value <> "-1" Then
Dim ArchivoPDF As String = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, HdnTipoDocto.Value, HdnFolioVenta.Value)
'REGENERAR EL PDF
If Not File.Exists(ArchivoPDF) Then
Try
GenerarPDFVenta(HdnCveVenta.Value.ToEntero(), AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False)
Catch ex As Exception
OnError("Ocurrió un error al regenerar el PDF", ex)
End Try
End If
Dim ObjMail As New ClsSisMail()
Dim Ruta As String = UsuarioActual.Empresa.Ruta