-- cuentas depósitos corrección y agregado de cveempresa

This commit is contained in:
2023-02-20 20:18:14 -07:00
parent 36054f318b
commit d96e4bd3c6
6 changed files with 81 additions and 118 deletions

View File

@@ -1146,20 +1146,17 @@ Partial Class Bancos_IE
Else Else
If DdlTipoTransaccion.SelectedValue = "9" Then If DdlTipoTransaccion.SelectedValue = "9" Then
Dim Dep As New ClsGenerales Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
If Dep.GetCuentasDepositos(CveProveedor:=ObjIE.CveProveedor) Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus = 'True' ") If dtc IsNot Nothing Then
If Dep.DtResultados.Rows.Count > 0 Then DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) 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
End If End If
Dep.Dispose()
DdlCuentaDeposito.DataBind() DdlCuentaDeposito.DataBind()
UpCuentaDeposito.Update() UpCuentaDeposito.Update()
End If End If
@@ -1167,9 +1164,6 @@ Partial Class Bancos_IE
End If End If
LnkComplementoPago.Visible = True LnkComplementoPago.Visible = True
If ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelado > 0 Then If ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelado > 0 Then
'cuando es cheque devuelto 'cuando es cheque devuelto
TabCancelacion.Visible = True TabCancelacion.Visible = True
@@ -1185,8 +1179,6 @@ Partial Class Bancos_IE
End If End If
'DATOS DE CANCELACION 'DATOS DE CANCELACION
If ObjIE.CveEstatusIE = 2 OrElse (ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelacion > 0) Then If ObjIE.CveEstatusIE = 2 OrElse (ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelacion > 0) Then
TabCancelacion.Visible = True TabCancelacion.Visible = True
@@ -1327,8 +1319,6 @@ Partial Class Bancos_IE
End If End If
RecargaGlobalCuentasBancarias()
ObjIE.Dispose() ObjIE.Dispose()
ObjIE2.Dispose() ObjIE2.Dispose()
UPPP.Update() UPPP.Update()
@@ -3968,7 +3958,6 @@ Partial Class Bancos_IE
End If End If
Msg.Clear() Msg.Clear()
RecargaGlobalCuentasBancarias()
ObjIE.Dispose() ObjIE.Dispose()
ObjMov.Dispose() ObjMov.Dispose()
If ObjComp IsNot Nothing Then ObjComp.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 'If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
trCuentaDeposito.Visible = False trCuentaDeposito.Visible = False
Dim dtc As DataTable = Nothing
Dim Dep As New ClsGenerales If CveProveedor > 0 Then
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor, CveCliente:=CveCliente, CvePersonal:=CvePersonal) 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 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 trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else Else
@@ -5223,10 +5220,9 @@ Partial Class Bancos_IE
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then ElseIf DdlTipoTransaccion.SelectedValue = "17" And CveIE <= -1 Then
If dtc.Rows.Count > 0 Then
If Dep.DtResultados.Rows.Count > 0 Then DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus = 'True' ")
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus = 'True' ")
trCuentaDeposito.Visible = True trCuentaDeposito.Visible = True
BtnGuardar.ToolTip = "" BtnGuardar.ToolTip = ""
@@ -5242,15 +5238,14 @@ Partial Class Bancos_IE
UpGuardar.Update() UpGuardar.Update()
Else Else
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'") DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
If Dep.DtResultados.Rows.Count > 0 Then If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If End If
End If End If
Else Else
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE <= -1 Then If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") And CveIE <= -1 Then
@@ -5265,9 +5260,8 @@ Partial Class Bancos_IE
UpGuardar.Update() UpGuardar.Update()
End If End If
Dep.Dispose()
'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
@@ -5280,7 +5274,7 @@ Partial Class Bancos_IE
' trCuentaDeposito.Visible = False ' trCuentaDeposito.Visible = False
' DdlCuentaDeposito.Items.Clear() ' DdlCuentaDeposito.Items.Clear()
'End If 'End If
RecargaGlobalCuentasBancarias()
UpCuentaDeposito.Update() UpCuentaDeposito.Update()
UpDatos.Update() UpDatos.Update()
End Sub End Sub
@@ -5305,18 +5299,6 @@ Partial Class Bancos_IE
End Sub 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) Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim Dep As New ClsGenerales Dim Dep As New ClsGenerales
@@ -6640,7 +6622,6 @@ Partial Class Bancos_IE
trCuentaDeposito.Visible = True trCuentaDeposito.Visible = True
DdlCuentaDeposito.Enabled = True DdlCuentaDeposito.Enabled = True
Dim Dep As New ClsGenerales Dim Dep As New ClsGenerales
If Dep.GetCuentasDepositos(CveCliente:=CveCliente) Then If Dep.GetCuentasDepositos(CveCliente:=CveCliente) Then
@@ -6651,15 +6632,12 @@ Partial Class Bancos_IE
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If End If
End If End If
Dep.Dispose() Dep.Dispose()
DdlCuentaDeposito.DataBind() DdlCuentaDeposito.DataBind()
UpCuentaDeposito.Update() UpCuentaDeposito.Update()
End If End If
End Sub End Sub

View File

@@ -650,16 +650,14 @@ Partial Class Bancos_ProveedoresAbonar
Exit Sub Exit Sub
End If End If
Dim Dep As New ClsGenerales Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor) Then If dtc IsNot Nothing Then
Dim Row = Dep.DtResultados.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero)) Dim Row = dtc.FiltroPrimero(String.Format("CveCuentaDeposito = {0}", DdlCuentaDeposito.SelectedValue.ToEntero))
If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then If Row IsNot Nothing AndAlso Row("Estatus").ToString = "False" Then
Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia) Alert("La cuenta depósito del proveedor esta inactiva.", TipoMensaje.MsgAdvertencia)
Dep.Dispose()
Exit Sub Exit Sub
End If End If
End If End If
Dep.Dispose()
'proceso que restringue solo el pago de apartir del dia de hoy y como limite fin de mes '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 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" #Region " CUENTAS DEPOSITOS"
Private Sub CargaCuentasDepositos() Private Sub CargaCuentasDepositos()
DdlCuentaDeposito.Items.Clear() DdlCuentaDeposito.Items.Clear()
' If DdlTipoTransaccion.SelectedValue.Contiene("2", "9") Then ' transferencias y layout
trCuentaDeposito.Visible = False trCuentaDeposito.Visible = False
Dim Dep As New ClsGenerales Dim dtc As DataTable = GlobalDTProveedoresCuentas(UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor)
If Dep.GetCuentasDepositos(CveProveedor:=CveProveedor) Then 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 DdlTipoTransaccion.SelectedValue = "9" Then
If Dep.DtResultados.Rows.Count > 0 Then If dtc.Rows.Count > 0 Then
DdlCuentaDeposito.DataSource = Dep.DtResultados.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.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If 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 trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
Else Else
@@ -1335,45 +1333,28 @@ Partial Class Bancos_ProveedoresAbonar
ElseIf DdlTipoTransaccion.SelectedValue = "17" Then ElseIf DdlTipoTransaccion.SelectedValue = "17" Then
If dtc.Rows.Count > 0 Then
If Dep.DtResultados.Rows.Count > 0 Then DdlCuentaDeposito.DataSource = dtc.FiltraParametros(" Estatus ='True'")
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus ='True'")
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 = ""
Else Else
BtnIEGuardar.Enabled = False BtnIEGuardar.Enabled = False
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() UpGuardar.Update()
Else Else
DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros("Estatus ='True'") DdlCuentaDeposito.DataSource = dtc.FiltraParametros("Estatus ='True'")
If Dep.DtResultados.Rows.Count > 0 Then If dtc.Rows.Count > 0 Then
trCuentaDeposito.Visible = True trCuentaDeposito.Visible = True
DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1"))
End If End If
End If End If
DdlCuentaDeposito.DataBind() DdlCuentaDeposito.DataBind()
'If DdlCuentaDeposito.Items.Count > 1 Then
' DdlCuentaDeposito.SelectedIndex = 1
'End If
Else Else
If DdlTipoTransaccion.SelectedValue.Contiene("9", "17") Then 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"
Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia) Alert("El proveedor no tiene cuentas deposito.", TipoMensaje.MsgAdvertencia)
@@ -1382,17 +1363,11 @@ Partial Class Bancos_ProveedoresAbonar
BtnIEGuardar.Enabled = True BtnIEGuardar.Enabled = True
BtnIEGuardar.ToolTip = "" BtnIEGuardar.ToolTip = ""
End If End If
UpGuardar.Update() UpGuardar.Update()
End If End If
Else Else
If DdlTipoTransaccion.SelectedValue = "17" Then If DdlTipoTransaccion.SelectedValue = "17" Then
BtnIEGuardar.Enabled = False BtnIEGuardar.Enabled = False
BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito" BtnIEGuardar.ToolTip = "El proveedor no tiene cuentas deposito"
Else Else
@@ -1402,11 +1377,8 @@ Partial Class Bancos_ProveedoresAbonar
End If End If
UpGuardar.Update() UpGuardar.Update()
End If End If
Dep.Dispose()
'Else 'Else
' trCuentaDeposito.Visible = False ' trCuentaDeposito.Visible = False
' DdlCuentaDeposito.Items.Clear() ' DdlCuentaDeposito.Items.Clear()
@@ -1428,28 +1400,27 @@ Partial Class Bancos_ProveedoresAbonar
Protected Sub DdlCuentaDeposito_SelectedIndexChanged(sender As Object, e As EventArgs) 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 dtc.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then
If Dep.DtResultados.Rows(0)("TieneCIE").ToString.ToEntero = 1 Then
TrReferenciaCIE.Visible = True TrReferenciaCIE.Visible = True
TxtReferenciaCIE.Text = Dep.DtResultados.Rows(0)("Referencia").ToString TxtReferenciaCIE.Text = dtc.Rows(0)("Referencia").ToString
TxtConceptoCIE.Text = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString TxtConceptoCIE.Text = dtc.Rows(0)("ConceptoCIE").ToString
OriReferenciaCIE = Dep.DtResultados.Rows(0)("Referencia").ToString OriReferenciaCIE = dtc.Rows(0)("Referencia").ToString
OriConceptoCIE = Dep.DtResultados.Rows(0)("ConceptoCIE").ToString OriConceptoCIE = dtc.Rows(0)("ConceptoCIE").ToString
Else Else
TrReferenciaCIE.Visible = False TrReferenciaCIE.Visible = False
End If 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) Alert("Es necesario establecer el banco de la cuenta deposito", TipoMensaje.MsgAdvertencia)
BtnIEGuardar.Enabled = False BtnIEGuardar.Enabled = False
@@ -1466,7 +1437,6 @@ Partial Class Bancos_ProveedoresAbonar
TrReferenciaCIE.Visible = False TrReferenciaCIE.Visible = False
End If End If
Dep.Dispose()
UpCuentaDeposito.Update() UpCuentaDeposito.Update()
UpGuardar.Update() UpGuardar.Update()
End Sub End Sub

View File

@@ -1730,7 +1730,7 @@ Partial Class Compras_Proveedores
''Agregar Cuentas Bancarias ''Agregar Cuentas Bancarias
If TempDTCuentasBancos.Rows.Count > 0 Then If TempDTCuentasBancos.Rows.Count > 0 Then
For Each row As DataRow In TempDTCuentasBancos.Rows For Each row As DataRow In TempDTCuentasBancos.Rows
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, row("RefCrediProveedor").ToString, UsuarioActual.CveUsuario, row("CveMoneda").ToString.ToEntero, If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString, row("Plaza").ToString, row("Sucursal").ToString, row("Cuenta").ToString, row("CLABE").ToString, row("CIE").ToString, row("SWIFT").ToString, row("Referencia").ToString, row("RefCrediProveedor").ToString, UsuarioActual.CveUsuario, row("CveMoneda").ToString.ToEntero, UsuarioActual.CveEmpresa,
CveProveedor:=NuevoCveProveedor, Correo:=row("Correo").ToString, BBVAAlias:=row("BBVAAlias").ToString, CveProveedor:=NuevoCveProveedor, Correo:=row("Correo").ToString, BBVAAlias:=row("BBVAAlias").ToString,
EstatusPagoElectronico:=Boolean.Parse(row("EstatusPagoElectronico").ToString), EstatusPagoElectronicoGrupos:=Boolean.Parse(row("EstatusPagoElectronicoGrupos").ToString), CveSATBanco:=row("CveSATBanco").ToString.ToEntero) Then EstatusPagoElectronico:=Boolean.Parse(row("EstatusPagoElectronico").ToString), EstatusPagoElectronicoGrupos:=Boolean.Parse(row("EstatusPagoElectronicoGrupos").ToString), CveSATBanco:=row("CveSATBanco").ToString.ToEntero) Then
ErrorBancos = True ErrorBancos = True
@@ -3212,7 +3212,7 @@ Partial Class Compras_Proveedores
If CveProveedor > 0 Then If CveProveedor > 0 Then
Dim ObjCuentasBancos As New ClsGenerales Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, CveProveedor:=CveProveedor, If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CveProveedor:=CveProveedor,
Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco, ConceptoCIE:=ConceptoCIE) Then Correo:=Correo, BBVAAlias:=BBVAAlias, EstatusPagoElectronico:=EstatusPagoElectronico, EstatusPagoElectronicoGrupos:=EstatusPagoElectronicoGrupos, CveSATBanco:=CveSATBanco, ConceptoCIE:=ConceptoCIE) Then
DTCuentasBancos.Clear() DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor))) DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveProveedor = {0}", CveProveedor)))

View File

@@ -1170,7 +1170,7 @@ Partial Class General_SaldosIniciales
If Not ErrorCuentaDeposito Then If Not ErrorCuentaDeposito Then
Dim ObjGrales As New ClsGenerales(ObjProv.IniciaTransacSQL) Dim ObjGrales As New ClsGenerales(ObjProv.IniciaTransacSQL)
If Not ObjGrales.AddCuentasDepositos(Banco, "-1", "-1", NumeroCuenta, ClabeInter, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario, 1, CveProveedor:=ObjProv.CveProveedor) Then If Not ObjGrales.AddCuentasDepositos(Banco, "-1", "-1", NumeroCuenta, ClabeInter, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario, 1, UsuarioActual.CveEmpresa, CveProveedor:=ObjProv.CveProveedor) Then
'ErrorProv = True 'ErrorProv = True
End If End If
End If End If
@@ -1811,6 +1811,9 @@ Partial Class General_SaldosIniciales
If Not dt.Columns.Contains("CveCuentaContable") Then If Not dt.Columns.Contains("CveCuentaContable") Then
dt.Columns.Add("CveCuentaContable", GetType(Integer)) dt.Columns.Add("CveCuentaContable", GetType(Integer))
End If End If
If Not dt.Columns.Contains("CveCuentaContableDepreciacion") Then
dt.Columns.Add("CveCuentaContableDepreciacion", GetType(Integer))
End If
Dim sbErrores As New StringBuilder Dim sbErrores As New StringBuilder
For Each Row As DataRow In dt.Rows For Each Row As DataRow In dt.Rows
@@ -1830,6 +1833,18 @@ Partial Class General_SaldosIniciales
ErrorAF = True ErrorAF = True
End If End If
End If End If
CuentaContable = Row("Cuenta Depreciación").ToString().Trim.Replace("-", "").Replace(" ", "")
If CuentaContable.Length > 0 Then
Dim CveCuentaContable As Integer = DTCuentasContables.FiltroPrimeroValor("CveCuenta", $"Codigo ='{CuentaContable}'").ToEntero()
If CveCuentaContable > 0 Then
Row("CveCuentaContableDepreciacion") = CveCuentaContable
Else
sbErrores.AppendLine($"Activo Fijo {Codigo} {Descripcion} cuenta {CuentaContable} no encontrada.<br>")
ErrorAF = True
End If
End If
Next Next
If Not ErrorAF Then If Not ErrorAF Then
@@ -1840,9 +1855,11 @@ Partial Class General_SaldosIniciales
End If End If
Dim ObjAF As New ClsAF Dim ObjAF As New ClsAF
ObjAF.IniciaTransacSQL()
Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL)
Try Try
ObjAF.IniciaTransacSQL()
Dim Contador As Integer = 0 Dim Contador As Integer = 0
Dim NumRow As Integer = 0 Dim NumRow As Integer = 0
@@ -1872,7 +1889,7 @@ Partial Class General_SaldosIniciales
Dim CveEstadoActivoFijo As Integer = GlobalDTEstadoActivoFijo().FiltroPrimeroValor("CveEstadoActivoFijo", $"EstadoActivoFijo = '{Estado}'").ToString().ToEntero() Dim CveEstadoActivoFijo As Integer = GlobalDTEstadoActivoFijo().FiltroPrimeroValor("CveEstadoActivoFijo", $"EstadoActivoFijo = '{Estado}'").ToString().ToEntero()
Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"Nombre = '{Cliente}'").ToString().ToEntero() Dim CveCliente As Integer = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCliente", $"Nombre = '{Cliente}'").ToString().ToEntero()
Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString().ToEntero() Dim CveCuentaContable As Integer = Row("CveCuentaContable").ToString().ToEntero()
Dim CveCuentaContableDepreciacion As Integer = Row("CveCuentaContable").ToString().ToEntero()
'VALIDACIONES 'VALIDACIONES
If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For If Not CveSubTipoAF > 0 Then Alert($"No se encontró el SubTipo: {TipoAF} Descripcion: {Descripcion} Renglón: {NumRow}: ", TipoMensaje.MsgAdvertencia) : ErrorAF = True : Exit For
@@ -1890,27 +1907,27 @@ Partial Class General_SaldosIniciales
If CveAF > 0 Then If CveAF > 0 Then
If CveCuentaContable > 0 Then If CveCuentaContable > 0 Then
Dim ObjConta As New ClsContabilidad(ObjAF.IniciaTransacSQL)
If Not ObjConta.AddCuentasAsignaciones(49, UsuarioActual.CveEmpresa, CveCuentaContable, -1, If Not ObjConta.AddCuentasAsignaciones(49, UsuarioActual.CveEmpresa, CveCuentaContable, -1,
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF, -1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
CveTipoGasto:=-1, RegeneraCuenta:=False) Then CveTipoGasto:=-1, RegeneraCuenta:=False) Then
ErrorAF = True ErrorAF = True
End If End If
End If
If CveCuentaContableDepreciacion > 0 Then
If Not ObjConta.AddCuentasAsignaciones(101, UsuarioActual.CveEmpresa, CveCuentaContableDepreciacion, -1,
-1, -1, -1, -1, -1, 0, CveBancoCuenta:=-1, CveConceptoNomina:=-1, CveSubProyecto:=-1, CveActivoFijo:=CveAF,
CveTipoGasto:=-1, RegeneraCuenta:=False) Then
ErrorAF = True
End If
End If End If
Else Else
ErrorAF = True ErrorAF = True
Exit For Exit For
End If End If
End If End If
NumRow = NumRow + 1 NumRow = NumRow + 1
Next Next
If Not ErrorAF Then If Not ErrorAF Then
If Contador > 0 Then If Contador > 0 Then
Alert(String.Format("Se agregaron: <b>{0}</b> Activos Fijos correctamente. <br>Se Omitieron: <b>{1}</b> Activos Fijos ya que ya se encontraban registrados.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion) Alert(String.Format("Se agregaron: <b>{0}</b> Activos Fijos correctamente. <br>Se Omitieron: <b>{1}</b> Activos Fijos ya que ya se encontraban registrados.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion)
@@ -1933,19 +1950,17 @@ Partial Class General_SaldosIniciales
Finally Finally
ObjAF.Dispose() ObjAF.Dispose()
ObjConta.Dispose()
End Try End Try
#End Region #End Region
' C U E N T A S C O N T A B L E S ' C U E N T A S C O N T A B L E S
ElseIf RblFormato.SelectedValue = "8" Then ElseIf RblFormato.SelectedValue = "8" Then
Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa)
ObjConta.IniciaTransacSQL() ObjConta.IniciaTransacSQL()
Try Try
Dim TieneError As Boolean = False Dim TieneError As Boolean = False
Dim ContadorUpdate As Integer = 0 Dim ContadorUpdate As Integer = 0
Dim ContadorError As Integer = 0 Dim ContadorError As Integer = 0

View File

@@ -1999,7 +1999,7 @@ Partial Class RH_Personal
If TempDTCuentasBancos.Rows.Count > 0 Then If TempDTCuentasBancos.Rows.Count > 0 Then
For Each row As DataRow In TempDTCuentasBancos.Rows For Each row As DataRow In TempDTCuentasBancos.Rows
If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then If Not ObjCuentasDeposito.AddCuentasDepositos(row("BancoNombre").ToString(), row("Plaza").ToString(), row("Sucursal").ToString(), row("Cuenta").ToString(), row("CLABE").ToString(), row("CIE").ToString(), row("SWIFT").ToString(), row("Referencia").ToString(), "", UsuarioActual.CveUsuario, row("CveMoneda").ToString().ToEntero(), UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=row("BBVAAlias").ToString()) Then
TieneError = True TieneError = True
Exit For Exit For
End If End If
@@ -3353,7 +3353,7 @@ Partial Class RH_Personal
If CvePersonal > 0 Then If CvePersonal > 0 Then
Dim ObjCuentasBancos As New ClsGenerales Dim ObjCuentasBancos As New ClsGenerales
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, "", UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CvePersonal:=CvePersonal, CveUsuarioModifico:=UsuarioActual.CveUsuario, BBVAAlias:=BBVAAlias, CveSATBanco:=CveSATBanco, EstatusPagoElectronico:=EstatusPagoElectronico) Then
DTCuentasBancos.Clear() DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal))) DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CvePersonal = {0}", CvePersonal)))

View File

@@ -6615,7 +6615,7 @@ Partial Class Clientes
If CveCliente > 0 Then If CveCliente > 0 Then
If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, CveCliente:=CveCliente) Then If ObjCuentasBancos.AddCuentasDepositos(NombreBanco, Plaza, NumeroSucursal, NumeroCuenta, CLABE, ConvenioCIE, SWIFT, Referencia, RefCrediProveedor, UsuarioActual.CveUsuario, CveMoneda, UsuarioActual.CveEmpresa, CveCliente:=CveCliente) Then
DTCuentasBancos.Clear() DTCuentasBancos.Clear()
DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente))) DTCuentasBancos.Merge(ObjCuentasBancos.DtResultados.FiltraParametros(String.Format("CveCliente = {0}", CveCliente)))
Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion) Alert("Cuenta Bancaria agregada con éxito.", TipoMensaje.MsgInformacion)