diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index c65e8e26e..b75818278 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1612,7 +1612,7 @@ Partial Class Clientes DdlUsoCFDI.SelectedValueExist(ObjClientes.CveUsoCFDI.ToString()) DdlMetodoPago33.SelectedValueExist(ObjClientes.CveMetodoPago33.ToString()) DdlFormaPago33.SelectedValueExist(ObjClientes.CveFormaPago33.ToString()) - DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal) + If ObjClientes.CveRegimenFiscal > 0 Then DdlRegimenFiscal.SelectedValueExist(ObjClientes.CveRegimenFiscal) ChkDesglosarIEPS.Checked = ObjClientes.DesglosaIEPS ChkNoDesglosaIVA.Checked = ObjClientes.NoDesglosaIVA @@ -1870,10 +1870,9 @@ Partial Class Clientes End If - RdTipoPersona.SelectedValue = If(ObjClientes.TipoPersona, "1", "0") - - RdTipoPersona_SelectedIndexChanged(Nothing, Nothing) - + RdTipoPersona.SelectedValue = If(ObjClientes.TipoPersona, "1", "0") + RdTipoPersona_SelectedIndexChanged(Nothing, Nothing) + End If UpActivacionPortal.Update() UpModalPersonaFisica.Update() @@ -4716,10 +4715,10 @@ Partial Class Clientes If Gvr.FCCheckBox("Chk").Checked AndAlso Gvr.FCTextBox("TxtImporte").Text.ToDouble > 0 Then Importe = Gvr.FCTextBox("TxtImporte").Text.ToDecimal() - IVA = Importe / Gvr.DataKey("Original").ToString().ToDecimal() * Gvr.DataKey("IVA").ToString().ToDecimal() 'TOMA EN CUENTA EL IVA - CONCEPTO DIFERENTE - ImporteAplicar = -(Importe - IVA) - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, "Traspaso de saldos de anticipos", 92, "Traspaso de saldos de anticipos.IVA", Now, 0, -1, CveCliente:=Gvr.DataKey("CveCliente").ToString().ToEntero(), CveIE:=Gvr.DataKey("CveIE").ToString().ToEntero(), ImporteMX:=ImporteAplicar) Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAplicar, "Traspaso de saldos de anticipos", 66, "Traspaso de saldos de anticipos.IVA", Now, 0, -1, CveCliente:=CveCliente, CveIE:=Gvr.DataKey("CveIE").ToString().ToEntero(), ImporteMX:=ImporteAplicar) Then + IVA = Importe / Gvr.DataKey("Original").ToDecimal() * Gvr.DataKey("IVA").ToDecimal() 'TOMA EN CUENTA EL IVA - CONCEPTO DIFERENTE + ImporteAplicar = (Importe - IVA) + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteAplicar, "Traspaso de saldos de anticipos", 92, "Traspaso de saldos de anticipos", Now, 0, -1, CveCliente:=Gvr.DataKey("CveCliente").ToEntero(), CveIE:=Gvr.DataKey("CveIE").ToEntero(), ImporteMX:=ImporteAplicar) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteAplicar, "Traspaso de saldos de anticipos", 66, "Traspaso de saldos de anticipos", Now, 0, -1, CveCliente:=CveCliente, CveIE:=Gvr.DataKey("CveIE").ToEntero(), ImporteMX:=ImporteAplicar) Then TieneError = True End If Else @@ -4737,8 +4736,6 @@ Partial Class Clientes End If End If End If - - End If Next Else @@ -10233,6 +10230,9 @@ Partial Class Clientes Else TxtNombreComercial.Enabled = True End If + ' DdlRegimenFiscal.SelectedIndex = -1 + DdlRegimenFiscal.Items.Clear() + DdlRegimenFiscal.SelectedValue = Nothing DdlRegimenFiscal.DataSource = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal") DdlRegimenFiscal.DataBind()