Option Explicit On
Option Strict On
Imports System.Data
Imports Extensiones
Imports System.IO
Imports Ionic.Zip
Imports Microsoft.Reporting.WebForms
Partial Class Bancos_PagoElectronicoGrupos
Inherits ClsPaginas
Private Shared missing As Object = System.Reflection.Missing.Value
#Region "PROPIEDADES"
Private Property HeaderTexto As String
Get
Return ViewState("HeaderTexto").ToString
End Get
Set(value As String)
ViewState("HeaderTexto") = value
End Set
End Property
Private Property DetalleTexto As String
Get
Return ViewState("DetalleTexto").ToString
End Get
Set(value As String)
ViewState("DetalleTexto") = value
End Set
End Property
Private Property TrailerTexto As String
Get
Return ViewState("TrailerTexto").ToString
End Get
Set(value As String)
ViewState("TrailerTexto") = value
End Set
End Property
Private Property TextoCompleto As String
Get
Return ViewState("TextoCompleto").ToString
End Get
Set(value As String)
ViewState("TextoCompleto") = value
End Set
End Property
Private Property Vacio As String
Get
Return ViewState("Vacio").ToString
End Get
Set(value As String)
ViewState("Vacio") = value
End Set
End Property
Private Property NombreArchivo As String
Get
Return ViewState("NombreArchivo").ToString
End Get
Set(value As String)
ViewState("NombreArchivo") = value
End Set
End Property
Private Property DTPendientes As DataTable
Get
Return CType(ViewState("DTPendientes"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTPendientes") = value
End Set
End Property
Private Property DTAltasPendientes As DataTable
Get
Return CType(ViewState("DTAltasPendientes"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTAltasPendientes") = value
End Set
End Property
Private Property DTProveedores As DataTable
Get
Return CType(ViewState("DTProveedores"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTProveedores") = value
End Set
End Property
Private Property DTFyE As DataTable
Get
Return CType(ViewState("DTFyE"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTFyE") = value
End Set
End Property
Private Property DTReportes As DataTable
Get
Return CType(ViewState("DTReportes"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTReportes") = value
End Set
End Property
Private Property DTPendienteActual As DataTable
Get
Return CType(ViewState("DTPendienteActual"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTPendienteActual") = value
End Set
End Property
Private Property DTEnviadas As DataTable
Get
Return CType(ViewState("DTEnviadas"), DataTable)
End Get
Set(value As DataTable)
ViewState("DTEnviadas") = value
End Set
End Property
Private ReadOnly Property PadCeros As Char
Get
Return "0"c
End Get
End Property
Private Property TotalAcumulado As Double
Get
Return ViewState("TotalAcumulado").ToString.ToDouble
End Get
Set(value As Double)
ViewState("TotalAcumulado") = value
End Set
End Property
Private Property CveCuenta As Integer
Get
Return ViewState("CveCuenta").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveCuenta") = value
End Set
End Property
Private Property DtPago As DataTable
Get
Return CType(ViewState("DtPago"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtPago") = value
End Set
End Property
Private Property DtAlta As DataTable
Get
Return CType(ViewState("DtAlta"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtAlta") = value
End Set
End Property
Private Property CorreoNotificacionesEmpresa As String
Get
Return ViewState("CorreoNotificacionesEmpresa").ToString
End Get
Set(value As String)
ViewState("CorreoNotificacionesEmpresa") = value
End Set
End Property
Private Property TipoMasiva As Integer
Get
Return ViewState("TipoMasiva").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("TipoMasiva") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
ViewState("NombreArchivo") = ""
ViewState("HeaderTexto") = ""
ViewState("DetalleTexto") = ""
ViewState("TrailerTexto") = ""
ViewState("Vacio") = ""
ViewState("TotalAcumulado") = 0
CveCuenta = -1
TipoMasiva = 1
txtFechaI.Text = Date.Now.ToShortDateString
txtFechaF.Text = Date.Now.ToShortDateString
CargaCuentas()
CargaProveedores()
InicializaDatosGenerales()
End If
End Sub
#Region " C A R G A - D A T O S "
Private Sub CargaCuentas()
DdlCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros("UsaLayoutGrupos = 1")
DdlCuenta.DataBind()
UpFiltros.Update()
DdlCuentaReportes.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario).FiltraParametros("UsaLayoutGrupos = 1")
DdlCuentaReportes.DataBind()
UpFiltrosReporte.Update()
End Sub
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
CveCuenta = DdlCuenta.SelectedValue.ToEntero
CargaDatos()
End Sub
Private Sub CargaDatos()
'Carga datos en DT´s
Dim ObjBancos As New ClsBancos
If ObjBancos.GetLayoutPagos(CveCuenta, -1, DdlTipoGeneracion.SelectedValue, PorGrupos:=True) Then
DTPendientes = ObjBancos.DtResultados
Else
DTPendientes = Nothing
End If
If ObjBancos.GetLayoutPagosEnviados(CveCuenta, 1, DdlTipoGeneracion.SelectedValue, "-1", "-1", PorGrupos:=True) Then
DTEnviadas = ObjBancos.DtResultados
Else
DTEnviadas = Nothing
End If
ObjBancos.Dispose()
If DTPendientes IsNot Nothing AndAlso DTPendientes.Rows.Count > 0 Then
CargaDatosInformativos()
Else
LbNumeroMovimientos.Text = "0"
LbImporteMovimientos.Text = "0"
UpComandosGeneracion.Update()
End If
'Carga GvPendientes
If DTPendientes IsNot Nothing AndAlso DTPendientes.Rows.Count > 0 Then
GvPendientes.DataSource = DTPendientes
End If
GvPendientes.DataBind()
'Carga GvEnviadas
If DTEnviadas IsNot Nothing AndAlso DTEnviadas.Rows.Count > 0 Then
GvEnviadas.DataSource = DTEnviadas
End If
GvEnviadas.DataBind()
UpGVDatos.Update()
End Sub
Private Sub CargaDatosInformativos()
Dim Altas = 0
Dim Interbancarias = 0
Dim Bancomer = 0
Dim Movimientos = 0
Dim Importe = 0.0
For Each dr As DataRow In DTPendientes.Rows
If dr("EstatusCtaDeposito").ToString <> "True" Then
Continue For
End If
If dr("CveCuentaDeposito").ToString <> "" And dr("EstatusPagoElectronicoGrupos").ToString <> "True" And dr("AltaCuenta").ToString = "1" Then
Altas += 1
If dr("BancoNombre").ToString.ToUpper.Contains("BANCOMER") OrElse dr("BancoNombre").ToString.ToUpper.Contains("BBVA") Then
Bancomer += 1
Else
Interbancarias += 1
End If
ElseIf dr("CveCuentaDeposito").ToString.ToEntero > 0 Then
Movimientos += 1
Importe += dr("Abonado").ToString.ToDouble
End If
Next
LnkNumeroAltas.Text = Altas.ToString
LbNumeroInterbancarias.Text = Interbancarias.ToString
LbNumeroBancomer.Text = Bancomer.ToString
LbNumeroMovimientos.Text = Movimientos.ToString
LbImporteMovimientos.Text = Importe.ToString.FormatoNumero
UpComandosGeneracion.Update()
End Sub
#End Region
#Region " DATOS GENERALES LAYOUT "
Private Sub InicializaDatosGenerales()
If UsuarioActual.CveEmpresa = 66 Then
CorreoNotificacionesEmpresa = "pagos@gluyasconstrucciones.com"
ElseIf UsuarioActual.CveEmpresa = 13 Then
CorreoNotificacionesEmpresa = "signotificaciones@adssistemas.mx"
Else
CorreoNotificacionesEmpresa = "signotificaciones@adssistemas.mx"
End If
End Sub
#End Region
#Region " GENERA Y DESCARGA ARCHIVO (TXT) "
Protected Sub CrearTXT()
Dim path As String = Server.MapPath(String.Format("~/Empresas/{0}/Layout/{1}.txt", UsuarioActual.CveEmpresa, NombreArchivo))
' Create or overwrite the file.
Dim fs As FileStream = File.Create(path)
' Add text to the file.
Dim info As Byte() = New UTF8Encoding(True).GetBytes(TextoCompleto)
fs.Write(info, 0, info.Length)
fs.Close()
End Sub
Private Sub DescargarArchivo()
With HttpContext.Current.Response
.Clear()
.Buffer = True
.ContentType = "textplain"
.AddHeader("Content-Disposition", String.Format("attachment;filename={0}{1}.txt", NombreArchivo, Date.Now.ToString("ddMMyyyy")))
.Charset = "UTF-8"
.ContentEncoding = Encoding.Default
.Write(TextoCompleto)
.Flush()
.End()
End With
End Sub
Private Sub DescargaZip()
Dim path As String = Server.MapPath(String.Format("~/Empresas/{0}/Layout/", UsuarioActual.CveEmpresa))
Response.Clear()
Dim ElZip As ZipFile = New ZipFile()
Using ElZip
ElZip.AddDirectory(path)
ElZip.Save(Response.OutputStream)
End Using
Response.AddHeader("Content-Disposition", "attachment; filename=LayoutPagos.zip")
Response.ContentType = "application/zip"
Response.End()
End Sub
Private Function CreaArchivo(Tipo As Integer, Optional MismoBanco As Boolean = True) As Boolean
System.Threading.Thread.Sleep(1000) 'Un segundo de diferencia Para doferentes tipos de bancos
DirectoryExistsCreate(String.Format("{0}Layout", UsuarioActual.Empresa.Ruta))
NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm-ss"), If(Tipo = 1, "LAYOUTPAGO", "LAYOUTALTA"))
If Tipo = 1 Then
NombreArchivo = String.Format("{2}{1}{0}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm-ss"), "LAYOUTPAGO")
Else
NombreArchivo = String.Format("{2}{1}{0}{3}.txt", UsuarioActual.CveUsuario, Date.Now.ToString("yyyyMMdd-HH-mm-ss"), "LAYOUTALTA", If(MismoBanco, "BANCOMER", "INTERBANCARIO"))
End If
Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
Dim fs As FileStream = File.Create(path)
' Add text to the file.
Dim info As Byte() = New UTF8Encoding(True).GetBytes(TextoCompleto)
fs.Write(info, 0, info.Length)
fs.Close()
Return True
End Function
'Private Function GuardaTXT() As Boolean
' Dim Retorno = True
' Try
' Dim Ruta = ""
' Dim FileName As String = Path.GetFileName(FUTxt.PostedFile.FileName)
' NombreArchivo = FileName
' Dim Extension As String = Path.GetExtension(FUTxt.PostedFile.FileName)
' Dim FolderPath As String = String.Format("{0}Empresas\", Request.ApplicationPath)
' Dim FilePath As String = Server.MapPath(FolderPath + FileName)
' FUTxt.SaveAs(FilePath)
' NombreArchivo = FilePath
' Catch ex As Exception
' Retorno = False
' End Try
' Return Retorno
'End Function
#End Region
#Region " TAB PRINCIPAL "
Protected Sub GvPendientes_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
'Colorea GV
If e.Row.DBCampo("RazonSocial").ToString = "" Then
e.Row.BackColor = Drawing.Color.WhiteSmoke
Else
If e.Row.DBCampo("EstatusPagoElectronicoGrupos").ToString <> "True" Then
e.Row.BackColor = Drawing.Color.LightSalmon
e.Row.ToolTip = "Cuenta Deposito aun sin dar de Alta."
End If
If e.Row.DBCampo("CveProveedor").ToString.ToEntero > 0 Then
e.Row.FCHyperLink("HLProveedor").NavigateUrl = String.Format("/Compras/Proveedores.aspx?CveProveedor={0}", e.Row.DBCampo("CveProveedor"))
Else
e.Row.FCHyperLink("HLProveedor").NavigateUrl = String.Format("/RH/Personal.aspx?CvePersonal={0}", e.Row.DBCampo("CvePersonal"))
End If
End If
If Not e.Row.DBCampo("CveCuentaDeposito").ToString.ToEntero > 0 Then
e.Row.Cells(0).BackColor = Drawing.Color.Red
e.Row.ToolTip = "Sin Cuenta Deposito asignada"
End If
If e.Row.DBCampo("EstatusCtaDeposito").ToString = "False" Then
e.Row.Cells(0).BackColor = Drawing.Color.Red
e.Row.ToolTip = "Cuenta Deposito INACTIVA"
End If
e.Row.FCHyperLink("HLImporte").NavigateUrl = String.Format("IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
End If
End Sub
Protected Sub GvEnviadas_RowDataBound(sender As Object, e As GridViewRowEventArgs)
If e.Row.RowType = DataControlRowType.DataRow Then
'Colorea GV
If e.Row.DBCampo("CveIE").ToString = "" Then
e.Row.BackColor = Drawing.Color.LightGray
'Si la fecha de generacion del archivo es diferente de hoy activamos el boton REGENERAR
'If e.Row.DBCampo("Fecha").ToDate.ToShortDateString <> Date.Now.ToShortDateString Then
' e.Row.FCLinkButton("LBRegenerar").Visible = True
'End If
If DTEnviadas.MAX("FueConciliado", String.Format("CveLayoutEnvio = {0}", e.Row.DBCampo("CveLayoutEnvio"))).ToEntero > 0 Then
e.Row.ToolTip = "El movimiento no se puede regenerar ya que alguno de sus movimientos ya fue conciliado"
Else
e.Row.FCLinkButton("LBRegenerar").Visible = True
End If
Else
If e.Row.DBCampo("FueConciliado") = "1" Then
e.Row.ForeColor = Drawing.Color.Red
e.Row.ToolTip = "Este movimiento ya fue conciliado."
End If
If e.Row.DBCampo("CveProveedor").ToString.ToEntero > 0 Then
e.Row.FCHyperLink("HLProveedor").NavigateUrl = String.Format("/Compras/Proveedores.aspx?CveProveedor={0}", e.Row.DBCampo("CveProveedor"))
Else
e.Row.FCHyperLink("HLProveedor").NavigateUrl = String.Format("/RH/Personal.aspx?CvePersonal={0}", e.Row.DBCampo("CvePersonal"))
End If
e.Row.FCHyperLink("HLDetalle").NavigateUrl = String.Format("IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
End If
End If
End Sub
Protected Sub LBRegenerar_Click(sender As Object, e As EventArgs)
Dim CveBLE = CType(sender, LinkButton).CommandArgument.ToEntero
Dim DtRegenerar As New DataTable
Dim ObjBancos As New ClsBancos
If ObjBancos.GetLayoutPagos(CveCuenta, CveBLE, "-1", PorGrupos:=True) Then
DtRegenerar = ObjBancos.DtResultados
Else
DtRegenerar = Nothing
End If
ObjBancos.Dispose()
If DtRegenerar IsNot Nothing Then
GeneraPago(DtRegenerar, False)
Else
Alert("Ocurrió un error al obtener los datos para generar el archivo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
End If
End Sub
#End Region
'RECARGA DATOS
#Region " RECARGA DATOS "
Private Sub RecargaDatos()
CargaDatos()
TipoMasiva = 1
DdlTipoCargaMasiva.SelectedValueExist("1")
CargaProveedores()
End Sub
#End Region
'ARMA Y GENERA TXT'S
#Region "ALTA PROVEEDORES"
Protected Sub BtnAltas_Click(sender As Object, e As EventArgs)
If Not DdlCuenta.SelectedValue.ToEntero > 0 Then
Alert("Primero debe seleccionar una Cuenta", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
AltaProveedores()
End Sub
Private Sub AltaProveedores(Optional DtCuentasPendientesTemp As DataTable = Nothing)
NombreArchivo = ""
Dim RegistrosAltaBancomer As New StringBuilder
Dim RegistrosAltaInterbancario As New StringBuilder
Dim SBErrores As New StringBuilder
Dim NombreArchivoBancomer As String = ""
Dim NombreArchivoInterbancario As String = ""
Dim CeroRelleno As Char = "0"c
Dim EspacioRelleno As Char = Chr(32)
Dim ErrorLayout = False
If DtCuentasPendientesTemp Is Nothing Then
DtCuentasPendientesTemp = DTPendientes.Copy
End If
DtCuentasPendientesTemp.CaseSensitive = False
Dim DtCuentasPendientesBancomer As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre like '%BBVA%' OR BancoNombre like '%BANCOMER%' ) ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias"})
Dim DtCuentasPendientesInterbancarias As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre not like '%BBVA%' AND BancoNombre not like '%BANCOMER%' ) ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias"})
'Dim ObjGrales As New ClsGenerales
If DtCuentasPendientesBancomer.Rows.Count > 0 Then
For Each dRow As DataRow In DtCuentasPendientesBancomer.Rows
Dim SBTmpBancomer As New StringBuilder
Dim SBErroresBancomer As New StringBuilder
Dim ErrorLineaBancomer As Boolean = False
SBErroresBancomer.Append($"{dRow("RazonSocial").ToString } ")
SBErroresBancomer.Append($"Cuenta: {dRow("Cuenta").ToString } ")
If dRow("CLABEDestino").ToString.Length <= 18 Then 'Tamaño maximo 18
SBTmpBancomer.Append(dRow("CLABEDestino").ToString.PadLeft(18, CeroRelleno))
Else
SBErroresBancomer.Append("La cuenta beneficiaria no puede ser mayor a 18 caracteres, ")
ErrorLineaBancomer = True
End If
If dRow("Abreviatura").ToString.Length = 3 Then
SBTmpBancomer.Append(dRow("Abreviatura"))
Else
SBErroresBancomer.Append("El tamaño de la divisa es incorrecto, ")
ErrorLineaBancomer = True
End If
SBTmpBancomer.Append("0999999999999.99")
If dRow("RazonSocial").ToString.Trim.Length < 31 Then 'Tamaño maximo 30
SBTmpBancomer.Append(dRow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
Else
SBTmpBancomer.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30))
End If
'ALIAS DE LA CUENTA PENDIENTE TAMAÑO MAXIMO 30
SBTmpBancomer.Append(dRow("BBVAAlias").ToString.PadRight(30, EspacioRelleno))
'CORREO OPCIONAL TAMAÑO MAXIMO 80
'RegistrosAlta.Append("".ToString.PadLeft(80, EspacioRelleno))
SBTmpBancomer.Append(vbCrLf)
If Not ErrorLineaBancomer Then
RegistrosAltaBancomer.Append(SBTmpBancomer.ToString)
' ObjGrales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(dRow("CveCuentaDeposito").ToString.ToEntero, True)
Else
SBErroresBancomer.Append("
")
SBErrores.AppendLine(SBErroresBancomer.ToString)
End If
Next
TextoCompleto = RegistrosAltaBancomer.ToString
If CreaArchivo(2, True) Then
NombreArchivoBancomer = NombreArchivo
End If
End If
If DtCuentasPendientesInterbancarias.Rows.Count > 0 Then
For Each dRow As DataRow In DtCuentasPendientesInterbancarias.Rows
Dim SBTmpInterbancarias As New StringBuilder
Dim SBErroresInterBancario As New StringBuilder
Dim ErrorLineaInterbancaria As Boolean = False
SBErroresInterBancario.Append($"{dRow("RazonSocial").ToString } ")
SBErroresInterBancario.Append($"Cuenta: {dRow("Cuenta").ToString } ")
If dRow("CveBanco").ToString.Trim.Length = 3 Then
SBTmpInterbancarias.Append(dRow("CveBanco").ToString.Trim)
Else
SBErroresInterBancario.Append("clave ABM(Clave SAT) incorrecta, ")
ErrorLineaInterbancaria = True
End If
If dRow("CLABEDestino").ToString.Length <= 18 Then 'Tamaño maximo 18
SBTmpInterbancarias.Append(dRow("CLABEDestino").ToString.PadLeft(18, CeroRelleno))
Else
SBErroresInterBancario.Append("La cuenta beneficiaria no puede ser mayor a 18 caracteres, ")
ErrorLineaInterbancaria = True
End If
If dRow("Abreviatura").ToString.Length = 3 Then
SBTmpInterbancarias.Append(dRow("Abreviatura").ToString.Trim)
Else
SBErroresInterBancario.Append("El tamaño de la divisa es incorrecto, ")
ErrorLineaInterbancaria = True
End If
SBTmpInterbancarias.Append("0999999999999.99")
If dRow("RazonSocial").ToString.Trim.Length < 31 Then 'Tamaño maximo 30
SBTmpInterbancarias.Append(dRow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
Else
SBTmpInterbancarias.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30))
End If
' ALIAS DE LA CUENTA PENDIENTE TAMAÑO MAXIMO 30
SBTmpInterbancarias.Append(dRow("BBVAAlias").ToString.PadRight(30, EspacioRelleno))
'CORREO OPCIONAL TAMAÑO MAXIMO 80
'RegistrosAlta.Append("".ToString.PadLeft(80, EspacioRelleno))
'Tipo de cuenta
SBTmpInterbancarias.Append("40")
SBTmpInterbancarias.Append(vbCrLf)
If Not ErrorLineaInterbancaria Then
RegistrosAltaInterbancario.Append(SBTmpInterbancarias.ToString)
' ObjGrales.UpdateCuentasDepositosEstatusPagoElectronicoGrupos(dRow("CveCuentaDeposito").ToString.ToEntero, True)
Else
SBErroresInterBancario.Append("
")
SBErrores.AppendLine(SBErroresInterBancario.ToString)
End If
Next
If RegistrosAltaInterbancario.Length > 0 Then
TextoCompleto = RegistrosAltaInterbancario.ToString
If CreaArchivo(2, False) Then
NombreArchivoInterbancario = NombreArchivo
End If
End If
End If
' ObjGrales.Dispose()
Dim Mensaje As New StringBuilder
Mensaje.Append("Descarga Layouts
")
If NombreArchivoBancomer.Trim.Length > 0 Then
Mensaje.Append($"Cuentas Bancomer Descarga Archivo cuentas Bancomer
")
End If
If NombreArchivoInterbancario.Trim.Length > 0 Then
Mensaje.Append($"Cuentas Interbancarias Descarga Archivo cuentas Bancomer
")
End If
If SBErrores.ToString.Length > 0 Then
Mensaje.Append("Errores Cuentas
")
Mensaje.Append("
| # | Proveedor | Banco | Tipo Cuenta | Cuenta | Estatus |
| {0} | {1}|||||
| {0} | {1} | {2} | {3} | {4} | {5} |
| Concepto | Pesos (MXP) | Dolares (USD) |
| Total registros rechazados: | {0} | {1} |
| Total Importe rechazado: $: | {0}.{1} | {2}.{3} |
| Total registros aceptados: | {0} | {1} |
| Total Importe aceptado $: | {0}.{1} | {2}.{3} |
| # | Proveedor | Importe($) | Moneda | Estatus | |
| {0} | {1}
| Personal | Cuenta | Error |
| {0} | {1} | CLABE ES OBLIGATORIA |
| {0} | {1} | NUMERO DE CUENTA CON FORMATO INCORRECTO |
| {0} | {1} | CLABE CON FORMATO INCORRECTO |
| {0} | {1} | CIE CON FORMATO INCORRECTO |
| {0} | {1} | CUENTA BANCOMER SIN CUENTA O CIE |
| ") strBody.AppendFormat(" ") strBody.AppendFormat(" | ") strBody.AppendFormat("
")
'strBody.Append(" De: Bancomer.com [mailto:alertatdu@serviciobancomer.com]
")
strBody.Append("
", UrlSitio)
strBody.Append(" ")
strBody.Append("
")
strBody.AppendFormat(" 
")
strBody.Append("
")
strBody.Append(" Confirmación de pago realizado bajo las siguientes condiciones:
| ") strBody.Append(" | ") strBody.Append("") strBody.Append(" | ") strBody.Append("
| ")
strBody.Append(" ")
strBody.Append(" NOMBRE DEL CLIENTE: | ")
strBody.Append(" ")
strBody.Append(" ")
strBody.AppendFormat(" {0} | ")
strBody.Append("
| ")
strBody.Append(" ")
strBody.Append(" NÚMERO DE CONVENIO: | ")
strBody.Append(" ")
strBody.Append(" ")
strBody.AppendFormat(" {0} | ")
strBody.Append("
| ")
strBody.Append(" ")
strBody.Append(" CLAVE DEL PROVEEDOR: | ")
strBody.Append(" ")
strBody.Append(" ")
strBody.AppendFormat(" {0} | ")
strBody.Append("
| ")
strBody.Append(" ")
strBody.Append(" NOMBRE DEL PROVEEDOR/TERCERO: | ")
strBody.Append(" ")
strBody.Append(" ")
strBody.AppendFormat(" {0} | ")
strBody.Append("
| ")
strBody.Append(" ")
strBody.Append(" REFERENCIA DEL PAGO: | ")
strBody.Append(" ")
strBody.Append(" ")
strBody.AppendFormat(" {0} | ")
strBody.Append("
| ")
strBody.Append(" ")
strBody.Append(" TIPO DE PAGO: | ")
strBody.Append(" ")
strBody.Append(" ")
strBody.AppendFormat(" {0} | ")
strBody.Append("
| ")
strBody.Append(" ")
strBody.Append(" CUENTA DE ABONO: | ")
strBody.Append(" ")
strBody.Append(" ")
strBody.AppendFormat(" {0} | ")
strBody.Append("
| ")
strBody.Append(" ")
strBody.Append(" IMPORTE DEL PAGO: | ")
strBody.Append(" ")
strBody.Append(" ")
strBody.AppendFormat(" ${0} | ")
strBody.Append("
| ")
strBody.Append(" ")
strBody.Append(" FECHA DE OPERACIÓN | ")
strBody.Append(" ")
strBody.Append(" ")
strBody.AppendFormat(" {0} | ")
strBody.Append("
| ")
strBody.Append(" ")
strBody.Append(" MENSAJE ADICIONAL: | ")
strBody.Append(" ")
strBody.Append(" ")
strBody.AppendFormat(" {0} | ")
strBody.Append("
", UrlSitio)
strBody.Append(" ")
strBody.Append("
")
strBody.Append("
")
strBody.Append("
")
strBody.Append("
")
strBody.Append("
| Factura ") strBody.Append(" | Fecha ") strBody.Append(" | Original ") strBody.Append(" | Abonado ") strBody.Append(" | Nota Crédito ") strBody.Append(" | Saldo ") strBody.Append(" |
|---|---|---|---|---|---|
| {Dr2("SerieFolio")} | ") strBody.Append($"{Dr2("FechaCompra").ToString.ToDate.ToShortDateString} | ") strBody.Append($"{Dr2("Total").ToString.ToDouble.FormatoNumero} | ") strBody.Append($"{Dr2("Importe").ToString.ToDouble.FormatoNumero} | ") strBody.Append($"{Dr2("ImporteNC").ToString.ToDouble.FormatoNumero} | ") strBody.Append($"{Dr2("Saldo").ToString.ToDouble.FormatoNumero} | ") strBody.Append("