-- filtro de Reporte PS ECono
This commit is contained in:
@@ -1961,14 +1961,14 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetRepPSEcono(CveSubProyecto As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1,
|
Public Function GetRepPSEcono(CveSubProyectos As String, CvePS As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional GPO As Integer = -1,
|
||||||
Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0,
|
Optional CveMoneda As Integer = -1, Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0,
|
||||||
Optional Clasificacion As String = "-1", Optional Linea As String = "-1", Optional Marca As String = "-1", Optional orden As Integer = -1) As Boolean
|
Optional Clasificacion As String = "-1", Optional Linea As String = "-1", Optional Marca As String = "-1", Optional orden As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_RepPSEconoGet")
|
DataAdapter("PA_Vta_RepPSEconoGet")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyectos", SqlDbType.VarChar).Value = CveSubProyectos
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
||||||
<div runat="server" id="DivSubProyecto" class="col-md-2">
|
<div runat="server" id="DivSubProyecto" class="col-md-2">
|
||||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me"></asp:DropDownList>
|
<asp:ListBox ID="DdlSubProyectos" CssClass="select2me" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Style="width: 100%" data-text="Todos" SelectionMode="Multiple"></asp:ListBox>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate">
|
<div class="col-md-1 truncate">
|
||||||
Fecha Inicio:
|
Fecha Inicio:
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ Partial Class Ventas_RepPS
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaCombos()
|
Private Sub CargaCombos()
|
||||||
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto)
|
CargarCentrosDeCosto(Nothing, DdlSubProyectos, Nothing, LblSubProyecto)
|
||||||
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||||
DdlClasificacion.DataBind()
|
DdlClasificacion.DataBind()
|
||||||
|
|
||||||
@@ -77,12 +77,13 @@ Partial Class Ventas_RepPS
|
|||||||
LblLinea.Visible = True
|
LblLinea.Visible = True
|
||||||
DivLinea.Visible = True
|
DivLinea.Visible = True
|
||||||
|
|
||||||
Using ObjMarcas As New ClsProductosServicios
|
DdlMarcaPSDes.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||||
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
'Using ObjMarcas As New ClsProductosServicios
|
||||||
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
' If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
||||||
DdlMarcaPSDes.DataBind()
|
' DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
||||||
End If
|
' DdlMarcaPSDes.DataBind()
|
||||||
End Using
|
' End If
|
||||||
|
'End Using
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlLinea.DataSource = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa)
|
DdlLinea.DataSource = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa)
|
||||||
@@ -95,7 +96,8 @@ Partial Class Ventas_RepPS
|
|||||||
Dim Clasificacion As String = If(DdlClasificacion.GetSelectedValuesM = "", "-1", DdlClasificacion.GetSelectedValuesM)
|
Dim Clasificacion As String = If(DdlClasificacion.GetSelectedValuesM = "", "-1", DdlClasificacion.GetSelectedValuesM)
|
||||||
Dim Linea As String = If(DdlLinea.GetSelectedValuesM = "", "-1", DdlLinea.GetSelectedValuesM)
|
Dim Linea As String = If(DdlLinea.GetSelectedValuesM = "", "-1", DdlLinea.GetSelectedValuesM)
|
||||||
Dim Marca As String = If(DdlMarcaPSDes.GetSelectedValuesM = "", "-1", DdlMarcaPSDes.GetSelectedValuesM)
|
Dim Marca As String = If(DdlMarcaPSDes.GetSelectedValuesM = "", "-1", DdlMarcaPSDes.GetSelectedValuesM)
|
||||||
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
|
'Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero()
|
||||||
|
Dim CveSubProyectos As String = If(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM)
|
||||||
Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero()
|
Dim Grupo As Integer = DdlGrupo.SelectedValue.ToEntero()
|
||||||
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero()
|
Dim CvePS As Integer = DdlPS.SelectedValue.ToEntero()
|
||||||
Dim CveMoneda As Integer = -1
|
Dim CveMoneda As Integer = -1
|
||||||
@@ -106,7 +108,7 @@ Partial Class Ventas_RepPS
|
|||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
||||||
|
|
||||||
Dim ObjVentas As New ClsVentas()
|
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, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca, orden:=DdlOrden.SelectedValue.ToEntero()) Then
|
If ObjVentas.GetRepPSEcono(CveSubProyectos, CvePS, FechaI, FechaF, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, GPO:=Grupo, CveMoneda:=CveMoneda, TipoCambio:=TC, TCEspecifico:=TCEspecifico, Clasificacion:=Clasificacion, Linea:=Linea, Marca:=Marca, orden:=DdlOrden.SelectedValue.ToEntero()) Then
|
||||||
DtReporte = ObjVentas.DtResultados.Copy()
|
DtReporte = ObjVentas.DtResultados.Copy()
|
||||||
GvDatos.DataSource = DtReporte
|
GvDatos.DataSource = DtReporte
|
||||||
Else
|
Else
|
||||||
@@ -167,7 +169,7 @@ Partial Class Ventas_RepPS
|
|||||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
|
||||||
If DtReporte IsNot Nothing AndAlso DtReporte.Rows.Count > 0 Then
|
If DtReporte IsNot Nothing AndAlso DtReporte.Rows.Count > 0 Then
|
||||||
Dim SbParametros As New StringBuilder
|
Dim SbParametros As New StringBuilder
|
||||||
SbParametros.AppendFormat("Sucursal:{0}", DdlSubProyecto.SelectedItem.Text)
|
SbParametros.AppendFormat("Sucursal:{0}", DdlSubProyectos.GetSelectedText)
|
||||||
SbParametros.AppendFormat(", Orden:{0}", DdlGrupo.SelectedItem.Text)
|
SbParametros.AppendFormat(", Orden:{0}", DdlGrupo.SelectedItem.Text)
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||||
|
|||||||
Reference in New Issue
Block a user