Layout Scotia correciones cambios de cuenta validacion
This commit is contained in:
@@ -1553,6 +1553,9 @@ Partial Class Bancos_IE
|
|||||||
If trIEDevolucion.Visible And RBL.SelectedValue <> "C" Then
|
If trIEDevolucion.Visible And RBL.SelectedValue <> "C" Then
|
||||||
CargaIEDevoluciones()
|
CargaIEDevoluciones()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
CargaCuentasDepositos()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -4084,8 +4087,13 @@ Partial Class Bancos_IE
|
|||||||
#Region " CUENTAS DEPOSITOS "
|
#Region " CUENTAS DEPOSITOS "
|
||||||
'Si la cuenta no esta activa, no la muestra.
|
'Si la cuenta no esta activa, no la muestra.
|
||||||
Private Sub CargaCuentasDepositos()
|
Private Sub CargaCuentasDepositos()
|
||||||
DdlCuentaDeposito.Items.Clear()
|
'¿DdlCuentaDeposito.Items.Clear()
|
||||||
'If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
|
'If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
|
||||||
|
|
||||||
|
DdlCuentaDeposito.ClearSelection()
|
||||||
|
DdlCuentaDeposito.SelectedValue = Nothing
|
||||||
|
DdlCuentaDeposito.Items.Clear()
|
||||||
|
|
||||||
trCuentaDeposito.Visible = False
|
trCuentaDeposito.Visible = False
|
||||||
|
|
||||||
Dim dtc As DataTable = Nothing
|
Dim dtc As DataTable = Nothing
|
||||||
@@ -4099,73 +4107,165 @@ Partial Class Bancos_IE
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
' If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
|
Dim OpBanco As Integer = 1
|
||||||
If dtc IsNot Nothing Then
|
Dim CuentaBanco As String = DdlCuenta.SelectedItem.Text.ToUpper
|
||||||
|
|
||||||
If DdlTipoTransaccion.SelectedValue = "9" And CveIE <= -1 Then
|
|
||||||
|
|
||||||
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
|
||||||
|
|
||||||
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
|
||||||
trCuentaDeposito.Visible = True
|
|
||||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
|
||||||
Else
|
|
||||||
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
|
||||||
End If
|
|
||||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
|
||||||
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
|
|
||||||
|
|
||||||
If dtc.Rows.Count > 0 Then
|
|
||||||
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
|
|
||||||
trCuentaDeposito.Visible = True
|
|
||||||
BtnGuardar.ToolTip = ""
|
|
||||||
Else
|
|
||||||
BtnGuardar.Enabled = False
|
|
||||||
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
|
||||||
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
|
||||||
|
|
||||||
End If
|
|
||||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
|
||||||
UpGuardar.Update()
|
|
||||||
|
|
||||||
Else
|
|
||||||
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
|
|
||||||
If dtc.Rows.Count > 0 Then
|
|
||||||
trCuentaDeposito.Visible = True
|
|
||||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
|
||||||
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
|
||||||
|
|
||||||
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE <= -1 Then
|
|
||||||
|
|
||||||
BtnGuardar.Enabled = False
|
|
||||||
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
|
||||||
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
|
||||||
Else
|
|
||||||
trCuentaDeposito.Visible = True
|
|
||||||
BtnGuardar.Enabled = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
UpGuardar.Update()
|
|
||||||
|
|
||||||
|
If CuentaBanco.Contains("BBVA") Or CuentaBanco.Contains("BANCOMER") Then
|
||||||
|
OpBanco = 1
|
||||||
|
'ElseIf CuentaBanco.Contains("BAJIO") Then
|
||||||
|
' OpBanco = 2
|
||||||
|
ElseIf CuentaBanco.Contains("SCOTIA") Then
|
||||||
|
OpBanco = 3
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If DdlCuenta.SelectedValue = "-1" Then
|
||||||
|
BtnGuardar.Enabled = False
|
||||||
|
trCuentaDeposito.Visible = False
|
||||||
|
DdlCuentaDeposito.Items.Clear()
|
||||||
|
'UpnCuentasPago.Update()
|
||||||
|
UpCuentaDeposito.Update()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'' If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
|
||||||
|
'If dtc IsNot Nothing Then
|
||||||
|
|
||||||
|
' If DdlTipoTransaccion.SelectedValue = "9" And CveIE <= -1 Then
|
||||||
|
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||||
|
|
||||||
|
' If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' Else
|
||||||
|
' Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
||||||
|
' End If
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
|
||||||
|
|
||||||
|
' If dtc.Rows.Count > 0 Then
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' BtnGuardar.ToolTip = ""
|
||||||
|
' Else
|
||||||
|
' BtnGuardar.Enabled = False
|
||||||
|
' Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
' BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
|
|
||||||
|
' End If
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' UpGuardar.Update()
|
||||||
|
|
||||||
|
' Else
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
|
||||||
|
' If dtc.Rows.Count > 0 Then
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
|
'Else
|
||||||
|
|
||||||
|
' If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE <= -1 Then
|
||||||
|
|
||||||
|
' BtnGuardar.Enabled = False
|
||||||
|
' Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
' BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
|
' Else
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' BtnGuardar.Enabled = True
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' UpGuardar.Update()
|
||||||
|
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
'If DdlTipoTransaccion.SelectedValue = "9" AndAlso DdlCuentaDeposito.Items.Count = 0 Then
|
'If DdlTipoTransaccion.SelectedValue = "9" AndAlso DdlCuentaDeposito.Items.Count = 0 Then
|
||||||
' BtnIEGuardar.Enabled = False
|
' BtnIEGuardar.Enabled = False
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
'GVCuentasPago.DataBind()
|
'GVCuentasPago.DataBind()
|
||||||
DdlCuentaDeposito.DataBind()
|
'DdlCuentaDeposito.DataBind()
|
||||||
|
|
||||||
'Else
|
'Else
|
||||||
' trCuentaDeposito.Visible = False
|
' trCuentaDeposito.Visible = False
|
||||||
' DdlCuentaDeposito.Items.Clear()
|
' DdlCuentaDeposito.Items.Clear()
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
|
If dtc IsNot Nothing Then
|
||||||
|
|
||||||
|
If DdlTipoTransaccion.SelectedValue = "9" Then
|
||||||
|
|
||||||
|
If OpBanco = 1 Then
|
||||||
|
If dtc.Rows.Count > 0 Then
|
||||||
|
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||||
|
DdlCuentaDeposito.DataBind()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
trCuentaDeposito.Visible = True
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
Else
|
||||||
|
BtnGuardar.Enabled = False
|
||||||
|
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 OpBanco = 3 Then
|
||||||
|
If dtc.Rows.Count > 0 Then
|
||||||
|
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'")
|
||||||
|
DdlCuentaDeposito.DataBind()
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
trCuentaDeposito.Visible = True
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
Else
|
||||||
|
BtnGuardar.Enabled = False
|
||||||
|
Alert("El Beneficiario no tiene una cuenta activa en Scotiabank, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
|
||||||
|
|
||||||
|
If OpBanco = 1 Then
|
||||||
|
If dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'")
|
||||||
|
DdlCuentaDeposito.DataBind()
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
trCuentaDeposito.Visible = True
|
||||||
|
BtnGuardar.ToolTip = ""
|
||||||
|
Else
|
||||||
|
BtnGuardar.Enabled = False
|
||||||
|
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
|
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
BtnGuardar.Enabled = False
|
||||||
|
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito para layout grupos"
|
||||||
|
Alert("El proveedor no tiene cuentas deposito para layout grupos.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Else
|
||||||
|
'Respuesta = True
|
||||||
|
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
|
||||||
|
DdlCuentaDeposito.DataBind()
|
||||||
|
|
||||||
|
If dtc.Rows.Count > 0 Then
|
||||||
|
trCuentaDeposito.Visible = True
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
End If
|
||||||
|
BtnGuardar.Enabled = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpGuardar.Update()
|
||||||
UpCuentaDeposito.Update()
|
UpCuentaDeposito.Update()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -1044,35 +1044,35 @@ Partial Class Bancos_PagoElectronico
|
|||||||
Dim NombreArchivo As String = $"pagos_{NowADS.ToString("ddMMyyyy")}_001.txt"
|
Dim NombreArchivo As String = $"pagos_{NowADS.ToString("ddMMyyyy")}_001.txt"
|
||||||
'"pagos_03062025_001.txt"
|
'"pagos_03062025_001.txt"
|
||||||
|
|
||||||
'If InsertaEnDB Then
|
If InsertaEnDB Then
|
||||||
|
|
||||||
' Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
' ObjBancos.IniciaTransacSQL()
|
ObjBancos.IniciaTransacSQL()
|
||||||
|
|
||||||
' Dim CveLayoutEnvio As Integer = ObjBancos.AddLayoutEnvios(NombreArchivo, NowADS(), CveCuenta, PorGrupos:=True)
|
Dim CveLayoutEnvio As Integer = ObjBancos.AddLayoutEnvios(NombreArchivo, NowADS(), CveCuenta, PorGrupos:=True)
|
||||||
|
|
||||||
' If CveLayoutEnvio > 0 Then
|
If CveLayoutEnvio > 0 Then
|
||||||
' For Each dr As DataRow In DTPendientes.Rows
|
For Each dr As DataRow In DTPendientes.Rows
|
||||||
' If dr("CveProveedor").ToString <> "" Or dr("CvePersonal").ToString <> "" Then
|
If dr("CveProveedor").ToString <> "" Or dr("CvePersonal").ToString <> "" Then
|
||||||
' If Not ObjBancos.AddLayoutEnviosDetalle(CveLayoutEnvio, dr("CveIE").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero, 1, "Observaciones") Then
|
If Not ObjBancos.AddLayoutEnviosDetalle(CveLayoutEnvio, dr("CveIE").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero, 1, "Observaciones") Then
|
||||||
' ErrorLayout = True
|
ErrorLayout = True
|
||||||
' Exit For
|
Exit For
|
||||||
' End If
|
End If
|
||||||
' End If
|
End If
|
||||||
' Next
|
Next
|
||||||
' Else
|
Else
|
||||||
' ErrorLayout = True
|
ErrorLayout = True
|
||||||
' End If
|
End If
|
||||||
|
|
||||||
' If ErrorLayout Then
|
If ErrorLayout Then
|
||||||
' ObjBancos.RollBack()
|
ObjBancos.RollBack()
|
||||||
' ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
' Else
|
Else
|
||||||
' ObjBancos.Commit()
|
ObjBancos.Commit()
|
||||||
' ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
' End If
|
End If
|
||||||
|
|
||||||
'End If
|
End If
|
||||||
|
|
||||||
Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
||||||
Dim pathDirectorio As String = String.Format("{0}Layout\", UsuarioActual.Empresa.Ruta)
|
Dim pathDirectorio As String = String.Format("{0}Layout\", UsuarioActual.Empresa.Ruta)
|
||||||
@@ -1499,11 +1499,23 @@ Partial Class Bancos_PagoElectronico
|
|||||||
End If
|
End If
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
|
|
||||||
If DtRegenerar IsNot Nothing Then
|
If OpBancos = 1 Then
|
||||||
GeneraPago(DtRegenerar, CveBLE)
|
If DtRegenerar IsNot Nothing Then
|
||||||
Else
|
GeneraPago(DtRegenerar, CveBLE)
|
||||||
Alert("Ocurrió un error al obtener los datos para generar el archivo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
Else
|
||||||
|
Alert("Ocurrió un error al obtener los datos para generar el archivo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If OpBancos = 3 Then
|
||||||
|
If DtRegenerar IsNot Nothing Then
|
||||||
|
GeneraPagoScotiaBank(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 If
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -1900,8 +1912,9 @@ Partial Class Bancos_PagoElectronico
|
|||||||
ElseIf OpBancos = 2 Then
|
ElseIf OpBancos = 2 Then
|
||||||
|
|
||||||
ElseIf OpBancos = 3 Then
|
ElseIf OpBancos = 3 Then
|
||||||
If DTPendientes.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND EstatusCtaDeposito = 'True'") IsNot Nothing Then
|
If DTPendientes.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND EstatusCtaDeposito = 'True'") IsNot Nothing AndAlso
|
||||||
GeneraPagoScotiaBank(DTPendientes.FiltraParametros("EstatusPagoElectronico > 0 AND EstatusCtaDeposito > 0"), False)
|
DTPendientes.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND EstatusCtaDeposito = 'True'").Rows.Count > 0 Then
|
||||||
|
GeneraPagoScotiaBank(DTPendientes.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND EstatusCtaDeposito = 'True'"), True)
|
||||||
Else
|
Else
|
||||||
Alert("No hay registros para generar pagos en ScotiaBank", TipoMensaje.MsgAdvertencia)
|
Alert("No hay registros para generar pagos en ScotiaBank", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
@@ -2370,6 +2383,8 @@ Partial Class Bancos_PagoElectronico
|
|||||||
|
|
||||||
If OpBancos = 3 Then
|
If OpBancos = 3 Then
|
||||||
|
|
||||||
|
TextoArreglo = File.ReadAllLines(path:=NombreArchivo) ' Texto.Split(CChar(vbCrLf))
|
||||||
|
|
||||||
Dim SBCuentasAltas As New StringBuilder
|
Dim SBCuentasAltas As New StringBuilder
|
||||||
Dim SBErrores As New StringBuilder
|
Dim SBErrores As New StringBuilder
|
||||||
Dim ErrorArchivoScotia As Boolean = False
|
Dim ErrorArchivoScotia As Boolean = False
|
||||||
@@ -2399,6 +2414,7 @@ Partial Class Bancos_PagoElectronico
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
|
ObjBancos.IniciaTransacSQL()
|
||||||
|
|
||||||
For i As Integer = 1 To TextoArreglo.Length - 2 Step 1
|
For i As Integer = 1 To TextoArreglo.Length - 2 Step 1
|
||||||
|
|
||||||
@@ -2406,12 +2422,17 @@ Partial Class Bancos_PagoElectronico
|
|||||||
|
|
||||||
If Linea.Length = 140 Then
|
If Linea.Length = 140 Then
|
||||||
|
|
||||||
Dim CodigoRespuesta As String = Linea.Substring(0, 3)
|
Dim CodigoRespuesta As String = Linea.Substring(109, 3)
|
||||||
|
Dim DTipoArchivo As String = Linea.Substring(0, 2)
|
||||||
Dim Cuenta As String = Linea.Substring(12, 20)
|
Dim Cuenta As String = Linea.Substring(12, 20)
|
||||||
'Dim FechaEliminacion As Date = Linea.Substring(32, 8).ToDate
|
|
||||||
|
|
||||||
Dim FechaEliminacion As Date = Date.ParseExact(Linea.Substring(32, 8), "yyyyMMdd", Globalization.CultureInfo.InvariantCulture)
|
Dim FechaEliminacion As Date = Date.ParseExact(Linea.Substring(32, 8), "yyyyMMdd", Globalization.CultureInfo.InvariantCulture)
|
||||||
|
|
||||||
|
If DTipoArchivo <> "SP" Then
|
||||||
|
SBErrores.Append($"Error Linea {i} el tipo de archivo no es un archivo de respuesta (SP), inicia con codigo {DTipoArchivo}.</br>")
|
||||||
|
ErrorArchivoScotia = True
|
||||||
|
End If
|
||||||
|
|
||||||
If CodigoRespuesta = "000" Or CodigoRespuesta = " " Then
|
If CodigoRespuesta = "000" Or CodigoRespuesta = " " Then
|
||||||
|
|
||||||
Dim CveCuentaDeposito As Integer = Linea.Substring(40, 50).Trim.ToEntero
|
Dim CveCuentaDeposito As Integer = Linea.Substring(40, 50).Trim.ToEntero
|
||||||
@@ -2439,11 +2460,16 @@ Partial Class Bancos_PagoElectronico
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
If ErrorArchivoScotia Then
|
If ErrorArchivoScotia Then
|
||||||
Alert($"El archivo presento errores en su procesamiento({SBErrores.Length}). Se dieron de alta {SBCuentasAltas.Length} cuentas.</br>Altas:</br>{SBCuentasAltas.ToString}.<br> <br>Errores:<br> {SBErrores.ToString}", TipoMensaje.MsgAdvertencia)
|
ObjBancos.RollBack()
|
||||||
|
Alert($"El archivo presento errores en su procesamiento({SBErrores.Length}). Correctos {SBCuentasAltas.Length} cuentas.</br>Altas:</br>{SBCuentasAltas.ToString}.<br> <br>Errores:<br> {SBErrores.ToString}", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
Else
|
||||||
|
ObjBancos.Commit()
|
||||||
Alert($"El archivo se analizo correctamente y se efectuaron todos los cambios en el sistema. cuentas procesadas: </BR>{SBCuentasAltas.ToString}", TipoMensaje.MsgInformacion)
|
Alert($"El archivo se analizo correctamente y se efectuaron todos los cambios en el sistema. cuentas procesadas: </BR>{SBCuentasAltas.ToString}", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -2944,6 +2970,8 @@ Partial Class Bancos_PagoElectronico
|
|||||||
|
|
||||||
If OpBancos = 3 Then
|
If OpBancos = 3 Then
|
||||||
|
|
||||||
|
TextoArreglo = File.ReadAllLines(NombreArchivo) 'Texto.Split(CChar(vbCrLf))
|
||||||
|
|
||||||
Dim CveIES As List(Of Integer) = New List(Of Integer)
|
Dim CveIES As List(Of Integer) = New List(Of Integer)
|
||||||
Dim LienasCount As Integer = TextoArreglo.Length
|
Dim LienasCount As Integer = TextoArreglo.Length
|
||||||
Dim SBErrores As New StringBuilder
|
Dim SBErrores As New StringBuilder
|
||||||
@@ -2956,8 +2984,9 @@ Partial Class Bancos_PagoElectronico
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Header As String = TextoArreglo(0)
|
Dim Header As String = TextoArreglo(0)
|
||||||
Dim HCodigo As String = TextoArreglo(0).Substring(0, 3).Trim
|
Dim HCodigo As String = TextoArreglo(0).Substring(35, 3).Trim
|
||||||
If HCodigo <> "SVH" Then
|
Dim HTipoArchivo As String = TextoArreglo(0).Substring(0, 3).Trim
|
||||||
|
If HTipoArchivo <> "SVH" Then
|
||||||
Alert("El archivo no es un archivo de respuesta, debe tener un encabezado con SVH.", TipoMensaje.MsgError)
|
Alert("El archivo no es un archivo de respuesta, debe tener un encabezado con SVH.", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -3130,13 +3159,14 @@ Partial Class Bancos_PagoElectronico
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Alert("Ocurrió un error al enviar los correos de notificación.", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al enviar los correos de notificación.", TipoMensaje.MsgAdvertencia)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
Alert(Respuesta.ToString, TipoMensaje.MsgInformacion)
|
Alert(Respuesta.ToString, TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
Alert("Ocurrió un error al procesar el archivo.", TipoMensaje.MsgAdvertencia)
|
||||||
objIE.RollBack()
|
objIE.RollBack()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -442,7 +442,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
|
|
||||||
Case DdlCuenta.SelectedItem.Text.ToUpper.Contains("SCOTIA")
|
Case DdlCuenta.SelectedItem.Text.ToUpper.Contains("SCOTIA")
|
||||||
|
|
||||||
habilitada = (dr("EstatusPagoElectronicoGruposScotia").ToString = "True")
|
habilitada = (dr("EstatusPagoElectronicoScotia").ToString = "True")
|
||||||
|
|
||||||
Case Else
|
Case Else
|
||||||
habilitada = False 'Otros bancos sin bandera propia
|
habilitada = False 'Otros bancos sin bandera propia
|
||||||
@@ -689,7 +689,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
|||||||
CuentaDepositoSinAlta = True
|
CuentaDepositoSinAlta = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DdlCuenta.SelectedItem.Text.ToUpper.Contains("SCOTIA") AndAlso e.Row.DBCampo("EstatusPagoElectronicoGruposScotia").ToString <> "True" Then
|
If DdlCuenta.SelectedItem.Text.ToUpper.Contains("SCOTIA") AndAlso e.Row.DBCampo("EstatusPagoElectronicoScotia").ToString <> "True" Then
|
||||||
CuentaDepositoSinAlta = True
|
CuentaDepositoSinAlta = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -774,17 +774,115 @@ Partial Class Bancos_PopIECompras
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaCuentasDepositos()
|
Private Sub CargaCuentasDepositos()
|
||||||
|
'DdlCuentaDeposito.Items.Clear()
|
||||||
|
|
||||||
|
'If DdlTipoTransaccion.SelectedValue.Contiene("2", "9", "17") Then ' transferencias y layout
|
||||||
|
' trCuentaDeposito.Visible = False
|
||||||
|
|
||||||
|
' Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||||
|
|
||||||
|
' If dtc IsNot Nothing Then
|
||||||
|
|
||||||
|
' If DdlTipoTransaccion.SelectedValue = "9" Then
|
||||||
|
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||||
|
|
||||||
|
' If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' Else
|
||||||
|
' BtnGuardar.Enabled = False
|
||||||
|
' Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
||||||
|
' End If
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
|
||||||
|
|
||||||
|
' If dtc.Rows.Count > 0 Then
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' BtnGuardar.ToolTip = ""
|
||||||
|
' Else
|
||||||
|
|
||||||
|
' BtnGuardar.Enabled = False
|
||||||
|
' BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
|
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' UpGuardar.Update()
|
||||||
|
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' Else
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
|
||||||
|
' If dtc.Rows.Count > 0 Then
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' Else
|
||||||
|
|
||||||
|
' If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
|
||||||
|
|
||||||
|
' BtnGuardar.Enabled = False
|
||||||
|
' BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
|
' Else
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' BtnGuardar.Enabled = True
|
||||||
|
' BtnGuardar.ToolTip = ""
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' UpGuardar.Update()
|
||||||
|
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' DdlCuentaDeposito.DataBind()
|
||||||
|
|
||||||
|
'Else
|
||||||
|
' trCuentaDeposito.Visible = False
|
||||||
|
' DdlCuentaDeposito.Items.Clear()
|
||||||
|
' 'TrReferenciaCIE.Visible = False
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'UpCuentaDeposito.Update()
|
||||||
|
|
||||||
|
DdlCuentaDeposito.ClearSelection()
|
||||||
|
DdlCuentaDeposito.SelectedValue = Nothing
|
||||||
DdlCuentaDeposito.Items.Clear()
|
DdlCuentaDeposito.Items.Clear()
|
||||||
If DdlTipoTransaccion.SelectedValue.Contiene("2", "9", "17") Then ' transferencias y layout
|
|
||||||
|
trCuentaDeposito.Visible = False
|
||||||
|
|
||||||
|
|
||||||
|
Dim OpBanco As Integer = 1
|
||||||
|
Dim CuentaBanco As String = DdlCuenta.SelectedItem.Text.ToUpper
|
||||||
|
|
||||||
|
If CuentaBanco.Contains("BBVA") Or CuentaBanco.Contains("BANCOMER") Then
|
||||||
|
OpBanco = 1
|
||||||
|
'ElseIf CuentaBanco.Contains("BAJIO") Then
|
||||||
|
' OpBanco = 2
|
||||||
|
ElseIf CuentaBanco.Contains("SCOTIA") Then
|
||||||
|
OpBanco = 3
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DdlCuenta.SelectedValue = "-1" Then
|
||||||
|
BtnGuardar.Enabled = False
|
||||||
trCuentaDeposito.Visible = False
|
trCuentaDeposito.Visible = False
|
||||||
|
DdlCuentaDeposito.Items.Clear()
|
||||||
|
'UpnCuentasPago.Update()
|
||||||
|
UpCuentaDeposito.Update()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
|
||||||
|
|
||||||
If dtc IsNot Nothing Then
|
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||||
|
|
||||||
If DdlTipoTransaccion.SelectedValue = "9" Then
|
If dtc IsNot Nothing Then
|
||||||
|
|
||||||
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
If DdlTipoTransaccion.SelectedValue = "9" Then
|
||||||
|
|
||||||
|
If OpBanco = 1 Then
|
||||||
|
If dtc.Rows.Count > 0 Then
|
||||||
|
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||||
|
DdlCuentaDeposito.DataBind()
|
||||||
|
End If
|
||||||
|
|
||||||
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
trCuentaDeposito.Visible = True
|
trCuentaDeposito.Visible = True
|
||||||
@@ -793,54 +891,61 @@ Partial Class Bancos_PopIECompras
|
|||||||
BtnGuardar.Enabled = False
|
BtnGuardar.Enabled = False
|
||||||
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
|
||||||
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
|
|
||||||
|
|
||||||
|
ElseIf OpBanco = 3 Then
|
||||||
If dtc.Rows.Count > 0 Then
|
If dtc.Rows.Count > 0 Then
|
||||||
DdlCuentaDeposito.DataSource = dtc
|
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'")
|
||||||
|
DdlCuentaDeposito.DataBind()
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
trCuentaDeposito.Visible = True
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
Else
|
||||||
|
BtnGuardar.Enabled = False
|
||||||
|
Alert("El Beneficiario no tiene una cuenta activa en Scotiabank, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
|
||||||
|
|
||||||
|
If OpBanco = 1 Then
|
||||||
|
If dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'")
|
||||||
|
DdlCuentaDeposito.DataBind()
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
trCuentaDeposito.Visible = True
|
trCuentaDeposito.Visible = True
|
||||||
BtnGuardar.ToolTip = ""
|
BtnGuardar.ToolTip = ""
|
||||||
Else
|
Else
|
||||||
|
|
||||||
BtnGuardar.Enabled = False
|
BtnGuardar.Enabled = False
|
||||||
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
|
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpGuardar.Update()
|
|
||||||
|
|
||||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
|
||||||
Else
|
Else
|
||||||
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
|
|
||||||
If dtc.Rows.Count > 0 Then
|
|
||||||
trCuentaDeposito.Visible = True
|
|
||||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
|
|
||||||
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
|
|
||||||
|
|
||||||
BtnGuardar.Enabled = False
|
BtnGuardar.Enabled = False
|
||||||
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
BtnGuardar.ToolTip = "El proveedor no tiene cuentas deposito para layout grupos"
|
||||||
Else
|
Alert("El proveedor no tiene cuentas deposito para layout grupos.", TipoMensaje.MsgAdvertencia)
|
||||||
trCuentaDeposito.Visible = True
|
|
||||||
BtnGuardar.Enabled = True
|
|
||||||
BtnGuardar.ToolTip = ""
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpGuardar.Update()
|
|
||||||
|
|
||||||
|
|
||||||
|
Else
|
||||||
|
'Respuesta = True
|
||||||
|
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
|
||||||
|
DdlCuentaDeposito.DataBind()
|
||||||
|
|
||||||
|
If dtc.Rows.Count > 0 Then
|
||||||
|
trCuentaDeposito.Visible = True
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
BtnGuardar.Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlCuentaDeposito.DataBind()
|
|
||||||
|
|
||||||
Else
|
|
||||||
trCuentaDeposito.Visible = False
|
|
||||||
DdlCuentaDeposito.Items.Clear()
|
|
||||||
'TrReferenciaCIE.Visible = False
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'UpnCuentasPago.Update()
|
||||||
|
UpGuardar.Update()
|
||||||
UpCuentaDeposito.Update()
|
UpCuentaDeposito.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -896,6 +1001,9 @@ Partial Class Bancos_PopIECompras
|
|||||||
Banco.Dispose()
|
Banco.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
CargaCuentasDepositos()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'Private Sub DdlOtrosPagos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlOtrosPagos.SelectedIndexChanged
|
'Private Sub DdlOtrosPagos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlOtrosPagos.SelectedIndexChanged
|
||||||
|
|||||||
@@ -1405,6 +1405,10 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
TxtFolio.Text = ""
|
TxtFolio.Text = ""
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'ValidaCuentasDepositoLayouts()
|
||||||
|
|
||||||
|
CargaCuentasDepositos()
|
||||||
|
|
||||||
'Dim dr2 As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuenta.SelectedValue)
|
'Dim dr2 As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuenta.SelectedValue)
|
||||||
'If dr2 IsNot Nothing Then
|
'If dr2 IsNot Nothing Then
|
||||||
|
|
||||||
@@ -1416,6 +1420,106 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
'End If
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
'Function ValidaCuentasDepositoLayouts() As Boolean
|
||||||
|
|
||||||
|
' Dim Respuesta As Boolean = False
|
||||||
|
' Dim OpBanco As Integer = 1
|
||||||
|
|
||||||
|
' Dim CuentaBanco As String = DdlCuenta.SelectedItem.Text.ToUpper
|
||||||
|
|
||||||
|
' If CuentaBanco.Contains("BBVA") Or CuentaBanco.Contains("BANCOMER") Then
|
||||||
|
' OpBanco = 1
|
||||||
|
' 'ElseIf CuentaBanco.Contains("BAJIO") Then
|
||||||
|
' ' OpBanco = 2
|
||||||
|
' ElseIf CuentaBanco.Contains("SCOTIA") Then
|
||||||
|
' OpBanco = 3
|
||||||
|
' End If
|
||||||
|
|
||||||
|
|
||||||
|
' Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||||
|
|
||||||
|
' If dtc IsNot Nothing Then
|
||||||
|
|
||||||
|
' If DdlTipoTransaccion.SelectedValue = "9" Then
|
||||||
|
|
||||||
|
' If OpBanco = 1 Then
|
||||||
|
' If dtc.Rows.Count > 0 Then
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' Else
|
||||||
|
' BtnIEGuardar.Enabled = False
|
||||||
|
' 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 OpBanco = 3 Then
|
||||||
|
' If dtc.Rows.Count > 0 Then
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'")
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' If dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' Else
|
||||||
|
' BtnIEGuardar.Enabled = False
|
||||||
|
' Alert("El Beneficiario no tiene una cuenta activa en Scotiabank, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
|
||||||
|
|
||||||
|
' If OpBanco = 1 Then
|
||||||
|
' If dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' Estatus ='True'")
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' BtnIEGuardar.ToolTip = ""
|
||||||
|
' Else
|
||||||
|
' BtnIEGuardar.Enabled = False
|
||||||
|
' BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
|
' Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
' End If
|
||||||
|
' 'ElseIf OpBanco = 3 Then
|
||||||
|
' ' If dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
' ' DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' Estatus ='True'")
|
||||||
|
' ' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' ' trCuentaDeposito.Visible = True
|
||||||
|
' ' BtnIEGuardar.ToolTip = ""
|
||||||
|
' ' Else
|
||||||
|
' ' BtnIEGuardar.Enabled = False
|
||||||
|
' ' BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
|
' ' Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
' ' End If
|
||||||
|
' Else
|
||||||
|
' BtnIEGuardar.Enabled = False
|
||||||
|
' BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito para layout grupos"
|
||||||
|
' Alert("El proveedor no tiene cuentas deposito para layout grupos.", TipoMensaje.MsgAdvertencia)
|
||||||
|
' End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
' Else
|
||||||
|
' Respuesta = True
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
|
||||||
|
' If dtc.Rows.Count > 0 Then
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
' UpGuardar.Update()
|
||||||
|
|
||||||
|
' Return Respuesta
|
||||||
|
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Private Sub CargaGridTarjetas()
|
'Private Sub CargaGridTarjetas()
|
||||||
@@ -1432,20 +1536,120 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
#Region " CUENTAS DEPOSITOS"
|
#Region " CUENTAS DEPOSITOS"
|
||||||
Private Sub CargaCuentasDepositos()
|
Private Sub CargaCuentasDepositos()
|
||||||
|
|
||||||
|
DdlCuentaDeposito.ClearSelection()
|
||||||
|
DdlCuentaDeposito.SelectedValue = Nothing
|
||||||
DdlCuentaDeposito.Items.Clear()
|
DdlCuentaDeposito.Items.Clear()
|
||||||
|
|
||||||
trCuentaDeposito.Visible = False
|
trCuentaDeposito.Visible = False
|
||||||
|
|
||||||
|
'Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||||
|
'If dtc IsNot Nothing Then
|
||||||
|
|
||||||
|
' If dtc.FiltraParametros("Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
|
||||||
|
' If DdlTipoTransaccion.SelectedValue = "9" Then
|
||||||
|
|
||||||
|
' If dtc.Rows.Count > 0 Then
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' Else
|
||||||
|
' 'BtnIEGuardar.Enabled = False
|
||||||
|
' '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" Then
|
||||||
|
|
||||||
|
' If dtc.Rows.Count > 0 Then
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus ='True'")
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' BtnIEGuardar.ToolTip = ""
|
||||||
|
' Else
|
||||||
|
' 'BtnIEGuardar.Enabled = False
|
||||||
|
' 'BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
|
' 'Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
' End If
|
||||||
|
' UpGuardar.Update()
|
||||||
|
' Else
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
|
||||||
|
' If dtc.Rows.Count > 0 Then
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' End If
|
||||||
|
' End If
|
||||||
|
' DdlCuentaDeposito.DataBind()
|
||||||
|
' Else
|
||||||
|
|
||||||
|
' If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
|
||||||
|
' 'BtnIEGuardar.Enabled = False
|
||||||
|
' 'BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
|
' 'Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
' Else
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' BtnIEGuardar.Enabled = True
|
||||||
|
' BtnIEGuardar.ToolTip = ""
|
||||||
|
' End If
|
||||||
|
' UpGuardar.Update()
|
||||||
|
' End If
|
||||||
|
'Else
|
||||||
|
|
||||||
|
' If DdlTipoTransaccion.SelectedValue = "17" Then
|
||||||
|
' BtnIEGuardar.Enabled = False
|
||||||
|
' BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
|
' Else
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' BtnIEGuardar.Enabled = True
|
||||||
|
' BtnIEGuardar.ToolTip = ""
|
||||||
|
' End If
|
||||||
|
|
||||||
|
' UpGuardar.Update()
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'Else
|
||||||
|
' trCuentaDeposito.Visible = False
|
||||||
|
' DdlCuentaDeposito.Items.Clear()
|
||||||
|
'End If
|
||||||
|
'RecargaGlobalCuentasBancarias()
|
||||||
|
|
||||||
|
|
||||||
|
Dim OpBanco As Integer = 1
|
||||||
|
|
||||||
|
Dim CuentaBanco As String = DdlCuenta.SelectedItem.Text.ToUpper
|
||||||
|
|
||||||
|
If CuentaBanco.Contains("BBVA") Or CuentaBanco.Contains("BANCOMER") Then
|
||||||
|
OpBanco = 1
|
||||||
|
'ElseIf CuentaBanco.Contains("BAJIO") Then
|
||||||
|
' OpBanco = 2
|
||||||
|
ElseIf CuentaBanco.Contains("SCOTIA") Then
|
||||||
|
OpBanco = 3
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DdlCuenta.SelectedValue = "-1" Then
|
||||||
|
BtnIEGuardar.Enabled = False
|
||||||
|
trCuentaDeposito.Visible = False
|
||||||
|
DdlCuentaDeposito.Items.Clear()
|
||||||
|
UpnCuentasPago.Update()
|
||||||
|
UpCuentaDeposito.Update()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||||
|
|
||||||
If dtc IsNot Nothing Then
|
If dtc IsNot Nothing Then
|
||||||
|
|
||||||
If dtc.FiltraParametros("Estatus ='True'").Rows.Count > 0 Then
|
If DdlTipoTransaccion.SelectedValue = "9" Then
|
||||||
|
|
||||||
If DdlTipoTransaccion.SelectedValue = "9" Then
|
|
||||||
|
|
||||||
|
If OpBanco = 1 Then
|
||||||
If dtc.Rows.Count > 0 Then
|
If dtc.Rows.Count > 0 Then
|
||||||
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
DdlCuentaDeposito.DataBind()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
If dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
@@ -1456,10 +1660,27 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
Alert("El Beneficiario no tiene una cuenta activa en BBVA, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
|
ElseIf OpBanco = 3 Then
|
||||||
|
|
||||||
If dtc.Rows.Count > 0 Then
|
If dtc.Rows.Count > 0 Then
|
||||||
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus ='True'")
|
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'")
|
||||||
|
DdlCuentaDeposito.DataBind()
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
If dtc.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
trCuentaDeposito.Visible = True
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
Else
|
||||||
|
BtnIEGuardar.Enabled = False
|
||||||
|
Alert("El Beneficiario no tiene una cuenta activa en Scotiabank, dela de alta o seleccione otro método de pago", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
|
||||||
|
|
||||||
|
If OpBanco = 1 Then
|
||||||
|
If dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' AND Estatus ='True'")
|
||||||
|
DdlCuentaDeposito.DataBind()
|
||||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
trCuentaDeposito.Visible = True
|
trCuentaDeposito.Visible = True
|
||||||
BtnIEGuardar.ToolTip = ""
|
BtnIEGuardar.ToolTip = ""
|
||||||
@@ -1468,47 +1689,39 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
UpGuardar.Update()
|
'ElseIf OpBanco = 3 Then
|
||||||
|
' If dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' Estatus ='True'").Rows.Count > 0 Then
|
||||||
|
' DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" EstatusPagoElectronicoGrupos = 'True' Estatus ='True'")
|
||||||
|
' DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
' trCuentaDeposito.Visible = True
|
||||||
|
' BtnIEGuardar.ToolTip = ""
|
||||||
|
' Else
|
||||||
|
' BtnIEGuardar.Enabled = False
|
||||||
|
' BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||||
|
' Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||||
|
' End If
|
||||||
Else
|
Else
|
||||||
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
|
|
||||||
If dtc.Rows.Count > 0 Then
|
|
||||||
trCuentaDeposito.Visible = True
|
|
||||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
DdlCuentaDeposito.DataBind()
|
|
||||||
Else
|
|
||||||
|
|
||||||
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then
|
|
||||||
BtnIEGuardar.Enabled = False
|
BtnIEGuardar.Enabled = False
|
||||||
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito para layout grupos"
|
||||||
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
Alert("El proveedor no tiene cuentas deposito para layout grupos.", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
|
||||||
trCuentaDeposito.Visible = True
|
|
||||||
BtnIEGuardar.Enabled = True
|
|
||||||
BtnIEGuardar.ToolTip = ""
|
|
||||||
End If
|
End If
|
||||||
UpGuardar.Update()
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
|
|
||||||
If DdlTipoTransaccion.SelectedValue = "17" Then
|
|
||||||
BtnIEGuardar.Enabled = False
|
|
||||||
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
|
||||||
Else
|
Else
|
||||||
trCuentaDeposito.Visible = True
|
'Respuesta = True
|
||||||
BtnIEGuardar.Enabled = True
|
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
|
||||||
BtnIEGuardar.ToolTip = ""
|
DdlCuentaDeposito.DataBind()
|
||||||
End If
|
|
||||||
|
|
||||||
UpGuardar.Update()
|
If dtc.Rows.Count > 0 Then
|
||||||
|
trCuentaDeposito.Visible = True
|
||||||
|
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||||
|
End If
|
||||||
|
BtnIEGuardar.Enabled = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'Else
|
UpGuardar.Update()
|
||||||
' trCuentaDeposito.Visible = False
|
|
||||||
' DdlCuentaDeposito.Items.Clear()
|
|
||||||
'End If
|
|
||||||
'RecargaGlobalCuentasBancarias()
|
|
||||||
UpnCuentasPago.Update()
|
UpnCuentasPago.Update()
|
||||||
UpCuentaDeposito.Update()
|
UpCuentaDeposito.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
Reference in New Issue
Block a user