--Cambios RepAnticipo-NC-IXCAplicados.aspx
This commit is contained in:
@@ -87,26 +87,14 @@
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
<div class="col-md-1" style="width: 5%">Con Saldo:</div>
|
||||
<div class="col-md-2" style="display: flex; width: 20%">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlConSaldo" runat="server" Width="40%" Class="table-group-action-input form-control input-inline input-small input-sm">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Si" Value="1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<div style="width: 30%; text-align: center">Vendedor:</div>
|
||||
<div id="DivDdlVendedor" runat="server" style="width: 55%; display: flex">
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox runat="server" ID="ChkAnticipos" Text="Anticipos" Checked="true" />
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:CheckBox runat="server" ID="ChkNCxAplicar" Text="NC x Aplicar" Checked="true" />
|
||||
<asp:CheckBox runat="server" ID="ChkNCxAplicar" Text="NC" Checked="true" />
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:CheckBox runat="server" ID="ChkIngresosxComprobar" Text="Ingreos x Comprobar" Checked="true" />
|
||||
<asp:CheckBox runat="server" ID="ChkIngresosxComprobar" Text="Ingresos x Comprobar" Checked="true" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -120,23 +108,15 @@
|
||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<table class="table Widthall ">
|
||||
<tr>
|
||||
<td style="width: 37%;"></td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 21%; border-right: 3px solid white;">Anticipos</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 21%; border-right: 3px solid white;">Notas de crédito</td>
|
||||
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 21%; border-right: 3px solid white;">Ingresos por Comprobar</td>
|
||||
</tr>
|
||||
</table>
|
||||
<asp:GridView ID="GvDatos" runat="server" OnRowDataBound="GvDatos_RowDataBound" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron registros" data-sort="true" Width="99%" DataKeyNames="CveCliente,CveMoneda,CveSubProyecto,FechaI,FechaF,FechaICorte,FechaFCorte,TipoCambio,TCEspecifico,ConSaldo">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="NombreComercial" ItemStyle-Width="30%" HeaderText="Cliente" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="TipoTexto" ItemStyle-Width="7%" HeaderText="Tipo" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="AplicadoAnticipos" ItemStyle-Width="21%" HeaderText="Importe" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="AplicadoNC" ItemStyle-Width="21%" HeaderText="Importe" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="AplicadoIXC" ItemStyle-Width="21%" HeaderText="Importe" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="AplicadoAnticipos" ItemStyle-Width="21%" HeaderText="Apl. Anticipo" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="AplicadoNC" ItemStyle-Width="21%" HeaderText="Apl. NC" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="AplicadoIXC" ItemStyle-Width="21%" HeaderText="Apl. IxC" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
|
||||
@@ -55,7 +55,6 @@ public partial class Ventas_RepAnticipo_NC_IXCAplicados : ClsPaginas
|
||||
Vendedor = 0;
|
||||
CargaSucursales();
|
||||
CargaClientes();
|
||||
CargaVendedores();
|
||||
CargaDatos();
|
||||
}
|
||||
|
||||
@@ -77,13 +76,6 @@ public partial class Ventas_RepAnticipo_NC_IXCAplicados : ClsPaginas
|
||||
DdlCliente.setEsWebService(true);
|
||||
DdlCliente.Attributes.Add("data-metodo", "getcliente");
|
||||
}
|
||||
protected void CargaVendedores()
|
||||
{
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
DdlVendedor.DataBind();
|
||||
DdlVendedor.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
//DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor);
|
||||
}
|
||||
|
||||
protected void CargaDatos()
|
||||
{
|
||||
@@ -99,20 +91,26 @@ public partial class Ventas_RepAnticipo_NC_IXCAplicados : ClsPaginas
|
||||
CveCliente = DdlCliente.SelectedValue.ToEntero();
|
||||
}
|
||||
if (ObjVenta.GetRepAnticiposNCIXCAplicados(CveCliente, DdlSucursal.SelectedValue.ToEntero(), ModExtensiones.MinFecha,
|
||||
ModExtensiones.MaxFecha, UsuarioActual.CveEmpresa, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico, DdlVendedor.SelectedValue.ToEntero(), DdlConSaldo.SelectedValue.ToEntero()))
|
||||
ModExtensiones.MaxFecha, UsuarioActual.CveEmpresa, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico, -1, -1))
|
||||
{
|
||||
GvDatos.DataSource = ObjVenta.DtResultados;
|
||||
DtDatos = ObjVenta.DtResultados;
|
||||
DtDatos = ObjVenta.DtResultados.Copy();
|
||||
}
|
||||
ObjVenta.Dispose();
|
||||
|
||||
GvDatos.DataSource = DtDatos;
|
||||
|
||||
GvDatos.Columns[2].Visible = ChkAnticipos.Checked;
|
||||
GvDatos.Columns[3].Visible = ChkNCxAplicar.Checked;
|
||||
GvDatos.Columns[4].Visible = ChkIngresosxComprobar.Checked;
|
||||
|
||||
GvDatos.DataBind();
|
||||
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargaDatos();
|
||||
Vendedor = DdlVendedor.SelectedIndex;
|
||||
}
|
||||
|
||||
protected void LnkExcel_Click(object sender, EventArgs e)
|
||||
@@ -132,38 +130,49 @@ public partial class Ventas_RepAnticipo_NC_IXCAplicados : ClsPaginas
|
||||
//String FechaF;
|
||||
//if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = ""; } else { FechaF = $" <b>Fecha Final:</b> {txtFechaF.Text}"; }
|
||||
String FechaICorte;
|
||||
if (TxtFechaICorte.Text == "" || TxtFechaICorte.Text == "__/__/____") { FechaICorte = ""; } else { FechaICorte = $" <b>Fecha Inicial Corte:</b> {TxtFechaICorte.Text}"; }
|
||||
if (TxtFechaICorte.Text == "" || TxtFechaICorte.Text == "__/__/____") { FechaICorte = ""; } else { FechaICorte = $" <b>Fecha Inicial:</b> {TxtFechaICorte.Text}"; }
|
||||
String FechaFCorte;
|
||||
if (TxtFechaFCorte.Text == "" || TxtFechaFCorte.Text == "__/__/____") { FechaFCorte = ""; } else { FechaFCorte = $" <b>Fecha Final Corte:</b> {TxtFechaFCorte.Text}"; }
|
||||
if (TxtFechaFCorte.Text == "" || TxtFechaFCorte.Text == "__/__/____") { FechaFCorte = ""; } else { FechaFCorte = $" <b>Fecha Final:</b> {TxtFechaFCorte.Text}"; }
|
||||
String Sucursal;
|
||||
if (DdlSucursal.SelectedValue != "-1") { Sucursal = $" <b>Sucursal:</b> {DdlSucursal.SelectedItem.Text}"; } else { Sucursal = ""; }
|
||||
String Cliente;
|
||||
if (DdlCliente.SelectedValue != "-1") { Cliente = $" <b>Cliente:</b> {DdlCliente.SelectedText}"; } else { Cliente = ""; }
|
||||
if (!DdlCliente.SelectedValue.Contiene("-1","")) { Cliente = $" <b>Cliente:</b> {DdlCliente.SelectedText}"; } else { Cliente = ""; }
|
||||
if (DtDatos.Rows.Count > 0)
|
||||
{
|
||||
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
|
||||
String logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
List<ReportParameter> para = new List<ReportParameter>();
|
||||
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
para.Add(new ReportParameter("FechaImpresion", NowADS().ToString()));
|
||||
para.Add(new ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {Cliente}{Sucursal}{FechaICorte}{FechaFCorte}"));
|
||||
|
||||
|
||||
|
||||
para.Add(new ReportParameter("MostarAnticipos", ChkAnticipos.Checked ? "1" : "0"));
|
||||
para.Add(new ReportParameter("MostarNCxAplicar", ChkNCxAplicar.Checked ? "1" : "0"));
|
||||
para.Add(new ReportParameter("MostarIngresosxComprobar", ChkIngresosxComprobar.Checked ? "1" : "0"));
|
||||
|
||||
if (Imagen.Exists)
|
||||
string AgrupadoPor = $"{Cliente}{Sucursal}{FechaICorte}{FechaFCorte}";
|
||||
if (Opcion == "PDF")
|
||||
{
|
||||
para.Add(new ReportParameter("LogoPath", logouri));
|
||||
List<ReportParameter> para = new List<ReportParameter>();
|
||||
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
para.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
para.Add(new ReportParameter("FechaImpresion", NowADS().ToString()));
|
||||
para.Add(new ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {AgrupadoPor}"));
|
||||
|
||||
|
||||
|
||||
para.Add(new ReportParameter("MostarAnticipos", ChkAnticipos.Checked ? "1" : "0"));
|
||||
para.Add(new ReportParameter("MostarNCxAplicar", ChkNCxAplicar.Checked ? "1" : "0"));
|
||||
para.Add(new ReportParameter("MostarIngresosxComprobar", ChkIngresosxComprobar.Checked ? "1" : "0"));
|
||||
|
||||
if (Imagen.Exists)
|
||||
{
|
||||
para.Add(new ReportParameter("LogoPath", logouri));
|
||||
}
|
||||
else
|
||||
{
|
||||
para.Add(new ReportParameter("LogoPath", ""));
|
||||
}
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepAnt-NC-IXCAplicados.rdlc", DtDatos, para, "Reporte de aplicaciones de Anticipos - NC - IXC", Opcion);
|
||||
}
|
||||
else
|
||||
{
|
||||
para.Add(new ReportParameter("LogoPath", ""));
|
||||
var TextoFiltro = AgrupadoPor.Replace(" ", "").Replace("<b>", "").Replace("</b>", "");
|
||||
|
||||
GvDatos.ExportToExcelGembox("RepAnticiposNCIxCAplicados", UsuarioActual, "Reporte de aplicaciones de Anticipos - NC - Ingresos X Comprobar", DatosFiltros: TextoFiltro, AlturaImagen: 0, AnchoImagen: 0);
|
||||
}
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepAnt-NC-IXC.rdlc", DtDatos, para, "Reporte de Anticipos - NCXAplicar - IXC", Opcion);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -171,6 +180,10 @@ public partial class Ventas_RepAnticipo_NC_IXCAplicados : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
public override void VerifyRenderingInServerForm(System.Web.UI.Control control)
|
||||
{
|
||||
}
|
||||
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
|
||||
Reference in New Issue
Block a user