This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-03-18 13:49:41 -07:00
parent e34cf6cf5e
commit 3ef09adf50

View File

@@ -234,7 +234,7 @@ Partial Class Contabilidad2_CatCuentas
DdlClientesWS.SelectedText = rowcc("Cliente").ToString().ToEntero() DdlClientesWS.SelectedText = rowcc("Cliente").ToString().ToEntero()
DdlClientesWS.SelectedValue = CveCliente DdlClientesWS.SelectedValue = CveCliente
Dim PorcentajeImpuesto As Decimal = rowcc("PorcentajeImpuesto").ToString().ToDecimal() * 100 Dim PorcentajeImpuesto As Decimal = rowcc("PorcentajeImpuesto").ToString().ToDecimal() * 100
DdlClasificacion.SelectedValueExist(PorcentajeImpuesto) TxtPorcentaje.Text = (PorcentajeImpuesto)
CveClasificacion = rowcc("CveClasificacion").ToString().ToEntero() CveClasificacion = rowcc("CveClasificacion").ToString().ToEntero()
DdlClasificacion.SelectedValueExist(CveClasificacion) DdlClasificacion.SelectedValueExist(CveClasificacion)
CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero() CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero()
@@ -292,21 +292,24 @@ Partial Class Contabilidad2_CatCuentas
CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen) Then CveConceptoAdmin:=CveConceptoAdmin, CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen) Then
Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}")
Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) If UsuarioActual.Empresa.TipoContabilizacion <> 1 Then
If ObjConta2.GetCuentas(-1, "-1", -1) Then Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa)
Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
Dim IdAgrupador As Integer
If ObjConta2.GetAgrupadoresSAT() Then If ObjConta2.GetCuentas(-1, "-1", -1) Then
IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero
End If Dim IdAgrupador As Integer
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 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 If End If
End If End Using
End Using End If
Dim customerRow As Data.DataRow Dim customerRow As Data.DataRow
customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0) customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0)