This commit is contained in:
rrene
2020-03-18 16:34:14 -07:00

View File

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