+
diff --git a/Ventas/RepPedidosSTF.aspx.vb b/Ventas/RepPedidosSTF.aspx.vb
index 30916e0ac..f9974ffa5 100644
--- a/Ventas/RepPedidosSTF.aspx.vb
+++ b/Ventas/RepPedidosSTF.aspx.vb
@@ -2,6 +2,7 @@
Option Strict On
Imports System.Data
+Imports DocumentFormat.OpenXml.Office.CustomUI
Imports Extensiones
Partial Class Ventas_RepPedidosSTF
Inherits ClsPaginas
@@ -30,12 +31,28 @@ Partial Class Ventas_RepPedidosSTF
Protected Sub CargaDatos()
- Dim ObjVentas As New ClsVentas
- If ObjVentas.GetRepPedidosSTF(DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
- GvDatos.DataSource = ObjVentas.DtResultados
+ Dim Opcion As Integer = 1
+ Dim FechaInicio As Date = MinFecha
+ Dim FechaFin As Date = MaxFecha
+
+ If TabG.ActiveTabIndex = 1 Then ' entregados
+ Opcion = 2
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetRepPedidosSTF(DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion, FechaInicio, FechaFin) Then
+ GvE.DataSource = ObjVentas.DtResultados
+ End If
+ ObjVentas.Dispose()
+ GvE.DataBind()
+ Else
+ Dim ObjVentas As New ClsVentas
+ If ObjVentas.GetRepPedidosSTF(DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Opcion, FechaInicio, FechaFin) Then
+ GvDatos.DataSource = ObjVentas.DtResultados
+ End If
+ ObjVentas.Dispose()
+ GvDatos.DataBind()
End If
- ObjVentas.Dispose()
- GvDatos.DataBind()
+
+
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then