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

@@ -4276,16 +4276,15 @@
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate" style="width: 120px">Proyecto:</asp:Label>
<div runat="server" id="DivProyecto" class="col-md-2" style="width: 120px">
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:Label ID="LblProyectoFiltro" runat="server" class="col-md-1 truncate" style="width: 120px">Proyecto:</asp:Label>
<div runat="server" id="DivProyectoFiltro" class="col-md-2" style="width: 120px">
<asp:DropDownList ID="DdlProyectoFiltro" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate" style="width: 120px; text-align: right">SubProyecto:</asp:Label>
<div runat="server" id="DivSubProyecto" class="col-md-2" style="width: 120px">
<asp:DropDownList ID="DdlSubProyectoFiltro" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
<asp:Label ID="LblSubProyectoFiltro" runat="server" class="col-md-1 truncate" style="width: 120px; text-align: right">SubProyecto:</asp:Label>
<div runat="server" id="DivSubProyectoFiltro" class="col-md-2" style="width: 120px">
<asp:DropDownList ID="DdlSubProyectoFiltro" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
</asp:DropDownList>
</div>
</div>

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