Rep Productos servicios Agrupador Cliente Sucursal

This commit is contained in:
rakcsle
2022-03-02 17:55:16 -07:00
parent e1ae89b689
commit c24fc52533
7 changed files with 193 additions and 100 deletions

View File

@@ -109,6 +109,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
DdlGrupo.Items.Insert(13, New ListItem("Año/Mes Ejec.", "17"))
DdlGrupo.Items.Insert(14, New ListItem("Fecha Ejec.", "18"))
DdlGrupo.Items.Insert(15, New ListItem("Cliente - PS", "20"))
DdlGrupo.Items.Insert(15, New ListItem("Cliente Sucursal", "26"))
DdlGrupo.DataBind()
DdlGrupo.SelectedValueExist("8")
End Sub
@@ -272,6 +273,38 @@ Partial Class Ventas_RepProductosServiciosDetalle
TCEspecifico = 0
TipoCambio = 1
End Sub
Private Sub CargaSucursales(CveCliente As Integer, CveClienteSucursal As Integer)
DdlClienteSucursal.Items.Clear()
If CveCliente > 0 Then
Dim ObjCliente As New ClsClientes
If ObjCliente.GetSucursales(CveCliente) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
DdlClienteSucursal.DataSource = ObjCliente.DtResultados
Else
DdlClienteSucursal.DataSource = Nothing
End If
End If
ObjCliente.Dispose()
DdlClienteSucursal.DataBind()
End If
DdlClienteSucursal.Items.Insert(0, New ListItem("Todas", "-1"))
DdlClienteSucursal.Items.Insert(1, New ListItem("Sin Sucursal", "0"))
DdlClienteSucursal.SelectedValueExist(CveClienteSucursal)
End Sub
Private Sub CargaParametrosDetalle()
@@ -281,6 +314,9 @@ Partial Class Ventas_RepProductosServiciosDetalle
Dim CveVendedor As Integer
Dim CveMarca As Integer = -1
Dim CveClasificacionDetalle As Integer = -1
Dim CveClienteSucursal As Integer = -1
GPO = If(Request("Grupo") IsNot Nothing AndAlso Request("Grupo").ToEntero() > 0, Request("Grupo").ToEntero(), -1).ToString
CveProyecto = If(Request("CveProyecto") IsNot Nothing AndAlso Request("CveProyecto").ToEntero() > 0, Request("CveProyecto").ToEntero(), -1).ToString
@@ -316,6 +352,9 @@ Partial Class Ventas_RepProductosServiciosDetalle
CveMarca = If(Request("CveMarca") IsNot Nothing AndAlso Request("CveMarca").ToEntero() > 0, Request("CveMarca").ToEntero(), -1).ToString.ToEntero
CveClasificacionDetalle = If(Request("CveClasificacionDetalle") IsNot Nothing AndAlso Request("CveClasificacionDetalle").ToEntero() > 0, Request("CveClasificacionDetalle").ToEntero(), -1).ToString.ToEntero
CveClienteSucursal = If(Request("CveClienteSucursal") IsNot Nothing AndAlso Request("CveClienteSucursal").ToEntero() >= 0, Request("CveClienteSucursal").ToEntero(), -1).ToString.ToEntero
'CveEstatusFactura = If(Request("CveEstatusFactura") IsNot Nothing AndAlso Request("CveEstatusFactura").ToEntero() > 0, Request("CveEstatusFactura").ToEntero(), -1).ToString.ToEntero
DdlGarantia.SelectedValueExist(If(Request("EsGarantia") IsNot Nothing AndAlso Request("EsGarantia").ToEntero() > 0, Request("EsGarantia").ToEntero(), -1).ToString)
DdlCondicionesPago.SelectedValueExist(If(Request("CveCondicionesPago") IsNot Nothing AndAlso Request("CveCondicionesPago").ToEntero() > 0, Request("CveCondicionesPago").ToEntero(), -1).ToString)
DdlDistribuidor.SelectedValueExist(If(Request("EsDistribuidor") IsNot Nothing AndAlso Request("EsDistribuidor").ToEntero() > 0, Request("EsDistribuidor").ToEntero(), -1).ToString)
@@ -456,6 +495,10 @@ Partial Class Ventas_RepProductosServiciosDetalle
CargaProvedores(CveProveedorCompra)
'If CveProveedorCompra.ToEntero > 0 Then DdlProveedor.SelectedValue = CveProveedorCompra
DdlTipoPSDes.SelectedValueExist(CveClasificacionDetalle)
CargaSucursales(DdlClientes.txtValue.Value.ToString.ToEntero, CveClienteSucursal)
' DdlEstatus.SelectedValueExist(CveEstatusFactura)
CargaDatos()
End Sub
@@ -486,7 +529,8 @@ Partial Class Ventas_RepProductosServiciosDetalle
UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, GPO:=DdlGrupo.SelectedValue.ToEntero, CveMoneda:=CveMoneda,
TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveProveedorCompra:=CveProveedorCompra,
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero,
ModalidadContable:=Not ChkLecturaAdmin.Checked, MostrarLitraje:=ChkLitraje.Checked, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero) Then
ModalidadContable:=Not ChkLecturaAdmin.Checked, MostrarLitraje:=ChkLitraje.Checked, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero,
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClienteSucursal:=DdlClienteSucursal.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados
TmpDT = ObjVentas.DtResultados
Else
@@ -675,7 +719,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
Private Sub CargaEstatus()
DdlEstatus.Items.Clear()
If DdlTipoComprobante.SelectedValue <> "-1" Then
If DdlTipoComprobante.SelectedValue <> "-1" AndAlso DdlTipoComprobante.SelectedValue <> "" Then
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto = '{0}'", DdlTipoComprobante.SelectedValue))
Else
DdlEstatus.DataSource = GlobalDTEstatusFactura
@@ -941,4 +985,15 @@ Partial Class Ventas_RepProductosServiciosDetalle
Protected Sub DdlClientes_selectedindexchange(sender As Object, e As EventArgs)
If DdlClientes.txtValue.Value.ToEntero > 0 Then
CargaSucursales(DdlClientes.txtValue.Value.ToEntero, -1)
Else
CargaSucursales(-1, -1)
End If
End Sub
End Class