diff --git a/App_Code/ClsCRM.vb b/App_Code/ClsCRM.vb
index 2c84fb3e1..7cb6f40ef 100644
--- a/App_Code/ClsCRM.vb
+++ b/App_Code/ClsCRM.vb
@@ -1061,7 +1061,7 @@ Public Class ClsCRM
Return retorno
End Function
- Public Function RepAcercamientosDetalle(CveEmpresa As Int32, cveVendedor As Int32, cveMedioCaptacion As Int32, cveProbabilidadAcercamiento As Int32, cveEtapaProceso As Int32, sFecha As String, sFechaIni As String, sFechaFin As String) As Boolean
+ Public Function RepAcercamientosDetalle(CveEmpresa As Int32, cveVendedor As Int32, cveMedioCaptacion As Int32, cveProbabilidadAcercamiento As Int32, cveEtapaProceso As Int32, sFecha As String, sFechaIni As String, sFechaFin As String, Optional CveTipoProceso As Integer = -1) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_CRM_RepAcercamientosDetalle", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
@@ -1073,6 +1073,7 @@ Public Class ClsCRM
.Add("@SFecha", SqlDbType.VarChar).Value = sFecha
.Add("@SFechaIni", SqlDbType.VarChar).Value = sFechaIni
.Add("@SFechaFin", SqlDbType.VarChar).Value = sFechaFin
+ .Add("@CveTipoProceso", SqlDbType.Int).Value = CveTipoProceso
End With
Try
SqlAdapter.Fill(Data)
diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs
index 93b909e00..8c2874e1b 100644
--- a/CRM/EmpresaCRM.aspx.cs
+++ b/CRM/EmpresaCRM.aspx.cs
@@ -643,7 +643,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
CveVendedor = ObjCRM.DtResultados.FiltroPrimeroValor("CveVendedorAsignado").ToEntero();
CveSubProyecto = ObjCRM.DtResultados.FiltroPrimeroValor("CveSubProyecto").ToEntero();
CveCliente = ObjCRM.DtResultados.FiltroPrimeroValor("CveCliente").ToEntero();
- CveGiroClasificacion = ObjCRM.DtResultados.FiltroPrimeroValor("CveGiroClasificacion").ToEntero();
+ CveGiroClasificacion = ObjCRM.DtResultados.FiltroPrimeroValor("CveGiroClasificacion") != "" ? ObjCRM.DtResultados.FiltroPrimeroValor("CveGiroClasificacion").ToEntero() : -1;
if (!(CveCliente > 0))
{
diff --git a/CRM/RepAcercamientos.aspx.cs b/CRM/RepAcercamientos.aspx.cs
index a0db080ea..1eef821ff 100644
--- a/CRM/RepAcercamientos.aspx.cs
+++ b/CRM/RepAcercamientos.aspx.cs
@@ -42,25 +42,19 @@ public partial class CRM_RepAcercamientos : ClsPaginas
protected void CargaDatos()
{
CveVendedor = DdlVendedor.SelectedValue.ToEntero();
-
- if (CveVendedor > 0)
+ string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text;
+ string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text;
+ int CvePS = DdlPS.SelectedValue.ToEntero() == 0 ? -1 : DdlPS.SelectedValue.ToEntero();
+ ClsCRM ObjCRM = new ClsCRM();
+ if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin, CvePS: CvePS, CveGiroClasificacion:DdlGiroClasificacion.SelectedValue.ToEntero()))
{
- string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text;
- string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text;
- int CvePS = DdlPS.SelectedValue.ToEntero() == 0 ? -1 : DdlPS.SelectedValue.ToEntero();
- ClsCRM ObjCRM = new ClsCRM();
- if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin, CvePS: CvePS, CveGiroClasificacion:DdlGiroClasificacion.SelectedValue.ToEntero()))
- {
- GVDatos.DataSource = ObjCRM.DtResultados;
- GVDatos.DataBind();
- }
-
- ObjCRM.Dispose();
- UPDatos.Update();
- }else
- {
- Alert("El Campo Vendedor es requerido",ModExtensiones.TipoMensaje.MsgError);
+ GVDatos.DataSource = ObjCRM.DtResultados;
+ GVDatos.DataBind();
}
+
+ ObjCRM.Dispose();
+ UPDatos.Update();
+
}
protected void GVDatos_RowDataBound(object sender, GridViewRowEventArgs e)
diff --git a/CRM/RepAcercamientosProcesosDetalle.aspx b/CRM/RepAcercamientosProcesosDetalle.aspx
index b54c7f46d..61d484036 100644
--- a/CRM/RepAcercamientosProcesosDetalle.aspx
+++ b/CRM/RepAcercamientosProcesosDetalle.aspx
@@ -266,7 +266,7 @@
-
+
@@ -286,7 +286,7 @@
-
+
diff --git a/CRM/RepAcercamientosProcesosDetalle.aspx.cs b/CRM/RepAcercamientosProcesosDetalle.aspx.cs
index fe8ab3eb8..b33304729 100644
--- a/CRM/RepAcercamientosProcesosDetalle.aspx.cs
+++ b/CRM/RepAcercamientosProcesosDetalle.aspx.cs
@@ -85,9 +85,9 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
RcveMedioCaptacion = Request["cveMedioCaptacion"] == null ? -1 : Request["cveMedioCaptacion"].ToString().ToEntero();
RcveProbabilidadAcercamiento = Request["cveProbabilidadAcercamiento"] == null ? -1 : Request["cveProbabilidadAcercamiento"].ToString().ToEntero();
RcveEtapaProceso = Request["cveEtapaProceso"] == null ? -1 : Request["cveEtapaProceso"].ToString().ToEntero();
- RsFecha = Request["Fecha"] == null ? "" : Request["Fecha"].ToString();
- RsFechaIni = Request["FechaInicio"] == null ? "" : Request["FechaInicio"].ToString();
- RsFechaFin = Request["FechaFin"] == null ? "" : Request["FechaFin"].ToString();
+ RsFecha = Request["Fecha"] == null ? Extensiones.ModExtensiones.MinFecha.ToString() : Request["Fecha"].ToString();
+ RsFechaIni = Request["FechaInicio"] == null ? Extensiones.ModExtensiones.MinFecha.ToString() : Request["FechaInicio"].ToString();
+ RsFechaFin = Request["FechaFin"] == null ? Extensiones.ModExtensiones.MaxFecha.ToString() : Request["FechaFin"].ToString();
try { RsFechaIni = RsFechaIni.ToDateTime().ToString("yyyy/MM/dd"); TxtFechaInicio.Text = RsFechaIni.ToDateTime().ToString("dd/MM/yyyy"); }
catch (Exception) { RsFechaIni = ""; }
try { RsFechaFin = RsFechaFin.ToDateTime().ToString("yyyy/MM/dd"); TxtFechaFin.Text = RsFechaFin.ToDateTime().ToString("dd/MM/yyyy"); }
@@ -192,7 +192,7 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
protected void cargarDatos()
{
ClsCRM ObjRepA = new ClsCRM();
- ObjRepA.RepAcercamientosDetalle(UsuarioActual.CveEmpresa, RcveVendedor, RcveMedioCaptacion, RcveProbabilidadAcercamiento, RcveEtapaProceso, RsFecha, RsFechaIni, RsFechaFin);
+ ObjRepA.RepAcercamientosDetalle(UsuarioActual.CveEmpresa, RcveVendedor, RcveMedioCaptacion, RcveProbabilidadAcercamiento, RcveEtapaProceso, RsFecha, RsFechaIni, RsFechaFin,CveTipoProceso:DdlTipoProceso.SelectedValue.ToEntero());
GVRepAcercamientosDetalle.DataSource = ObjRepA.DtResultados;
ObjRepA.Dispose();
GVRepAcercamientosDetalle.DataBind();
@@ -218,8 +218,8 @@ public partial class CRM_RepAcercamientosProcesosDetalle : ClsPaginas
// RsFecha = Request["CveGrupo1"] == null ? "" : Request["CveGrupo1"].ToString();
// break;
//}
- RsFechaIni = TxtFechaInicio.Text.Length > 0 ? TxtFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
- RsFechaFin = TxtFechaFin.Text.Length > 0 ? TxtFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd") : "";
+ RsFechaIni = TxtFechaInicio.Text.Length > 0 ? TxtFechaInicio.Text.ToDateTime().ToString("yyyy/MM/dd") : Extensiones.ModExtensiones.MinFecha.ToString();
+ RsFechaFin = TxtFechaFin.Text.Length > 0 ? TxtFechaFin.Text.ToDateTime().ToString("yyyy/MM/dd") : Extensiones.ModExtensiones.MaxFecha.ToString();
RcveVendedor = DdlVendedor.SelectedValue.ToEntero();
RcveMedioCaptacion = DdlMedioCaptacion.SelectedValue.ToEntero();
RcveProbabilidadAcercamiento = DdlProbabilidad.SelectedValue.ToEntero();
diff --git a/CRM/RepAcercamientosRechazos.aspx.cs b/CRM/RepAcercamientosRechazos.aspx.cs
index 9a1efc92f..1a5d105c8 100644
--- a/CRM/RepAcercamientosRechazos.aspx.cs
+++ b/CRM/RepAcercamientosRechazos.aspx.cs
@@ -131,9 +131,17 @@ public partial class CRM_RepAcercamientosRechazos : ClsPaginas
HyperLinkField hypt = new HyperLinkField();
hypt.DataTextField = $"Total";
hypt.HeaderText = $"Total";
- hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" , "Grupo1" };
- string strfilstros = string.Format("&cveVendedor={0}&cveMedioCaptacion={1}&cveProbabilidadAcercamiento={2}", cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento);
- hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}";
+ string strfilstros = "";
+ if (DdlGrupo1.SelectedValue == "1") {
+ hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2", "Grupo1", "CveVendedor" };
+ strfilstros = string.Format("&cveMedioCaptacion={0}&cveProbabilidadAcercamiento={1}", cveMedioCaptacion, cveProbabilidadAcercamiento);
+ hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&cveVendedor={{3}}&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}";
+ }
+ else {
+ hypt.DataNavigateUrlFields = new string[] { "CveGrupo1", "CveGrupo2" , "Grupo1" };
+ strfilstros = string.Format("&cveVendedor={0}&cveMedioCaptacion={1}&cveProbabilidadAcercamiento={2}", cveVendedor, cveMedioCaptacion, cveProbabilidadAcercamiento);
+ hypt.DataNavigateUrlFormatString = $"/CRM/RepAcercamientosProcesosDetalle.ASPX?CveTipoProceso={cveTipoProceso}&CveGrupo1={{0}}&CveGrupo2={{1}}&c&FechaInicio={TxtFechaInicio.Text}&FechaFin={TxtFechaFin.Text}{strfilstros}";
+ }
switch (idgrupo1)
{
case 1: