-- cuentas depósitos corrección y agregado de cveempresa
This commit is contained in:
@@ -1146,20 +1146,17 @@ Partial Class Bancos_IE
|
||||
Else
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue = "9" Then
|
||||
Dim Dep As New ClsGenerales
|
||||
If Dep.GetCuentasDepositos(CveProveedor:=ObjIE.CveProveedor) Then
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus = 'True' ")
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||
|
||||
If dtc IsNot Nothing Then
|
||||
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"))
|
||||
'ElseIf Dep.DtResultados.Rows.Count = 1 Then
|
||||
' TrCuentaDepositado.Visible = True
|
||||
' LitTextoDepositado.Text = "Cuenta Depósito"
|
||||
' LitDepositado.Text = Dep.DtResultados.Rows(0)("CuentaDeposito").ToString
|
||||
'End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Dep.Dispose()
|
||||
|
||||
DdlCuentaDeposito.DataBind()
|
||||
UpCuentaDeposito.Update()
|
||||
End If
|
||||
@@ -1167,9 +1164,6 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
LnkComplementoPago.Visible = True
|
||||
|
||||
|
||||
|
||||
If ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelado > 0 Then
|
||||
'cuando es cheque devuelto
|
||||
TabCancelacion.Visible = True
|
||||
@@ -1185,8 +1179,6 @@ Partial Class Bancos_IE
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
'DATOS DE CANCELACION
|
||||
If ObjIE.CveEstatusIE = 2 OrElse (ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelacion > 0) Then
|
||||
TabCancelacion.Visible = True
|
||||
@@ -1327,8 +1319,6 @@ Partial Class Bancos_IE
|
||||
|
||||
End If
|
||||
|
||||
|
||||
RecargaGlobalCuentasBancarias()
|
||||
ObjIE.Dispose()
|
||||
ObjIE2.Dispose()
|
||||
UPPP.Update()
|
||||
@@ -3968,7 +3958,6 @@ Partial Class Bancos_IE
|
||||
End If
|
||||
|
||||
Msg.Clear()
|
||||
RecargaGlobalCuentasBancarias()
|
||||
ObjIE.Dispose()
|
||||
ObjMov.Dispose()
|
||||
If ObjComp IsNot Nothing Then ObjComp.Dispose()
|
||||
@@ -5206,15 +5195,23 @@ Partial Class Bancos_IE
|
||||
'If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
|
||||
trCuentaDeposito.Visible = False
|
||||
|
||||
Dim dtc As DataTable = Nothing
|
||||
|
||||
Dim Dep As New ClsGenerales
|
||||
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) Then
|
||||
If CveProveedor > 0 Then
|
||||
dtc = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||
ElseIf CveCliente > 0 Then
|
||||
dtc = GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, CveCliente:=CveCliente)
|
||||
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 = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||
DdlCuentaDeposito.DataSource = dtc.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||
|
||||
If Dep.DtResultados.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
|
||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||
Else
|
||||
@@ -5223,10 +5220,9 @@ Partial Class Bancos_IE
|
||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
|
||||
|
||||
If dtc.Rows.Count > 0 Then
|
||||
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus = 'True' ")
|
||||
DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
|
||||
trCuentaDeposito.Visible = True
|
||||
BtnGuardar.ToolTip = ""
|
||||
|
||||
@@ -5242,15 +5238,14 @@ Partial Class Bancos_IE
|
||||
UpGuardar.Update()
|
||||
|
||||
Else
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'")
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
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
|
||||
@@ -5265,9 +5260,8 @@ Partial Class Bancos_IE
|
||||
|
||||
UpGuardar.Update()
|
||||
|
||||
|
||||
End If
|
||||
Dep.Dispose()
|
||||
|
||||
|
||||
'If DdlTipoTransaccion.SelectedValue = "9" AndAlso DdlCuentaDeposito.Items.Count = 0 Then
|
||||
' BtnIEGuardar.Enabled = False
|
||||
@@ -5280,7 +5274,7 @@ Partial Class Bancos_IE
|
||||
' trCuentaDeposito.Visible = False
|
||||
' DdlCuentaDeposito.Items.Clear()
|
||||
'End If
|
||||
RecargaGlobalCuentasBancarias()
|
||||
|
||||
UpCuentaDeposito.Update()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
@@ -5305,18 +5299,6 @@ Partial Class Bancos_IE
|
||||
|
||||
End Sub
|
||||
|
||||
'Recaga CuentasBancarias de Proveedor
|
||||
Private Sub RecargaGlobalCuentasBancarias(Optional ByVal CveCuenta As Integer = -1)
|
||||
If CveProveedor > 0 Then
|
||||
GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, -1) = Nothing
|
||||
'Dim ObjCuentasBancos As New ClsGenerales
|
||||
|
||||
'If ObjCuentasBancos.GetCuentasDepositos(CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
' GlobalDTProveedoresCuentas(-1, True) = ObjCuentasBancos.DtResultados
|
||||
'End If
|
||||
'ObjCuentasBancos.Dispose()
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Dep As New ClsGenerales
|
||||
@@ -6640,7 +6622,6 @@ Partial Class Bancos_IE
|
||||
trCuentaDeposito.Visible = True
|
||||
DdlCuentaDeposito.Enabled = True
|
||||
|
||||
|
||||
Dim Dep As New ClsGenerales
|
||||
If Dep.GetCuentasDepositos(CveCliente:=CveCliente) Then
|
||||
|
||||
@@ -6651,15 +6632,12 @@ Partial Class Bancos_IE
|
||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dep.Dispose()
|
||||
DdlCuentaDeposito.DataBind()
|
||||
UpCuentaDeposito.Update()
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -650,16 +650,14 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim Dep As New ClsGenerales
|
||||
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor) Then
|
||||
Dim Row = Dep.DtResultados.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
|
||||
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||
If dtc IsNot Nothing Then
|
||||
Dim Row = dtc.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
|
||||
If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then
|
||||
Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
|
||||
Dep.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
Dep.Dispose()
|
||||
|
||||
'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes
|
||||
If UsuarioActual.TienePermisoProceso(105) AndAlso (TxtFechaDocumento.Text.ToDate < Now.Date Or TxtFechaDocumento.Text.ToDate > Now.LastDayOfMonth) Then
|
||||
@@ -1310,22 +1308,22 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
#Region " CUENTAS DEPOSITOS"
|
||||
Private Sub CargaCuentasDepositos()
|
||||
DdlCuentaDeposito.Items.Clear()
|
||||
' If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
|
||||
|
||||
trCuentaDeposito.Visible = False
|
||||
|
||||
Dim Dep As New ClsGenerales
|
||||
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor) Then
|
||||
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||
If dtc IsNot Nothing Then
|
||||
|
||||
If Dep.DtResultados.FiltraParametros("Estatus ='True'").Rows.Count > 0 Then
|
||||
If dtc.FiltraParametros("Estatus ='True'").Rows.Count > 0 Then
|
||||
|
||||
If DdlTipoTransaccion.SelectedValue = "9" Then
|
||||
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("EstatusPagoElectronico = 'True' AND Estatus ='True'")
|
||||
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 Dep.DtResultados.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
|
||||
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
|
||||
Else
|
||||
@@ -1335,45 +1333,28 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
|
||||
|
||||
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus ='True'")
|
||||
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 = Dep.DtResultados.FiltraParametros("Estatus ='True'")
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
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()
|
||||
|
||||
|
||||
'If DdlCuentaDeposito.Items.Count > 1 Then
|
||||
' DdlCuentaDeposito.SelectedIndex = 1
|
||||
'End If
|
||||
|
||||
|
||||
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)
|
||||
@@ -1382,17 +1363,11 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
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
|
||||
@@ -1402,11 +1377,8 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
End If
|
||||
|
||||
UpGuardar.Update()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Dep.Dispose()
|
||||
'Else
|
||||
' trCuentaDeposito.Visible = False
|
||||
' DdlCuentaDeposito.Items.Clear()
|
||||
@@ -1428,28 +1400,27 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
|
||||
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Dep As New ClsGenerales
|
||||
Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
|
||||
If dtc IsNot Nothing AndAlso dtc.Rows.Count = 1 Then
|
||||
|
||||
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCuentaDeposito:=DdlCuentaDeposito.SelectedValue.ToEntero) AndAlso Dep.DtResultados.Rows.Count = 1 Then
|
||||
If dtc.Rows.Count > 0 Then
|
||||
|
||||
If Dep.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then
|
||||
If dtc.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then
|
||||
|
||||
TrReferenciaCIE.Visible = True
|
||||
|
||||
TxtReferenciaCIE.Text = Dep.DtResultados.Rows(0)("Referencia").ToString
|
||||
TxtConceptoCIE.Text = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString
|
||||
TxtReferenciaCIE.Text = dtc.Rows(0)("Referencia").ToString
|
||||
TxtConceptoCIE.Text = dtc.Rows(0)("ConceptoCIE").ToString
|
||||
|
||||
OriReferenciaCIE = Dep.DtResultados.Rows(0)("Referencia").ToString
|
||||
OriConceptoCIE = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString
|
||||
OriReferenciaCIE = dtc.Rows(0)("Referencia").ToString
|
||||
OriConceptoCIE = dtc.Rows(0)("ConceptoCIE").ToString
|
||||
|
||||
Else
|
||||
TrReferenciaCIE.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
If Boolean.Parse(Dep.DtResultados.Rows(0)("EstatusPagoElectronicoGrupos").ToString) = True AndAlso Dep.DtResultados.Rows(0)("CveSATBanco").ToString.ToEntero <= 0 Then
|
||||
If Boolean.Parse(dtc.Rows(0)("EstatusPagoElectronicoGrupos").ToString) = True AndAlso dtc.Rows(0)("CveSATBanco").ToString.ToEntero <= 0 Then
|
||||
|
||||
Alert("Es necesario establecer el banco de la cuenta deposito", TipoMensaje.MsgAdvertencia)
|
||||
BtnIEGuardar.Enabled = False
|
||||
@@ -1466,7 +1437,6 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
TrReferenciaCIE.Visible = False
|
||||
End If
|
||||
|
||||
Dep.Dispose()
|
||||
UpCuentaDeposito.Update()
|
||||
UpGuardar.Update()
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user