@@ -2323,6 +2323,24 @@
+
Fecha Ini Doc:
diff --git a/Ventas/RepAnticipo-NC-IXC.aspx.cs b/Ventas/RepAnticipo-NC-IXC.aspx.cs
index 4895c21bc..bfe564237 100644
--- a/Ventas/RepAnticipo-NC-IXC.aspx.cs
+++ b/Ventas/RepAnticipo-NC-IXC.aspx.cs
@@ -65,11 +65,16 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1"));
}
+ //protected void CargaClientes()
+ //{
+ // DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa,-1);
+ // DdlCliente.DataBind();
+ // DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
+ //}
protected void CargaClientes()
{
- DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa,-1);
- DdlCliente.DataBind();
- DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
+ DdlCliente.setEsWebService(true);
+ DdlCliente.Attributes.Add("data-metodo", "getcliente");
}
protected void CargaVendedores()
{
@@ -87,7 +92,12 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
DateTime FechaFCorte;
if (TxtFechaFCorte.Text != "") { FechaFCorte = TxtFechaFCorte.Text.ToDate(); } else { FechaFCorte = DateTime.MaxValue; }
ClsVentas ObjVenta = new ClsVentas();
- if (ObjVenta.GetRepAnticiposNCIXC(DdlCliente.SelectedValue.ToEntero(), DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(),
+ int CveCliente = -1;
+ if (DdlCliente.SelectedValue.ToEntero() != 0)
+ {
+ CveCliente = DdlCliente.SelectedValue.ToEntero();
+ }
+ if (ObjVenta.GetRepAnticiposNCIXC(CveCliente, DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(),
txtFechaF.Text.ToDate(),UsuarioActual.CveEmpresa, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico, DdlVendedor.SelectedValue.ToEntero(),DdlConSaldo.SelectedValue.ToEntero()))
{
GvDatos.DataSource = ObjVenta.DtResultados;
@@ -127,7 +137,7 @@ public partial class Ventas_RepAnticipo_NC_IXC : ClsPaginas
String Sucursal;
if (DdlSucursal.SelectedValue != "-1") { Sucursal = $" Sucursal: {DdlSucursal.SelectedItem.Text}"; } else { Sucursal = ""; }
String Cliente;
- if (DdlCliente.SelectedValue != "-1") { Cliente = $" Cliente: {DdlCliente.SelectedItem.Text}"; } else { Cliente = ""; }
+ if (DdlCliente.SelectedValue != "-1") { Cliente = $" Cliente: {DdlCliente.SelectedText}"; } else { Cliente = ""; }
if (DtDatos.Rows.Count > 0)
{
System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
diff --git a/Ventas/RepAnticipo-NC-IXCDetalle.aspx b/Ventas/RepAnticipo-NC-IXCDetalle.aspx
index 5d17ff9ea..427376291 100644
--- a/Ventas/RepAnticipo-NC-IXCDetalle.aspx
+++ b/Ventas/RepAnticipo-NC-IXCDetalle.aspx
@@ -50,8 +50,10 @@
Fecha Ini Doc:
diff --git a/Ventas/RepAnticipo-NC-IXCDetalle.aspx.cs b/Ventas/RepAnticipo-NC-IXCDetalle.aspx.cs
index 6abb773da..24bd56845 100644
--- a/Ventas/RepAnticipo-NC-IXCDetalle.aspx.cs
+++ b/Ventas/RepAnticipo-NC-IXCDetalle.aspx.cs
@@ -58,7 +58,12 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
TxtFechaFCorte.Text = DateTime.Today.ToString();
CargaSucursales();
CargaClientes();
- DdlCliente.SelectedValueExist(Request["CveCliente"] == null ? "-1" : Request["CveCliente"].ToString());
+ int CveCliente = (Request["CveCliente"] == null ? -1 : Request["CveCliente"].ToString().ToEntero());
+
+ DdlCliente.SelectedValue = CveCliente.ToString();
+ DataTable dt = get_GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:CveCliente);
+ DdlCliente.SelectedText = dt.FiltroPrimeroValor("NombreComercial", "");
+
DdlSucursal.SelectedValueExist(Request["CveSubProyecto"] == null ? "-1" : Request["CveSubProyecto"].ToString());
DdlTipo.SelectedValueExist(Request["Tipo"] == null ? "-1" : Request["Tipo"].ToString());
CveMoneda = Request["CveMoneda"] == null ? -1 : Request["CveMoneda"].ToString().ToEntero();
@@ -90,16 +95,21 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
DdlSucursal.DataBind();
DdlSucursal.Items.Insert(0, new ListItem("Todos", "-1"));
DdlSucursal.SelectedValue = "-1";
+ }
+
+ //protected void CargaClientes()
+ //{
+ // DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1);
+ // DdlCliente.DataBind();
+ // DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
+ // DdlCliente.SelectedValue = "-1";
+ //}
+
+ protected void CargaClientes()
+ {
+ DdlCliente.setEsWebService(true);
+ DdlCliente.Attributes.Add("data-metodo", "getcliente");
}
-
- protected void CargaClientes()
- {
- DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1);
- DdlCliente.DataBind();
- DdlCliente.Items.Insert(0, new ListItem("Todos", "-1"));
- DdlCliente.SelectedValue = "-1";
- }
-
protected void CargaVendedores()
{
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
@@ -116,8 +126,13 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
if (TxtFechaICorte.Text != "") { FechaICorte = TxtFechaICorte.Text.ToDate(); } else { FechaICorte = DateTime.MinValue; }
DateTime FechaFCorte;
if (TxtFechaFCorte.Text != "") { FechaFCorte = TxtFechaFCorte.Text.ToDate(); } else { FechaFCorte = DateTime.MaxValue; }
- ClsVentas ObjVenta = new ClsVentas();
- if (ObjVenta.GetRepAnticiposNCIXCDetalle(DdlCliente.SelectedValue.ToEntero(), DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(),
+ ClsVentas ObjVenta = new ClsVentas();
+ int CveCliente = -1;
+ if (DdlCliente.SelectedValue.ToEntero() != 0)
+ {
+ CveCliente = DdlCliente.SelectedValue.ToEntero();
+ }
+ if (ObjVenta.GetRepAnticiposNCIXCDetalle(CveCliente, DdlSucursal.SelectedValue.ToEntero(), txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(),
UsuarioActual.CveEmpresa, DdlConSaldo.SelectedValue.ToEntero(), DdlTipo.SelectedValue.ToEntero(), CveMoneda, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico))
{
GvDatos.DataSource = ObjVenta.DtResultados;
@@ -128,7 +143,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
UpDatos.Update();
if (TxtFechaFCorte.Text != DateTime.Now.ToShortDateString() && txtFechaI.Text != "") { LnkHabilitarSaldar.Visible = false; LnkSaldar.Visible = false; } else { LnkHabilitarSaldar.Visible = true; }
if (LnkSaldar.Visible) { HabilitarCheckbox(); }
- Tipo = DdlTipo.SelectedValue.ToEntero();
+ Tipo = DdlTipo.SelectedValue.ToEntero();
}
protected void BtnConsultar_Click(object sender, EventArgs e)
@@ -159,7 +174,7 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
String Sucursal;
if (DdlSucursal.SelectedValue != "-1") { Sucursal = $" Sucursal: {DdlSucursal.SelectedItem.Text}"; } else { Sucursal = ""; }
String Cliente;
- if (DdlCliente.SelectedValue != "-1") { Cliente = $" Cliente: {DdlCliente.SelectedItem.Text}"; } else { Cliente = ""; }
+ if (DdlCliente.SelectedValue.ToEntero() != -1) { Cliente = $" Cliente: {DdlCliente.SelectedText}"; } else { Cliente = ""; }
String ConSaldo;
if (DdlConSaldo.SelectedValue != "-1") { ConSaldo = $" Con Saldo: {DdlConSaldo.SelectedItem.Text}"; } else { ConSaldo = ""; }
String Tipo2;