-- cuentas depósitos corrección y agregado de cveempresa
This commit is contained in:
@@ -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