-- cambio en liga
This commit is contained in:
@@ -2299,7 +2299,6 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then
|
If UsuarioActual.Empresa.AsuntoPlantillaMailVenta.Trim.Length > 0 Then
|
||||||
Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta
|
Asunto = UsuarioActual.Empresa.AsuntoPlantillaMailVenta
|
||||||
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
|
Asunto = Asunto.Replace("{""TipoDocumento""}", TipoComprobante)
|
||||||
@@ -2308,9 +2307,9 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso HdnTipoDocto.Value.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso HdnTipoDocto.Value.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
||||||
If File.Exists($"{Ruta}PDF\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.pdf") AndAlso File.Exists($"{Ruta}XML\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.xml") Then
|
Dim PDF As String = $"{Ruta}PDF\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.pdf"
|
||||||
Dim PDF As String = $"{Ruta}PDF\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.pdf"
|
Dim XML As String = $"{Ruta}XML\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.xml"
|
||||||
Dim XML As String = $"{Ruta}XML\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.xml"
|
If File.Exists(PDF) AndAlso File.Exists(XML) Then
|
||||||
|
|
||||||
Dim ResultadoMail As Integer = 0
|
Dim ResultadoMail As Integer = 0
|
||||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||||
@@ -2344,38 +2343,38 @@ Partial Class Clientes
|
|||||||
Else
|
Else
|
||||||
Alert("No se pudo adjuntar el correo electrónico.", TipoMensaje.MsgError)
|
Alert("No se pudo adjuntar el correo electrónico.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
ElseIf UsuarioActual.Empresa.TipoFacturacion = "CBB" AndAlso HdnTipoDocto.Value.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
'ElseIf UsuarioActual.Empresa.TipoFacturacion = "CBB" AndAlso HdnTipoDocto.Value.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
||||||
If File.Exists(Ruta & "PDF\" & HdnFolioVenta.Value & ".pdf") Then
|
' If File.Exists(Ruta & "PDF\" & HdnFolioVenta.Value & ".pdf") Then
|
||||||
Dim PDF As String = Ruta & "PDF\" & HdnFolioVenta.Value & ".pdf"
|
' Dim PDF As String = Ruta & "PDF\" & HdnFolioVenta.Value & ".pdf"
|
||||||
|
|
||||||
Dim ResultadoMail As Integer = 0
|
' Dim ResultadoMail As Integer = 0
|
||||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
' Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||||
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = PDF})
|
' LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = PDF})
|
||||||
If Dr("Adjunto").ToString() <> "" Then
|
' If Dr("Adjunto").ToString() <> "" Then
|
||||||
Adjunto = Dr("Adjunto").ToString()
|
' Adjunto = Dr("Adjunto").ToString()
|
||||||
Dim ArchivoAdjunto As String = $"{Ruta}Ventas\{Adjunto}"
|
' Dim ArchivoAdjunto As String = $"{Ruta}Ventas\{Adjunto}"
|
||||||
LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = ArchivoAdjunto})
|
' LSRutasMail.Add(New ClsSisMail.ArchivoMail With {.Ruta = ArchivoAdjunto})
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
'If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Entrega de Factura", PDF, XML, ArrayCC, TxtBody.Text.Trim) Then
|
' 'If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Entrega de Factura", PDF, XML, ArrayCC, TxtBody.Text.Trim) Then
|
||||||
If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, Asunto, Cuerpo, TxtCC.Text.Trim, LSRutasMail) Then
|
' If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, Asunto, Cuerpo, TxtCC.Text.Trim, LSRutasMail) Then
|
||||||
ResultadoMail = 1
|
' ResultadoMail = 1
|
||||||
TxtCC.Text = ""
|
' TxtCC.Text = ""
|
||||||
TxtBody.Text = ""
|
' TxtBody.Text = ""
|
||||||
RegistraScript("$('#ModalDivMail').modal('hide');")
|
' RegistraScript("$('#ModalDivMail').modal('hide');")
|
||||||
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
' Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
||||||
CargaHistorial()
|
' CargaHistorial()
|
||||||
UpnHistorial.Update()
|
' UpnHistorial.Update()
|
||||||
Else
|
' Else
|
||||||
ResultadoMail = 3
|
' ResultadoMail = 3
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas
|
' Dim ObjVentas As New ClsVentas
|
||||||
ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta.Value.ToEntero())
|
' ObjVentas.UpdateVentaMail(ResultadoMail, HdnCveVenta.Value.ToEntero())
|
||||||
ObjVentas.Dispose()
|
' ObjVentas.Dispose()
|
||||||
Else
|
' Else
|
||||||
Alert("No se pudo adjuntar el correo electrónico.", TipoMensaje.MsgError)
|
' Alert("No se pudo adjuntar el correo electrónico.", TipoMensaje.MsgError)
|
||||||
End If
|
' End If
|
||||||
ElseIf HdnTipoDocto.Value = "Cot" Then
|
ElseIf HdnTipoDocto.Value = "Cot" Then
|
||||||
If File.Exists($"{Ruta}PDF\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.pdf") Then
|
If File.Exists($"{Ruta}PDF\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.pdf") Then
|
||||||
Dim PDF As String = $"{Ruta}PDF\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.pdf"
|
Dim PDF As String = $"{Ruta}PDF\{HdnTipoDocto.Value}\{HdnFolioVenta.Value}.pdf"
|
||||||
|
|||||||
Reference in New Issue
Block a user