Layout Scotia correciones cambios de cuenta validacion
This commit is contained in:
@@ -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