Commit inicial Ventas Productivo
This commit is contained in:
376
CxC/GestionCobranza.aspx
Normal file
376
CxC/GestionCobranza.aspx
Normal file
@@ -0,0 +1,376 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="GestionCobranza.aspx.vb" Inherits="Ventas_GestionCobranza" %>
|
||||
|
||||
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="cc1" %>
|
||||
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.truncate2 {
|
||||
width: 300px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.Excede {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Gestión de Cobranza
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel ID="UPAcciones" runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> Imprimir PDF</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgImprimir" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" ValidationGroup="Valida" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Fecha Inicio:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>--%>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">Fecha Fin:</label>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 140px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<%--<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>--%>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<%--<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>--%>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">Cobrador:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlUsuarioCobranza" DataValueField="CveUsuario" DataTextField="Nombre" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
<div class="row">
|
||||
<label class="col-md-1 truncate">Estatus:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCobranzaEstatus" DataValueField="CveCobranzaEstatus" DataTextField="CobranzaEstatus" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">Responsable:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlResponsableCobranza" DataValueField="CveUsuario" DataTextField="Nombre" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">Turno Cobranza:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTurnos" runat="server" DataValueField="CveCobranzaEstatusTurno" DataTextField="CobranzaEstatusTurno" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 truncate">Tipo Pago:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlTipoPago" runat="server" CssClass="form-control select2me">
|
||||
<asp:ListItem Value="-1" Text="Todos" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="-2" Text="Efectivo+Cheque"></asp:ListItem>
|
||||
<asp:ListItem Value="Efectivo" Text="Efectivo"></asp:ListItem>
|
||||
<asp:ListItem Value="Cheque" Text="Cheque"></asp:ListItem>
|
||||
<asp:ListItem Value="Tranferencia" Text="Transferencia"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" CssClass="table table-striped table-hover mysmallbtn ScrollAD Widthall" data-sort="true" DataKeyNames="CveVenta,FechaCobranza,CveCobranzaEstatus,CobranzaObservacion,CveUsuarioCobranza,CveCobranzaEstatusTurno" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros"
|
||||
GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cliente</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div class="truncate2" style="width: 200px;">
|
||||
<asp:Label ID="LtNombreCliente" runat="server" CssClass="truncate2" Text='<%# Eval("NombreCliente")%>'></asp:Label>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Factura</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="width: 70px;">
|
||||
<asp:Label ID="LtSerieFolio" runat="server" Text='<%# Eval("SerieFolio")%>'></asp:Label>
|
||||
</div>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha Factura</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha Cobranza</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtFechaCobranza" runat="server" Text='<%# Eval("FechaCobranza", "{0:d}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Saldo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Estatus</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div style="width: 70px;">
|
||||
<asp:Label ID="LtCobranzaEstatus" runat="server" Text='<%# Eval("CobranzaEstatus")%>'></asp:Label>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Turno</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtCobranzaEstatusTurno" runat="server" Text='<%# Eval("CobranzaEstatusTurno")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Observación</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div class="truncate2" style="width: 200px;">
|
||||
<asp:Label ID="LtCobranzaObservacion" runat="server" CssClass="truncate2" Text='<%# Eval("CobranzaObservacion")%>'></asp:Label>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Teléfono</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LtTelefono" runat="server" Text='<%# Eval("Telefono")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Dirección</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div class="truncate2" style="width: 200px;">
|
||||
<asp:Label ID="LtDireccion" runat="server" CssClass="truncate2" Text='<%# Eval("Direccion")%>'></asp:Label>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Horario</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div class="truncate2" style="width: 200px;">
|
||||
<asp:Label ID="LtHorario" runat="server" CssClass="truncate2" Text='<%# Eval("Horario")%>'></asp:Label>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Documentación</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<div class="truncate2" style="width: 200px;">
|
||||
<asp:Label ID="LtDocumentacion" runat="server" Text='<%# Eval("Documentacion")%>'></asp:Label>
|
||||
</div>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="Edit_Click" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:ImageButton ID="ImgBtnAbonar" ClientIDMode="Static" runat="server" OnClientClick="" ImageUrl="/Imagenes/Money_add.png" BorderWidth="0" Style="float: right;" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivPopUpCobranza" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpAddVisitaCobranza" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional" style="width: 350px !important;">
|
||||
<ContentTemplate>
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
<asp:HiddenField ID="HdnCveUsuarioCobranza" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="myModalLabel">Actualizar Datos de Cobranza</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel ID="UpBodyVisitaCobranza" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= TxtFechaCobranza.ClientID.ToString()%>">Fecha Cobranza: </label>
|
||||
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaCobranza" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaCobranza" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaCobranza" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6" style="margin-top: 60px;">
|
||||
<%--<label for="<%= TimeSelector.ClientID.ToString()%>">Hora Cobranza: </label>--%>
|
||||
<cc1:TimeSelector ID="TimeSelector" runat="server" DisplaySeconds="false" DisplayButtons="false">
|
||||
</cc1:TimeSelector>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlCobranzaEstatusEdit" DataValueField="CveCobranzaEstatus" DataTextField="CobranzaEstatus" runat="server" CssClass="form-control select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlCobranzaEstatusEdit.ClientID.ToString()%>">Cobranza Estatus:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTurnoCobranza" DataValueField="CveCobranzaEstatusTurno" DataTextField="CobranzaEstatusTurno" runat="server" CssClass="form-control select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTurnoCobranza.ClientID.ToString()%>">Turno Cobranza: </label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<label for="<%= TxtObservacionCobranza.ClientID.ToString()%>">Observaciones:</label>
|
||||
<asp:TextBox ID="TxtObservacionCobranza" runat="server" MaxLength="255" Rows="3" TextMode="MultiLine" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="BtnActualizarDatosDeCobranza" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"><i class='material-icons'>done_all</i>Actualizar </asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivTipoCambio" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Cambiar Tipo Cambio de Dólares"></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:RadioButtonList runat="server" ID="RblTipoCambio" AutoPostBack="true">
|
||||
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Venta" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
|
||||
Especifico:
|
||||
<asp:TextBox ID="TxtEspecifico" runat="server" Width="55px" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnTipoCambio" runat="server" Text="Aceptar" class="btn btn-primary" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
$(document).on('mouseenter', ".truncate2", function () {
|
||||
var $this = $(this);
|
||||
if (this.offsetWidth < this.scrollWidth && !$this.attr('title')) {
|
||||
$this.tooltip({
|
||||
title: $this.text(),
|
||||
placement: "top"
|
||||
});
|
||||
$this.tooltip('show');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
249
CxC/GestionCobranza.aspx.vb
Normal file
249
CxC/GestionCobranza.aspx.vb
Normal file
@@ -0,0 +1,249 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Partial Class Ventas_GestionCobranza
|
||||
Inherits ClsPaginas
|
||||
|
||||
#Region "P R O P I E D A D E S "
|
||||
Private Property DtDatos As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtDatos"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TipoCambio As Integer
|
||||
Get
|
||||
Return ViewState("TipoCambio").ToString.ToEntero
|
||||
End Get
|
||||
|
||||
Set(value As Integer)
|
||||
ViewState("TipoCambio") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property TCEspecifico As Decimal
|
||||
Get
|
||||
Return ViewState("TCEspecifico").ToString.ToDecimal
|
||||
End Get
|
||||
|
||||
Set(value As Decimal)
|
||||
ViewState("TCEspecifico") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
Private Sub Ventas_GestionCobranza_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
TipoCambio = 1
|
||||
TCEspecifico = -1
|
||||
CargaFiltrosrCobranza()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "C A R G A C O M B O S "
|
||||
Private Sub CargaFiltrosrCobranza()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
DdlUsuarioCobranza.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||
DdlUsuarioCobranza.DataBind()
|
||||
DdlUsuarioCobranza.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlResponsableCobranza.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||
DdlResponsableCobranza.DataBind()
|
||||
DdlResponsableCobranza.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlCobranzaEstatus.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa)
|
||||
DdlCobranzaEstatus.DataBind()
|
||||
DdlCobranzaEstatus.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
DdlCobranzaEstatusEdit.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa)
|
||||
DdlCobranzaEstatusEdit.DataBind()
|
||||
|
||||
If ObjVentas.GetCobranzaTurnoEstatus(-1, UsuarioActual.CveEmpresa) Then
|
||||
DdlTurnoCobranza.DataSource = ObjVentas.DtResultados
|
||||
DdlTurnoCobranza.DataBind()
|
||||
|
||||
DdlTurnos.DataSource = ObjVentas.DtResultados
|
||||
DdlTurnos.DataBind()
|
||||
DdlTurnos.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim FechaI, FechaF As String
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||
|
||||
If TipoCambio = 3 And TxtEspecifico.Text <> "" Then TCEspecifico = TxtEspecifico.Text.ToDecimal Else TCEspecifico = -1
|
||||
|
||||
If ObjVentas.GetGestionCobranza(DdlCobranzaEstatus.SelectedValue.ToEntero, DdlUsuarioCobranza.SelectedValue.ToEntero, DdlResponsableCobranza.SelectedValue.ToEntero, DdlTurnos.SelectedValue.ToEntero, DdlTipoPago.SelectedValue, FechaI, FechaF, UsuarioActual.CveEmpresa, TipoCambio, TCEspecifico) Then
|
||||
DtDatos = ObjVentas.DtResultados
|
||||
GvDatos.DataSource = ObjVentas.DtResultados
|
||||
GvDatos.DataBind()
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "BTN"
|
||||
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
End Sub
|
||||
Private Sub BtnActualizarDatosDeCobranza_Click(sender As Object, e As EventArgs) Handles BtnActualizarDatosDeCobranza.Click
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim time As DateTime
|
||||
Dim TieneError = False
|
||||
time = DateTime.Parse(String.Format("{0} {1}:{2} {3}", TxtFechaCobranza.Text, TimeSelector.Hour, TimeSelector.Minute, TimeSelector.AmPm))
|
||||
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
|
||||
'Actualizo datos de cobranza
|
||||
If Not ObjVentas.UpdateVentaCobranza(HdnID.Value.ToEntero, DdlCobranzaEstatusEdit.SelectedValue.ToEntero, DdlTurnoCobranza.SelectedValue.ToEntero, time, TxtObservacionCobranza.Text) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
'AGREGO A VISITAS DE COBRANZA
|
||||
If Not TieneError Then
|
||||
If Not ObjVentas.AddVisitaCobranza(HdnID.Value.ToEntero, HdnCveUsuarioCobranza.Value.ToEntero, TxtFechaCobranza.Text.ToDate, TxtObservacionCobranza.Text) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not TieneError Then
|
||||
ObjVentas.Commit()
|
||||
Alert("Se ha actualizado los datos de cobranza", TipoMensaje.MsgInformacion)
|
||||
Else
|
||||
ObjVentas.RollBack()
|
||||
Alert("Ha ocurrido un error al actualizar los datos de cobranza", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
CargaDatos()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivPopUpCobranza"))
|
||||
End Sub
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
TxtFechaCobranza.Text = GvRow.DataKey("FechaCobranza")
|
||||
DdlCobranzaEstatusEdit.SelectedValueExist(GvRow.DataKey("CveCobranzaEstatus"))
|
||||
DdlTurnoCobranza.SelectedValueExist(GvRow.DataKey("CveCobranzaEstatusTurno"))
|
||||
TxtObservacionCobranza.Text = GvRow.DataKey("CobranzaObservacion")
|
||||
HdnID.Value = GvRow.DataKey("CveVenta")
|
||||
HdnCveUsuarioCobranza.Value = GvRow.DataKey("CveUsuarioCobranza")
|
||||
UpAddVisitaCobranza.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivPopUpCobranza"))
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "GV"
|
||||
Private Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
If e.Row.DBCampo("NIVEL").ToEntero = 1 Then
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.Cells(0).Text = e.Row.DBCampo("Moneda").ToString
|
||||
e.Row.FCLinkButton("imgE").Visible = False
|
||||
e.Row.FCImageButton("ImgBtnAbonar").Visible = False
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("NIVEL").ToEntero = 2 Then
|
||||
e.Row.Cells(0).Text = e.Row.DBCampo("CobranzaEstatusTurno")
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
e.Row.FCLinkButton("imgE").Visible = False
|
||||
e.Row.FCImageButton("ImgBtnAbonar").Visible = False
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("NIVEL").ToEntero = 3 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
e.Row.Attributes.Add("style", "background: #CCCCCC !important")
|
||||
e.Row.FCImageButton("ImgBtnAbonar").Visible = False
|
||||
e.Row.FCLinkButton("imgE").Visible = False
|
||||
e.Row.FCLabel("LtNombreCliente").Text = String.Format("<a class=""Texto"" target=""_blank"" href=""/Ventas/Clientes.aspx?CveCliente={0}&Opt=3"" > {1}</a>", e.Row.DBCampo("CveCliente"), e.Row.DBCampo("NombreCliente"))
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("NIVEL").ToEntero = 4 Then
|
||||
e.Row.FCLabel("LtSerieFolio").Text = String.Format("<a class=""Texto"" target=""_blank"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a>", e.Row.DBCampo("CveVenta"), e.Row.DBCampo("SerieFolio"))
|
||||
e.Row.FCImageButton("ImgBtnAbonar").OnClientClick = String.Format("AbrirVentana('/Bancos/PopIEVentas.aspx?CveVenta={0}&Masterimpoup=true',700,550,'S'); return false;", e.Row.DBCampo("CveVenta"))
|
||||
e.Row.FCLabel("LtNombreCliente").Text = String.Format("<a class=""Texto"" target=""_blank"" href=""/Ventas/Clientes.aspx?CveCliente={0}&Opt=3"" > {1}</a>", e.Row.DBCampo("CveCliente"), e.Row.DBCampo("NombreCliente"))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "PDF"
|
||||
Private Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click
|
||||
If DtDatos.Rows.Count > 0 Then
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/GestionCobranza.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim Cobrador = If(DdlUsuarioCobranza.SelectedValue = "-1", "", $" <b>Cobrador:</b> {DdlUsuarioCobranza.SelectedItem.Text}")
|
||||
Dim Estatus = If(DdlCobranzaEstatus.SelectedValue = "-1", "", $" <b>Estatus:</b> {DdlCobranzaEstatus.SelectedItem.Text}")
|
||||
Dim Responsable = If(DdlResponsableCobranza.SelectedValue = "-1", "", $" <b>Responsable:</b> {DdlResponsableCobranza.SelectedItem.Text}")
|
||||
Dim Turno = If(DdlTurnos.SelectedValue = "-1", "", $" <b>Turno:</b> {DdlTurnos.SelectedItem.Text}")
|
||||
Dim TipoPago = If(DdlTipoPago.SelectedValue = "-1", "", $" <b>Tipo de Pago:</b> {DdlTipoPago.SelectedItem.Text}")
|
||||
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("FechaInicio", If(txtFechaI.Text = "", "", txtFechaI.Text)))
|
||||
params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text = "", "", txtFechaF.Text)))
|
||||
'params.Add(New ReportParameter("Cobrador", DdlUsuarioCobranza.SelectedItem.Text))
|
||||
params.Add(New ReportParameter("Filtros", $"{Cobrador}{Estatus}{Responsable}{Turno}{TipoPago}"))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
|
||||
If Archivo.Exists Then
|
||||
ImprimirPDF(String.Format("{0}Formatos/GestionCobranza.rdlc", UsuarioActual.Empresa.Ruta), DtDatos, params, NombreArchivo:="Gestión de Cobranza")
|
||||
Else
|
||||
ImprimirPDF("Empresas/Grales/Formatos/GestionCobranza.rdlc", DtDatos, params, NombreArchivo:="Gestión de Cobranza")
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
Alert("No ha generado datos para la impresion", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "TIPO CAMBIO"
|
||||
|
||||
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
|
||||
TipoCambio = RblTipoCambio.SelectedValue.ToEntero
|
||||
If TipoCambio = 3 Then
|
||||
LiEspecifico.Visible = True
|
||||
TCEspecifico = GlobalTipoCambio(Now).ToDecimal
|
||||
TxtEspecifico.Text = TCEspecifico.ToString
|
||||
Else
|
||||
LiEspecifico.Visible = False
|
||||
End If
|
||||
UpBodyTipoCambio.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) Handles BtnTipoCambio.Click
|
||||
CargaDatos()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
865
CxC/RepCxC.aspx
Normal file
865
CxC/RepCxC.aspx
Normal file
@@ -0,0 +1,865 @@
|
||||
<%@ Page Title="Reporte de CxC" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCxC.aspx.vb" Inherits="RepCxC" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.ColumnaenBlanco {
|
||||
background-color: #DDD;
|
||||
border-color: #DDD;
|
||||
}
|
||||
|
||||
.select2 .select2-selection__rendered {
|
||||
line-height: 1;
|
||||
color: #111;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.select2 .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
height: 60px;
|
||||
min-height: 20px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
/*margin-top: 10px;*/
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
||||
margin-top: 7px;
|
||||
}
|
||||
|
||||
.select2-selection__rendered {
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 800px;
|
||||
}
|
||||
|
||||
#chartdiv2 {
|
||||
width: 100%;
|
||||
height: 800px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar Columnas</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivPersonalizarRango" ID="HplPersonalizarRango" runat="server"> <i class="fa fa-pencil"></i> Personalizar Rango de Columnas</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBEnviarSMS" runat="server" OnClick="LBEnviarSMS_Click" data-toggle="confirmation" data-original-title="¿Está seguro que desea enviar el estado de cuenta a los clientes por SMS?" data-btn-ok-label="si"> <i class="fa fa-comments"></i> Estado de cuenta por SMS</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LBEnviarCorreo" runat="server" OnClick="LBEnviarCorreo_Click" data-toggle="confirmation" data-original-title="¿Está seguro que desea enviar el estado de cuenta a los clientes por correo?" data-btn-ok-label="si"> <i class="fa fa-envelope"></i> Estado de cuenta por Correo</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkDescargarSegmentos" runat="server" Visible="false" OnClick="LnkDescargarSegmentos_Click"><i class="fa fa-credit-card"></i> Generar Buro de Crédito</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgExcel" />
|
||||
<asp:PostBackTrigger ControlID="ImgImprimir" />
|
||||
<asp:PostBackTrigger ControlID="LnkDescargarSegmentos" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Gráfica</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de CxC
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="" id="filtroprlcXc">
|
||||
<div class="portlet-title portlet-filterT smalltitle " style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cliente:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
<%--<asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Sucursal:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Grupo:
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Año" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mes" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Año/Mes" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Fecha" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Cliente" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Sucursal" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Vendedor" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Usuario" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Límite de Crédito" Value="11"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Vendedor:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" title="Fecha Inicio Documento" data-toggle="tooltip" data-placement="top">
|
||||
Fecha Inicio Docto:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" title="Fecha Fin Documento" data-toggle="tooltip" data-placement="top">
|
||||
Fecha Fin Docto:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Registró:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Responsable:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlResponsable" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Tipo Docto:
|
||||
</div>
|
||||
<div class="col-md-2 " style="padding-bottom: 10px;">
|
||||
<asp:ListBox ID="DdlTipoDocto" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
|
||||
<asp:ListItem Selected="True" Value="Ing" Text="Ingresos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Rem" Text="Remisión"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Egs" Text="Egresos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="IxC" Text="Ingresos X Comp"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Dev" Text="Devolución"></asp:ListItem>
|
||||
</asp:ListBox>
|
||||
<%-- <asp:DropDownList ID="DdlTipoDocto" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Value="Ing" Text="Ingresos"></asp:ListItem>
|
||||
<asp:ListItem Value="Rem" Text="Remisión"></asp:ListItem>
|
||||
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Estatus Cobranza:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCobranzaEstatus" DataValueField="CveCobranzaEstatus" DataTextField="CobranzaEstatus" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate" data-toggle="tooltip" title="Fecha Vencimiento Inicial">
|
||||
Fecha Venc. Inicial:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaVI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioVI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtFechaVI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="txtFechaVI" PopupButtonID="imgCalendarioVI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtFechaVI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtFechaVI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" data-toggle="tooltip" title="Fecha Vencimiento Final">
|
||||
Fecha Venc. Final:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaVF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioVF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="txtFechaVF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="txtFechaVF" PopupButtonID="imgCalendarioVF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtFechaVF" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="txtFechaVF" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Corte A:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtCorteA" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioCA" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="txtCorteA" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="txtCorteA" PopupButtonID="imgCalendarioCA" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtCorteA" Display="None" ErrorMessage="El campo <b>''Corte A''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CompareValidator3" runat="server" ControlToValidate="txtCorteA" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator3" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator3" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Estatus Cliente:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEstatusCliente" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Inactivos" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Activos" Value="1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-1 truncate" title="Clasificación Cliente" data-toggle="tooltip" data-placement="top">
|
||||
Clasificación Cliente:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div id="DivEmpresasFiltro" runat="server" visible="false">
|
||||
<div class="col-md-1 truncate">
|
||||
Empresas:
|
||||
</div>
|
||||
<div class="col-md-2 " style="padding-bottom: 10px;">
|
||||
<asp:ListBox ID="DdlEmpresas" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server" DataTextField="Empresa" DataValueField="CveEmpresa"></asp:ListBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" data-rows="2" GridLines="None" AllowPaging="False" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Grupo
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--Nuevo R: 2/09/2017--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
Código Cliente
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlCodigoCl" runat="server" Text='<%# Eval("CodigoCliente") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--Nuevo R: 25/09/2017--%>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
Nombre Corto
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNombreCorto" runat="server" Text='<%# Eval("NombreCorto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Saldo
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="HplSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" BackColor="LightGray" />
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="HplColumna1" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="HplColumna2" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="HplColumna3" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="HplColumna4" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="HplColumna5" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="HplColumna6" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="HplColumna7" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="HplColumna8" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="HplColumna9" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Total">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="HplPorVencer" runat="server" Text='<%# Eval("por_vencer", "{0:N2}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" BackColor="LightGray" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
Ventas
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlVentas" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
Saldo
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlSaldo1" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
Resta
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlVentasRecuperado" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
% Recup.
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlPorRecuperado" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField Visible="false">
|
||||
<HeaderTemplate>
|
||||
% X Recup.
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlPorPorRecuperar" runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivPersonalizar" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTitulo1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:CheckBox ID="ChkVentasVsSaldo" runat="server" Text="" Checked="False" />
|
||||
<label for="ChkVentasSaldo">Ventas VS Saldo </label>
|
||||
<br />
|
||||
<asp:CheckBox ID="ChkCodigoCl" runat="server" Text="" Checked="False" />
|
||||
<label for="ChkcodigoCl">Código Cliente </label>
|
||||
<br />
|
||||
<asp:CheckBox ID="ChkNombreCorto" runat="server" Text="" Checked="False" />
|
||||
<label for="ChkNombreCorto">Nombre Corto </label>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-primary" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpPersonalizarRango" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivPersonalizarRango" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Personalizar Rango de Columnas"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpBodyPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="btn-group pull-right">
|
||||
<asp:Button ID="BtnAgregarRango" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="BtnAgregarRango_Click" runat="server" Text="Agregar" />
|
||||
</div>
|
||||
<br />
|
||||
<br />
|
||||
<asp:GridView ID="GvPersonalizarRango" runat="server" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron columnas" ToolTip="Listado de Columnas"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn"
|
||||
OnRowDataBound="GvPersonalizarRango_RowDataBound" GridLines="None" AllowPaging="False" DataKeyNames="Tipo,RangoInicial,RangoFinal">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoEscrito" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Rango Incial" DataField="RangoInicial" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Rango Final" DataField="RangoFinal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Comandos">
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton data-toggle="tooltip" title="Editar" ID="LnkEditar" OnClick="LnkEditar_Click" CssClass="btn btn-circle btn-sm green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
||||
<asp:LinkButton ID="imgD" runat="server" OnClick="LnkEliminar_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar el rango?" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnPersonalizarRango" OnClick="BtnPersonalizarRango_Click" runat="server" Text="Personalizar" class="btn btn-primary" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpPersonalizarRangoEditar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivPersonalizarRangoEditar" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label3" runat="server" ClientIDMode="Static" Text="Personalizar Rango de Columnas"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpBodyEdit" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipo" CssClass="form-control select2me " runat="server" AppendDataBoundItems="true" Style="width: 100%">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Vencido" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Por Vencer" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RFVTipo" runat="server" ControlToValidate="DdlTipo" Display="None" InitialValue="-1" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor seleccionelo." ValidationGroup="GrpRangoEditar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo"></ajax:ValidatorCalloutExtender>
|
||||
<label for="<%= DdlTipo.ClientID.ToString()%>">Tipo:</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRI" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVRI" runat="server" ControlToValidate="TxtRI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Rango Inicial''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRangoEditar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCORI" runat="server" HighlightCssClass="vco" TargetControlID="RFVRI"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros1" runat="server" TargetControlID="TxtRI" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtRI.ClientID.ToString()%>">Rango Inicial:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtRF" CssClass="form-control" runat="server"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVRF" runat="server" ControlToValidate="TxtRF" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Rango Final''</b> es necesario, por favor ingréselo." ValidationGroup="GrpRangoEditar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCETxtRF" runat="server" HighlightCssClass="vco" TargetControlID="RFVRF"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtRF" FilterType="Custom, Numbers" ValidChars="." />
|
||||
<label for="<%= TxtRF.ClientID.ToString()%>">Rango Final:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="<%= ChkMayor.ClientID.ToString()%>">Mayor que el Rango Inicial:</label>
|
||||
<asp:CheckBox ID="ChkMayor" AutoPostBack="true" OnCheckedChanged="ChkMayor_CheckedChanged" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnGuardarPersonalizarRangoEditar" OnClick="BtnGuardarPersonalizarRangoEditar_Click" runat="server" Text="Aceptar" class="btn btn-primary" ValidationGroup="GrpRangoEditar" />
|
||||
<asp:Button ID="BtnCancelarPersonalizarRangoEditar" Text="Cancelar" runat="server" OnClick="BtnCancelarPersonalizarRangoEditar_Click" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivTipoCambio" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text="Cambiar Tipo Cambio de Dólares"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:RadioButtonList runat="server" ID="RblTipoCambio" AutoPostBack="true">
|
||||
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Compra" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
|
||||
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
|
||||
Especifico:
|
||||
<asp:TextBox ID="TxtEspecifico" runat="server" Width="55px" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnTipoCambio" runat="server" Text="Aceptar" class="btn btn-primary" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UPModalProd" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text=""></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<ajax:TabContainer ID="Tab" runat="server" ActiveTabIndex="0" Width="100%">
|
||||
<ajax:TabPanel ID="TabVencidoPorVencer" runat="server" HeaderText="Vencido/Por Vencer">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel runat="server" ID="UpGraficaVencidoPorVencer" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-2"></div>
|
||||
<label class="col-md-1 truncate">Top:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlMostrarGraficaVencidoPorVencer" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlMostrarGraficaVencidoPorVencer_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Top 10" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Top 20" Value="20"></asp:ListItem>
|
||||
<asp:ListItem Text="Top 50" Value="50"></asp:ListItem>
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate"> Ver:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlVerGraficaVencidoPorVencer" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlVerGraficaVencidoPorVencer_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Vencido" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Por Vencer" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv2"></div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
<ajax:TabPanel ID="TabTotales" runat="server" HeaderText="Totales">
|
||||
<ContentTemplate>
|
||||
<asp:UpdatePanel runat="server" ID="UpGraficaTotales" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-1"></div>
|
||||
<label class="col-md-1 truncate">Top:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlMostrarGraficaTotales" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlMostrarGraficaTotales_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Top 10" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Top 20" Value="20"></asp:ListItem>
|
||||
<asp:ListItem Text="Top 50" Value="50"></asp:ListItem>
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate"> Grafica:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlGrafica" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlGrafica_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Barras" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Pastel" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label class="col-md-1 truncate"> Ver:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlVer" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DdlVer_SelectedIndexChanged" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Saldo" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Total Vencido" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Total Por Vencer" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div id="chartdiv"></div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabContainer>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/pie.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
|
||||
<script>
|
||||
|
||||
function CargaGraficaVencidoPorVencer(data, graph) {
|
||||
var chart = AmCharts.makeChart("chartdiv2", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"legend": {
|
||||
"useGraphSettings": true,
|
||||
"valueWidth": 150
|
||||
},
|
||||
"dataProvider": data,
|
||||
"startDuration": 0.5,
|
||||
"graphs": graph,
|
||||
"chartCursor": {
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "categoria",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"axisAlpha": 0,
|
||||
"fillAlpha": 0.05,
|
||||
"fillColor": "#000000",
|
||||
"gridAlpha": 0,
|
||||
"position": "top"
|
||||
},
|
||||
"export": {
|
||||
"enabled": true,
|
||||
"position": "bottom-right"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaBarras(data) {
|
||||
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"dataProvider": data,
|
||||
"startDuration": 2,
|
||||
"valueAxes": [{
|
||||
"position": "left",
|
||||
"title": "Ventas"
|
||||
}],
|
||||
"graphs": [{
|
||||
"balloonText": "[[category]]: <b>[[value]]</b> [[Moneda]]",
|
||||
"colorField": "Color",
|
||||
"fillAlphas": 1,
|
||||
"lineAlpha": 0.1,
|
||||
"type": "column",
|
||||
"valueField": "Valor"
|
||||
}],
|
||||
"depth3D": 20,
|
||||
"angle": 30,
|
||||
"chartCursor": {
|
||||
"categoryBalloonEnabled": false,
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "Texto",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"labelRotation": 90
|
||||
},
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function CargaGraficaPastel(data) {
|
||||
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "pie",
|
||||
"theme": "light",
|
||||
"dataProvider":
|
||||
data,
|
||||
"valueField": "Valor",
|
||||
"titleField": "Texto",
|
||||
"outlineAlpha": 0.4,
|
||||
"depth3D": 0,
|
||||
"balloonText": "[[title]]<br><span style='font-size:14px'><b>[[value]]</b> ([[percents]]% [[Moneda]])</span>",
|
||||
"angle": 0,
|
||||
"export": {
|
||||
"enabled": true
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
1447
CxC/RepCxC.aspx.vb
Normal file
1447
CxC/RepCxC.aspx.vb
Normal file
File diff suppressed because it is too large
Load Diff
638
CxC/RepCxCDetalle.aspx
Normal file
638
CxC/RepCxCDetalle.aspx
Normal file
@@ -0,0 +1,638 @@
|
||||
<%@ Page Title="SIG: Reporte de Cuentas X Cobrar Detalle" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCxCDetalle.aspx.vb" Inherits="RepCxCDetalle" %>
|
||||
|
||||
<%@ Register Assembly="TimePicker" Namespace="MKB.TimePicker" TagPrefix="cc1" %>
|
||||
<%@ Register Assembly="eWorld.UI" Namespace="eWorld.UI" TagPrefix="ew" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.truncate2 {
|
||||
/*width: 00px;*/
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.select2 .select2-selection__rendered{
|
||||
line-height:1;
|
||||
color:#111;
|
||||
}
|
||||
|
||||
.select2 .select2-selection--multiple {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
min-height: 20px;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<asp:UpdatePanel ID="U" runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcelPersonalizado" runat="server" Visible="false"> <i class="fa fa-ad-excel"></i> Generar Excel Personalizado</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar Columnas</asp:HyperLink>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LkbHabilitarCobranza" runat="server"> <i class="fa fa-money"></i> Habilitar Cobranza</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="/CxC/GestionCobranza.aspx" ID="HLGestionCobranza" runat="server" Target="_blank"> <i class="fa fa-money"></i> Ir a Gestión de Cobranza </asp:HyperLink>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="ImgImprimir" />
|
||||
<asp:PostBackTrigger ControlID="ImgExcel" />
|
||||
<asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de CxC - Detalle
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="IdPorlet" class="portlet solid grey-cascade portlet-filter" id="PortletPadre" style="">
|
||||
<div class="portlet-title portlet-filterT smalltitle " style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand" data-placement="left"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cliente:
|
||||
</div>
|
||||
<div class="col-md-2" id="DivClientes" runat="server">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
<%--<asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" CssClass="form-control input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
|
||||
<asp:DropDownList ID="DdlClienteSucursal" runat="server" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal" Visible="false" CssClass="form-control input-small input-sm select2me" Width="35%">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Sucursal:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Grupo:
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="form-control input-small input-sm select2me" Style="max-width: 100px">
|
||||
<asp:ListItem Text="Año" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mes" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Año/Mes" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Fecha" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Cliente" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Sucursal" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Vendedor" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Usuario" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
|
||||
<asp:ListItem Text="Límite de Crédito" Value="11"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Vendedor:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" title="Fecha Inicio Documento" data-toggle="tooltip" data-placement="top">
|
||||
Fecha Inicio Docto:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" title="Fecha Fin Documento" data-toggle="tooltip" data-placement="top">
|
||||
Fecha Fin Docto:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Registró:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Responsable:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlResponsable" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Tipo Docto:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:ListBox ID="DdlTipoDocto" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
|
||||
<asp:ListItem Value="Ing" Text="Ingresos"></asp:ListItem>
|
||||
<asp:ListItem Value="Rem" Text="Remisión"></asp:ListItem>
|
||||
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||
<asp:ListItem Value="Egs" Text="Egresos"></asp:ListItem>
|
||||
<asp:ListItem Value="Dev" Text="Devolución"></asp:ListItem>
|
||||
</asp:ListBox>
|
||||
<%-- <asp:DropDownList ID="DdlTipoDocto" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Value="Ing" Text="Ingresos"></asp:ListItem>
|
||||
<asp:ListItem Value="Rem" Text="Remisión"></asp:ListItem>
|
||||
<asp:ListItem Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||
</asp:DropDownList>--%>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Estatus Cobranza:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCobranzaEstatusFiltro" AppendDataBoundItems="true" DataValueField="CveCobranzaEstatus" DataTextField="CobranzaEstatus" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate" data-toggle="tooltip" title="Fecha Vencimiento Inicial">
|
||||
Fecha Venc. Inicial:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaVI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioVI" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="txtFechaVI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="txtFechaVI" PopupButtonID="imgCalendarioVI" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtFechaVI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtFechaVI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1 truncate" data-toggle="tooltip" title="Fecha Vencimiento Final">
|
||||
Fecha Venc. Final:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtFechaVF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioVF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender2" runat="server" TargetControlID="txtFechaVF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="txtFechaVF" PopupButtonID="imgCalendarioVF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtFechaVF" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="txtFechaVF" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator1" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate">
|
||||
Corte A:
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtCorteA" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioCA" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="txtCorteA" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="txtCorteA" PopupButtonID="imgCalendarioCA" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtCorteA" Display="None" ErrorMessage="El campo <b>''Corte A''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CompareValidator3" runat="server" ControlToValidate="txtCorteA" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator3" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator3" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-1 truncate" title="Clasificación Cliente" data-toggle="tooltip" data-placement="top" >
|
||||
Clasificación Cliente:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel ID="UpCobranza" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="text-left">
|
||||
<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>
|
||||
</div>
|
||||
<div class="col-md-offset-8" style="width: 300px;">
|
||||
<div class="portlet light bordered xspadding" id="DivCobranza" runat="server" visible="false">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<i class="icon-pin font-green"></i>
|
||||
<span class="caption-subject bold uppercase">Usuario Cobranza</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:DropDownList ID="DdlCobranzaEstatus" DataValueField="CveCobranzaEstatus" DataTextField="CobranzaEstatus" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlCobranzaEstatus.ClientID.ToString()%>">Cobranza Estatus: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:DropDownList ID="DdlUsuarioCobranza" DataValueField="CveUsuario" DataTextField="Nombre" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlUsuarioCobranza.ClientID.ToString()%>">Cobrador: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group form-md-line-input">
|
||||
<asp:DropDownList ID="DdlTurnoCobranza" DataValueField="CveCobranzaEstatusTurno" DataTextField="CobranzaEstatusTurno" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTurnoCobranza.ClientID.ToString()%>">Turno Cobranza: </label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<label>Observación Cobranza: </label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<asp:TextBox ID="TxtObservacionCobranza" runat="server" Rows="3" TextMode="MultiLine" Width="100%" CssClass="form-control"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
<label>Fecha Cobranza: </label>
|
||||
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
|
||||
<asp:TextBox ID="TxtFechaCobranza" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalendarioDel" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaDel" runat="server" TargetControlID="TxtFechaCobranza" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarioDel" runat="server" TargetControlID="TxtFechaCobranza" PopupButtonID="ImgCalendarioDel" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6" style="margin-top: 20px;">
|
||||
<cc1:TimeSelector ID="TimeSelector" runat="server" DisplaySeconds="false" DisplayButtons="false">
|
||||
</cc1:TimeSelector>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="text-align: center; margin-top: 10px;">
|
||||
<asp:Button ID="BtnAsignaCobranza" runat="server" Text="Asignar" CssClass="btn btn-success" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<br />
|
||||
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%" EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas" CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||
DataKeyNames="CveVenta">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="TipoDocto" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" ControlStyle-Width ="85px" DataTextField="SerieFolio" />
|
||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="IVA" DataField="IVA" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Descuento" DataField="Descuento" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Amortizacion" DataField="Amortizacion" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="RetIVA" DataField="RetIVA" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="RetISR" DataField="RetISR" DataFormatString="{0:N2}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Saldo" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Mon" DataField="Moneda"/>
|
||||
<asp:BoundField HeaderText="Sucursal Venta" DataField="SubProyecto" DataFormatString="{0}" />
|
||||
<asp:BoundField HeaderText="Fecha Venc." DataField="FechaVencimiento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Días Venc." DataField="DiasVencidos" DataFormatString="{0:N0}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Código Cliente" DataField="Codigo" />
|
||||
<asp:HyperLinkField HeaderText="Cliente" DataNavigateUrlFields="CveCliente" DataNavigateUrlFormatString="/Ventas/Clientes.aspx?CveCliente={0}" DataTextField="Nombre" ControlStyle-CssClass="truncate2" ControlStyle-Width="200px" />
|
||||
<asp:BoundField HeaderText="Sucursal Cliente" DataField="SucursalCliente" DataFormatString="{0}" Visible="false" />
|
||||
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" DataFormatString="{0}" Visible="false" />
|
||||
<asp:BoundField HeaderText="Motivo Descuento" DataField="MotivoDescuento" DataFormatString="{0}" Visible="false" />
|
||||
<asp:BoundField HeaderText="Estatus Factura" DataField="EstatusFactura" DataFormatString="{0}" Visible="false" />
|
||||
<asp:BoundField HeaderText="Se Timbro" DataField="SeTimbro" ItemStyle-HorizontalAlign="Center" Visible="false" />
|
||||
<asp:BoundField HeaderText="Cta.Contable Referencia" DataField="CuentaContableReferencia" Visible="false" />
|
||||
<asp:BoundField HeaderText="Cuenta Contable" DataField="CuentaContable" Visible="false" />
|
||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" DataFormatString="{0}" Visible="false" />
|
||||
<asp:BoundField HeaderText="Motivo Cancelacion" DataField="MotivoCancelacion" DataFormatString="{0}" Visible="false" />
|
||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" DataFormatString="{0}" Visible="false" />
|
||||
<asp:BoundField HeaderText="SucursalEjecucion" DataField="SubProyectoEjecucion" DataFormatString="{0}" Visible="false" />
|
||||
<asp:BoundField HeaderText="Telefono" DataField="Telefono" DataFormatString="{0}" Visible="false" />
|
||||
<asp:BoundField HeaderText="Mail" DataField="Mail" DataFormatString="{0}" Visible="false" />
|
||||
<asp:BoundField HeaderText="Limite Credito" DataField="LimiteCredito" DataFormatString="{0}" Visible="false" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="Sucursal Cobranza" DataField="SubProyectoCobranza" DataFormatString="{0}" Visible="false" />
|
||||
|
||||
<asp:TemplateField Visible="false" HeaderText="Asignar" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="ChkCobranza" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:BoundField HeaderText="Cobranza Estatus" DataField="CobranzaEstatus" DataFormatString="{0}" Visible="false" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Turno" DataField="CobranzaEstatusTurno" Visible="false" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Observación" DataField="CobranzaObservacion" Visible="false" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha Cobranza" DataField="FechaCobranza" DataFormatString="{0:d}" Visible="True" />
|
||||
<asp:BoundField HeaderText="Horario" DataField="Horario" DataFormatString="{0}" Visible="false" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Dias Pago" DataField="DiasPago" DataFormatString="{0}" Visible="false" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Se Envio Mail?" DataField="EnvioMail" DataFormatString="{0}" Visible="false" />
|
||||
<asp:BoundField HeaderText="Estatus Cliente" DataField="Estatus" Visible="false" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="IEPS" DataField="IEPS" Visible="false" />
|
||||
<asp:BoundField HeaderText="Dias Trans" DataField="DiasTranscurridos" DataFormatString="{0}" Visible="false" />
|
||||
<asp:BoundField HeaderText="T.C." DataField="TipoCambio" DataFormatString="{0}" Visible="false" />
|
||||
<asp:BoundField HeaderText="Fecha Ejecución" DataField="FechaEjecucion" DataFormatString="{0:d}" Visible="false" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivPersonalizar" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content SucursalCobranza-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<table class="table table-striped nobordertop table-advance table-hover">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFolio" runat="server" Text=" Folio" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSubTotal" runat="server" Text=" SubTotal" /></td>
|
||||
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSeEnvioMail" runat="server" Text=" Se envió Mail" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCuentaContable" runat="server" Text=" Cuenta Contable" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text=" Descuento" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChlMotivoDescuento" runat="server" Text=" Motivo Descuento" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkUsuario" runat="server" Text=" Usuario" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkObservaciones" runat="server" Text=" Observaciones" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkAmortizacion" runat="server" Text=" Amortización" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkIVA" runat="server" Text=" IVA" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalEjecucion" runat="server" Text=" Sucursal Ejecucion" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalCobranza" runat="server" Text=" Sucursal Cobranza" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetIVA" runat="server" Text=" Ret. IVA" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkRetISR" runat="server" Text=" Ret. ISR" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTelefono" runat="server" Text=" Telefono" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMail" runat="server" Text=" Mail" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTotal" runat="server" Text=" Total" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFecha" runat="server" Text=" Fecha" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkLimiteCredito" runat="server" Text=" Limite Credito" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMoneda" runat="server" Text=" Moneda" Checked="true" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursal" runat="server" Text=" Sucursal" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCodigo" runat="server" Text=" Código Cliente" Checked="true" /></td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text=" IEPS" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkEstatusCliente" runat="server" Text=" Estatus Cliente" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCliente" runat="server" Text=" Cliente" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSucursalCliente" runat="server" Text=" Sucursal Cliente" Checked="true" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkEstatusCobranza" runat="server" Text=" Estatus Cobranza" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkTurnoCobranza" runat="server" Text=" TurnoCobranza" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkVendedor" runat="server" Text=" Vendedor" Checked="false" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkEstatusFactura" runat="server" Text=" Estatus de Factura" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkObsCobranza" runat="server" Text=" Observación Cobranza" />
|
||||
</td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkCuentaContableReferencia" runat="server" Text=" CuentaContableReferencia" Visible="False" /></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkMotivoCancelacion" runat="server" Text=" Motivo Cancelacion" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkSeTimbro" runat="server" Text=" Se Timbró" /></td>
|
||||
<td>
|
||||
<asp:CheckBox ID="ChkFechaCobranza" runat="server" Text=" Fecha Cobranza" Checked="true" /></td>
|
||||
<td> <asp:CheckBox ID="ChkDiasTranscurridos" runat="server" Text=" Días Transcurridos" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkHorario" runat="server" Text=" Horario" Checked="false" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkDiasPago" runat="server" Text=" Dias Pago" /></td>
|
||||
<td style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkFechaEjecucion" runat="server" Text=" Fecha Ejecución" /></td>
|
||||
|
||||
<td> <asp:CheckBox ID="ChkTC" runat="server" Text=" Tipo Cambio" /></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnPersonalizar" runat="server" CssClass="btn btn-success" Text="Personalizar" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
<%--<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-success" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivTipoCambio" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Cambiar Tipo Cambio de Dólares"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:RadioButtonList runat="server" ID="RblTipoCambio" AutoPostBack="true">
|
||||
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Compra" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
|
||||
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
|
||||
Especifico:
|
||||
<asp:TextBox ID="TxtEspecifico" runat="server" Width="55px" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnTipoCambio" runat="server" Text="Aceptar" class="btn btn-primary" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
$(document).on('mouseenter', ".truncate2", function () {
|
||||
var $this = $(this);
|
||||
if (this.offsetWidth < this.scrollWidth && !$this.attr('title')) {
|
||||
$this.tooltip({
|
||||
title: $this.text(),
|
||||
placement: "top"
|
||||
});
|
||||
$this.tooltip('show');
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</asp:Content>
|
||||
980
CxC/RepCxCDetalle.aspx.vb
Normal file
980
CxC/RepCxCDetalle.aspx.vb
Normal file
@@ -0,0 +1,980 @@
|
||||
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
|
||||
Imports System.Data
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports GemBox.Spreadsheet
|
||||
Imports System.IO
|
||||
|
||||
Partial Class RepCxCDetalle
|
||||
Inherits ClsPaginas
|
||||
|
||||
'pRivate ReadOnly Property ColumnasVisibles As
|
||||
|
||||
#Region "PROPIEDADES"
|
||||
Public Property Anio() As Integer
|
||||
Get
|
||||
Return ViewState("Anio").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Anio") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Mes() As Integer
|
||||
Get
|
||||
Return ViewState("Mes").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Mes") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property AnioMes() As String
|
||||
Get
|
||||
Return ViewState("AnioMes").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("AnioMes") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Fecha() As String
|
||||
Get
|
||||
Return ViewState("Fecha").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Fecha") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property FechaVI() As String
|
||||
Get
|
||||
Return ViewState("FechaVInicio").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaVInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property FechaVF() As String
|
||||
Get
|
||||
Return ViewState("FechaVFin").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaVFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property FechaI() As String
|
||||
Get
|
||||
Return ViewState("FechaInicio").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaInicio") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property FechaF() As String
|
||||
Get
|
||||
Return ViewState("FechaFin").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaFin") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property FechaCorte() As String
|
||||
Get
|
||||
Return ViewState("FechaCorte").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("FechaCorte") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Iva() As String
|
||||
Get
|
||||
Return ViewState("IVA").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("IVA") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Agrupador() As Integer
|
||||
Get
|
||||
Return ViewState("Agrupador").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("Agrupador") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Opcion() As String
|
||||
Get
|
||||
Return ViewState("Opcion").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("Opcion") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property TipoDocto() As String
|
||||
Get
|
||||
Return ViewState("TipoDocto").ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
ViewState("TipoDocto") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property TipoCambio() As Integer
|
||||
Get
|
||||
Return ViewState("TipoCambio").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("TipoCambio") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property TCEspecifico() As Double
|
||||
Get
|
||||
Return ViewState("TCEspecifico").ToString.ToDouble
|
||||
End Get
|
||||
Set(value As Double)
|
||||
ViewState("TCEspecifico") = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property SePersonalizo() As Integer
|
||||
Get
|
||||
Return ViewState("SePersonalizo").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("SePersonalizo") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveClienteSucursal As Integer
|
||||
Get
|
||||
If ViewState("CveClienteSucursal") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return DirectCast(ViewState("CveClienteSucursal"), Integer)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveClienteSucursal") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property CveCobranzaEstatus As Integer
|
||||
Get
|
||||
If ViewState("CveCobranzaEstatus") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return DirectCast(ViewState("CveCobranzaEstatus"), Integer)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveCobranzaEstatus") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property LimiteCredito As Decimal
|
||||
Get
|
||||
If ViewState("LimiteCredito") Is Nothing Then
|
||||
Return -1
|
||||
Else
|
||||
Return DirectCast(ViewState("LimiteCredito"), Decimal)
|
||||
End If
|
||||
End Get
|
||||
Set(value As Decimal)
|
||||
ViewState("LimiteCredito") = value
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
ViewState("Opcion") = IfNull(Request("Op"), "-1")
|
||||
CargaCombos()
|
||||
If Request("Op") IsNot Nothing Then
|
||||
CargaDatos()
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 7 Then
|
||||
ChkCuentaContableReferencia.Visible = True
|
||||
End If
|
||||
CargaAsignarCobranza()
|
||||
TxtFechaCobranza.Text = Now.ToShortDateString
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "CARGAS"
|
||||
Private Sub CargaCombos()
|
||||
Dim CveCliente, CveVendedor, CveUsuario, CveSubProyecto,
|
||||
CveEstatus, CveResponsable, CveAgrupador, CveClienteClasificacion As Integer
|
||||
|
||||
'CargaClientes
|
||||
'CargaClientes
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
DdlClientesWS.setEsWebService(True)
|
||||
Else
|
||||
DdlClientesWS.setEsWebService(False)
|
||||
DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientesWS.DataBind()
|
||||
DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
'DdlClientes.DataBind()
|
||||
|
||||
'CargaSubProyectos
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
'CargaUsuarios
|
||||
DdlUsuario.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlUsuario.DataBind()
|
||||
|
||||
'CargaResponsable
|
||||
DdlResponsable.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||
DdlResponsable.DataBind()
|
||||
|
||||
'Tipo Docto
|
||||
DdlTipoDocto.Items.Add(New ListItem("Ing X Comp", "IxC"))
|
||||
|
||||
'Carga Cobranza Estatus
|
||||
DdlCobranzaEstatusFiltro.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa)
|
||||
DdlCobranzaEstatusFiltro.DataBind()
|
||||
DdlCobranzaEstatusFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
'Carga Clasificacion Cliente
|
||||
DdlClienteClasificacion.DataSource = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClienteClasificacion.DataBind()
|
||||
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
'Cargamos las fechas
|
||||
Anio = If(Request("Anio") IsNot Nothing, Request("Anio").ToString, "-1").ToString.ToEntero
|
||||
Mes = If(Request("Mes") IsNot Nothing, Request("Mes").ToString, "-1").ToString.ToEntero
|
||||
AnioMes = If(Request("AnioMes") IsNot Nothing, Request("AnioMes").ToString, "-1").ToString
|
||||
Fecha = If(Request("Fecha") IsNot Nothing, Request("Fecha").ToString, "-1").ToString
|
||||
FechaI = If(Request("FechaI") IsNot Nothing, Request("FechaI").ToString, "-1").ToString
|
||||
FechaF = If(Request("FechaF") IsNot Nothing, Request("FechaF").ToString, "-1").ToString
|
||||
FechaVI = If(Request("FechaVI") IsNot Nothing, Request("FechaVI").ToString, "-1").ToString
|
||||
FechaVF = If(Request("FechaVF") IsNot Nothing, Request("FechaVF").ToString, "-1").ToString
|
||||
FechaCorte = IfNull(Request("FechaCorte"), Now.ToDate.ToString).ToString
|
||||
CveCobranzaEstatus = If(Request("CveCobranzaEstatus") IsNot Nothing, Request("CveCobranzaEstatus").ToString, "-1").ToString.ToEntero
|
||||
CveClienteClasificacion = If(Request("CveClienteClasificacion") IsNot Nothing, Request("CveClienteClasificacion").ToString, "-1").ToString.ToEntero
|
||||
LimiteCredito = If(Request("LimiteCredito") IsNot Nothing, Request("LimiteCredito").ToString, "-1").ToString.ToDecimal
|
||||
|
||||
|
||||
If FechaF <> "-1" Then
|
||||
txtFechaF.Text = FechaF
|
||||
End If
|
||||
If FechaI <> "-1" Then
|
||||
txtFechaI.Text = FechaI
|
||||
End If
|
||||
If FechaVF <> "-1" Then
|
||||
txtFechaVF.Text = FechaVF
|
||||
End If
|
||||
If FechaVI <> "-1" Then
|
||||
txtFechaVI.Text = FechaVI
|
||||
End If
|
||||
If Fecha <> "-1" Then
|
||||
txtFechaI.Text = Fecha
|
||||
txtFechaF.Text = Fecha
|
||||
End If
|
||||
|
||||
txtCorteA.Text = $"31/12/{Now.Year}"
|
||||
|
||||
txtFechaI.Text = If(Anio <> -1, String.Format("01/01/{0}", Anio), txtFechaI.Text)
|
||||
txtFechaI.Text = If(Mes <> -1, txtFechaI.Text, txtFechaI.Text)
|
||||
txtFechaI.Text = If(AnioMes <> "-1", String.Format("01/{0}/{1}", AnioMes.Substring(5, 2).PadLeft(2, "0"c), AnioMes.Substring(0, 4)), txtFechaI.Text)
|
||||
If Request("FechaCorte") <> "-1" AndAlso IsDate(Request("FechaCorte")) Then txtCorteA.Text = Request("FechaCorte")
|
||||
|
||||
If Anio <> -1 Then
|
||||
txtFechaF.Text = String.Format("31/12/{0}", Anio)
|
||||
ElseIf Mes <> -1 Then
|
||||
'txtFechaF.Text = txtFechaI.Text.ToDate.LastDayOfMonth.ToShortDateString
|
||||
ElseIf AnioMes <> "-1" Then
|
||||
txtFechaF.Text = txtFechaI.Text.ToDate.LastDayOfMonth.ToShortDateString
|
||||
End If
|
||||
|
||||
|
||||
TipoCambio = IfNull(Request("TipoCambio"), -1).ToString.ToEntero
|
||||
TCEspecifico = IfNull(Request("TCEspecifico"), -1).ToString.ToDouble
|
||||
TipoDocto = IfNull(Request("TipoDocto"), "-1").ToString
|
||||
CveClienteSucursal = IfNull(Request("CveClienteSucursal"), "-1").ToString.ToEntero
|
||||
CveSubProyecto = IfNull(Request("CveSubProyecto"), "-1").ToString.ToEntero
|
||||
CveVendedor = IfNull(Request("Vendedor"), "-1").ToString.ToEntero
|
||||
CveCliente = IfNull(Request("CveCliente"), "-1").ToString.ToEntero
|
||||
CveUsuario = IfNull(Request("CveUsuario"), "-1").ToString.ToEntero
|
||||
CveEstatus = IfNull(Request("CveEstatusFactura"), "-1").ToString.ToEntero
|
||||
CveResponsable = IfNull(Request("CveUsuarioResponsable"), "-1").ToString.ToEntero
|
||||
CveAgrupador = IfNull(Request("GPO"), "-1").ToString.ToEntero
|
||||
Iva = IfNull(Request("IVA"), "-1").ToString
|
||||
|
||||
DdlSubProyecto.SelectedValueExist(CveSubProyecto)
|
||||
|
||||
DdlClienteClasificacion.SelectedValueExist(CveClienteClasificacion)
|
||||
CargaClientes()
|
||||
If CveCliente > 0 Then
|
||||
DdlClientesWS.SelectedValue = CveCliente.ToString
|
||||
DdlClientesWS.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("NombreComercial", $"CveCliente = {CveCliente}")
|
||||
End If
|
||||
'DdlClientes.SelectedValueExist(CveCliente)
|
||||
DdlUsuario.SelectedValueExist(CveUsuario)
|
||||
DdlResponsable.SelectedValueExist(CveResponsable)
|
||||
DdlGrupo.SelectedValueExist(CveAgrupador)
|
||||
|
||||
'Carga Vendedor
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||
DdlVendedor.DataBind()
|
||||
If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then
|
||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
||||
DdlVendedor.Attributes.Add("disabled", "disabled")
|
||||
DdlVendedor.Enabled = False
|
||||
End If
|
||||
|
||||
|
||||
'Nuevos
|
||||
DdlTipoDocto.SelectedValuesIfExistM(TipoDocto)
|
||||
RblTipoCambio.SelectedValue = CType(TipoCambio, String)
|
||||
|
||||
'13/04/2018 - Carga filtro estatus cobranza
|
||||
DdlCobranzaEstatusFiltro.SelectedValueExist(CveCobranzaEstatus.ToString)
|
||||
|
||||
If RblTipoCambio.SelectedValue.ToEntero = 3 Then
|
||||
If TCEspecifico <> -1 Then
|
||||
LiEspecifico.Visible = True
|
||||
TxtEspecifico.Text = TCEspecifico.ToString
|
||||
Else
|
||||
Dim TipoCambio As Double
|
||||
LiEspecifico.Visible = True
|
||||
TipoCambio = GlobalTipoCambio(Now)
|
||||
TxtEspecifico.Text = TipoCambio.ToString
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If CveClienteSucursal > 0 Then
|
||||
DdlClientesWS.Attributes.Add("style", "!important width: 60%;")
|
||||
DdlClienteSucursal.Visible = True
|
||||
DivClientes.Attributes.Remove("class")
|
||||
DivClientes.Attributes.Add("class", "col-md-4")
|
||||
|
||||
Dim ObjCliente As New ClsClientes
|
||||
If ObjCliente.GetSucursales(CveCliente) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
DdlClienteSucursal.DataSource = ObjCliente.DtResultados
|
||||
End If
|
||||
End If
|
||||
ObjCliente.Dispose()
|
||||
DdlClienteSucursal.DataBind()
|
||||
DdlClienteSucursal.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||
DdlClienteSucursal.SelectedValueExist(CveClienteSucursal)
|
||||
Else
|
||||
DdlClientesWS.Attributes.Add("style", "!important width: 100%;")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
Private Function CargaDatos() As DataTable
|
||||
Dim dt As DataTable = Nothing
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
Dim FechaI, FechaF, FechaVI, FechaVF As String
|
||||
|
||||
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
|
||||
TCEspecifico = TxtEspecifico.Text.ToDouble
|
||||
Else
|
||||
TCEspecifico = -1
|
||||
End If
|
||||
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||
FechaVI = If(IsDate(txtFechaVI.Text.Trim()), txtFechaVI.Text.Trim(), "-1")
|
||||
FechaVF = If(IsDate(txtFechaVF.Text.Trim()), txtFechaVF.Text.Trim(), "-1")
|
||||
'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero
|
||||
Dim CveCliente = If(DdlClientesWS.SelectedValue.ToEntero > 0, DdlClientesWS.SelectedValue.ToEntero, -1)
|
||||
If ObjMovtos.GetCxCDetalle(FechaI, FechaF, CveCliente, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero,
|
||||
Anio, Mes, AnioMes, Fecha, CveClienteSucursal, Opcion, -1,
|
||||
Iva.ToString, DdlGrupo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlResponsable.SelectedValue.ToEntero,
|
||||
RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF,
|
||||
FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=DdlCobranzaEstatusFiltro.SelectedValue.ToEntero,
|
||||
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, LimiteCredito:=LimiteCredito) Then
|
||||
|
||||
GvDatos.DataSource = ObjMovtos.DtResultados
|
||||
dt = ObjMovtos.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjMovtos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
UPDatos.Update()
|
||||
|
||||
Return dt
|
||||
|
||||
End Function
|
||||
|
||||
Private Sub ConfiguraEmpresa()
|
||||
'Dim ObjEmpresa As New ClsEmpresas()
|
||||
'If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
If Not UsuarioActual.Empresa.MostrarRetIVA Then GvDatos.Columns(7).Visible = False
|
||||
If Not UsuarioActual.Empresa.MostrarRetISR Then GvDatos.Columns(8).Visible = False
|
||||
'End If
|
||||
'ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "CONSULTAR"
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
ConfiguraEmpresa()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "GRIDVIEW"
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(1).Width = Unit.Pixel(70)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(75)
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("SubProyecto") = "" And e.Row.DBCampo("CveMoneda") = "1" Then
|
||||
e.Row.Cells(11).Text = "Total Pesos"
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.FCCheckBox("ChkCobranza").Visible = False
|
||||
e.Row.Cells(39).Text = ""
|
||||
e.Row.Cells(21).Text = ""
|
||||
e.Row.Cells(28).Text = ""
|
||||
ElseIf e.Row.DBCampo("SubProyecto") = "" And e.Row.DBCampo("CveMoneda") = "2" Then
|
||||
e.Row.Cells(12).Text = "Total Dólares"
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.FCCheckBox("ChkCobranza").Visible = False
|
||||
e.Row.Cells(39).Text = ""
|
||||
e.Row.Cells(21).Text = ""
|
||||
e.Row.Cells(28).Text = ""
|
||||
ElseIf e.Row.DBCampo("CveVenta") = "" Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
e.Row.FCCheckBox("ChkCobranza").Visible = False
|
||||
e.Row.Cells(39).Text = ""
|
||||
e.Row.Cells(21).Text = ""
|
||||
e.Row.Cells(28).Text = ""
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "PERSONALIZAR COLUMNAS"
|
||||
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As EventArgs) Handles BtnPersonalizar.Click
|
||||
|
||||
If ChkFecha.Checked Then
|
||||
GvDatos.Columns(1).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(1).Visible = False
|
||||
End If
|
||||
|
||||
If ChkFolio.Checked Then
|
||||
GvDatos.Columns(2).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(2).Visible = False
|
||||
End If
|
||||
|
||||
If ChkTotal.Checked Then
|
||||
GvDatos.Columns(3).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(3).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSubTotal.Checked Then
|
||||
GvDatos.Columns(4).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(4).Visible = False
|
||||
End If
|
||||
|
||||
If ChkIVA.Checked Then
|
||||
GvDatos.Columns(5).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(5).Visible = False
|
||||
End If
|
||||
|
||||
If ChkDescuento.Checked Then
|
||||
GvDatos.Columns(6).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(6).Visible = False
|
||||
End If
|
||||
|
||||
If ChkAmortizacion.Checked Then
|
||||
GvDatos.Columns(7).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(7).Visible = False
|
||||
End If
|
||||
|
||||
If ChkRetIVA.Checked Then
|
||||
GvDatos.Columns(8).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(8).Visible = False
|
||||
End If
|
||||
|
||||
If ChkRetISR.Checked Then
|
||||
GvDatos.Columns(9).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(9).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMoneda.Checked Then
|
||||
GvDatos.Columns(10).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(10).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSucursal.Checked Then
|
||||
GvDatos.Columns(11).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(11).Visible = False
|
||||
End If
|
||||
|
||||
If ChkCodigo.Checked Then
|
||||
GvDatos.Columns(15).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(15).Visible = False
|
||||
End If
|
||||
|
||||
If ChkCliente.Checked Then
|
||||
GvDatos.Columns(16).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(16).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSucursalCliente.Checked Then
|
||||
GvDatos.Columns(17).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(17).Visible = False
|
||||
End If
|
||||
|
||||
If ChkVendedor.Checked Then
|
||||
GvDatos.Columns(18).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(18).Visible = False
|
||||
End If
|
||||
|
||||
If ChlMotivoDescuento.Checked Then
|
||||
GvDatos.Columns(19).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(19).Visible = False
|
||||
End If
|
||||
|
||||
If ChkEstatusFactura.Checked Then
|
||||
GvDatos.Columns(20).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(20).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSeTimbro.Checked Then
|
||||
GvDatos.Columns(21).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(21).Visible = False
|
||||
End If
|
||||
|
||||
If ChkCuentaContableReferencia.Checked Then
|
||||
GvDatos.Columns(22).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(22).Visible = False
|
||||
End If
|
||||
|
||||
|
||||
If ChkCuentaContable.Checked Then
|
||||
GvDatos.Columns(23).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(23).Visible = False
|
||||
End If
|
||||
|
||||
If ChkUsuario.Checked Then
|
||||
GvDatos.Columns(24).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(24).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMotivoCancelacion.Checked Then
|
||||
GvDatos.Columns(25).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(25).Visible = False
|
||||
End If
|
||||
|
||||
If ChkObservaciones.Checked Then
|
||||
GvDatos.Columns(26).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(26).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSucursalEjecucion.Checked Then
|
||||
GvDatos.Columns(27).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(27).Visible = False
|
||||
End If
|
||||
|
||||
If ChkTelefono.Checked Then
|
||||
GvDatos.Columns(28).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(28).Visible = False
|
||||
End If
|
||||
|
||||
If ChkMail.Checked Then
|
||||
GvDatos.Columns(29).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(29).Visible = False
|
||||
End If
|
||||
|
||||
If ChkLimiteCredito.Checked Then
|
||||
GvDatos.Columns(30).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(30).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSucursalCobranza.Checked Then
|
||||
GvDatos.Columns(31).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(31).Visible = False
|
||||
End If
|
||||
|
||||
If ChkEstatusCobranza.Checked Then
|
||||
GvDatos.Columns(33).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(33).Visible = False
|
||||
End If
|
||||
|
||||
If ChkTurnoCobranza.Checked Then
|
||||
GvDatos.Columns(34).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(34).Visible = False
|
||||
End If
|
||||
|
||||
If ChkObsCobranza.Checked Then
|
||||
GvDatos.Columns(35).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(35).Visible = False
|
||||
End If
|
||||
|
||||
|
||||
If ChkFechaCobranza.Checked Then
|
||||
GvDatos.Columns(36).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(36).Visible = False
|
||||
End If
|
||||
|
||||
If ChkHorario.Checked Then
|
||||
GvDatos.Columns(37).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(37).Visible = False
|
||||
End If
|
||||
|
||||
If ChkDiasPago.Checked Then
|
||||
GvDatos.Columns(38).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(38).Visible = False
|
||||
End If
|
||||
|
||||
If ChkSeEnvioMail.Checked Then
|
||||
GvDatos.Columns(39).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(39).Visible = False
|
||||
End If
|
||||
|
||||
If ChkEstatusCliente.Checked Then
|
||||
GvDatos.Columns(40).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(40).Visible = False
|
||||
End If
|
||||
|
||||
If ChkIEPS.Checked Then
|
||||
GvDatos.Columns(41).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(41).Visible = False
|
||||
End If
|
||||
|
||||
If ChkDiasTranscurridos.Checked Then
|
||||
GvDatos.Columns(42).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(42).Visible = False
|
||||
End If
|
||||
|
||||
If ChkTC.Checked Then
|
||||
GvDatos.Columns(43).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(43).Visible = False
|
||||
End If
|
||||
|
||||
If ChkFechaEjecucion.Checked Then
|
||||
GvDatos.Columns(44).Visible = True
|
||||
SePersonalizo = 1
|
||||
Else
|
||||
GvDatos.Columns(44).Visible = False
|
||||
End If
|
||||
|
||||
|
||||
If SePersonalizo = 1 Then
|
||||
ImgExcelPersonalizado.Visible = True
|
||||
Else
|
||||
ImgExcelPersonalizado.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
CargaDatos()
|
||||
RegistraScript("$('#DivPersonalizar').modal('hide');")
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "IMPRESIONES"
|
||||
Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click
|
||||
GenerarImpresion("EXCEL")
|
||||
End Sub
|
||||
Private Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click
|
||||
SpreadsheetInfo.SetLicense(SerialGemBoxSpreadsheet())
|
||||
|
||||
Dim ef As ExcelFile = New ExcelFile
|
||||
Dim ws As ExcelWorksheet = ef.Worksheets.Add("DataTable to Sheet")
|
||||
Dim dt As DataTable = New DataTable
|
||||
Dim response As HttpResponse = Me.Response
|
||||
|
||||
'Recorrer columnas
|
||||
For index = 0 To GvDatos.Columns.Count - 1
|
||||
If GvDatos.Columns(index).Visible Then
|
||||
dt.Columns.Add(GvDatos.Columns(index).HeaderText)
|
||||
End If
|
||||
Next
|
||||
|
||||
'Recorrer filas
|
||||
For Each fila As GridViewRow In GvDatos.Rows
|
||||
Dim dr As DataRow = dt.NewRow()
|
||||
|
||||
For index = 0 To GvDatos.Columns.Count - 1
|
||||
If GvDatos.Columns(index).Visible Then
|
||||
|
||||
If TypeOf GvDatos.Columns(index) Is HyperLinkField Then
|
||||
dr(GvDatos.Columns(index).HeaderText) = DirectCast(fila.Cells(index).Controls(0), HyperLink).Text.Replace(" ", "")
|
||||
Else
|
||||
dr(GvDatos.Columns(index).HeaderText) = fila.Cells(index).Text.Replace(" ", "")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
dt.Rows.Add(dr)
|
||||
Next
|
||||
|
||||
' Insert DataTable into an Excel worksheet.
|
||||
ws.InsertDataTable(dt,
|
||||
New InsertDataTableOptions() With
|
||||
{
|
||||
.ColumnHeaders = True,
|
||||
.StartRow = 1
|
||||
})
|
||||
|
||||
ef.Save(response, "RepCxC.xlsx")
|
||||
End Sub
|
||||
|
||||
Private Sub GenerarImpresion(Optional TipoImpresion As String = "PDF")
|
||||
'Dim ObjMovtos As New ClsMovimientos()
|
||||
Dim FechaI As String = txtFechaI.Text
|
||||
Dim FechaF As String = txtFechaF.Text
|
||||
If txtFechaI.Text = "" Then FechaI = "-1"
|
||||
If txtFechaF.Text = "" Then FechaF = "-1"
|
||||
|
||||
If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then
|
||||
TCEspecifico = TxtEspecifico.Text.ToDouble
|
||||
Else
|
||||
TCEspecifico = -1
|
||||
End If
|
||||
|
||||
Dim Cliente = If(DdlClientesWS.SelectedValue = "-1", "", $" <b>Cliente:</b> {DdlClientesWS.SelectedText}")
|
||||
Dim Sucursal = If(DdlSubProyecto.SelectedValue = "-1", "", $" <b>Sucursal:</b> {DdlSubProyecto.SelectedItem.Text}")
|
||||
Dim Grupo = $" <b>Agrupado Por:</b> {DdlGrupo.SelectedItem.Text}" 'If(DdlGrupo.SelectedValue = "3", "", $" <b>Agrupado Por:</b> {DdlGrupo.SelectedItem.Text}")
|
||||
Dim TipoDocto = If(DdlTipoDocto.GetSelectedText = "", "", $" <b>Documentos:</b> {DdlTipoDocto.GetSelectedText}")
|
||||
Dim Vendedor = If(DdlVendedor.SelectedValue = "-1", "", $" <b>Vendedor:</b> {DdlVendedor.SelectedItem.Text}")
|
||||
Dim FechaIn As String = If(txtFechaI.Text = "", "", $" <b>Fecha Inicio Docto:</b> {txtFechaI.Text}")
|
||||
Dim FechaFn As String = If(txtFechaF.Text = "", "", $" <b>Fecha Fin Docto:</b> {txtFechaF.Text}")
|
||||
Dim FVI As String = If(txtFechaVI.Text = "", "", $" <b>Fecha Venc. Inic.:</b> {txtFechaVI.Text}")
|
||||
Dim FVF As String = If(txtFechaVF.Text = "", "", $" <b>Fecha Venc. Final:</b> {txtFechaVF.Text}")
|
||||
Dim Registro = If(DdlUsuario.SelectedValue = "-1", "", $" <b>Registró:</b> {DdlUsuario.SelectedItem.Text}")
|
||||
Dim Responsable = If(DdlResponsable.SelectedValue = "-1", "", $" <b>Responsable:</b> {DdlResponsable.SelectedItem.Text}")
|
||||
Dim EstatusCob = If(DdlCobranzaEstatusFiltro.SelectedValue = "-1", "", $" <b>Estatus Cobranza:</b> {DdlCobranzaEstatusFiltro.SelectedItem.Text}")
|
||||
'Dim CorteA As String = If(txtCorteA.Text = "31/12/2018", "", $" <b>Corte A:</b> {txtCorteA.Text}")
|
||||
Dim ClasificacionCli = If(DdlClienteClasificacion.SelectedValue = "-1", "", $" <b>Clasificación Cliente:</b> {DdlClienteClasificacion.SelectedItem.Text}")
|
||||
|
||||
Dim TituloReporte As String = "REPORTE DE CUENTAS POR COBRAR DEL CLIENTE CON DETALLE"
|
||||
'If UsuarioActual.CveEmpresa = 72 Then
|
||||
' TituloReporte = "Antigüedad de Saldos de Clientes"
|
||||
'End If
|
||||
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||
params.Add(New ReportParameter("FechaInicio", FechaI))
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||
params.Add(New ReportParameter("AgrupadoPor", $"{Cliente}{Sucursal}{Grupo}{Vendedor}{FechaIn}{FechaFn}{Registro}{Responsable}{TipoDocto}{EstatusCob}{FVI}{FVF}{ClasificacionCli}"))
|
||||
params.Add(New ReportParameter("TituloReporte", TituloReporte))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
params.Add(New ReportParameter("LogoPath", ""))
|
||||
End If
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepCxCDetalle.rdlc", UsuarioActual.Empresa.Ruta))
|
||||
If Archivo.Exists Then
|
||||
ImprimirPDF(String.Format("{0}Formatos/RepCxCDetalle.rdlc", UsuarioActual.Empresa.Ruta), CargaDatos, params, "ReporteCxCDetalle", TipoImpresion)
|
||||
Else
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepCxCDetalle.rdlc", CargaDatos, params, "ReporteCxCDetalle", TipoImpresion)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
Protected Sub ImgImprimir_Click(sender As Object, e As EventArgs) Handles ImgImprimir.Click
|
||||
GenerarImpresion("PDF")
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "TIPO DE CAMBIO"
|
||||
|
||||
Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged
|
||||
If RblTipoCambio.SelectedValue.ToEntero = 3 Then
|
||||
Dim TipoCambio As Double
|
||||
LiEspecifico.Visible = True
|
||||
TipoCambio = GlobalTipoCambio(Now)
|
||||
TxtEspecifico.Text = TipoCambio.ToString
|
||||
Else
|
||||
LiEspecifico.Visible = False
|
||||
End If
|
||||
UpBodyTipoCambio.Update()
|
||||
End Sub
|
||||
Private Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) Handles BtnTipoCambio.Click
|
||||
CargaDatos()
|
||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio"))
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "C O B R A N Z A "
|
||||
Private Sub CargaAsignarCobranza()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
DdlUsuarioCobranza.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||
DdlUsuarioCobranza.DataBind()
|
||||
DdlUsuarioCobranza.Items.Insert(0, New ListItem("Sin Cobrador", "-1"))
|
||||
|
||||
DdlCobranzaEstatus.DataSource = GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa)
|
||||
DdlCobranzaEstatus.DataBind()
|
||||
DdlCobranzaEstatus.Items.Insert(0, New ListItem("Sin Estatus", "-1"))
|
||||
|
||||
If ObjVentas.GetCobranzaTurnoEstatus(-1, UsuarioActual.CveEmpresa) Then
|
||||
DdlTurnoCobranza.DataSource = ObjVentas.DtResultados
|
||||
DdlTurnoCobranza.DataBind()
|
||||
DdlTurnoCobranza.Items.Insert(0, New ListItem("Sin Turno", "-1"))
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
End Sub
|
||||
Private Sub LkbHabilitarCobranza_Click(sender As Object, e As EventArgs) Handles LkbHabilitarCobranza.Click
|
||||
GvDatos.Columns(32).Visible = True ' chk aplica
|
||||
GvDatos.Columns(33).Visible = True : ChkEstatusCobranza.Checked = True
|
||||
GvDatos.Columns(35).Visible = True : ChkObsCobranza.Checked = True
|
||||
GvDatos.Columns(36).Visible = True : ChkFechaCobranza.Checked = True
|
||||
GvDatos.Columns(37).Visible = True : ChkHorario.Checked = True
|
||||
|
||||
DivCobranza.Visible = True
|
||||
CargaDatos()
|
||||
UPPersonalizar.Update()
|
||||
UpCobranza.Update()
|
||||
End Sub
|
||||
Private Sub BtnAsignaCobranza_Click(sender As Object, e As EventArgs) Handles BtnAsignaCobranza.Click
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim time As DateTime
|
||||
Dim TieneError = False
|
||||
|
||||
ObjVentas.IniciaTransacSQL()
|
||||
|
||||
For Each row As GridViewRow In GvDatos.Rows
|
||||
If row.FCCheckBox("ChkCobranza").Checked Then
|
||||
time = DateTime.Parse(String.Format("{0} {1}:{2} {3}", TxtFechaCobranza.Text, TimeSelector.Hour, TimeSelector.Minute, TimeSelector.AmPm))
|
||||
If Not ObjVentas.UpdateAsignaVentaCobranza(row.DataKey("CveVenta").ToEntero, DdlCobranzaEstatus.SelectedValue.ToEntero, DdlUsuarioCobranza.SelectedValue.ToEntero, DdlTurnoCobranza.SelectedValue.ToEntero, TxtObservacionCobranza.Text.Trim, time) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If Not TieneError Then
|
||||
ObjVentas.Commit()
|
||||
Alert("Se asigno exitosamente datos de cobranza a la venta", TipoMensaje.MsgInformacion)
|
||||
|
||||
Else
|
||||
ObjVentas.RollBack()
|
||||
Alert("Hubo un error al asignar datos de cobranza", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
CargaDatos()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region "SELECTED INDEX CHANGE"
|
||||
|
||||
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaClientes()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaClientes()
|
||||
If UsuarioActual.CveEmpresa <> 119 Then
|
||||
DdlClientesWS.ddl.Items.Clear()
|
||||
DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
|
||||
DdlClientesWS.DataBind()
|
||||
DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
288
CxC/RepCxCPeriodo.aspx
Normal file
288
CxC/RepCxCPeriodo.aspx
Normal file
@@ -0,0 +1,288 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepCxCPeriodo.aspx.cs" Inherits="CxC_RepCxCPeriodo" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
#chartdiv {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de CxC Periodo
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
||||
</li>
|
||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal"></i> Ver Grafica</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||
</li>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="" id="filtroprlcXc">
|
||||
<div class="portlet-title portlet-filterT smalltitle " style="">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Cliente:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Sucursal:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Grupo:
|
||||
</div>
|
||||
<div class="col-md-2 truncate">
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Text="Año" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mes" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Año/Mes" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Fecha" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Cliente" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Sucursal" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Vendedor" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Usuario" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Vendedor:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Registró:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Responsable:
|
||||
</div>
|
||||
<div class="col-md-2 ">
|
||||
<asp:DropDownList ID="DdlResponsable" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Tipo Docto:
|
||||
</div>
|
||||
<div class="col-md-2 " style="padding-bottom: 10px;">
|
||||
<asp:ListBox ID="DdlTipoDocto" SelectionMode="Multiple" CssClass="form-control ddlFiltros input-sm select2me Widthall" Style="width: 100%;" runat="server">
|
||||
<asp:ListItem Selected="True" Value="Ing" Text="Ingresos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Rem" Text="Remisión"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Ant" Text="Anticipos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Egs" Text="Egresos"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Value="Dev" Text="Devolución"></asp:ListItem>
|
||||
</asp:ListBox>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Estatus Cobranza:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlCobranzaEstatus" DataValueField="CveCobranzaEstatus" DataTextField="CobranzaEstatus" runat="server" CssClass="form-control select2me">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1 truncate">
|
||||
Corte A:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||
<asp:TextBox Width="80px" ID="txtCorteA" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="imgCalendarioCA" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="txtCorteA" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="txtCorteA" PopupButtonID="imgCalendarioCA" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtCorteA" Display="None" ErrorMessage="El campo <b>''Corte A''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="CompareValidator3" runat="server" ControlToValidate="txtCorteA" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="RequiredFieldValidator3" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="CompareValidator3" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-1 truncate">
|
||||
Estatus Cliente:
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlEstatusCliente" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Inactivos" Value="0"></asp:ListItem>
|
||||
<asp:ListItem Text="Activos" Value="1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<label title="Clasificación Cliente" data-toggle="tooltip" data-placement="top" class="col-md-1 ">Clasificacion Cli.:</label>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlClienteClasificacion" AutoPostBack="true" OnSelectedIndexChanged="DdlClienteClasificacion_SelectedIndexChanged" runat="server" AppendDataBoundItems="true" CssClass="form-control input-small input-sm select2me" Width="100%" DataTextField="ClienteClasificacion" DataValueField="CveClienteClasificacion"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" data-sort="true" Width="99%" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron datos con los filtros especificados"
|
||||
CssClass="table GVD table-striped table-hover Widthall ScrollAD" GridLines="None" OnRowDataBound="GvDatos_RowDataBound">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="GPO" HeaderText="Grupo" ItemStyle-Width="30%" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Enero" HeaderText="Ene" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Febrero" HeaderText="Feb" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Marzo" HeaderText="Mar" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Abril" HeaderText="Abr" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Mayo" HeaderText="May" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Junio" HeaderText="Jun" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Julio" HeaderText="Jul" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Agosto" HeaderText="Ago" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Septiembre" HeaderText="Sep" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Octubre" HeaderText="Oct" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Noviembre" HeaderText="Nov" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Diciembre" HeaderText="Dic" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
<asp:BoundField DataField="Saldo" HeaderText="Saldo" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:N2}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel runat="server" ID="UpTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivTipoCambio" class="modal fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="Label2" runat="server" ClientIDMode="Static" Text="Cambiar Tipo Cambio de Dólares"></asp:Label></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:UpdatePanel runat="server" ID="UpBodyTipoCambio" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:RadioButtonList runat="server" ID="RblTipoCambio" OnSelectedIndexChanged="RblTipoCambio_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Selected="true" Text="Moneda Original" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Dólares en Tipo Cambio de la Fecha Compra" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Tipo Cambio Especifico" Value="3"></asp:ListItem>
|
||||
</asp:RadioButtonList>
|
||||
<div class="row" style="margin-left: 10px;" runat="server" id="LiEspecifico" visible="false">
|
||||
Especifico:
|
||||
<asp:TextBox ID="TxtEspecifico" runat="server" Width="55px" />
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="BtnTipoCambio" runat="server" OnClick="BtnTipoCambio_Click" Text="Aceptar" class="btn btn-primary" />
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div id="DivModalGrafica" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog modal-lg" runat="server" ID="UpGrafica" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblTituloGrafica" runat="server" ClientIDMode="Static" Text="Saldo"></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="chartdiv"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="https://www.amcharts.com/lib/3/amcharts.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/serial.js"></script>
|
||||
<script src="https://www.amcharts.com/lib/3/plugins/export/export.min.js"></script>
|
||||
<link rel="stylesheet" href="https://www.amcharts.com/lib/3/plugins/export/export.css" type="text/css" media="all" />
|
||||
<script src="https://www.amcharts.com/lib/3/themes/light.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
function CargaGraficaLineas(data, graph) {
|
||||
var chart = AmCharts.makeChart("chartdiv", {
|
||||
"type": "serial",
|
||||
"theme": "light",
|
||||
"legend": {
|
||||
"useGraphSettings": true,
|
||||
"valueWidth": 150
|
||||
},
|
||||
"dataProvider": data,
|
||||
"startDuration": 0.5,
|
||||
"graphs": graph,
|
||||
"chartCursor": {
|
||||
"cursorAlpha": 0,
|
||||
"zoomable": false
|
||||
},
|
||||
"categoryField": "mes",
|
||||
"categoryAxis": {
|
||||
"gridPosition": "start",
|
||||
"axisAlpha": 0,
|
||||
"fillAlpha": 0.05,
|
||||
"fillColor": "#000000",
|
||||
"gridAlpha": 0,
|
||||
"position": "top"
|
||||
},
|
||||
"export": {
|
||||
"enabled": true,
|
||||
"position": "bottom-right"
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
324
CxC/RepCxCPeriodo.aspx.cs
Normal file
324
CxC/RepCxCPeriodo.aspx.cs
Normal file
@@ -0,0 +1,324 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using static Extensiones.ModExtensiones;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Text;
|
||||
|
||||
public partial class CxC_RepCxCPeriodo : ClsPaginas
|
||||
{
|
||||
#region PROPIEDADES
|
||||
|
||||
private DataTable DtDatos
|
||||
{
|
||||
get { return DtDatos = (DataTable)ViewState["DtDatos"]; }
|
||||
set { ViewState["DtDatos"] = value; }
|
||||
}
|
||||
private int TipoCambio
|
||||
{
|
||||
get { return (ViewState["TipoCambio"] == null) ? -1 : Convert.ToInt32(ViewState["TipoCambio"]); }
|
||||
set { ViewState["TipoCambio"] = value; }
|
||||
}
|
||||
private double TCEspecifico
|
||||
{
|
||||
get { return (ViewState["TCEspecifico"] == null) ? 0 : Convert.ToDouble(ViewState["TCEspecifico"]); }
|
||||
set { ViewState["TCEspecifico"] = value; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
}
|
||||
}
|
||||
|
||||
private void InicializaValores()
|
||||
{
|
||||
TipoCambio = 1;
|
||||
TCEspecifico = -1;
|
||||
|
||||
//CargaClientes
|
||||
if (UsuarioActual.CveEmpresa == 119) {
|
||||
DdlClientesWS.setEsWebService(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
DdlClientesWS.setEsWebService(false);
|
||||
DdlClientesWS.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1);
|
||||
DdlClientesWS.DataBind();
|
||||
DdlClientesWS.ddl.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
}
|
||||
|
||||
//CargaSubProyectos
|
||||
DdlSubProyecto.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1);
|
||||
DdlSubProyecto.DataBind();
|
||||
|
||||
//Carga Vendedor
|
||||
DdlVendedor.DataSource = get_GlobalDTVendedores(UsuarioActual.CveEmpresa);
|
||||
DdlVendedor.DataBind();
|
||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor);
|
||||
|
||||
//CargaUsuarios
|
||||
DdlUsuario.DataSource = get_GlobalDTUsuarios().FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}");
|
||||
DdlUsuario.DataBind();
|
||||
|
||||
//CargaResponsable
|
||||
DdlResponsable.DataSource = get_GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa);
|
||||
DdlResponsable.DataBind();
|
||||
|
||||
txtCorteA.Text = $"31/12/{DateTime.Now.Year}";
|
||||
|
||||
//Carga Cobranza Estatus
|
||||
DdlCobranzaEstatus.DataSource = get_GlobalDTCobranzaEstatus(UsuarioActual.CveEmpresa);
|
||||
DdlCobranzaEstatus.DataBind();
|
||||
DdlCobranzaEstatus.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
|
||||
//Carga Clasificacion Cliente
|
||||
DdlClienteClasificacion.DataSource = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa);
|
||||
DdlClienteClasificacion.DataBind();
|
||||
DdlClienteClasificacion.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
}
|
||||
|
||||
private void Consulta()
|
||||
{
|
||||
string TipoDocto = "";
|
||||
if (DdlTipoDocto.GetSelectedValuesM() == "") { TipoDocto = "-1"; } else { TipoDocto = DdlTipoDocto.GetSelectedValuesM(); }
|
||||
|
||||
if (RblTipoCambio.SelectedValue.ToEntero() == 3 && TxtEspecifico.Text != "") { TCEspecifico = TxtEspecifico.Text.ToDouble(); } else { TCEspecifico = -1; }
|
||||
|
||||
ClsMovimientos ObjMov = new ClsMovimientos();
|
||||
if (ObjMov.GetCxCPeriodo(DdlClientesWS.SelectedValue.ToEntero(),DdlSubProyecto.SelectedValue.ToEntero(),DdlVendedor.SelectedValue.ToEntero(),DdlUsuario.SelectedValue.ToEntero(),
|
||||
-1,"-1",UsuarioActual.CveEmpresa,DdlGrupo.SelectedValue.ToEntero(),DdlResponsable.SelectedValue.ToEntero(),TipoCambio,TCEspecifico, TipoDocto,txtCorteA.Text.ToDate(),
|
||||
DdlEstatusCliente.SelectedValue.ToEntero(), UsuarioActual.CveUsuario, DdlCobranzaEstatus.SelectedValue.ToEntero(), DdlClienteClasificacion.SelectedValue.ToEntero())){
|
||||
GvDatos.DataSource = ObjMov.DtResultados;
|
||||
DtDatos = ObjMov.DtResultados;
|
||||
}
|
||||
ObjMov.Dispose();
|
||||
GvDatos.DataBind();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
private void CargaClientes()
|
||||
{
|
||||
if (UsuarioActual.CveEmpresa != 119)
|
||||
{
|
||||
DdlClientesWS.ddl.Items.Clear();
|
||||
DdlClientesWS.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero()} OR {DdlClienteClasificacion.SelectedValue.ToEntero()} = -1");
|
||||
DdlClientesWS.DataBind();
|
||||
DdlClientesWS.ddl.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
}
|
||||
}
|
||||
|
||||
protected void DdlClienteClasificacion_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
CargaClientes();
|
||||
}
|
||||
|
||||
protected void BtnTipoCambio_Click(object sender, EventArgs e)
|
||||
{
|
||||
Consulta();
|
||||
}
|
||||
|
||||
protected void RblTipoCambio_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
TipoCambio = RblTipoCambio.SelectedValue.ToEntero();
|
||||
if (TipoCambio == 3)
|
||||
{
|
||||
LiEspecifico.Visible = true;
|
||||
TCEspecifico = get_GlobalTipoCambio(DateTime.Now);
|
||||
TxtEspecifico.Text = TCEspecifico.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
LiEspecifico.Visible = false;
|
||||
}
|
||||
UpBodyTipoCambio.Update();
|
||||
}
|
||||
|
||||
protected void LnkVerGrafica_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DtDatos != null)
|
||||
{
|
||||
if (DtDatos.Rows.Count > 0)
|
||||
{
|
||||
DataTable Dt = new DataTable();
|
||||
Dt.Columns.Add("mes");
|
||||
|
||||
DataTable Dt2 = new DataTable();
|
||||
Dt2.Columns.Add("balloonText");
|
||||
Dt2.Columns.Add("bullet");
|
||||
Dt2.Columns.Add("title");
|
||||
Dt2.Columns.Add("valueField");
|
||||
Dt2.Columns.Add("fillAlphas");
|
||||
|
||||
foreach (DataRow Row in DtDatos.Rows)
|
||||
{
|
||||
if (Row["GPO"].ToString() != "")
|
||||
{
|
||||
Dt.Columns.Add($"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}");
|
||||
DataRow Row2 = Dt2.NewRow();
|
||||
Row2["balloonText"] = "Saldo [[category]]: [[value]]";
|
||||
Row2["bullet"] = "round";
|
||||
Row2["title"] = $"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}";
|
||||
Row2["valueField"] = $"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}";
|
||||
Row2["fillAlphas"] = 0;
|
||||
Dt2.Rows.Add(Row2);
|
||||
}
|
||||
}
|
||||
|
||||
DataRow RowEnero = Dt.NewRow();
|
||||
DataRow RowFebrero = Dt.NewRow();
|
||||
DataRow RowMarzo = Dt.NewRow();
|
||||
DataRow RowAbril = Dt.NewRow();
|
||||
DataRow RowMayo = Dt.NewRow();
|
||||
DataRow RowJunio = Dt.NewRow();
|
||||
DataRow RowJulio = Dt.NewRow();
|
||||
DataRow RowAgosto = Dt.NewRow();
|
||||
DataRow RowSeptiembre = Dt.NewRow();
|
||||
DataRow RowOctubre = Dt.NewRow();
|
||||
DataRow RowNoviembre = Dt.NewRow();
|
||||
DataRow RowDiciembre = Dt.NewRow();
|
||||
|
||||
foreach (DataRow Row in DtDatos.Rows)
|
||||
{
|
||||
if (Row["GPO"].ToString() != "")
|
||||
{
|
||||
RowEnero[$"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}"] = Row["Enero"].ToString();
|
||||
RowEnero["mes"] = "Enero";
|
||||
RowFebrero[$"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}"] = Row["Febrero"].ToString();
|
||||
RowFebrero["mes"] = "Febrero";
|
||||
RowMarzo[$"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}"] = Row["Marzo"].ToString();
|
||||
RowMarzo["mes"] = "Marzo";
|
||||
RowAbril[$"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}"] = Row["Abril"].ToString();
|
||||
RowAbril["mes"] = "Abril";
|
||||
RowMayo[$"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}"] = Row["Mayo"].ToString();
|
||||
RowMayo["mes"] = "Mayo";
|
||||
RowJunio[$"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}"] = Row["Junio"].ToString();
|
||||
RowJunio["mes"] = "Junio";
|
||||
RowJulio[$"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}"] = Row["Julio"].ToString();
|
||||
RowJulio["mes"] = "Julio";
|
||||
RowAgosto[$"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}"] = Row["Agosto"].ToString();
|
||||
RowAgosto["mes"] = "Agosto";
|
||||
RowSeptiembre[$"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}"] = Row["Septiembre"].ToString();
|
||||
RowSeptiembre["mes"] = "Septiembre";
|
||||
RowOctubre[$"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}"] = Row["Octubre"].ToString();
|
||||
RowOctubre["mes"] = "Octubre";
|
||||
RowNoviembre[$"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}"] = Row["Noviembre"].ToString();
|
||||
RowNoviembre["mes"] = "Noviembre";
|
||||
RowDiciembre[$"{Row["GPO"].ToString()} {Row["Abreviatura"].ToString()}"] = Row["Diciembre"].ToString();
|
||||
RowDiciembre["mes"] = "Diciembre";
|
||||
}
|
||||
}
|
||||
|
||||
Dt.Rows.Add(RowEnero);
|
||||
Dt.Rows.Add(RowFebrero);
|
||||
Dt.Rows.Add(RowMarzo);
|
||||
Dt.Rows.Add(RowAbril);
|
||||
Dt.Rows.Add(RowMayo);
|
||||
Dt.Rows.Add(RowJunio);
|
||||
Dt.Rows.Add(RowJulio);
|
||||
Dt.Rows.Add(RowAgosto);
|
||||
Dt.Rows.Add(RowSeptiembre);
|
||||
Dt.Rows.Add(RowOctubre);
|
||||
Dt.Rows.Add(RowNoviembre);
|
||||
Dt.Rows.Add(RowDiciembre);
|
||||
|
||||
RegistraScript($"CargaGraficaLineas({Dt.ToJson()},{Dt2.ToJson()})", "11");
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivModalGrafica"), "22");
|
||||
UpGrafica.Update();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia);
|
||||
}
|
||||
}
|
||||
|
||||
protected void LnkPdf_Click(object sender, EventArgs e)
|
||||
{
|
||||
GenerarPDF("PDF");
|
||||
}
|
||||
|
||||
protected void LnkExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
GenerarPDF("EXCEL");
|
||||
}
|
||||
|
||||
private void GenerarPDF(string Opcion)
|
||||
{
|
||||
if (DtDatos.Rows.Count < 1)
|
||||
{
|
||||
Alert("Tiene que haber datos consultados para imprimir.", TipoMensaje.MsgAdvertencia);
|
||||
return;
|
||||
}
|
||||
StringBuilder StrFiltro = new StringBuilder();
|
||||
if (txtCorteA.Text != "")
|
||||
StrFiltro.AppendFormat(" <b>Fecha Corte</b>: {0}", txtCorteA.Text.ToDate().ToShortDateString());
|
||||
if (DdlSubProyecto.SelectedValue != "-1")
|
||||
StrFiltro.AppendFormat(" <b>Sucursal</b>: {0}", DdlSubProyecto.SelectedItem.Text);
|
||||
if (DdlGrupo.SelectedValue != "-1")
|
||||
StrFiltro.AppendFormat(" <b>Grupo</b>: {0}", DdlGrupo.SelectedItem.Text);
|
||||
if (DdlClientesWS.SelectedValue != "-1")
|
||||
StrFiltro.AppendFormat(" <b>Cliente</b>: {0}", DdlClientesWS.SelectedText);
|
||||
if (DdlVendedor.SelectedValue != "-1")
|
||||
StrFiltro.AppendFormat(" <b>Venedor</b>: {0}", DdlVendedor.SelectedItem.Text);
|
||||
if (DdlUsuario.SelectedValue != "-1")
|
||||
StrFiltro.AppendFormat(" <b>Registro</b>: {0}", DdlUsuario.SelectedItem.Text);
|
||||
if (DdlResponsable.SelectedValue != "-1")
|
||||
StrFiltro.AppendFormat(" <b>Responsable</b>: {0}", DdlResponsable.SelectedItem.Text);
|
||||
if (DdlTipoDocto.GetSelectedText() != "")
|
||||
StrFiltro.AppendFormat(" <b>Tipo Documento</b>: {0}", DdlTipoDocto.GetSelectedText());
|
||||
if (DdlCobranzaEstatus.SelectedValue != "-1")
|
||||
StrFiltro.AppendFormat(" <b>Estatus Cobranza</b>: {0}", DdlCobranzaEstatus.SelectedItem.Text);
|
||||
if (DdlEstatusCliente.SelectedValue != "-1")
|
||||
StrFiltro.AppendFormat(" <b>Estatus Cliente</b>: {0}", DdlEstatusCliente.SelectedItem.Text);
|
||||
if (DdlClienteClasificacion.SelectedValue != "-1")
|
||||
StrFiltro.AppendFormat(" <b>Clasificación Cliente</b>: {0}", DdlClienteClasificacion.SelectedItem.Text);
|
||||
|
||||
string RutaPDF = "";
|
||||
string Ruta = $"{AppDomain.CurrentDomain.BaseDirectory}Empresas/{UsuarioActual.CveEmpresa}/";
|
||||
RutaPDF = $"{Ruta}/Formatos/RepCxCPeriodo.rdlc";
|
||||
if (!System.IO.File.Exists(RutaPDF))
|
||||
{
|
||||
RutaPDF = "Empresas/Grales/Formatos/RepCxCPeriodo.rdlc";
|
||||
}
|
||||
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||
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", DateTime.Now.ToShortDateString()));
|
||||
para.Add(new ReportParameter("Filtros", StrFiltro.ToString()));
|
||||
if (Imagen.Exists)
|
||||
{
|
||||
para.Add(new ReportParameter("LogoPath", logouri));
|
||||
}
|
||||
else
|
||||
{
|
||||
para.Add(new ReportParameter("LogoPath", ""));
|
||||
}
|
||||
ImprimirPDF(RutaPDF, DtDatos, para, "RepCxCPeriodo" + DateTime.Now.ToString("yyyyMMddhhmmss"), Opcion);
|
||||
}
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
if (e.Row.DBCampo("GPO").ToString() == "")
|
||||
{
|
||||
e.Row.CssClass = "Totales";
|
||||
e.Row.Cells[0].Text= e.Row.DBCampo("Moneda");
|
||||
}
|
||||
}
|
||||
}
|
||||
245
CxC/RepCxCSemanal.aspx
Normal file
245
CxC/RepCxCSemanal.aspx
Normal file
@@ -0,0 +1,245 @@
|
||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCxCSemanal.aspx.vb" Inherits="CxC_RepCxCSemanal" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||
<%-- <asp:UpdatePanel runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server" Enabled="false"> <i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="ImgExcel" runat="server" > <i class="fa fa-ad-excel"></i> Generar</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl ="javascript:;" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server" > <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
<%-- <asp:ImageButton ID="ImgImprimir" runat="server" ImageUrl="/Imagenes/btnImprimir.gif" Width="17px" Height="17px" Enabled="false" />
|
||||
<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />
|
||||
<asp:Image ID="ImgPersonalizar" runat="server" ImageUrl="/Imagenes/Table-icon.png" Width="17px" Height="17px" Style="cursor: pointer;" />--%>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de CxC
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="portlet solid grey-cascade portlet-filter" style="">
|
||||
<div class="portlet-title portlet-filterT" style="">
|
||||
<div class="titlefiltros caption ">
|
||||
<ul class="list-inline">
|
||||
<li>Cliente:
|
||||
<asp:DropDownList ID="DdlClientes" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 300px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Sucursal:
|
||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 130px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Vendedor:
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="Vendedor" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 120px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>Usuario:
|
||||
<asp:DropDownList ID="DdlUsuario" runat="server" AppendDataBoundItems="true" DataTextField="Usuario" DataValueField="CveUsuario" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 110px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
<a onclick="document.getElementById('C_BtnConsultar').click();" class="reload"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<ul class="list-inline">
|
||||
<li style="width: 360px;">Estatus:
|
||||
<asp:DropDownList ID="DdlEstatus" runat="server" AppendDataBoundItems="true" DataTextField="EstatusFactura" DataValueField="CveEstatusFactura" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 120px !important;">
|
||||
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
<li>F.I.:
|
||||
<asp:TextBox ID="txtFechaI" runat="server" Width="70px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="imgCalendario" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
<li style="width: 240px;">F.F.:
|
||||
<asp:TextBox ID="txtFechaF" runat="server" Width="70px"></asp:TextBox>
|
||||
<asp:ImageButton runat="server" ID="imgCalendarioF" ImageUrl="/Imagenes/calendar.png" ImageAlign="AbsMiddle" Width="16px" Height="16px" AlternateText="Click para ver el Calendario" />
|
||||
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</li>
|
||||
<li>Grupo:
|
||||
<asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 110px !important;">
|
||||
<asp:ListItem Text="Año" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="Mes" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Año/Mes" Value="3"></asp:ListItem>
|
||||
<asp:ListItem Text="Fecha" Value="4"></asp:ListItem>
|
||||
<asp:ListItem Text="Cliente" Value="5"></asp:ListItem>
|
||||
<asp:ListItem Text="Sucursal" Value="6"></asp:ListItem>
|
||||
<asp:ListItem Text="Vendedor" Value="7"></asp:ListItem>
|
||||
<asp:ListItem Text="Usuario" Value="8"></asp:ListItem>
|
||||
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
|
||||
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<br />
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados" ToolTip="Listado de Ventas" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Grupo
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("GPO") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Saldo
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="HplSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
1 - 7
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlSem1" runat="server" Text='<%# Eval("Sem1", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
8 - 30
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlSem2" runat="server" Text='<%# Eval("Sem2", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
30 +
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlSem3" runat="server" Text='<%# Eval("Sem3", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Total
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlSem4" runat="server" Text='<%# Eval("Sem4", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
0 - 7
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlSem5" runat="server" Text='<%# Eval("Sem5", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
8 - 14
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlSem6" runat="server" Text='<%# Eval("Sem6", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
15 - 30
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlSem7" runat="server" Text='<%# Eval("Sem7", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
30 +
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlSem8" runat="server" Text='<%# Eval("Sem8", "{0:N2}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
Total
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink CssClass="Texto" ID="LtlMayor8Sem" runat="server" Text='<%# Eval("Mayor8Sem", "{0:N2}") %>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel runat="server" ID="UPPersonalizar" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="DivPersonalizar" style="width: 315px; background-color: White; border: solid 1px black; color: Black; display: none; position: absolute;">
|
||||
<table class="table table-striped table-advance table-hover" width="315px">
|
||||
<tr class="Titulos">
|
||||
<th style="width: 310px">
|
||||
<asp:Label ID="LblTitulo1" runat="server" ClientIDMode="Static" Text="Personalizar Columnas"></asp:Label>
|
||||
</th>
|
||||
<th style="padding-right: 4px; padding-top: 4px" valign="top">
|
||||
<img alt="" src="/Imagenes/close.gif" style="cursor: pointer;" onclick="$('#DivPersonalizar').hide(1000);" /></th>
|
||||
</tr>
|
||||
<tr align="left">
|
||||
<td colspan="2">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="text-align: left;">
|
||||
<asp:CheckBox ID="ChkVentasVsSaldo" runat="server" Text="Ventas VS Saldo" Checked="False" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="height: 25px">
|
||||
<td style="text-align: center;" colspan="2">
|
||||
<asp:Button ID="BtnPersonalizar" runat="server" Text="Personalizar" class="btn btn-primary" /><input type="button" value="Cancelar" onclick="$('#DivPersonalizar').hide(1000);" class="btn btn-danger" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
264
CxC/RepCxCSemanal.aspx.vb
Normal file
264
CxC/RepCxCSemanal.aspx.vb
Normal file
@@ -0,0 +1,264 @@
|
||||
Option Explicit On
|
||||
Option Strict On
|
||||
|
||||
Imports Extensiones
|
||||
Partial Class CxC_RepCxCSemanal
|
||||
Inherits ClsPaginas
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargaCombos()
|
||||
|
||||
'ImgPersonalizar.Attributes.Add("onclick", "javascript:$('#DivPersonalizar').show(1000); PosicionaObjeto(this.id,'DivPersonalizar');")
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaCombos()
|
||||
'CargaClientes
|
||||
Dim ObjClientes As New ClsClientes
|
||||
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa) Then
|
||||
DdlClientes.DataSource = ObjClientes.DtResultados
|
||||
Else
|
||||
DdlClientes.DataSource = Nothing
|
||||
End If
|
||||
ObjClientes.Dispose()
|
||||
DdlClientes.DataBind()
|
||||
|
||||
'CargaSubProyectos
|
||||
DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlSubProyecto.DataBind()
|
||||
|
||||
'Vendedor
|
||||
|
||||
'CargaUsuarios
|
||||
DdlUsuario.DataSource = GlobalDTUsuarios.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
DdlUsuario.DataBind()
|
||||
|
||||
'CargaEstatus
|
||||
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(" CveEstatusFactura NOT IN (1, 4, 5) ")
|
||||
DdlEstatus.DataBind()
|
||||
DdlEstatus.Items.Add(New ListItem("Canceladas", "4"))
|
||||
DdlEstatus.SelectedIndex = 2
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||
CargaDatos()
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDatos()
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
Dim FechaI As String = txtFechaI.Text
|
||||
Dim FechaF As String = txtFechaF.Text
|
||||
If txtFechaI.Text = "" Then FechaI = "-1"
|
||||
If txtFechaF.Text = "" Then FechaF = "-1"
|
||||
'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero
|
||||
If ObjMovtos.GetCxCSemanal(FechaI, FechaF, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero,
|
||||
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero) Then
|
||||
GvDatos.DataSource = ObjMovtos.DtResultados
|
||||
Else
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
GvDatos.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowCreated(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowCreated
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
Dim FC As New SortedList
|
||||
FC.Add(0, " ,2,1,ColumnaenBlanco")
|
||||
FC.Add(2, "Vencido,4,1,Titulos")
|
||||
FC.Add(3, "Por Vencer,5,1,Titulos")
|
||||
|
||||
GetMultiRowHeader(DirectCast(sender, GridView), e, FC, "Titulos")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
|
||||
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Css As String = "Texto"
|
||||
If e.Row.DBCampo("Orden") = "" Then
|
||||
|
||||
e.Row.BackColor = Drawing.Color.LightGray
|
||||
|
||||
End If
|
||||
If e.Row.RowIndex = 1 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(295)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(90)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(75)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(75)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(75)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(75)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(75)
|
||||
e.Row.Cells(7).Width = Unit.Pixel(75)
|
||||
e.Row.Cells(8).Width = Unit.Pixel(75)
|
||||
|
||||
End If
|
||||
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Right
|
||||
Dim FechaI, FechaF As String
|
||||
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||
|
||||
'If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
' Dim Css As String = "Texto"
|
||||
' If e.Row.RowIndex = 0 Then
|
||||
' e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
|
||||
' e.Row.Cells(0).Width = Unit.Pixel(200)
|
||||
' e.Row.CssClass = "Totales"
|
||||
' Css = "Totales"
|
||||
' End If
|
||||
|
||||
' e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(2).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(9).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(10).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(11).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(12).HorizontalAlign = HorizontalAlign.Right
|
||||
' e.Row.Cells(13).HorizontalAlign = HorizontalAlign.Right
|
||||
|
||||
' Dim FechaI, FechaF As String
|
||||
' FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.Trim(), "-1")
|
||||
' FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim(), "-1")
|
||||
|
||||
|
||||
Dim Liga1 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=V1&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}",
|
||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("Vendedor"),
|
||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF)
|
||||
|
||||
Dim Liga2 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=V8&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}",
|
||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("Vendedor"),
|
||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF)
|
||||
|
||||
Dim Liga3 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=V30&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}",
|
||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("Vendedor"),
|
||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF)
|
||||
|
||||
Dim Liga4 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=XV0&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}",
|
||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("Vendedor"),
|
||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF)
|
||||
|
||||
Dim Liga5 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=XV8&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}",
|
||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("Vendedor"),
|
||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF)
|
||||
|
||||
Dim Liga6 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=XV15&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}",
|
||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("Vendedor"),
|
||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF)
|
||||
|
||||
Dim Liga7 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=XV30&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}",
|
||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("Vendedor"),
|
||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF)
|
||||
|
||||
Dim Liga8 As String = String.Format("/CxC/RepCxCDetalle.aspx.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}",
|
||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("Vendedor"),
|
||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF)
|
||||
|
||||
Dim Liga9 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}",
|
||||
DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("Vendedor"),
|
||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF)
|
||||
|
||||
Dim Liga10 As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=TPV&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}",
|
||||
DdlGrupo.SelectedValue,
|
||||
e.Row.DBCampo("Anio"),
|
||||
e.Row.DBCampo("Mes"),
|
||||
e.Row.DBCampo("AnioMes"),
|
||||
e.Row.DBCampo("Fecha"),
|
||||
e.Row.DBCampo("CveCliente"),
|
||||
e.Row.DBCampo("CveSubProyecto"),
|
||||
e.Row.DBCampo("Vendedor"),
|
||||
e.Row.DBCampo("CveUsuario"),
|
||||
e.Row.DBCampo("CveEstatusFactura"),
|
||||
e.Row.DBCampo("GPO_IVA"), FechaI, FechaF)
|
||||
|
||||
Dim LigaTot As String = String.Format("/CxC/RepCxCDetalle.aspx?Op=S&GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveCliente={5}&CveSubProyecto={6}&Vendedor={7}&CveUsuario={8}&CveEstatusFactura={9}&IVA={10}&FechaI={11}&FechaF={12}",
|
||||
DdlGrupo.SelectedValue,
|
||||
e.Row.DBCampo("Anio"),
|
||||
e.Row.DBCampo("Mes"),
|
||||
e.Row.DBCampo("AnioMes"),
|
||||
e.Row.DBCampo("Fecha"),
|
||||
e.Row.DBCampo("CveCliente"),
|
||||
e.Row.DBCampo("CveSubProyecto"),
|
||||
e.Row.DBCampo("Vendedor"),
|
||||
e.Row.DBCampo("CveUsuario"),
|
||||
e.Row.DBCampo("CveEstatusFactura"),
|
||||
e.Row.DBCampo("GPO_IVA"), FechaI, FechaF)
|
||||
|
||||
e.Row.FCHyperLink("HplSaldo").NavigateUrl = LigaTot
|
||||
e.Row.FCHyperLink("LtlSem1").NavigateUrl = Liga1
|
||||
e.Row.FCHyperLink("LtlSem2").NavigateUrl = Liga2
|
||||
e.Row.FCHyperLink("LtlSem3").NavigateUrl = Liga3
|
||||
e.Row.FCHyperLink("LtlSem4").NavigateUrl = Liga9
|
||||
e.Row.FCHyperLink("LtlSem5").NavigateUrl = Liga4
|
||||
e.Row.FCHyperLink("LtlSem6").NavigateUrl = Liga5
|
||||
e.Row.FCHyperLink("LtlSem7").NavigateUrl = Liga6
|
||||
e.Row.FCHyperLink("LtlSem8").NavigateUrl = Liga7
|
||||
e.Row.FCHyperLink("LtlMayor8Sem").NavigateUrl = Liga10
|
||||
'e.Row.FCHyperLink("LtlSaldo1").NavigateUrl = LigaTot
|
||||
|
||||
|
||||
' e.Row.FCLiteral("LtlSaldo").Text = "<a class=""" & Css & """ href=""" & LigaTot & """>" & e.Row.FCLiteral("LtlSaldo").Text & "</a>"
|
||||
' e.Row.FCLiteral("LtlVencido1_7").Text = "<a class=""" & Css & """ href=""" & Liga1 & """>" & e.Row.FCLiteral("LtlVencido1_7").Text & "</a>"
|
||||
' e.Row.FCLiteral("LtlVencido8_30").Text = "<a class=""" & Css & """ href=""" & Liga2 & """>" & e.Row.FCLiteral("LtlVencido8_30").Text & "</a>"
|
||||
' e.Row.FCLiteral("LtlVencido30_mas").Text = "<a class=""" & Css & """ href=""" & Liga3 & """>" & e.Row.FCLiteral("LtlVencido30_mas").Text & "</a>"
|
||||
' e.Row.FCLiteral("LtlPorVender0_7").Text = "<a class=""" & Css & """ href=""" & Liga4 & """>" & e.Row.FCLiteral("LtlPorVender0_7").Text & "</a>"
|
||||
' e.Row.FCLiteral("LtlPorVencer8_14").Text = "<a class=""" & Css & """ href=""" & Liga5 & """>" & e.Row.FCLiteral("LtlPorVencer8_14").Text & "</a>"
|
||||
' e.Row.FCLiteral("LtlPorVencer15_30").Text = "<a class=""" & Css & """ href=""" & Liga6 & """>" & e.Row.FCLiteral("LtlPorVencer15_30").Text & "</a>"
|
||||
' e.Row.FCLiteral("LtlPorVencido30_mas").Text = "<a class=""" & Css & """ href=""" & Liga7 & """>" & e.Row.FCLiteral("LtlPorVencido30_mas").Text & "</a>"
|
||||
' e.Row.FCLiteral("LtlVentas").Text = "<a class=""" & Css & """ href=""" & Liga8 & """>" & e.Row.FCLiteral("LtlVentas").Text & "</a>"
|
||||
' e.Row.FCLiteral("LtlSaldo1").Text = "<a class=""" & Css & """ href=""" & LigaTot & """>" & e.Row.FCLiteral("LtlSaldo1").Text & "</a>"
|
||||
|
||||
|
||||
' If (e.Row.DBCampo("Total").ToDouble - e.Row.DBCampo("Saldo").ToDouble) <> 0 Then
|
||||
' e.Row.FCLiteral("LtlVentasRecuperado").Text = (e.Row.DBCampo("Total").ToDouble + e.Row.DBCampo("Saldo").ToDouble).FormatoNumero & "%"
|
||||
' End If
|
||||
|
||||
' e.Row.FCLiteral("LtlPorRecuperado").Text = (((e.Row.DBCampo("Total").ToDouble + e.Row.DBCampo("Saldo").ToDouble) * 100) / e.Row.DBCampo("Total").ToDouble).FormatoNumero & "%"
|
||||
' e.Row.FCLiteral("LtlPorPorRecuperar").Text = ((e.Row.DBCampo("Saldo").ToDouble * -100) / e.Row.DBCampo("Total").ToDouble).FormatoNumero & "%"
|
||||
|
||||
' If e.Row.DBCampo("Saldo").ToDouble = 0 Then e.Row.FCLiteral("LtlSaldo").Text = "" : e.Row.FCLiteral("LtlSaldo1").Text = ""
|
||||
' If e.Row.DBCampo("vencido_1_7").ToDouble = 0 Then e.Row.FCLiteral("LtlVencido1_7").Text = ""
|
||||
' If e.Row.DBCampo("vencido_8_30").ToDouble = 0 Then e.Row.FCLiteral("LtlVencido8_30").Text = ""
|
||||
' If e.Row.DBCampo("vencido_30_mas").ToDouble = 0 Then e.Row.FCLiteral("LtlVencido30_mas").Text = ""
|
||||
' If e.Row.DBCampo("por_vencer_0_7").ToDouble = 0 Then e.Row.FCLiteral("LtlPorVender0_7").Text = ""
|
||||
' If e.Row.DBCampo("por_vencer_8_14").ToDouble = 0 Then e.Row.FCLiteral("LtlPorVencer8_14").Text = ""
|
||||
' If e.Row.DBCampo("por_vencer_15_30").ToDouble = 0 Then e.Row.FCLiteral("LtlPorVencer15_30").Text = ""
|
||||
' If e.Row.DBCampo("por_vencido_30_mas").ToDouble = 0 Then e.Row.FCLiteral("LtlPorVencido30_mas").Text = ""
|
||||
' If e.Row.DBCampo("Total").ToDouble = 0 Then e.Row.FCLiteral("LtlVentas").Text = ""
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
|
||||
|
||||
'If ChkVentasVsSaldo.Checked Then
|
||||
' GvDatos.Columns(9).Visible = True
|
||||
' GvDatos.Columns(10).Visible = True
|
||||
' GvDatos.Columns(11).Visible = True
|
||||
' GvDatos.Columns(12).Visible = True
|
||||
' GvDatos.Columns(13).Visible = True
|
||||
'Else
|
||||
' GvDatos.Columns(9).Visible = False
|
||||
' GvDatos.Columns(10).Visible = False
|
||||
' GvDatos.Columns(11).Visible = False
|
||||
' GvDatos.Columns(12).Visible = False
|
||||
' GvDatos.Columns(13).Visible = False
|
||||
'End If
|
||||
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
|
||||
'Protected Sub ImgExcel_Click(sender As Object, e As System.EventArgs) Handles ImgExcel.Click
|
||||
' GvDatos.ExportToExcel("ReporteCxC_" & Now.ToShortDateString)
|
||||
'End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user