-- limpiar globaldtcuentas
This commit is contained in:
@@ -261,7 +261,7 @@ Partial Class Contabilidad2_CatCuentas
|
||||
Tnombre.Text = dr("Nombre").ToString()
|
||||
DTcuenta.SelectedValue = dr("Tipo").ToString()
|
||||
DcuentaMayor.SelectedValue = dr("CtaMayor").ToString
|
||||
DdlMoneda.SelectedValue = dr("CveMoneda").ToString
|
||||
DdlMoneda.SelectedValue = If(dr("CveMoneda").ToString = "", "1", dr("CveMoneda").ToString)
|
||||
Using objconta As New ClsContabilidad
|
||||
objconta.GetConta_CuentasDataContabilidad(IDSelected, UsuarioActual.CveEmpresa)
|
||||
If objconta.DtResultados.Rows.Count > 0 Then
|
||||
@@ -362,36 +362,36 @@ Partial Class Contabilidad2_CatCuentas
|
||||
CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto,
|
||||
CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen, Codigo:=TxtCuenta.Text.Replace("-", ""), CvePadre:=DdlCuentaContable.SelectedValue.ToEntero) Then
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
Dim ObjContaEmpresa As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If Not ObjContaEmpresa.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
DdlMoneda.SelectedValue.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
ObjContaEmpresa.Dispose()
|
||||
ObjConta.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
' Dim ObjContaEmpresa As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' If Not ObjContaEmpresa.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero,
|
||||
' DdlMoneda.SelectedValue.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
' ObjContaEmpresa.Dispose()
|
||||
' ObjConta.Dispose()
|
||||
' Exit Sub
|
||||
' End If
|
||||
'End If
|
||||
|
||||
Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
|
||||
'Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
|
||||
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
'If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||
|
||||
Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
' Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
|
||||
If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
|
||||
Dim IdAgrupador As Integer
|
||||
' If ObjConta2.GetCuentas(-1, "-1", -1) Then
|
||||
' Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
|
||||
' Dim IdAgrupador As Integer
|
||||
|
||||
If ObjConta2.GetAgrupadoresSAT() Then
|
||||
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||
End If
|
||||
If Id > 0 Then
|
||||
If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
' If ObjConta2.GetAgrupadoresSAT() Then
|
||||
' IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero
|
||||
' End If
|
||||
' If Id > 0 Then
|
||||
' If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then
|
||||
' End If
|
||||
' End If
|
||||
' End If
|
||||
' End Using
|
||||
'End If
|
||||
|
||||
Dim customerRow As Data.DataRow
|
||||
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)
|
||||
@@ -408,7 +408,7 @@ Partial Class Contabilidad2_CatCuentas
|
||||
LimpiarCampos()
|
||||
'RegistraScript("$get('BtnCambiaAgrupadorSAT').click();")
|
||||
updatos.Update()
|
||||
|
||||
GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing
|
||||
Alert("La cuenta se guardo correctamente")
|
||||
|
||||
End If
|
||||
@@ -596,7 +596,7 @@ Partial Class Contabilidad2_CatCuentas
|
||||
|
||||
If Not TieneError Then
|
||||
ObjConta.Commit()
|
||||
|
||||
GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing
|
||||
CargaDatos()
|
||||
LimpiarCampos()
|
||||
updatos.Update()
|
||||
@@ -669,6 +669,7 @@ Partial Class Contabilidad2_CatCuentas
|
||||
ObjConta2.Dispose()
|
||||
|
||||
End If
|
||||
GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
Else
|
||||
Alert("La Cuenta no pudo ser eliminada", TipoMensaje.MsgError)
|
||||
|
||||
Reference in New Issue
Block a user