This commit is contained in:
@@ -33,6 +33,39 @@ Partial Class Ventas_RepPS
|
||||
|
||||
Private Sub CargaCombos()
|
||||
CargaTipoCentroCosto()
|
||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
|
||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||
DdlPS.SelectedText = ""
|
||||
DdlPS.SelectedValue = "-1"
|
||||
Else
|
||||
DdlPS.ddl.Items.Clear()
|
||||
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero)
|
||||
DdlPS.ddl.DataBind()
|
||||
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then
|
||||
DivMarca.Visible = True
|
||||
LblMarca.Visible = True
|
||||
LblLinea.Visible = True
|
||||
DivLinea.Visible = True
|
||||
|
||||
Using ObjMarcas As New ClsProductosServicios
|
||||
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
||||
DdlMarcaPSDes.DataBind()
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
|
||||
DdlLinea.DataSource = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa)
|
||||
DdlLinea.DataBind()
|
||||
'DdlMarcaPSDes.Items.Insert(0, New ListItem(" Todos ", "-1"))
|
||||
End Sub
|
||||
|
||||
Private Sub CargaTipoCentroCosto()
|
||||
@@ -70,9 +103,12 @@ Partial Class Ventas_RepPS
|
||||
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim Clasificacion As String = If(DdlClasificacion.GetSelectedValuesM = "", "-1", DdlClasificacion.GetSelectedValuesM)
|
||||
Dim Linea As String = If(DdlLinea.GetSelectedValuesM = "", "-1", DdlLinea.GetSelectedValuesM)
|
||||
Dim Marca As String = If(DdlMarcaPSDes.GetSelectedValuesM = "", "-1", DdlMarcaPSDes.GetSelectedValuesM)
|
||||
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
|
||||
Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero()
|
||||
Dim CvePS As Integer = -1
|
||||
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero()
|
||||
Dim CveMoneda As Integer = -1
|
||||
Dim TC As Integer = 1
|
||||
Dim TCEspecifico As Decimal = -1
|
||||
@@ -81,7 +117,7 @@ Partial Class Ventas_RepPS
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
||||
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico) Then
|
||||
If ObjVentas.GetRepPSEcono(CveSubProyecto, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca) Then
|
||||
DtReporte = ObjVentas.DtResultados.Copy()
|
||||
GvDatos.DataSource = DtReporte
|
||||
Else
|
||||
@@ -97,14 +133,25 @@ Partial Class Ventas_RepPS
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Select Case e.Row.DBCampo("Orden").ToString.ToEntero()
|
||||
Case 4
|
||||
|
||||
e.Row.Cells(0).ColumnSpan = 2
|
||||
e.Row.Cells(1).Visible = False
|
||||
e.Row.CssClass = "Totales"
|
||||
Case 3
|
||||
e.Row.Cells(0).ColumnSpan = 2
|
||||
e.Row.Cells(1).Visible = False
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
Case 2
|
||||
e.Row.Cells(0).ColumnSpan = 2
|
||||
e.Row.Cells(1).Visible = False
|
||||
e.Row.CssClass = "SubTotales"
|
||||
Case 1
|
||||
e.Row.Cells(0).ColumnSpan = 2
|
||||
e.Row.Cells(1).Visible = False
|
||||
e.Row.CssClass = "SubTotalesB"
|
||||
Case 0
|
||||
e.Row.Cells(0).ColumnSpan = 1
|
||||
e.Row.Cells(1).Visible = True
|
||||
e.Row.CssClass = "Texto"
|
||||
End Select
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user