Correcion de carga de centros de costos en clientes

This commit is contained in:
2023-02-13 17:24:32 -07:00
parent 17cc2c85aa
commit 4aeabf9cc7
2 changed files with 21 additions and 13 deletions

View File

@@ -1302,6 +1302,7 @@ Partial Class Clientes
Private Sub CargaCombos()
CargaSubProyectos()
CargaMetodosPago()
CargaPrecioLista()
CargaVendedores()
@@ -1321,6 +1322,11 @@ Partial Class Clientes
CargaCombosComercioExterior()
End Sub
Private Sub CargaSubProyectos()
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, Nothing, AplicaTodos:="Seleccione")
'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
'DdlSubProyecto.DataBind()
End Sub
Private Sub CargaMetodosPago()
'DdlMetodoPago.DataSource = GlobalDTMetodosPago.FiltraParametros("Estatus = 'Activo'", "ClaveSAT") '.FiltraParametros("CveMetodoPago > 0 ")
@@ -1576,8 +1582,11 @@ Partial Class Clientes
DdlTipoRetencion_SelectedIndexChanged(DdlTipoRetencion, EventArgs.Empty)
TxtRetIVA.Text = ObjClientes.RetIVA.ToString()
TxtRetISR.Text = ObjClientes.RetISR.ToString()
ChkRetIVAFletesAcarreos.Checked = ObjClientes.RetieneIVAFletes
DdlSubProyecto.SelectedValue = ObjClientes.CveSubProyecto.ToString()
ChkRetIVAFletesAcarreos.Checked = ObjClientes.RetieneIVAFletes
If ObjClientes.CveSubProyecto > 0 Then
DdlSubProyecto.SelectedValueExistInsert(ObjClientes.CveSubProyecto.ToString(), GlobalDTSubProyectos(-1, CveSubProyecto:=ObjClientes.CveSubProyecto, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("SubProyecto"))
End If
DdlZonaHoraria.SelectedValueExist(ObjClientes.DtResultados(0)("CveZonaHoraria").ToString())
ChkEstado.Checked = ObjClientes.Estatus
EstatusAnteriorCliente = ObjClientes.Estatus
@@ -8428,7 +8437,7 @@ Partial Class Clientes
Private Sub CargaFiltros()
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, Nothing, LblSubProyecto)
CargarCentrosDeCosto(DdlProyectoFiltro, DdlSubProyectoFiltro, Nothing, LblSubProyectoFiltro)
'Cargo Clasificaciones
DdlClasificacionFilto.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
@@ -8465,8 +8474,8 @@ Partial Class Clientes
End Sub
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged
CargarSubProyecto(DdlSubProyecto, DdlProyecto.SelectedValue)
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyectoFiltro.SelectedIndexChanged
CargarSubProyecto(DdlSubProyecto, DdlProyectoFiltro.SelectedValue)
End Sub
Protected Sub DdlClasificacionFilto_SelectedIndexChanged(sender As Object, e As EventArgs)
@@ -8509,7 +8518,7 @@ Partial Class Clientes
FechaI = If(IsDate(TxtFechaIFiltro.Text.Trim()), TxtFechaIFiltro.Text.ToDate(), MinFecha)
FechaF = If(IsDate(TxtFechaFFiltro.Text.Trim()), TxtFechaFFiltro.Text.ToDate(), MaxFecha)
If ObjVentas.GetRepProductosServiciosDetalle(DdlProyecto.SelectedValue.ToEntero(), DdlSubProyectoFiltro.SelectedValue.ToEntero(), -1, DdlClasificacionFilto.SelectedValue.ToEntero(),
If ObjVentas.GetRepProductosServiciosDetalle(DdlProyectoFiltro.SelectedValue.ToEntero(), DdlSubProyectoFiltro.SelectedValue.ToEntero(), -1, DdlClasificacionFilto.SelectedValue.ToEntero(),
DdlPSFiltro.SelectedValue.ToEntero(), FechaI, FechaF, -1, MinFecha, MaxFecha, -1,
CveCliente, -1, DdlVendedorFiltro.SelectedValue.ToEntero(), DdlUsuario.SelectedValue.ToEntero(), -1,
UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:="Ing", GPO:=DdlGrupo.SelectedValue.ToEntero()) Then