+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb b/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb
new file mode 100644
index 000000000..cd77622b5
--- /dev/null
+++ b/Acumuladores/RepIndicadorDiarioDetalle.aspx.vb
@@ -0,0 +1,67 @@
+Option Explicit On
+Option Strict On
+
+Imports System.Data
+Imports System.IO
+Imports Extensiones
+Imports Microsoft.Reporting.WebForms
+Imports System.IO.Compression
+
+Partial Class Acumuladores_RepIndicadorDiarioDetalle
+ Inherits ClsPaginas
+
+ Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
+ If Not IsPostBack Then
+
+ CargaParametrosDetalle()
+
+ End If
+ End Sub
+
+
+#Region " CARGA DATOS INICIALES "
+
+
+ Private Sub CargaParametrosDetalle()
+
+ Dim Opcion As Integer = If(Request("Opcion") IsNot Nothing AndAlso Request("Opcion").ToEntero() > 0, Request("Opcion").ToEntero(), -1)
+
+ Dim CveSubProyecto As Integer = If(Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero() > 0, Request("CveSubProyecto").ToEntero(), -1)
+
+
+
+ End Sub
+#End Region
+
+#Region " CARGA DATOS "
+ Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
+ CargaDatos()
+ UPDatos.Update()
+ End Sub
+
+ Private Sub CargaDatos()
+
+ Dim ObjAcum As New ClsAcumuladores()
+
+ Dim FechaI, FechaF As Date
+ FechaI = txtFechaI.Text.ToDate
+ FechaF = txtFechaF.Text.ToDate
+
+ If ObjAcum.GetRepIndicadorDiarioDetalle(FechaI, FechaF, 1, -1, UsuarioActual.CveEmpresa) Then
+ GvDatos.DataSource = ObjAcum.DtResultados
+ Else
+ GvDatos.DataSource = Nothing
+ End If
+
+ ObjAcum.Dispose()
+ GvDatos.DataBind()
+
+ End Sub
+
+
+#End Region
+
+
+
+
+End Class
diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb
index 14962f888..6a8a46e45 100644
--- a/App_Code/ClsAcumuladores.vb
+++ b/App_Code/ClsAcumuladores.vb
@@ -1135,7 +1135,7 @@ Public Class ClsAcumuladores
End Function
- Public Function GetRepIndicadorDiario(FechaInicio As Date, FechaFin As Date, CveSubProeycto As Integer, CveEmpresa As Integer) As Boolean
+ Public Function GetRepIndicadorDiario(FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
@@ -1144,7 +1144,35 @@ Public Class ClsAcumuladores
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
- .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProeycto
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
+ .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
+ End With
+
+ Try
+
+ SqlAdapter.Fill(Data)
+ Retorno = True
+
+ Catch ex As SqlException
+
+ OnError("Ocurrió un error al consultar los datos. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
+
+ End Try
+
+ Return Retorno
+ End Function
+
+ Public Function GetRepIndicadorDiarioDetalle(FechaInicio As Date, FechaFin As Date, Opcion As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean
+
+ Dim Retorno As Boolean = False
+
+ SqlDataAdapter("PA_Acum_RepIndicadorDiarioDetalleGet")
+
+ With SqlAdapter.SelectCommand.Parameters
+ .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
+ .Add("@FechaFin", SqlDbType.Date).Value = FechaFin
+ .Add("@Opcion", SqlDbType.Int).Value = Opcion
+ .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb
index f7896eacb..0eb004041 100644
--- a/App_Code/ClsPaginas.vb
+++ b/App_Code/ClsPaginas.vb
@@ -2036,7 +2036,7 @@ Public Class ClsPaginas
End Set
End Property
'Variables para Ventas
- Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Boolean = True, Optional VendedorTipo As Integer = 1) As DataTable
+ Property GlobalDTVendedores(CveEmpresa As Integer, Optional Estatus As Integer = 1, Optional VendedorTipo As Integer = 1) As DataTable
Get
Dim AppNombre As String = String.Format("GlobalDTVendedores-{0}", CveEmpresa)
'sino existe, recarga los datos
@@ -2047,10 +2047,15 @@ Public Class ClsPaginas
End If
If CveEmpresa <> -1 Then
- Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0} AND CveEstatus = {1} AND VendedorTipo = {2}", CveEmpresa, If(Estatus, 1, 0), VendedorTipo), "", DataViewRowState.CurrentRows)
+ Dim StrSQL As New StringBuilder
+ StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
+ If VendedorTipo >= 0 Then StrSQL.AppendFormat(" AND VendedorTipo = {0} ", VendedorTipo)
+ If Estatus >= 0 Then StrSQL.AppendFormat(" AND CveEstatus = {0} ", If(Estatus = 1, True, False))
+ Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
GlobalDTVendedores = Dv.ToTable
Dv.Dispose()
+
Else
GlobalDTVendedores = DirectCast(Application(AppNombre), DataTable)
End If
@@ -5633,7 +5638,8 @@ Public Class ClsPaginas
PaginaDict.Add("/Acumuladores/CatTiposUso.aspx".ToUpper(), 1034)
PaginaDict.Add("/Acumuladores/CatFoliosGarantia.aspx".ToUpper(), 1035)
PaginaDict.Add("/Acumuladores/CatGarantiasMeses.aspx".ToUpper(), 1036)
- PaginaDict.Add("/Acumuladores/RepIndicadorDiario.aspx".ToUpper(), 2055)
+ PaginaDict.Add("/Acumuladores/RepIndicadorDiario.aspx".ToUpper(), 730)
+ PaginaDict.Add("/Acumuladores/RepIndicadorDiarioDetalle.aspx".ToUpper(), 730)
PaginaDict.Add("/Acumuladores/RepEntradasUsadosClientes.aspx".ToUpper(), 543)
PaginaDict.Add("/Acumuladores/EntradasUsadosResumenRep.aspx".ToUpper(), 1032)
@@ -7075,7 +7081,7 @@ Public Class ClsPaginas
'Si no tiene CBB, SE GENERA
If Not ImagenCBB.Exists AndAlso Vta.CveCliente.ToEntero > 0 Then
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
- CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total.ToString.ToDecimal, Vta.FolioFiscal, RutaCBB)
+ CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total, Vta.FolioFiscal, RutaCBB)
End If
'ImgCBB = String.Format("{0}://{1}:{2}/Empresas/{3}/CBB/{4}.jpg", Request.Url.Scheme.Replace("https", "http"), Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa, Vta.SerieFolio)