diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb
index 03d47a895..754e99d4a 100644
--- a/App_Code/ClsBancos.vb
+++ b/App_Code/ClsBancos.vb
@@ -3122,6 +3122,13 @@ Public Class ClsBancos
Try
SqlAdapter.Fill(Data)
Retorno = True
+
+ Catch Ex1 As SqlException
+ If Ex1.Message.Contains("Número: 2627;") Then
+ Alert("Ya existe un registro con el mismo Folio", TipoMensaje.MsgAdvertencia)
+ Else
+ Me.OnError("Ocurrió un error al guardar los cambios", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
+ End If
Catch ex As Exception
OnError("Ocurrió un error al actualizar El movimiento Bancario", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb
index dcb1ca78e..a2ff5ec74 100644
--- a/App_Code/ClsGenerales.vb
+++ b/App_Code/ClsGenerales.vb
@@ -1363,13 +1363,15 @@ Public Class ClsGenerales
End Try
Return Retorno
- End Function
+ End Function
#End Region
- ' IDisposable
-
+ ' IDisposable
+
#Region "G E N E R A L E S - C U E N T A S B A N C A R I A S "
- Public Function GetCuentasDepositos(Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCuentaDeposito As Integer = -1) As Boolean
+ Public Function GetCuentasDepositos(Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveCuentaDeposito As Integer = -1) As Boolean
+
Dim Retorno As Boolean = False
+
DataAdapter("PA_Gral_CuentasDepositosGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
@@ -1389,8 +1391,9 @@ Public Class ClsGenerales
Return Retorno
End Function
Public Function AddCuentasDepositos(BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String, RefCrediProveedor As String, CveUsuario As Integer, CveMoneda As Integer,
- Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
- Optional Correo As String = "", Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1) As Boolean
+ Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveColectiva As Integer = -1, Optional CveUsuarioModifico As Integer = -1,
+ Optional Correo As String = "", Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1,
+ Optional ConceptoCIE As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_CuentasDepositosAdd")
@@ -1417,6 +1420,7 @@ Public Class ClsGenerales
.Add("@EstatusPagoElectronico", SqlDbType.Bit).Value = EstatusPagoElectronico
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Bit).Value = EstatusPagoElectronicoGrupos
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
+ .Add("@ConceptoCIE", SqlDbType.VarChar).Value = ConceptoCIE
End With
@@ -1435,6 +1439,7 @@ Public Class ClsGenerales
Return Retorno
End Function
+
Public Function RemoveCuentasDepositos(CveCuentaDeposito As Integer, Optional CveUsuarioModifico As Integer = -1) As Boolean
Dim Retorno As Boolean = False
@@ -1461,7 +1466,8 @@ Public Class ClsGenerales
Public Function UpdateCuentasDepositos(CveCuentaDeposito As Integer, BancoNombre As String, Plaza As String, Sucursal As String, Cuenta As String, CLABE As String, CIE As String, SWIFT As String, Referencia As String,
RefCrediProveedor As String, Predeterminada As Boolean, Estatus As Boolean, CveMoneda As Integer, Optional CveUsuarioModifico As Integer = -1, Optional Correo As String = "",
- Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1) As Boolean
+ Optional BBVAAlias As String = "-1", Optional EstatusPagoElectronico As Boolean = False, Optional EstatusPagoElectronicoGrupos As Boolean = False, Optional CveSATBanco As Integer = -1,
+ Optional ConceptoCIE As String = "-1") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Gral_CuentasDepositosUpdate")
@@ -1487,6 +1493,7 @@ Public Class ClsGenerales
.Add("@EstatusPagoElectronico", SqlDbType.Bit).Value = EstatusPagoElectronico
.Add("@EstatusPagoElectronicoGrupos", SqlDbType.Bit).Value = EstatusPagoElectronicoGrupos
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
+ .Add("@ConceptoCIE", SqlDbType.VarChar).Value = ConceptoCIE
End With
@@ -1506,7 +1513,7 @@ Public Class ClsGenerales
Return Retorno
End Function
- Public Function UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito As Integer, EstatusPagoElectronicoGrupos As Boolean, CveSATBanco As Integer, BBVAAlias As String) As Boolean
+ Public Function UpdateCuentasDepositosEstatusPagoElectronicoGrupos(CveCuentaDeposito As Integer, EstatusPagoElectronicoGrupos As Integer, CveSATBanco As Integer, BBVAAlias As String, Referencia As String, ConceptoCIE As String) As Boolean
Dim Retorno As Boolean = False
@@ -1514,21 +1521,17 @@ Public Class ClsGenerales
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCuentaDeposito", SqlDbType.VarChar).Value = CveCuentaDeposito
- .Add("@EstatusPagoElectronicoGrupos", SqlDbType.Bit).Value = EstatusPagoElectronicoGrupos
+ .Add("@EstatusPagoElectronicoGrupos", SqlDbType.Int).Value = EstatusPagoElectronicoGrupos
.Add("@CveSATBanco", SqlDbType.Int).Value = CveSATBanco
.Add("@BBVAAlias", SqlDbType.VarChar).Value = BBVAAlias
+ .Add("@Referencia", SqlDbType.VarChar).Value = Referencia
+ .Add("@ConceptoCIE", SqlDbType.VarChar).Value = ConceptoCIE
End With
Try
SqlAdapter.Fill(Data)
- Retorno = True
- Catch Ex1 As SqlException
- If Ex1.Message.Contains("Número: 2627;") Then
- Alert("Ya existe un registro con el mismo nombre", TipoMensaje.MsgAdvertencia)
- Else
- Me.OnError("Ocurrió un error al guardar los cambios", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
- End If
+ Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al guardar los cambios.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index 9dea8b176..64cb331f8 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -573,6 +573,7 @@ Partial Class Bancos_IE
CveCredito = IfNull(Request("CveCredito"), "-1").ToString.ToEntero
CveCreditoDetalle = IfNull(Request("CveCreditoDetalle"), "-1").ToString.ToEntero
LtlTitulo.Text = "Pago de Créditos"
+ CveIE = -1
DVInteresMoratorio.Visible = True
@@ -4642,7 +4643,7 @@ Partial Class Bancos_IE
Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
- If DdlTipoTransaccion.SelectedValue = "9" And CveIE = Nothing Then
+ If DdlTipoTransaccion.SelectedValue = "9" And CveIE <= -1 Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
@@ -4653,7 +4654,7 @@ Partial Class Bancos_IE
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
End If
- ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE = Nothing Then
+ ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
If Dep.DtResultados.Rows.Count > 0 Then
@@ -4685,7 +4686,7 @@ Partial Class Bancos_IE
Else
- If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE = Nothing Then
+ If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE <= -1 Then
BtnGuardar.Enabled = False
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
diff --git a/Bancos/PagoElectronico.aspx.vb b/Bancos/PagoElectronico.aspx.vb
index 355150d54..a47729cf5 100644
--- a/Bancos/PagoElectronico.aspx.vb
+++ b/Bancos/PagoElectronico.aspx.vb
@@ -1979,7 +1979,7 @@ Partial Class Bancos_PagoElectronico
'Dim CveTipoTransaccion As Integer = Parametros(4).ToEntero
'Dim Estatus As Integer = If(CveTipoTransaccion = 2, 2, 1) ' cuando es transferencia, no lo pasa por entregar
- ' Mail.MandaCorreo(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
+ 'Mail.MandaCorreo(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body)
End Sub
diff --git a/Bancos/PagoElectronicoGrupos.aspx b/Bancos/PagoElectronicoGrupos.aspx
index a79a95981..89aae1006 100644
--- a/Bancos/PagoElectronicoGrupos.aspx
+++ b/Bancos/PagoElectronicoGrupos.aspx
@@ -732,7 +732,7 @@
-
+
@@ -855,19 +855,20 @@
Cuentas Interbancarias
+
+
Cuentas Convennios CIE
+
-
-
-
+
diff --git a/Bancos/PagoElectronicoGrupos.aspx.vb b/Bancos/PagoElectronicoGrupos.aspx.vb
index 8b8bbf24e..9013449c5 100644
--- a/Bancos/PagoElectronicoGrupos.aspx.vb
+++ b/Bancos/PagoElectronicoGrupos.aspx.vb
@@ -202,6 +202,16 @@ Partial Class Bancos_PagoElectronicoGrupos
End Set
End Property
+
+ Private Property NombreArchivoCIE As String
+ Get
+ Return ViewState("NombreArchivoCIE").ToString
+ End Get
+ Set(value As String)
+ ViewState("NombreArchivoCIE") = value
+ End Set
+ End Property
+
Property DTSATBancos As DataTable
Get
If ViewState("DTSATBancos") Is Nothing Then
@@ -260,7 +270,8 @@ Partial Class Bancos_PagoElectronicoGrupos
Property DTFoliosPrefijos As DataTable
Get
If ViewState("DTFoliosPrefijos") Is Nothing Then
- Return Crate_DTFoliosPrefijos()
+ Crate_DTFoliosPrefijos()
+ Return DirectCast(ViewState("DTFoliosPrefijos"), DataTable)
Else
Return DirectCast(ViewState("DTFoliosPrefijos"), DataTable)
End If
@@ -300,16 +311,18 @@ Partial Class Bancos_PagoElectronicoGrupos
End Sub
- Private Function Crate_DTFoliosPrefijos() As DataTable
+ Private Sub Crate_DTFoliosPrefijos()
Dim DTFolios As New DataTable
DTFolios.Columns.Add("CveIE", GetType(Integer))
DTFolios.Columns.Add("Folio", GetType(String))
DTFolios.AcceptChanges()
- Return DTFolios
+ ViewState("DTFoliosPrefijos") = DTFolios.Copy
- End Function
+
+
+ End Sub
#Region " C A R G A - D A T O S "
@@ -480,6 +493,13 @@ Partial Class Bancos_PagoElectronicoGrupos
End If
Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
+
+ If File.Exists(path) Then
+
+ File.Delete(path)
+
+ End If
+
Dim fs As FileStream = File.Create(path)
' Add text to the file.
@@ -690,9 +710,16 @@ Partial Class Bancos_PagoElectronicoGrupos
NombreArchivoBancomer = ""
NombreArchivoInterbancario = ""
+ NombreArchivoCIE = ""
+
+ DVDescargaCuentas1.Visible = False
+ DVDescargaCuentas2.Visible = False
+ DVDescargaCuentas3.Visible = False
+
NombreArchivo = ""
Dim RegistrosAltaBancomer As New StringBuilder
+ Dim RegistrosAltaBancomerCIE As New StringBuilder
Dim RegistrosAltaInterbancario As New StringBuilder
Dim SBErrores As New StringBuilder
@@ -711,12 +738,13 @@ Partial Class Bancos_PagoElectronicoGrupos
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 DtCuentasPendientesBancomer As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre like '%BBVA%' OR BancoNombre like '%BANCOMER%' AND CveBanco = '012' AND LEN(CIE) = 0) ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias", "CIE"})
+ Dim DtCuentasPendientesCIE As DataTable = DtCuentasPendientesTemp.FiltraParametros($" (EstatusPagoElectronicoGrupos IS NULL OR EstatusPagoElectronicoGrupos = False) AND (BancoNombre like '%BBVA%' OR BancoNombre like '%BANCOMER%' AND LEN(CIE) > 0 AND CveBanco = '012') ", "", {"CveCuentaDeposito", "BancoNombre", "CLABEDestino", "Abreviatura", "RazonSocial", "CveProveedor", "CveBanco", "Cuenta", "BBVAAlias", "CIE"})
+ 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", "CIE"})
- 'Dim ObjGrales As New ClsGenerales
+ 'Cuentas bancomer
If DtCuentasPendientesBancomer.Rows.Count > 0 Then
For Each dRow As DataRow In DtCuentasPendientesBancomer.Rows
@@ -775,10 +803,60 @@ Partial Class Bancos_PagoElectronicoGrupos
NombreArchivoBancomer = NombreArchivo
End If
-
End If
+ 'Cuentas bancomer CIE
+ If DtCuentasPendientesCIE.Rows.Count > 0 Then
+ For Each dRow As DataRow In DtCuentasPendientesCIE.Rows
+
+ Dim SBTmpBancomerCIE As New StringBuilder
+ Dim SBErroresBancomerCIE As New StringBuilder
+ Dim ErrorLineaBancomerCIE As Boolean = False
+
+ SBErroresBancomerCIE.Append($"{dRow("RazonSocial").ToString } ")
+ SBErroresBancomerCIE.Append($"Cuenta: {dRow("Cuenta").ToString } ")
+
+ SBTmpBancomerCIE.Append("CV")
+ SBTmpBancomerCIE.Append(dRow("CIE").ToString.PadLeft(18, CeroRelleno))
+
+ If dRow("Abreviatura").ToString.Length = 3 Then
+ SBTmpBancomerCIE.Append(dRow("Abreviatura"))
+ Else
+ SBErroresBancomerCIE.Append("El tamaño de la divisa es incorrecto, ")
+ ErrorLineaBancomerCIE = True
+ End If
+
+ SBTmpBancomerCIE.Append("0999999999999.99")
+
+ If dRow("RazonSocial").ToString.Trim.Length < 31 Then 'Tamaño maximo 30
+ SBTmpBancomerCIE.Append(dRow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
+ Else
+ SBTmpBancomerCIE.Append(dRow("RazonSocial").ToString.Trim.Substring(0, 30))
+ End If
+
+ 'ALIAS DE LA CUENTA PENDIENTE TAMAÑO MAXIMO 30
+ SBTmpBancomerCIE.Append(dRow("BBVAAlias").ToString.PadRight(30, EspacioRelleno))
+
+ SBTmpBancomerCIE.Append(vbCrLf)
+
+ If Not ErrorLineaBancomerCIE Then
+ RegistrosAltaBancomerCIE.Append(SBTmpBancomerCIE.ToString)
+ Else
+ SBErroresBancomerCIE.Append(" ")
+ SBErrores.AppendLine(SBErroresBancomerCIE.ToString)
+ End If
+
+ Next
+
+ TextoCompleto = RegistrosAltaBancomerCIE.ToString
+
+ If CreaArchivo(2, True) Then
+ NombreArchivoCIE = NombreArchivo
+ End If
+
+ End If
+
If DtCuentasPendientesInterbancarias.Rows.Count > 0 Then
@@ -867,17 +945,13 @@ Partial Class Bancos_PagoElectronicoGrupos
If NombreArchivoBancomer.Trim.Length > 0 Then
-
DVDescargaCuentas1.Visible = True
- ' Mensaje.Append($"Cuentas Bancomer Descarga Archivo cuentas Bancomer
")
-
End If
-
-
If NombreArchivoInterbancario.Trim.Length > 0 Then
DVDescargaCuentas2.Visible = True
- 'Mensaje.Append($"Cuentas Interbancarias Descarga Archivo cuentas Bancomer
")
-
+ End If
+ If NombreArchivoCIE.Trim.Length > 0 Then
+ DVDescargaCuentas3.Visible = True
End If
@@ -888,21 +962,18 @@ Partial Class Bancos_PagoElectronicoGrupos
Mensaje.Append("")
End If
- If NombreArchivoBancomer.Length > 0 Or NombreArchivoInterbancario.Length > 0 Then
-
+ If NombreArchivoBancomer.Length > 0 Or NombreArchivoInterbancario.Length > 0 Or NombreArchivoCIE.Length > 0 Then
LnkDescargaCuentas1.Text = NombreArchivoBancomer
LnkDescargaCuentas2.Text = NombreArchivoInterbancario
+ LnkDescargaCuentas3.Text = NombreArchivoCIE
+
RegistraScript("$('#ModalDescarga').modal({ backdrop: 'static', keyboard: false});")
-
UpModalDescarga.Update()
-
-
Else
Alert(Mensaje.ToString, TipoMensaje.MsgAdvertencia)
End If
-
CargaDatos()
End Sub
@@ -1068,6 +1139,7 @@ Partial Class Bancos_PagoElectronicoGrupos
'Alert("Hola")
End If
End Sub
+
Protected Sub FormarTexto(Registros As Integer)
'''''' LLENADO HEADER
Dim convenio As String = DTPendienteActual(0)("ConvenioPagoElectronico").ToString
@@ -1118,7 +1190,7 @@ Partial Class Bancos_PagoElectronicoGrupos
Dim RegistrosPago As New StringBuilder
Dim MENSAJEError As New StringBuilder
-
+ Dim EsCIE As Boolean = False
Dim CeroRelleno As Char = "0"c
Dim EspacioRelleno As Char = Chr(32)
Dim ErrorLayout = False
@@ -1132,40 +1204,53 @@ Partial Class Bancos_PagoElectronicoGrupos
MENSAJEError.AppendLine($"Error al generar pago ")
MENSAJEError.AppendLine($" Proveedor: {drow("RazonSocial").ToString} detalle: { drow("Observaciones").ToString} ")
+ 'CveBanco = '012'
+ If drow("CveBanco").ToString.Trim = "012" Then
+ If drow("CIE").ToString.Trim.Length > 0 Then 'cuenta bancomer Con convenio CIE
+ EsCIE = True
+ If drow("CIE").ToString.Trim.Length > 0 Then
+ RegistrosPago.Append("CIL")
+ Else
+ ErrorLayout = True
+ MENSAJEError.AppendLine("ERROR en tamaño de CIE")
+ End If
+ Else
+ RegistrosPago.Append("PTC") 'cuenta bancomer
+ End If
- If drow("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Or drow("BancoNombre").ToString.ToUpper.Contains("BBVA") Then
- RegistrosPago.Append("PTC")
Else
RegistrosPago.Append("PSC")
End If
- If drow("CLABEDestino").ToString.Trim.Length.Contiene(10, 18) Then
- RegistrosPago.Append(drow("CLABEDestino").ToString.PadLeft(18, CeroRelleno))
- Else
- ErrorLayout = True
- MENSAJEError.AppendLine("ERROR EN CLABE cuenta destino")
- Exit For
- End If
+ If EsCIE Then
+
+ If drow("ConceptoCIE").ToString.Length <= 30 Then
+ RegistrosPago.Append(drow("ConceptoCIE").ToString.PadRight(30, CeroRelleno))
+ Else
+ ErrorLayout = True
+ MENSAJEError.AppendLine("ERROR Tamaño de ConceptoCIE.")
+ Exit For
+ End If
- If drow("CLABEOrigen").ToString.Trim.Length.Contiene(10, 18) Then
+ If drow("CIE").ToString.Length < 5 Or drow("CIE").ToString.Length > 7 Then
+ ErrorLayout = True
+ MENSAJEError.AppendLine("ERROR Tamaño de CIE (rango 5-7).")
+ Exit For
+ Else
+ RegistrosPago.Append(drow("CIE").ToString.PadLeft(7, CeroRelleno))
+ End If
- RegistrosPago.Append(drow("CLABEOrigen").ToString.PadLeft(18, CeroRelleno))
+ If drow("CLABEOrigen").ToString.Trim.Length.Contiene(10, 18) Then
+ RegistrosPago.Append(drow("CLABEOrigen").ToString.PadLeft(18, CeroRelleno))
+ Else
+ ErrorLayout = True
+ MENSAJEError.AppendLine("ERROR EN CLABE cuenta origen")
+ Exit For
+ End If
- Else
- ErrorLayout = True
- MENSAJEError.AppendLine("ERROR EN CLABE cuenta origen")
- Exit For
- End If
-
-
-
- RegistrosPago.Append(drow("Abreviatura").ToString)
- RegistrosPago.Append(drow("Abonado").ToString.ToDecimal.ToString("0000000000000.00"))
-
-
- If drow("BancoNombre").ToString.ToUpper.Contains("BANCOMER") Or drow("BancoNombre").ToString.ToUpper.Contains("BBVA") Then
+ RegistrosPago.Append(drow("Abonado").ToString.ToDecimal.ToString("0000000000000.00"))
If drow("Observaciones").ToString.Trim.Length = 0 Then
@@ -1185,7 +1270,78 @@ Partial Class Bancos_PagoElectronicoGrupos
End If
- Else
+
+ If drow("Referencia").ToString.Trim.Length > 20 Then
+ RegistrosPago.Append(drow("Referencia").ToString.Substring(0, 20))
+ Else
+ RegistrosPago.Append(drow("Referencia").ToString.PadRight(20, EspacioRelleno))
+ End If
+
+
+ ElseIf drow("CveBanco").ToString.Trim = "012" And drow("CIE").ToString.Trim.Length = 0 Then
+
+ 'cuentas Inicio
+ If drow("CLABEDestino").ToString.Trim.Length.Contiene(10, 18) Then
+ RegistrosPago.Append(drow("CLABEDestino").ToString.PadLeft(18, CeroRelleno))
+ Else
+ ErrorLayout = True
+ MENSAJEError.AppendLine("ERROR EN CLABE cuenta destino")
+ Exit For
+ End If
+
+ If drow("CLABEOrigen").ToString.Trim.Length.Contiene(10, 18) Then
+ RegistrosPago.Append(drow("CLABEOrigen").ToString.PadLeft(18, CeroRelleno))
+ Else
+ ErrorLayout = True
+ MENSAJEError.AppendLine("ERROR EN CLABE cuenta origen")
+ Exit For
+ End If
+ 'cuentas Fin
+
+
+ RegistrosPago.Append(drow("Abreviatura").ToString)
+ RegistrosPago.Append(drow("Abonado").ToString.ToDecimal.ToString("0000000000000.00"))
+
+
+ If drow("Observaciones").ToString.Trim.Length = 0 Then
+
+ If drow("RazonSocial").ToString.Trim.Length > 30 Then
+ RegistrosPago.Append(drow("RazonSocial").ToString.Substring(0, 30))
+ Else
+ RegistrosPago.Append(drow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
+ End If
+ Else
+
+ If drow("Observaciones").ToString.Trim.Length > 30 Then
+ RegistrosPago.Append(drow("Observaciones").ToString.Substring(0, 30))
+ Else
+ RegistrosPago.Append(drow("Observaciones").ToString.PadRight(30, EspacioRelleno))
+ End If
+
+ End If
+
+ ElseIf drow("CveBanco").ToString <> "012" Then 'I N T E R B A N C A R I O
+
+ 'cuentas Inicio
+ If drow("CLABEDestino").ToString.Trim.Length.Contiene(10, 18) Then
+ RegistrosPago.Append(drow("CLABEDestino").ToString.PadLeft(18, CeroRelleno))
+ Else
+ ErrorLayout = True
+ MENSAJEError.AppendLine("ERROR EN CLABE cuenta destino")
+ Exit For
+ End If
+
+ If drow("CLABEOrigen").ToString.Trim.Length.Contiene(10, 18) Then
+ RegistrosPago.Append(drow("CLABEOrigen").ToString.PadLeft(18, CeroRelleno))
+ Else
+ ErrorLayout = True
+ MENSAJEError.AppendLine("ERROR EN CLABE cuenta origen")
+ Exit For
+ End If
+ 'cuentas Fin
+
+ RegistrosPago.Append(drow("Abreviatura").ToString)
+ RegistrosPago.Append(drow("Abonado").ToString.ToDecimal.ToString("0000000000000.00"))
If drow("RazonSocial").ToString.Length <= 30 Then
RegistrosPago.Append(drow("RazonSocial").ToString.PadRight(30, EspacioRelleno))
@@ -1217,8 +1373,14 @@ Partial Class Bancos_PagoElectronicoGrupos
RegistrosPago.Append("H")
+ Else
+ ErrorLayout = True
+ MENSAJEError.AppendLine("Parametros incorrecots")
+ Exit For
End If
+
+
If ErrorLayout Then
Alert(MENSAJEError.ToString(), TipoMensaje.MsgAdvertencia)
Exit For
@@ -1300,6 +1462,7 @@ Partial Class Bancos_PagoElectronicoGrupos
DVDescargaPagos.Visible = True
DVDescargaCuentas1.Visible = False
DVDescargaCuentas2.Visible = False
+ DVDescargaCuentas3.Visible = False
DVDescargaReporte.Visible = True
DT_PagosReporte = DTPendientesTemp.Copy
@@ -1934,7 +2097,7 @@ Partial Class Bancos_PagoElectronicoGrupos
If ObjBancos.GetLayoutProveedores(DdlCuenta.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, PorGrupos:=True) Then
DTProveedores = ObjBancos.DtResultados.FiltraParametros("LEN(RFC) IN (12,13)")
Else
- DTProveedores = Nothing
+ DTProveedores = New DataTable
End If
ObjBancos.Dispose()
@@ -2052,20 +2215,20 @@ Partial Class Bancos_PagoElectronicoGrupos
strBody.AppendFormat("