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
|
||||
CargaIEDevoluciones()
|
||||
End If
|
||||
|
||||
CargaCuentasDepositos()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
@@ -4084,8 +4087,13 @@ Partial Class Bancos_IE
|
||||
#Region " CUENTAS DEPOSITOS "
|
||||
'Si la cuenta no esta activa, no la muestra.
|
||||
Private Sub CargaCuentasDepositos()
|
||||
DdlCuentaDeposito.Items.Clear()
|
||||
'¿DdlCuentaDeposito.Items.Clear()
|
||||
'If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
|
||||
|
||||
DdlCuentaDeposito.ClearSelection()
|
||||
DdlCuentaDeposito.SelectedValue = Nothing
|
||||
DdlCuentaDeposito.Items.Clear()
|
||||
|
||||
trCuentaDeposito.Visible = False
|
||||
|
||||
Dim dtc As DataTable = Nothing
|
||||
@@ -4099,73 +4107,165 @@ Partial Class Bancos_IE
|
||||
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()
|
||||
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
|
||||
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
|
||||
' BtnIEGuardar.Enabled = False
|
||||
'End If
|
||||
|
||||
'GVCuentasPago.DataBind()
|
||||
DdlCuentaDeposito.DataBind()
|
||||
'DdlCuentaDeposito.DataBind()
|
||||
|
||||
'Else
|
||||
' trCuentaDeposito.Visible = False
|
||||
' DdlCuentaDeposito.Items.Clear()
|
||||
'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()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
@@ -1044,35 +1044,35 @@ Partial Class Bancos_PagoElectronico
|
||||
Dim NombreArchivo As String = $"pagos_{NowADS.ToString("ddMMyyyy")}_001.txt"
|
||||
'"pagos_03062025_001.txt"
|
||||
|
||||
'If InsertaEnDB Then
|
||||
If InsertaEnDB Then
|
||||
|
||||
' Dim ObjBancos As New ClsBancos
|
||||
' ObjBancos.IniciaTransacSQL()
|
||||
Dim ObjBancos As New ClsBancos
|
||||
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
|
||||
' For Each dr As DataRow In DTPendientes.Rows
|
||||
' 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
|
||||
' ErrorLayout = True
|
||||
' Exit For
|
||||
' End If
|
||||
' End If
|
||||
' Next
|
||||
' Else
|
||||
' ErrorLayout = True
|
||||
' End If
|
||||
If CveLayoutEnvio > 0 Then
|
||||
For Each dr As DataRow In DTPendientes.Rows
|
||||
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
|
||||
ErrorLayout = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ErrorLayout = True
|
||||
End If
|
||||
|
||||
' If ErrorLayout Then
|
||||
' ObjBancos.RollBack()
|
||||
' ObjBancos.Dispose()
|
||||
' Else
|
||||
' ObjBancos.Commit()
|
||||
' ObjBancos.Dispose()
|
||||
' End If
|
||||
If ErrorLayout Then
|
||||
ObjBancos.RollBack()
|
||||
ObjBancos.Dispose()
|
||||
Else
|
||||
ObjBancos.Commit()
|
||||
ObjBancos.Dispose()
|
||||
End If
|
||||
|
||||
'End If
|
||||
End If
|
||||
|
||||
Dim path As String = String.Format("{0}Layout\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo)
|
||||
Dim pathDirectorio As String = String.Format("{0}Layout\", UsuarioActual.Empresa.Ruta)
|
||||
@@ -1499,11 +1499,23 @@ Partial Class Bancos_PagoElectronico
|
||||
End If
|
||||
ObjBancos.Dispose()
|
||||
|
||||
If DtRegenerar IsNot Nothing Then
|
||||
GeneraPago(DtRegenerar, CveBLE)
|
||||
Else
|
||||
Alert("Ocurrió un error al obtener los datos para generar el archivo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
If OpBancos = 1 Then
|
||||
If DtRegenerar IsNot Nothing Then
|
||||
GeneraPago(DtRegenerar, CveBLE)
|
||||
Else
|
||||
Alert("Ocurrió un error al obtener los datos para generar el archivo. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
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 Region
|
||||
@@ -1900,8 +1912,9 @@ Partial Class Bancos_PagoElectronico
|
||||
ElseIf OpBancos = 2 Then
|
||||
|
||||
ElseIf OpBancos = 3 Then
|
||||
If DTPendientes.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND EstatusCtaDeposito = 'True'") IsNot Nothing Then
|
||||
GeneraPagoScotiaBank(DTPendientes.FiltraParametros("EstatusPagoElectronico > 0 AND EstatusCtaDeposito > 0"), False)
|
||||
If DTPendientes.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND EstatusCtaDeposito = 'True'") IsNot Nothing AndAlso
|
||||
DTPendientes.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND EstatusCtaDeposito = 'True'").Rows.Count > 0 Then
|
||||
GeneraPagoScotiaBank(DTPendientes.FiltraParametros("EstatusPagoElectronicoScotia = 'True' AND EstatusCtaDeposito = 'True'"), True)
|
||||
Else
|
||||
Alert("No hay registros para generar pagos en ScotiaBank", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -2370,6 +2383,8 @@ Partial Class Bancos_PagoElectronico
|
||||
|
||||
If OpBancos = 3 Then
|
||||
|
||||
TextoArreglo = File.ReadAllLines(path:=NombreArchivo) ' Texto.Split(CChar(vbCrLf))
|
||||
|
||||
Dim SBCuentasAltas As New StringBuilder
|
||||
Dim SBErrores As New StringBuilder
|
||||
Dim ErrorArchivoScotia As Boolean = False
|
||||
@@ -2399,6 +2414,7 @@ Partial Class Bancos_PagoElectronico
|
||||
End If
|
||||
|
||||
Dim ObjBancos As New ClsBancos
|
||||
ObjBancos.IniciaTransacSQL()
|
||||
|
||||
For i As Integer = 1 To TextoArreglo.Length - 2 Step 1
|
||||
|
||||
@@ -2406,12 +2422,17 @@ Partial Class Bancos_PagoElectronico
|
||||
|
||||
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 FechaEliminacion As Date = Linea.Substring(32, 8).ToDate
|
||||
|
||||
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
|
||||
|
||||
Dim CveCuentaDeposito As Integer = Linea.Substring(40, 50).Trim.ToEntero
|
||||
@@ -2439,11 +2460,16 @@ Partial Class Bancos_PagoElectronico
|
||||
Next
|
||||
|
||||
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
|
||||
ObjBancos.Commit()
|
||||
Alert($"El archivo se analizo correctamente y se efectuaron todos los cambios en el sistema. cuentas procesadas: </BR>{SBCuentasAltas.ToString}", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
ObjBancos.Dispose()
|
||||
|
||||
End If
|
||||
@@ -2944,6 +2970,8 @@ Partial Class Bancos_PagoElectronico
|
||||
|
||||
If OpBancos = 3 Then
|
||||
|
||||
TextoArreglo = File.ReadAllLines(NombreArchivo) 'Texto.Split(CChar(vbCrLf))
|
||||
|
||||
Dim CveIES As List(Of Integer) = New List(Of Integer)
|
||||
Dim LienasCount As Integer = TextoArreglo.Length
|
||||
Dim SBErrores As New StringBuilder
|
||||
@@ -2956,8 +2984,9 @@ Partial Class Bancos_PagoElectronico
|
||||
End If
|
||||
|
||||
Dim Header As String = TextoArreglo(0)
|
||||
Dim HCodigo As String = TextoArreglo(0).Substring(0, 3).Trim
|
||||
If HCodigo <> "SVH" Then
|
||||
Dim HCodigo As String = TextoArreglo(0).Substring(35, 3).Trim
|
||||
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)
|
||||
Exit Sub
|
||||
End If
|
||||
@@ -3130,13 +3159,14 @@ Partial Class Bancos_PagoElectronico
|
||||
End If
|
||||
Next
|
||||
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
|
||||
|
||||
|
||||
Alert(Respuesta.ToString, TipoMensaje.MsgInformacion)
|
||||
|
||||
Else
|
||||
Alert("Ocurrió un error al procesar el archivo.", TipoMensaje.MsgAdvertencia)
|
||||
objIE.RollBack()
|
||||
End If
|
||||
|
||||
|
||||
@@ -442,7 +442,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
|
||||
Case DdlCuenta.SelectedItem.Text.ToUpper.Contains("SCOTIA")
|
||||
|
||||
habilitada = (dr("EstatusPagoElectronicoGruposScotia").ToString = "True")
|
||||
habilitada = (dr("EstatusPagoElectronicoScotia").ToString = "True")
|
||||
|
||||
Case Else
|
||||
habilitada = False 'Otros bancos sin bandera propia
|
||||
@@ -689,7 +689,7 @@ Partial Class Bancos_PagoElectronicoGrupos
|
||||
CuentaDepositoSinAlta = True
|
||||
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
|
||||
End If
|
||||
|
||||
|
||||
@@ -774,73 +774,178 @@ Partial Class Bancos_PopIECompras
|
||||
End Sub
|
||||
|
||||
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)
|
||||
'DdlCuentaDeposito.Items.Clear()
|
||||
|
||||
If dtc IsNot Nothing Then
|
||||
'If DdlTipoTransaccion.SelectedValue.Contiene("2", "9", "17") Then ' transferencias y layout
|
||||
' trCuentaDeposito.Visible = False
|
||||
|
||||
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
|
||||
' 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()
|
||||
|
||||
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
|
||||
DdlCuentaDeposito.Items.Clear()
|
||||
'UpnCuentasPago.Update()
|
||||
UpCuentaDeposito.Update()
|
||||
Return
|
||||
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
|
||||
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
|
||||
|
||||
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 = ""
|
||||
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
|
||||
|
||||
UpGuardar.Update()
|
||||
|
||||
End If
|
||||
|
||||
DdlCuentaDeposito.DataBind()
|
||||
|
||||
Else
|
||||
trCuentaDeposito.Visible = False
|
||||
DdlCuentaDeposito.Items.Clear()
|
||||
'TrReferenciaCIE.Visible = False
|
||||
|
||||
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
|
||||
|
||||
'UpnCuentasPago.Update()
|
||||
UpGuardar.Update()
|
||||
UpCuentaDeposito.Update()
|
||||
|
||||
End Sub
|
||||
@@ -896,6 +1001,9 @@ Partial Class Bancos_PopIECompras
|
||||
Banco.Dispose()
|
||||
|
||||
End If
|
||||
|
||||
CargaCuentasDepositos()
|
||||
|
||||
End Sub
|
||||
|
||||
'Private Sub DdlOtrosPagos_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlOtrosPagos.SelectedIndexChanged
|
||||
|
||||
@@ -1405,6 +1405,10 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
TxtFolio.Text = ""
|
||||
End If
|
||||
|
||||
'ValidaCuentasDepositoLayouts()
|
||||
|
||||
CargaCuentasDepositos()
|
||||
|
||||
'Dim dr2 As DataRow = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("CveCuenta = " & DdlCuenta.SelectedValue)
|
||||
'If dr2 IsNot Nothing Then
|
||||
|
||||
@@ -1416,6 +1420,106 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
'End If
|
||||
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()
|
||||
@@ -1432,20 +1536,120 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
#Region " CUENTAS DEPOSITOS"
|
||||
Private Sub CargaCuentasDepositos()
|
||||
|
||||
DdlCuentaDeposito.ClearSelection()
|
||||
DdlCuentaDeposito.SelectedValue = Nothing
|
||||
DdlCuentaDeposito.Items.Clear()
|
||||
|
||||
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)
|
||||
|
||||
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
|
||||
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||
DdlCuentaDeposito.DataBind()
|
||||
End If
|
||||
|
||||
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)
|
||||
End If
|
||||
|
||||
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
|
||||
|
||||
ElseIf OpBanco = 3 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"))
|
||||
trCuentaDeposito.Visible = True
|
||||
BtnIEGuardar.ToolTip = ""
|
||||
@@ -1468,47 +1689,39 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
|
||||
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
|
||||
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
|
||||
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 = ""
|
||||
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
|
||||
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
|
||||
'Respuesta = True
|
||||
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
|
||||
DdlCuentaDeposito.DataBind()
|
||||
|
||||
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
|
||||
|
||||
'Else
|
||||
' trCuentaDeposito.Visible = False
|
||||
' DdlCuentaDeposito.Items.Clear()
|
||||
'End If
|
||||
'RecargaGlobalCuentasBancarias()
|
||||
UpGuardar.Update()
|
||||
UpnCuentasPago.Update()
|
||||
UpCuentaDeposito.Update()
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user