diff --git a/Ventas/RepVencimientosCredito.aspx b/Ventas/RepVencimientosCredito.aspx
index 8c3639ca1..4e0d07699 100644
--- a/Ventas/RepVencimientosCredito.aspx
+++ b/Ventas/RepVencimientosCredito.aspx
@@ -6,7 +6,7 @@
-
+
@@ -38,17 +38,45 @@
-
-
Comercializador:
-
-
+
Cliente:
-
+
+ Fecha Inicio:
+
+
+
+ Fecha Fin:
+
+
Estatus:
@@ -88,8 +116,8 @@
@@ -104,7 +132,7 @@
-
diff --git a/Ventas/RepVencimientosCredito.aspx.cs b/Ventas/RepVencimientosCredito.aspx.cs
index e40e21656..8c7d13ece 100644
--- a/Ventas/RepVencimientosCredito.aspx.cs
+++ b/Ventas/RepVencimientosCredito.aspx.cs
@@ -27,17 +27,17 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
set { ViewState["TipoLinea"] = (int)value; }
}
- private DataTable DTDatosGvLineasAdicionales
+ private DataTable DTDatosGvD
{
get
{
- if (ViewState["DTDatosGvLineasAdicionales"] == null)
+ if (ViewState["DTDatosGvD"] == null)
{
- ViewState["DTDatosGvLineasAdicionales"] = new DataTable();
+ ViewState["DTDatosGvD"] = new DataTable();
}
- return (DataTable)ViewState["DTDatosGvLineasAdicionales"];
+ return (DataTable)ViewState["DTDatosGvD"];
}
- set { ViewState["DTDatosGvLineasAdicionales"] = (DataTable)value; }
+ set { ViewState["DTDatosGvD"] = (DataTable)value; }
}
private string LineaAdicionalComprobante
@@ -66,45 +66,14 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
private void InicializaValores()
{
-
- if (Request["OP"] != null && Request["OP"].ToString() == "PO")
- {
- DVProveedor1.Visible = true;
- DVProveedor2.Visible = true;
- TipoLinea = 2;
- LtlEncabezado.Text = "Reporte PO";
- GvLAPO.Visible = true;
- DvLineaPO.Visible = true;
- DVAgrupador1.Visible = true;
- DVAgrupador2.Visible = true;
-
- }
- else
- {
- DvLinea.Visible = true;
- GvLineasAdicionales.Visible = true;
- }
-
-
- if(UsuarioActual.Empresa.Funcionalidad(105) == "1") {
- DdlProveedor.setEsWebService(true);
- DdlProveedor.Attributes.Add("data-metodo", "getproveedores");
- DdlProveedor.SelectedText = "Todos";
- DdlProveedor.SelectedValue = "-1";
- }else {
- DdlProveedor.setEsWebService(false);
- DdlProveedor.ddl.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa);
- DdlProveedor.ddl.DataBind();
- DdlProveedor.ddl.Items.Insert(0, new ListItem("-", "-1"));
- }
-
+ txtFechaI.Text = NowADS().FirstDayOfMonth().ToShortDateString();
+ txtFechaF.Text = NowADS().ToShortDateString();
+
DdlClientes.setEsWebService(true);
DdlClientes.Attributes.Add("data-metodo", "getcliente");
DdlClientes.SelectedText = "Todos";
DdlClientes.SelectedValue = "-1";
-
-
-
+
}
@@ -115,29 +84,29 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
private void CargaDatos()
{
- DTDatosGvLineasAdicionales = new DataTable();
+ DTDatosGvD = new DataTable();
LnkDescargaExcel.Visible = false;
ClsVentas objVentas = new ClsVentas();
- int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1;
+ int CveProveedor = -1;
if(TipoLinea == 1)
{
- if (objVentas.RepLineasAdicionales(-1,-1, DdlClientes.SelectedValue.ToEntero(), CveProveedor, 1, -1, MinFecha, MaxFecha, DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa))
+ if (objVentas.GetLineasAdicionalesVencimientos( DdlClientes.SelectedValue.ToEntero(), 1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), 1, UsuarioActual.CveEmpresa))
{
- GvLineasAdicionales.DataSource = objVentas.DtResultados;
+ GvD.DataSource = objVentas.DtResultados;
if (objVentas.DtResultados.Rows.Count > 0)
{
- DTDatosGvLineasAdicionales = objVentas.DtResultados;
+ DTDatosGvD = objVentas.DtResultados;
LnkDescargaExcel.Visible = true;
UpAcciones.Update();
}
}
else
{
- GvLineasAdicionales.DataSource = null;
+ GvD.DataSource = null;
}
}
else
@@ -157,7 +126,7 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
if (objVentas.DtResultados.Rows.Count > 0)
{
- DTDatosGvLineasAdicionales = objVentas.DtResultados;
+ DTDatosGvD = objVentas.DtResultados;
LnkDescargaExcel.Visible = true;
UpAcciones.Update();
}
@@ -169,7 +138,7 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
}
objVentas.Dispose();
- GvLineasAdicionales.DataBind();
+ GvD.DataBind();
GvLAPO.DataBind();
UpLineasAdicionales.Update();
}
@@ -301,7 +270,7 @@ public partial class Ventas_RepVencimientosCredito : ClsPaginas
{
if(TipoLinea == 1)
{
- GridView gvTemp = GvLineasAdicionales;
+ GridView gvTemp = GvD;
//gvTemp.ExportToExcelX("RepLineasAdicionales" + NowADS().ToShortDateString());
gvTemp.ExportToExcelGembox("RepLineasAdicionales", UsuarioActual, "Rep Lineas Adicionales", AnchoImagen: 150);
}