Agrupador filtro TipoCliente, Unificaion Correos de notificacion de Pago
This commit is contained in:
@@ -3680,7 +3680,8 @@ Partial Class Bancos_IE
|
||||
|
||||
'Notificación de Pago
|
||||
If TxtNotificarA.Text.Trim <> "" And MsgError = "" Then
|
||||
NotificacionPago(CveIE, TxtNotificarA.Text.Trim)
|
||||
'NotificacionPago(CveIE, TxtNotificarA.Text.Trim)
|
||||
EnviarCorreoNotificacion(CveIE, TxtNotificarA.Text.Trim, "", UsuarioActual, False)
|
||||
End If
|
||||
|
||||
Else
|
||||
@@ -3811,253 +3812,257 @@ Partial Class Bancos_IE
|
||||
End Sub
|
||||
|
||||
#Region " NOTIFICACION PAGO "
|
||||
Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String)
|
||||
|
||||
If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
|
||||
|
||||
Dim Param As New List(Of String)
|
||||
|
||||
Param.Add(CorreoNotificarA) 'Para
|
||||
Param.Add("Notificaciones de pago") 'Asunto
|
||||
Param.Add(GeneraCorreo2(CveIE)) 'Body
|
||||
Param.Add(CveIE.ToString) 'CveIE
|
||||
Param.Add(If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "")) 'Archivo Adjunto
|
||||
|
||||
Dim Hilo As New Threading.Thread(AddressOf MandaCorreo)
|
||||
Hilo.Start(Param)
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub MandaCorreo(data As Object)
|
||||
Dim Parametros As List(Of String) = DirectCast(data, List(Of String))
|
||||
|
||||
Dim Mail As New ClsSisMail()
|
||||
Dim Para As String = If(Parametros(0) IsNot Nothing, Parametros(0), "")
|
||||
Dim Asunto As String = If(Parametros(1) IsNot Nothing, Parametros(1), "")
|
||||
Dim Body As String = If(Parametros(2) IsNot Nothing, Parametros(2), "")
|
||||
Dim CveIE As Integer = If(Parametros(3) IsNot Nothing, Parametros(3).ToEntero, 0)
|
||||
|
||||
Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||
If Parametros(4) IsNot Nothing AndAlso Parametros(4) <> "" Then
|
||||
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Parametros(4).ToString})
|
||||
End If
|
||||
|
||||
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
|
||||
Dim objIE As New ClsBancos
|
||||
objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE)
|
||||
objIE.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function GeneraCorreo2(CveIE As Integer) As String
|
||||
Dim strBody As New StringBuilder
|
||||
Dim objIE As New ClsBancos
|
||||
|
||||
If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
||||
strBody.Append("<head> ")
|
||||
strBody.Append(" <style type=""text/css""> ")
|
||||
strBody.Append(" body ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" margin:0px; ")
|
||||
strBody.Append(" padding:0px 0px 0px 0px; ")
|
||||
strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
||||
strBody.Append(" font-size: 10px; ")
|
||||
strBody.Append(" background-color:#F0F0F0; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" a.Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" font-size:11px; ")
|
||||
strBody.Append(" background-color:#F7F6F3; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .TextoAlterno ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .BarraIdentidad ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" color:#FFFFFF; ")
|
||||
strBody.Append(" background:#F0F0F0; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" font-size:19px; ")
|
||||
strBody.Append(" font-style:oblique; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Titulos ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color: Gray;")
|
||||
strBody.Append(" color:White; ")
|
||||
strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Verde {color: #00CC00;} ")
|
||||
strBody.Append(" .Negro {color: #000000;} ")
|
||||
strBody.Append(" .Rojo {color: #FF0000;} ")
|
||||
strBody.Append(" </style> ")
|
||||
strBody.Append("</head> ")
|
||||
strBody.Append("<body> ")
|
||||
strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
|
||||
strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat("</div><br/><br/>")
|
||||
|
||||
'strBody.AppendFormat("<div style='width: 600px'>")
|
||||
'strBody.AppendFormat(" <fieldset>")
|
||||
'strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||
'strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||
|
||||
'If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
||||
' strBody.Append(" </tr> ")
|
||||
'End If
|
||||
|
||||
'If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
||||
' strBody.Append(" </tr> ")
|
||||
'End If
|
||||
|
||||
'strBody.Append(" <tr style=""height: 22px""> ")
|
||||
'strBody.AppendFormat(" <td> </td> ")
|
||||
'strBody.Append(" </tr> ")
|
||||
'strBody.Append(" </table> ")
|
||||
'strBody.AppendFormat(" </fieldset>")
|
||||
'strBody.Append(" </div> ")
|
||||
|
||||
|
||||
strBody.AppendFormat("<div style='width: 600px'>")
|
||||
strBody.AppendFormat(" <table style='width:100%'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
|
||||
strBody.AppendFormat(" <table width='100%'>")
|
||||
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Movimiento:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Banco:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Cuenta:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
If objIE.CuentaDepositado.ToString <> "" Then
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Cuenta Destino:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
End If
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Fecha:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy"))
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Importe:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Observaciones:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td colspan='2'>")
|
||||
strBody.AppendFormat(" <hr />")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat("</div>")
|
||||
|
||||
|
||||
'MOVIMIENTOS CHEQUE
|
||||
'If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' Dim Textov33 As String = ""
|
||||
' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||
' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||
' End If
|
||||
|
||||
' strBody.AppendFormat("<div style='width: 1000px'>")
|
||||
' strBody.AppendFormat(" <table style='width:1000px'>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
|
||||
' strBody.AppendFormat(" <table width='1000px'>")
|
||||
' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 15%'>Fecha</th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 25%'>Factura</th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 25%'>Importe ($)</th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
|
||||
|
||||
' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
|
||||
' strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' Next
|
||||
|
||||
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td colspan='4'>")
|
||||
' strBody.AppendFormat(" <hr />")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat(" </fieldset>")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat("</div>")
|
||||
'End If
|
||||
|
||||
strBody.Append(" <div> Favor de no responder a este correo. </div> ")
|
||||
|
||||
strBody.Append("</body></html>")
|
||||
End If
|
||||
|
||||
objIE.Dispose()
|
||||
Return strBody.ToString
|
||||
End Function
|
||||
|
||||
'Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String)
|
||||
|
||||
' If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
|
||||
|
||||
' Dim Param As New List(Of String)
|
||||
|
||||
' Param.Add(CorreoNotificarA) 'Para
|
||||
' Param.Add("Notificaciones de pago") 'Asunto
|
||||
' Param.Add(GeneraCorreo2(CveIE)) 'Body
|
||||
' Param.Add(CveIE.ToString) 'CveIE
|
||||
' Param.Add(If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "")) 'Archivo Adjunto
|
||||
|
||||
' Dim Hilo As New Threading.Thread(AddressOf MandaCorreo)
|
||||
' Hilo.Start(Param)
|
||||
|
||||
' End If
|
||||
|
||||
|
||||
|
||||
'End Sub
|
||||
'Private Sub MandaCorreo(data As Object)
|
||||
' Dim Parametros As List(Of String) = DirectCast(data, List(Of String))
|
||||
|
||||
' Dim Mail As New ClsSisMail()
|
||||
' Dim Para As String = If(Parametros(0) IsNot Nothing, Parametros(0), "")
|
||||
' Dim Asunto As String = If(Parametros(1) IsNot Nothing, Parametros(1), "")
|
||||
' Dim Body As String = If(Parametros(2) IsNot Nothing, Parametros(2), "")
|
||||
' Dim CveIE As Integer = If(Parametros(3) IsNot Nothing, Parametros(3).ToEntero, 0)
|
||||
|
||||
' Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||
' If Parametros(4) IsNot Nothing AndAlso Parametros(4) <> "" Then
|
||||
' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Parametros(4).ToString})
|
||||
' End If
|
||||
|
||||
' If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
|
||||
' Dim objIE As New ClsBancos
|
||||
' objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE)
|
||||
' objIE.Dispose()
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'Private Function GeneraCorreo2(CveIE As Integer) As String
|
||||
' Dim strBody As New StringBuilder
|
||||
' Dim objIE As New ClsBancos
|
||||
|
||||
' If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
||||
' strBody.Append("<head> ")
|
||||
' strBody.Append(" <style type=""text/css""> ")
|
||||
' strBody.Append(" body ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" margin:0px; ")
|
||||
' strBody.Append(" padding:0px 0px 0px 0px; ")
|
||||
' strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
||||
' strBody.Append(" font-size: 10px; ")
|
||||
' strBody.Append(" background-color:#F0F0F0; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" a.Texto ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" font-size:11px; ")
|
||||
' strBody.Append(" background-color:#F7F6F3; ")
|
||||
' strBody.Append(" text-decoration:none; ")
|
||||
' strBody.Append(" font-weight:bold; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .Texto ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .TextoAlterno ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
||||
' strBody.Append(" vertical-align:middle; height:20px;")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .BarraIdentidad ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" color:#FFFFFF; ")
|
||||
' strBody.Append(" background:#F0F0F0; ")
|
||||
' strBody.Append(" font-weight:bold; ")
|
||||
' strBody.Append(" font-size:19px; ")
|
||||
' strBody.Append(" font-style:oblique; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .Titulos ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" background-color: Gray;")
|
||||
' strBody.Append(" color:White; ")
|
||||
' strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
||||
' strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
||||
' strBody.Append(" text-decoration:none; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .Verde {color: #00CC00;} ")
|
||||
' strBody.Append(" .Negro {color: #000000;} ")
|
||||
' strBody.Append(" .Rojo {color: #FF0000;} ")
|
||||
' strBody.Append(" </style> ")
|
||||
' strBody.Append("</head> ")
|
||||
' strBody.Append("<body> ")
|
||||
' strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
|
||||
' strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat(" </fieldset>")
|
||||
' strBody.AppendFormat("</div><br/><br/>")
|
||||
|
||||
' 'strBody.AppendFormat("<div style='width: 600px'>")
|
||||
' 'strBody.AppendFormat(" <fieldset>")
|
||||
' 'strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||
' 'strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||
|
||||
' 'If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
' ' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' ' strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
||||
' ' strBody.Append(" </tr> ")
|
||||
' 'End If
|
||||
|
||||
' 'If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
' ' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' ' strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
||||
' ' strBody.Append(" </tr> ")
|
||||
' 'End If
|
||||
|
||||
' 'strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' 'strBody.AppendFormat(" <td> </td> ")
|
||||
' 'strBody.Append(" </tr> ")
|
||||
' 'strBody.Append(" </table> ")
|
||||
' 'strBody.AppendFormat(" </fieldset>")
|
||||
' 'strBody.Append(" </div> ")
|
||||
|
||||
|
||||
' strBody.AppendFormat("<div style='width: 600px'>")
|
||||
' strBody.AppendFormat(" <table style='width:100%'>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
|
||||
' strBody.AppendFormat(" <table width='100%'>")
|
||||
' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Movimiento:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Banco:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Cuenta:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' If objIE.CuentaDepositado.ToString <> "" Then
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Cuenta Destino:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' End If
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Fecha:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy"))
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Importe:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Observaciones:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td colspan='2'>")
|
||||
' strBody.AppendFormat(" <hr />")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat(" </fieldset>")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat("</div>")
|
||||
|
||||
|
||||
' 'MOVIMIENTOS CHEQUE
|
||||
' 'If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' ' Dim Textov33 As String = ""
|
||||
' ' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||
' ' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||
' ' End If
|
||||
|
||||
' ' strBody.AppendFormat("<div style='width: 1000px'>")
|
||||
' ' strBody.AppendFormat(" <table style='width:1000px'>")
|
||||
' ' strBody.AppendFormat(" <tr>")
|
||||
' ' strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
' ' strBody.AppendFormat(" <fieldset>")
|
||||
' ' strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
|
||||
' ' strBody.AppendFormat(" <table width='1000px'>")
|
||||
' ' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
' ' strBody.AppendFormat(" <th scope='col' style='width: 15%'>Fecha</th>")
|
||||
' ' strBody.AppendFormat(" <th scope='col' style='width: 25%'>Factura</th>")
|
||||
' ' strBody.AppendFormat(" <th scope='col' style='width: 25%'>Importe ($)</th>")
|
||||
' ' strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>")
|
||||
' ' strBody.AppendFormat(" </tr>")
|
||||
|
||||
|
||||
' ' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
|
||||
' ' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' ' strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
|
||||
' ' strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
|
||||
' ' strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
|
||||
' ' strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
|
||||
' ' strBody.AppendFormat(" </tr>")
|
||||
' ' Next
|
||||
|
||||
|
||||
' ' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' ' strBody.AppendFormat(" <td colspan='4'>")
|
||||
' ' strBody.AppendFormat(" <hr />")
|
||||
' ' strBody.AppendFormat(" </td>")
|
||||
' ' strBody.AppendFormat(" </tr>")
|
||||
' ' strBody.AppendFormat(" </table>")
|
||||
' ' strBody.AppendFormat(" </fieldset>")
|
||||
' ' strBody.AppendFormat(" </td>")
|
||||
' ' strBody.AppendFormat(" </tr>")
|
||||
' ' strBody.AppendFormat(" </table>")
|
||||
' ' strBody.AppendFormat("</div>")
|
||||
' 'End If
|
||||
|
||||
' strBody.Append(" <div> Favor de no responder a este correo. </div> ")
|
||||
|
||||
' strBody.Append("</body></html>")
|
||||
' End If
|
||||
|
||||
' objIE.Dispose()
|
||||
' Return strBody.ToString
|
||||
'End Function
|
||||
|
||||
|
||||
|
||||
@@ -6102,38 +6107,77 @@ Partial Class Bancos_IE
|
||||
End Function
|
||||
|
||||
Private Sub BtnSendMail_Click(sender As Object, e As EventArgs) Handles BtnSendMail.Click
|
||||
'NotificacionPago(HdnCveIE.Value.ToEntero, Txt)
|
||||
Dim ObjMail As New ClsSisMail()
|
||||
Dim Body = GeneraCorreo(CveIE)
|
||||
|
||||
Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||
|
||||
Dim ObjIE As New ClsBancos()
|
||||
If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
If ObjIE.Comprobante <> "" Then
|
||||
ComprobanteIE = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
|
||||
EnviarCorreoNotificacion(CveIE, TxtParaMail.Text.Trim, TxtCC.Text.Trim, UsuarioActual, True)
|
||||
|
||||
If IO.File.Exists(ComprobanteIE) Then
|
||||
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = ComprobanteIE.ToString})
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
ObjIE.Dispose()
|
||||
''NotificacionPago(HdnCveIE.Value.ToEntero, Txt)
|
||||
'Dim ObjMail As New ClsSisMail()
|
||||
'Dim Body = GeneraCorreo(CveIE)
|
||||
|
||||
If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Notificaciones de pago", Body, TxtCC.Text.Trim, Displayname:="Notificaciones de pago", Archivos:=ListaArchivos) Then
|
||||
'ResultadoMail = 1
|
||||
TxtCC.Text = ""
|
||||
'TxtAdicional.Text = ""
|
||||
RegistraScript("$('#ModalDivMail').modal('hide');")
|
||||
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
|
||||
End If
|
||||
'Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||
|
||||
'Dim ObjIE As New ClsBancos()
|
||||
'If ObjIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||
' If ObjIE.Comprobante <> "" Then
|
||||
' ComprobanteIE = String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ObjIE.Comprobante.ToString)
|
||||
|
||||
' If IO.File.Exists(ComprobanteIE) Then
|
||||
' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = ComprobanteIE.ToString})
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
'End If
|
||||
'ObjIE.Dispose()
|
||||
|
||||
'If ObjMail.SendMail(UsuarioActual.Empresa, TxtParaMail.Text.Trim, "Notificaciones de pago", Body, TxtCC.Text.Trim, Displayname:="Notificaciones de pago", Archivos:=ListaArchivos) Then
|
||||
' 'ResultadoMail = 1
|
||||
' TxtCC.Text = ""
|
||||
' 'TxtAdicional.Text = ""
|
||||
' RegistraScript("$('#ModalDivMail').modal('hide');")
|
||||
' Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
||||
'Else
|
||||
' Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean)
|
||||
|
||||
Try
|
||||
Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
|
||||
Hilo.Start()
|
||||
If MostarAlert Then
|
||||
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
||||
RegistraScript("$('#ModalDivMail').modal('hide');")
|
||||
End If
|
||||
Catch ex As Exception
|
||||
If MostarAlert Then
|
||||
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
|
||||
End If
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario)
|
||||
|
||||
Try
|
||||
Dim ObjBancos As New ClsBancos()
|
||||
If ObjBancos.NotificacionPago(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar) Then
|
||||
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
Catch ex As Exception
|
||||
GuardaLog("Error al enviar notificación de pago IE --> " & ex.StackTrace.ToString)
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub LnkAjustarMovimiento_Click(sender As Object, e As EventArgs) Handles LnkAjustarMovimiento.Click
|
||||
RegistraScript("$('#ModalAjustarMovimiento').modal('show');")
|
||||
End Sub
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -437,6 +437,22 @@ Partial Class Bancos_PopIECompras
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property NotificarA As String
|
||||
Get
|
||||
If ViewState("NotificarA") Is Nothing Then
|
||||
Return ""
|
||||
Else
|
||||
Return ViewState("NotificarA").ToString
|
||||
End If
|
||||
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("NotificarA") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
Private Sub Bancos_PopIECompras_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
@@ -724,6 +740,10 @@ Partial Class Bancos_PopIECompras
|
||||
ViewState("CveCuentaRetIVA") = ObjProveedor.CveCuentaRetIVA
|
||||
ViewState("CveCuentaProveedorExtranjera") = ObjProveedor.CveCuentaProveedoresExtranjera
|
||||
ViewState("CveCuentaComplementaria") = ObjProveedor.CveCuentaProveedoresComplementaria
|
||||
ViewState("NotificarA") = ObjProveedor.NotificarA.Trim()
|
||||
|
||||
|
||||
|
||||
Else
|
||||
Alert("El Proveedor solicitado no existe, por favor intente de nuevo.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -3351,7 +3371,10 @@ Partial Class Bancos_PopIECompras
|
||||
If IdPoliza > 0 Then
|
||||
StrMsg.AppendFormat("<br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Ver Póliza</a>", IdPoliza)
|
||||
End If
|
||||
If RBLContado.SelectedValue.ToEntero = 6 And ChkEmitirComplementoPago.Checked Then GeneraTimbre(CvePrePoliza) Else Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
|
||||
If RBLContado.SelectedValue.ToEntero = 6 And ChkEmitirComplementoPago.Checked Then GeneraTimbre(CvePrePoliza) Else Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
|
||||
|
||||
EnviarCorreoNotificacion(CveIE, NotificarA, "", UsuarioActual, False)
|
||||
|
||||
Else
|
||||
ObjIE.RollBack()
|
||||
Alert(MsgError, TipoMensaje.MsgError)
|
||||
@@ -3359,11 +3382,60 @@ Partial Class Bancos_PopIECompras
|
||||
|
||||
ObjIE.Dispose()
|
||||
ObjMov.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
#Region "ENVIAR CORREO NOTIFICACION DE PAGO"
|
||||
|
||||
|
||||
Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean)
|
||||
|
||||
Try
|
||||
Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
|
||||
'Dim Hilo As New Threading.Thread( EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
|
||||
Hilo.Start()
|
||||
|
||||
|
||||
If MostarAlert Then
|
||||
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
If MostarAlert Then
|
||||
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario)
|
||||
|
||||
Try
|
||||
Dim ObjBancos As New ClsBancos()
|
||||
|
||||
If ObjBancos.NotificacionPago(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar) Then
|
||||
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjBancos.Dispose()
|
||||
|
||||
Catch ex As Exception
|
||||
GuardaLog("Error al enviar notificación de pago PopIECompras --> " & ex.StackTrace.ToString)
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "COMPLEMENTO DE PAGO"
|
||||
|
||||
|
||||
Private Sub GeneraTimbre(CvePrePoliza As Integer)
|
||||
|
||||
Dim Str As New StringBuilder
|
||||
|
||||
@@ -2365,7 +2365,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
'Notificación de Pago
|
||||
If TxtNotificarA.Text.Trim <> "" AndAlso ChkEnviarCorreo.Checked Then
|
||||
NotificacionPago(CveIE, TxtNotificarA.Text.Trim)
|
||||
'NotificacionPago(CveIE, TxtNotificarA.Text.Trim)
|
||||
EnviarCorreoNotificacion(CveIE, TxtNotificarA.Text.Trim, "", UsuarioActual, False)
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -2785,261 +2786,302 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
#Region " NOTIFICACION PAGO "
|
||||
|
||||
Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String)
|
||||
|
||||
If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
|
||||
'Dim Param As New List(Of String)
|
||||
|
||||
'Param.Add(CorreoNotificarA) 'Para
|
||||
'Param.Add("Notificaciones de pago") 'Asunto
|
||||
'Param.Add(GeneraCorreo(CveIE)) 'Body
|
||||
'Param.Add(CveIE.ToString) 'CveIE
|
||||
Dim Body As String = GeneraCorreo(CveIE)
|
||||
Dim Comprobante = If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "") 'Archivo Adjunto
|
||||
Private Sub EnviarCorreoNotificacion(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario, MostarAlert As Boolean)
|
||||
|
||||
Dim File As Byte() = Nothing
|
||||
If UsuarioActual.Empresa.Funcionalidad(545).ToEntero > 0 Then
|
||||
File = NewGeneraBytesCxP(CveProveedor, UsuarioActual.Nombre)
|
||||
End If
|
||||
|
||||
Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, Comprobante, File))
|
||||
Try
|
||||
Dim Hilo As New Threading.Thread(Sub() EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
|
||||
'Dim Hilo As New Threading.Thread( EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar))
|
||||
Hilo.Start()
|
||||
End If
|
||||
|
||||
If MostarAlert Then
|
||||
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
If MostarAlert Then
|
||||
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub EnviarCorreoNotifiMandaCorreocacionHilo(CveIENotificar As Integer, CorreoNotificarA As String, CopiaPara As String, UsuarioActualNotificar As Usuario)
|
||||
|
||||
|
||||
Try
|
||||
Dim ObjBancos As New ClsBancos()
|
||||
|
||||
If ObjBancos.NotificacionPago(CveIENotificar, CorreoNotificarA, CopiaPara, UsuarioActualNotificar) Then
|
||||
Alert("El correo se envió correctamente", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
Alert("No se pudo enviar el correo electrónico.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjBancos.Dispose()
|
||||
Catch ex As Exception
|
||||
GuardaLog("Error al enviar notificación de pago ProveedoresAbonar --> " & ex.StackTrace.ToString)
|
||||
End Try
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte())
|
||||
'Dim Parametros As List(Of String) = DirectCast(Data, List(Of String))
|
||||
|
||||
Dim Mail As New ClsSisMail()
|
||||
Para = If(Para IsNot Nothing, Para, "")
|
||||
Asunto = If(Asunto IsNot Nothing, Asunto, "")
|
||||
Body = If(Body IsNot Nothing, Body, "")
|
||||
|
||||
Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||
If Comprobante IsNot Nothing AndAlso Comprobante <> "" Then
|
||||
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Comprobante})
|
||||
End If
|
||||
|
||||
If File IsNot Nothing Then
|
||||
ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"})
|
||||
End If
|
||||
|
||||
If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
|
||||
Dim objIE As New ClsBancos
|
||||
objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE)
|
||||
objIE.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function GeneraCorreo(CveIE As Integer) As String
|
||||
Dim strBody As New StringBuilder
|
||||
Dim objIE As New ClsBancos
|
||||
|
||||
If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
||||
strBody.Append("<head> ")
|
||||
strBody.Append(" <style type=""text/css""> ")
|
||||
strBody.Append(" body ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" margin:0px; ")
|
||||
strBody.Append(" padding:0px 0px 0px 0px; ")
|
||||
strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
||||
strBody.Append(" font-size: 10px; ")
|
||||
strBody.Append(" background-color:#F0F0F0; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" a.Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" font-size:11px; ")
|
||||
strBody.Append(" background-color:#F7F6F3; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Texto ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .TextoAlterno ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; height:20px;")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .BarraIdentidad ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" color:#FFFFFF; ")
|
||||
strBody.Append(" background:#F0F0F0; ")
|
||||
strBody.Append(" font-weight:bold; ")
|
||||
strBody.Append(" font-size:19px; ")
|
||||
strBody.Append(" font-style:oblique; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Titulos ")
|
||||
strBody.Append(" { ")
|
||||
strBody.Append(" background-color: Gray;")
|
||||
strBody.Append(" color:White; ")
|
||||
strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
||||
strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
||||
strBody.Append(" text-decoration:none; ")
|
||||
strBody.Append(" } ")
|
||||
strBody.Append(" .Verde {color: #00CC00;} ")
|
||||
strBody.Append(" .Negro {color: #000000;} ")
|
||||
strBody.Append(" .Rojo {color: #FF0000;} ")
|
||||
strBody.Append(" </style> ")
|
||||
strBody.Append("</head> ")
|
||||
strBody.Append("<body> ")
|
||||
strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
|
||||
strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat("</div><br/><br/>")
|
||||
|
||||
strBody.AppendFormat("<div style='width: 600px'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||
strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||
|
||||
If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
End If
|
||||
|
||||
If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
End If
|
||||
|
||||
strBody.Append(" <tr style=""height: 22px""> ")
|
||||
strBody.AppendFormat(" <td> </td> ")
|
||||
strBody.Append(" </tr> ")
|
||||
strBody.Append(" </table> ")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.Append(" </div> ")
|
||||
|
||||
|
||||
strBody.AppendFormat("<div style='width: 600px'>")
|
||||
strBody.AppendFormat(" <table style='width:100%'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
|
||||
strBody.AppendFormat(" <table width='100%'>")
|
||||
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Movimiento:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Banco:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Cuenta:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
If objIE.CuentaDepositado.ToString <> "" Then
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Cuenta Destino:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
End If
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Fecha:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy"))
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Importe:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>Observaciones:</td>")
|
||||
strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td colspan='2'>")
|
||||
strBody.AppendFormat(" <hr />")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat("</div>")
|
||||
'Private Sub NotificacionPago(CveIE As Integer, CorreoNotificarA As String)
|
||||
|
||||
' If Not DdlTipoTransaccion.SelectedValue.ToEntero.Contiene(9, 17) Then
|
||||
|
||||
' Dim Body As String = GeneraCorreo(CveIE)
|
||||
' Dim Comprobante = If(ComprobanteIE <> "", String.Format("{0}IE\{1}", UsuarioActual.Empresa.Ruta, ComprobanteIE), "") 'Archivo Adjunto
|
||||
|
||||
' Dim File As Byte() = Nothing
|
||||
' If UsuarioActual.Empresa.Funcionalidad(545).ToEntero > 0 Then
|
||||
' File = NewGeneraBytesCxP(CveProveedor, UsuarioActual.Nombre)
|
||||
' End If
|
||||
|
||||
' Dim Hilo As New Threading.Thread(Sub() MandaCorreo(CorreoNotificarA, "Notificaciones de pago", Body, CveIE, Comprobante, File))
|
||||
' Hilo.Start()
|
||||
' End If
|
||||
|
||||
'End Sub
|
||||
|
||||
'Private Sub MandaCorreo(Para As String, Asunto As String, Body As String, CveIE As Integer, Comprobante As String, File As Byte())
|
||||
' 'Dim Parametros As List(Of String) = DirectCast(Data, List(Of String))
|
||||
|
||||
' Dim Mail As New ClsSisMail()
|
||||
' Para = If(Para IsNot Nothing, Para, "")
|
||||
' Asunto = If(Asunto IsNot Nothing, Asunto, "")
|
||||
' Body = If(Body IsNot Nothing, Body, "")
|
||||
|
||||
' Dim ListaArchivos As New List(Of ClsSisMail.ArchivoMail)
|
||||
' If Comprobante IsNot Nothing AndAlso Comprobante <> "" Then
|
||||
' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.Ruta = Comprobante})
|
||||
' End If
|
||||
|
||||
' If File IsNot Nothing Then
|
||||
' ListaArchivos.Add(New ClsSisMail.ArchivoMail With {.ArchivoBinario = File, .NombreArchivo = "EstadoCuentaCxP.pdf"})
|
||||
' End If
|
||||
|
||||
' If Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, Archivos:=ListaArchivos) Then
|
||||
' Dim objIE As New ClsBancos
|
||||
' objIE.UpdateBancos_IENotificaciones(1, "-1", "-1", CveIE)
|
||||
' objIE.Dispose()
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
'Private Function GeneraCorreo(CveIE As Integer) As String
|
||||
' Dim strBody As New StringBuilder
|
||||
' Dim objIE As New ClsBancos
|
||||
|
||||
' If objIE.GetBancosIE(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
||||
' strBody.Append("<head> ")
|
||||
' strBody.Append(" <style type=""text/css""> ")
|
||||
' strBody.Append(" body ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" margin:0px; ")
|
||||
' strBody.Append(" padding:0px 0px 0px 0px; ")
|
||||
' strBody.Append(" font-family: Verdana, Arial, Helvetica, sans-serif; ")
|
||||
' strBody.Append(" font-size: 10px; ")
|
||||
' strBody.Append(" background-color:#F0F0F0; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" a.Texto ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" font-size:11px; ")
|
||||
' strBody.Append(" background-color:#F7F6F3; ")
|
||||
' strBody.Append(" text-decoration:none; ")
|
||||
' strBody.Append(" font-weight:bold; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .Texto ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" background-color:#F7F6F3; color:Black; font-family:Verdana; font-size:10px; text-align:center; vertical-align:middle; height:20px;")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .TextoAlterno ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" background-color:White; color:Black; font-family:Verdana; font-size:10px; text-align:center; ")
|
||||
' strBody.Append(" vertical-align:middle; height:20px;")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .BarraIdentidad ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" color:#FFFFFF; ")
|
||||
' strBody.Append(" background:#F0F0F0; ")
|
||||
' strBody.Append(" font-weight:bold; ")
|
||||
' strBody.Append(" font-size:19px; ")
|
||||
' strBody.Append(" font-style:oblique; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .Titulos ")
|
||||
' strBody.Append(" { ")
|
||||
' strBody.Append(" background-color: Gray;")
|
||||
' strBody.Append(" color:White; ")
|
||||
' strBody.Append(" font-family:Verdana; font-size:12px; text-align:center; ")
|
||||
' strBody.Append(" vertical-align:middle; font-weight:bold; height:30px; ")
|
||||
' strBody.Append(" text-decoration:none; ")
|
||||
' strBody.Append(" } ")
|
||||
' strBody.Append(" .Verde {color: #00CC00;} ")
|
||||
' strBody.Append(" .Negro {color: #000000;} ")
|
||||
' strBody.Append(" .Rojo {color: #FF0000;} ")
|
||||
' strBody.Append(" </style> ")
|
||||
' strBody.Append("</head> ")
|
||||
' strBody.Append("<body> ")
|
||||
' strBody.AppendFormat("<div id='C_div' style='width: 600px'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend><b>{0}</b></legend>", UsuarioActual.Empresa.Empresa)
|
||||
' strBody.AppendFormat(" <table class='TextoG' border='0' cellpadding='0' cellspacing='0' width='100%'>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td style='width:100px'>{0}</td>", UsuarioActual.Empresa.Direccion)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td>Col. {0}</td>", UsuarioActual.Empresa.Colonia)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td>{0}, {1}, C.P.{2}</td>", UsuarioActual.Empresa.Ciudad, UsuarioActual.Empresa.Estado, UsuarioActual.Empresa.CP)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td>RFC {0}</td>", UsuarioActual.Empresa.RFC)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat(" </fieldset>")
|
||||
' strBody.AppendFormat("</div><br/><br/>")
|
||||
|
||||
' strBody.AppendFormat("<div style='width: 600px'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend><b> </b></legend>")
|
||||
' strBody.AppendFormat(" <table class='TextoG' style='width:100%'>")
|
||||
|
||||
' If objIE.CveTipoTransaccion = 1 Then ' cuando es cheque
|
||||
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' strBody.Append(" <td>Favor de pasar a nuestras oficinas por el cheque con la siguientes instrucciones.</td> ")
|
||||
' strBody.Append(" </tr> ")
|
||||
' End If
|
||||
|
||||
' If objIE.CveTipoTransaccion = 2 Then ' cuando es transf
|
||||
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' strBody.Append(" <td>Notificación de transferencia de pago realizada.</td> ")
|
||||
' strBody.Append(" </tr> ")
|
||||
' End If
|
||||
|
||||
' strBody.Append(" <tr style=""height: 22px""> ")
|
||||
' strBody.AppendFormat(" <td> </td> ")
|
||||
' strBody.Append(" </tr> ")
|
||||
' strBody.Append(" </table> ")
|
||||
' strBody.AppendFormat(" </fieldset>")
|
||||
' strBody.Append(" </div> ")
|
||||
|
||||
|
||||
'MOVIMIENTOS CHEQUE
|
||||
If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
Dim Textov33 As String = ""
|
||||
If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||
Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||
End If
|
||||
|
||||
strBody.AppendFormat("<div style='width: 1000px'>")
|
||||
strBody.AppendFormat(" <table style='width:1000px'>")
|
||||
strBody.AppendFormat(" <tr>")
|
||||
strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
strBody.AppendFormat(" <fieldset>")
|
||||
strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
|
||||
strBody.AppendFormat(" <table width='1000px'>")
|
||||
strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 10%'>Fecha</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Factura</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 20%'>Importe ($)</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>")
|
||||
strBody.AppendFormat(" <th scope='col' style='width: 15%'>NC Aplicadas</th>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat("<div style='width: 600px'>")
|
||||
' strBody.AppendFormat(" <table style='width:100%'>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend>Beneficiario:<b>{0}</b> </legend>", objIE.PagueseA)
|
||||
' strBody.AppendFormat(" <table width='100%'>")
|
||||
' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width:150px;'></th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width:450px;'></th>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Movimiento:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.TipoTransaccion)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Banco:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Banco)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Cuenta:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.NumCuenta)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' If objIE.CuentaDepositado.ToString <> "" Then
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Cuenta Destino:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.CuentaDepositado)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' End If
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Fecha:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.FechaDocumento.ToString("dd/MM/yyyy"))
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Importe:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>$ {0} {1}</td>", objIE.Importe.FormatoNumero, objIE.Moneda)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>Observaciones:</td>")
|
||||
' strBody.AppendFormat(" <td style='text-align: left'>{0}</td>", objIE.Observaciones)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td colspan='2'>")
|
||||
' strBody.AppendFormat(" <hr />")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat(" </fieldset>")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat("</div>")
|
||||
|
||||
|
||||
For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
|
||||
strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
|
||||
strBody.AppendFormat(" <td>{0}</td>", dr("ImporteNC").ToString.FormatoNumero)
|
||||
strBody.AppendFormat(" </tr>")
|
||||
Next
|
||||
' 'MOVIMIENTOS CHEQUE
|
||||
' If objIE.GetBancosIEMovimientos(CveIE, UsuarioActual.CveEmpresa) Then
|
||||
' Dim Textov33 As String = ""
|
||||
' If UsuarioActual.Empresa.Funcionalidad(520) = "1" Then
|
||||
' Textov33 = "Favor de emitir complemento de pago de los siguientes documentos"
|
||||
' End If
|
||||
|
||||
' strBody.AppendFormat("<div style='width: 1000px'>")
|
||||
' strBody.AppendFormat(" <table style='width:1000px'>")
|
||||
' strBody.AppendFormat(" <tr>")
|
||||
' strBody.AppendFormat(" <td style='vertical-align: top'>")
|
||||
' strBody.AppendFormat(" <fieldset>")
|
||||
' strBody.AppendFormat(" <legend><b>Documentos abonados o pagados <br/>{0}</b> </legend>", Textov33)
|
||||
' strBody.AppendFormat(" <table width='1000px'>")
|
||||
' strBody.AppendFormat(" <tr style='background-color: gray; color: White; font-family: Verdana; font-size: 10px; text-align: center; vertical-align: middle; font-weight: bold; height: 20px; text-decoration: none;'>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 10%'>Fecha</th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 20%'>Factura</th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 20%'>Importe ($)</th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 40%'>Folio Fiscal</th>")
|
||||
' strBody.AppendFormat(" <th scope='col' style='width: 15%'>NC Aplicadas</th>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
|
||||
|
||||
strBody.AppendFormat(" <tr class='Texto'>")
|
||||
strBody.AppendFormat(" <td colspan='5'>")
|
||||
strBody.AppendFormat(" <hr />")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat(" </fieldset>")
|
||||
strBody.AppendFormat(" </td>")
|
||||
strBody.AppendFormat(" </tr>")
|
||||
strBody.AppendFormat(" </table>")
|
||||
strBody.AppendFormat("</div>")
|
||||
End If
|
||||
' For Each dr As DataRow In objIE.DtResultados.FiltraParametros("CveConceptoContable IN (17) AND CveCompra > 0").Rows
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("Fecha").ToString.ToDate.ToShortDateString())
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("SerieFolio").ToString)
|
||||
' strBody.AppendFormat(" <td style='text-align: right'>$ {0}</td>", dr("Importe").ToString.FormatoNumero)
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("FolioFiscal"))
|
||||
' strBody.AppendFormat(" <td>{0}</td>", dr("ImporteNC").ToString.FormatoNumero)
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' Next
|
||||
|
||||
strBody.Append(" <div> Favor de no responder a este correo. </div> ")
|
||||
|
||||
strBody.Append("</body></html>")
|
||||
End If
|
||||
' strBody.AppendFormat(" <tr class='Texto'>")
|
||||
' strBody.AppendFormat(" <td colspan='5'>")
|
||||
' strBody.AppendFormat(" <hr />")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat(" </fieldset>")
|
||||
' strBody.AppendFormat(" </td>")
|
||||
' strBody.AppendFormat(" </tr>")
|
||||
' strBody.AppendFormat(" </table>")
|
||||
' strBody.AppendFormat("</div>")
|
||||
' End If
|
||||
|
||||
objIE.Dispose()
|
||||
Return strBody.ToString
|
||||
End Function
|
||||
' strBody.Append(" <div> Favor de no responder a este correo. </div> ")
|
||||
|
||||
' strBody.Append("</body></html>")
|
||||
' End If
|
||||
|
||||
' objIE.Dispose()
|
||||
' Return strBody.ToString
|
||||
'End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Reference in New Issue
Block a user