<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ConsolidadoDiarioAuxiliarClase.aspx.cs" Inherits="ConsolidadoDiarioAuxiliarClase" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Src="~/ControlUsuario/pl_pie.ascx" TagName="pl_pie" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Consolidado Por Clase</title>
    <link href="estilos/Estilos.css" rel="stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="JavaScript/actb.js"></script>
    <script language="javascript" type="text/javascript" src="JavaScript/common.js"></script>
    <script language="javascript" type="text/javascript" src="JavaScript/SGH_Script.js"></script>
    
    <script type="text/javascript" language="JavaScript">
        function cerrar() {
        var ventana = window.self;
        ventana.opener = window.self;
        parent.close();
        }
        
    function requestStart(sender, args)
        {
            if (args.get_eventTarget().indexOf("ExcelExport") != -1)
                args.set_enableAjax(false);
            if (args.get_eventTarget().indexOf("PDFExport") > 0)
                args.set_enableAjax(false);
            if (args.get_eventTarget().indexOf("WordExport") > 0)
                args.set_enableAjax(false);
            if (args.get_eventTarget().indexOf("CSVExport") > 0)
                args.set_enableAjax(false);
            if (args.get_eventTarget().indexOf("Print") > 0)
                args.set_enableAjax(false);
        }      
        
         function Regresar() {
            
            var ventana = window.self;
            ventana.opener = window.self;
            ventana.opener.focus();
    }
  
        function CerraryRegresar() {
            var ventana = window.self;
            ventana.opener = window.self;
            parent.close();
        }                               
    </script>

    

    </head>
<body>
    <form id="form2" runat="server" method="post" defaultfocus="txtUsuario">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Telerik" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1" ClientEvents-OnRequestStart="requestStart">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="tk_Grid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="tk_Grid" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnActualizar">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="tk_Grid" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>


        </AjaxSettings>
    </telerik:RadAjaxManager>
    
      <table  style="height:455px; width:100%" cellpadding="0" cellspacing="0" border="0">
      <tr>
        <td align="center" valign="middle">
          <table width="100%" cellpadding="0" cellspacing="0" border="0" 
                style="height:435px; background-color: #FFFFFF;">
            <tr>
              <td colspan="2" style="height:7px" bgcolor="#FFFFFF"></td>
            </tr>
            <tr id="TRImagen2" runat="server" visible="false">
              <%--<td align=right colspan="2" style="height:20px" bgcolor="#A9CE53"><a href="#" class="linksblanco" onClick="cerrar()"> Cerrar</a>&nbsp;&nbsp</td>--%>
              <td align=right colspan="2" style="height:24px;" background="images/LineForest.jpg"></asp:Label> <a href="#" class="linksblanco" style="vertical-align:text-top" onClick="cerrar()"> Cerrar</a>&nbsp;&nbsp</td>
            </tr> 
            <tr id="TRImagen" runat="server" visible="false">
              <td align="center" colspan="2" style="height:10px">
                <table width="95%" cellpadding="0" cellspacing="0" border="0">
                  <tr>
                    <td align="left" style="height: 18px">
                      
                      <asp:Image ID="imgLogo"  runat="server" align="left" 
                            ImageUrl="~/images/logo.JPG" />
                    </td>
                    <td align="right" valign="middle" >
                     
                      <asp:Image ID="imgLogoEmpresa"  runat="server" 
                            ImageUrl="~/images/logo_prince.jpg" />
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td colspan="2" align="center">
              
              <table id="Table3" cellspacing="0" cellpadding="0" width="100%" border="0" >
        <tr>
            <td align="center" class="tituloseccion" style="height: 25px;" valign="bottom">                
                 <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td style="width:1px; padding-left:2px">
                            <img id="Img3" runat="server" src="~/images/TitleLeftLightBlue.png" alt="" />
                        </td>
                        <td background="images/LineBodySky.png" style="width:15px; padding-left:5px; text-align:left; vertical-align:middle;" class="tituloseccion">
                            <img id="img5" runat="server" src="images/Report.png" border="0" />                             
                        </td>
                        <td background="images/LineBodySky.png" style="padding-left:10px; text-align:left; vertical-align:middle;" class="tituloseccion">                            
                            CONSOLIDADO POR CLASE
                        </td>
                        <td background="images/LineGray.png" style="width:20px; padding-left:10px; vertical-align:bottom;">
                            <a href="BusquedaInteligente.aspx" class="gridtext">
                                <img id="imgHome" runat="server" src="images/Back.png" border="0" />                                            
                            </a>                            
                        </td>
                        <td background="images/LineGray.png" style="width:20px" class="gridtextbold">
                            <a href="#" class="gridtext"  onClick="Regresar()">Atras</a>
                            <%--<asp:LinkButton runat="server" ID="l1" Text="Inicio2" onclick="l1_Click"></asp:LinkButton>--%>
                        </td>
                        <td background="images/LineGray.png" style="width:20px; padding-left:15px; vertical-align:middle;" class="gridtextbold">
                            <a href="#" class="gridtext"  onClick="cerrar()">
                                <img id="img2" runat="server" src="images/close.png" border="0" />                                            
                            </a>
                        </td>                 
                        <td background="images/LineGray.png" style="width:20px; padding-right:5px; vertical-align:middle;" class="gridtextbold">
                            <a href="#" class="gridtext"  onClick="CerraryRegresar()">Cerrar</a>
                        </td>
                        <td style="text-align:right; width:1px; padding-right:2px" 
                            <img id="Img1" class="gridtext" runat="server" src="~/images/TitleRightLightGray.png" alt="" />
                        </td>
                    </tr>
                    <tr>
                   
                </table>
            </td>
        </tr>
      <tr><td style="height:15px"></td></tr>
        
      
        <tr>
            <td align="center" >                
                         
                        <table border="0" style="border: #CCCCCC 1px solid; width: 100%">
                        
                        <tr>
                            <td align="left" style="padding-top:6px; padding-bottom:6px; border-bottom:1px solid #3C7FB1;">
                            
                                <div style="float:left">
                                <asp:Label CssClass="gridtextgray" ID="Label8" runat="server" Text="Sucursal: "></asp:Label>
                                &nbsp;
                                <asp:Label CssClass="gridtextgray" ID="lblSucursal" runat="server" Text="Label"></asp:Label>
                                &nbsp;
                                <asp:Label CssClass="gridtextgray" ID="Label7" runat="server" Text="Unidad de Negocio: "></asp:Label>
                                &nbsp;
                                <asp:Label CssClass="gridtextgray" ID="lblUnidadNegocio" runat="server" Text="Label"></asp:Label>
                                &nbsp;
                                <asp:Label CssClass="gridtextgray" ID="Label11" runat="server" Text="Area: "></asp:Label>
                                &nbsp;
                                <asp:Label CssClass="gridtextgray" ID="lblArea" runat="server" Text="Label"></asp:Label>
                                &nbsp;
                                <span class="gridtextgray">Moneda: </span>
                                <asp:Label CssClass="gridtextgray" ID="lblMoneda" runat="server" Text="Label"></asp:Label>
                                &nbsp;
                                <span class="gridtextgray">Desde: </span>
                                <asp:Label CssClass="gridtextgray" ID="lblDesde" runat="server" Text="Label"></asp:Label>
                                &nbsp;
                                <span class="gridtextgray">Hasta: </span>
                                <asp:Label CssClass="gridtextgray" ID="lblHasta" runat="server" Text="Label"></asp:Label>

                            </div>
                            <div style="float:right">
                                <table border="0" width="450px">
                   <tr>
                    <td align="left" Width="170px" >
                        &nbsp;</td>
                    <td style="width:80px;></td>
                    <td align="left"  border-top:1px dotted #3E5729; padding-top:5px; border-bottom:1px dotted #3E5729; padding-bottom:5px;">
                        &nbsp;</td>
                    <td Width="130px" align="right"  >
                        <asp:Button ID="btnActualizar" runat="server" Text="Actualizar" 
                            CssClass="Button" onclick="btnActualizar_Click" />
                    </td>
                    </tr>
                </table>
                            </div>
                            
                            </td>
                        </tr>
                        
                            <tr>
                                <td style="text-align: center; height: 21px; padding: 4px;">
                                                                    
                                 <telerik:RadGrid 
                                            AutoGenerateColumns="False" 
                                            ID="tk_Grid" 
                                            AllowPaging="True" 
                                            PageSize="200"
                                            runat="server" 
                                            GridLines="None" 
                                            onneeddatasource="tk_Grid_NeedDataSource" 
                                            onitemdatabound="tk_Grid_ItemDataBound" 
                                            AllowFilteringByColumn="True" 
                                            AllowSorting="True"
                                            Height="550px" onitemcommand="tk_Grid_ItemCommand" Skin="Office2007"
                                            >
                                        <FilterItemStyle HorizontalAlign="Right" />    
                                        <FooterStyle BackColor="Silver" CssClass="arial10bold"/>
                                        <HeaderStyle CssClass="arial10bold" Font-Bold="true" />
                                        <GroupHeaderItemStyle CssClass="arial10px" />
                                        
                                        <PagerStyle Mode="NextPrevAndNumeric" PageButtonCount="15" />
                                        
                                        <ExportSettings ExportOnlyData="true" IgnorePaging="true" OpenInNewWindow="true" >
                                            <Pdf PageWidth="210mm" />
                                        </ExportSettings>
                                        <GroupingSettings CaseSensitive="False" />
                                        <MasterTableView CommandItemDisplay="Top" CellSpacing="0" ShowGroupFooter="true" ShowFooter="false" AllowMultiColumnSorting="true" GroupLoadMode="Client">
                                        <CommandItemStyle Height="24px" VerticalAlign="Middle" HorizontalAlign="Right" />
                                        
                                            <Columns>
                                            
                                                <telerik:GridBoundColumn Aggregate="none" DataField="BEPlanDeCuentas.PlanCuentaID" Display="false"
                                                    HeaderText="PlanCuentaID" FooterText="Total" FooterAggregateFormatString="{0:g}" FooterStyle-Font-Bold="true"
                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true" FilterControlWidth="100%">
                                                    <ItemStyle HorizontalAlign="Left" />
                                                    <FooterStyle Font-Bold="True" />
                                                 </telerik:GridBoundColumn>
                                            
                                                <telerik:GridBoundColumn Aggregate="none" DataField="SubDiarioID" Display="false"
                                                    HeaderText="SubDiarioID" FooterText="Total" FooterAggregateFormatString="{0:g}" FooterStyle-Font-Bold="true"
                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true" FilterControlWidth="100%">
                                                    <ItemStyle HorizontalAlign="Left" />
                                                    <FooterStyle Font-Bold="True" />
                                                 </telerik:GridBoundColumn>
                                                 
                                                 <telerik:GridBoundColumn Aggregate="none" DataField="BESubDiarios.NombreSubDiario" Display="false"
                                                    HeaderText="SubDiario" FooterText="Total" FooterAggregateFormatString="{0:g}" FooterStyle-Font-Bold="true"
                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true" FilterControlWidth="100%">
                                                    <ItemStyle HorizontalAlign="Left" />
                                                    <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
                                                 </telerik:GridBoundColumn>                                                                                                                                                   
                                                 
                                                 <telerik:GridBoundColumn Aggregate="none" DataField="BEPlanDeCuentas.CodigoPlanCuenta"  HeaderStyle-Width="8%" 
                                                    HeaderText="Codigo" FooterText="Total" FooterAggregateFormatString="{0:g}" FooterStyle-Font-Bold="true"
                                                    ShowFilterIcon="false" AutoPostBackOnFilter="true" FilterControlWidth="100%">
                                                     <HeaderStyle Width="8%" />
                                                    <ItemStyle CssClass="gridtext" HorizontalAlign="Left" />
                                                    <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
                                                 </telerik:GridBoundColumn> 
                                                                          
                                                <telerik:GridBoundColumn DataField="BEPlanDeCuentas.NombrePlanCuenta" HeaderText="Descripcion"  HeaderStyle-Width="30%" 
                                                        FooterAggregateFormatString="{0:g}" FooterStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Right"
                                                        CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true" FilterControlWidth="100%">
                                                    <ItemStyle CssClass="gridtext" HorizontalAlign="Left" />
                                                    <HeaderStyle HorizontalAlign="Left" />
                                                    <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
                                                </telerik:GridBoundColumn>
                                                
                                                <telerik:GridNumericColumn DataField="DebeSoles" HeaderText="Debe S/" FooterAggregateFormatString="{0:N2}" DataFormatString="{0:N2}"
                                                     Aggregate="Sum"  FooterStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Right"
                                                     CurrentFilterFunction="StartsWith" ShowFilterIcon="false" AutoPostBackOnFilter="true" FilterControlWidth="100%">
                                                    <ItemStyle CssClass="gridtext" HorizontalAlign="Right"  />                                                    
                                                    <HeaderStyle HorizontalAlign="Right" />
                                                    <FooterStyle HorizontalAlign="Right" />
                                                </telerik:GridNumericColumn>
                                                                                                                                                                                                
                                                <telerik:GridNumericColumn DataField="HaberSoles" HeaderText="Haber S/" FooterAggregateFormatString="{0:N2}" DataFormatString="{0:N2}"
                                                    Aggregate="Sum"  FooterStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Right" FilterControlWidth="100%"
                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true">
                                                    <HeaderStyle HorizontalAlign="Right" />
                                                    <ItemStyle CssClass="gridtext" HorizontalAlign="Right" />
                                                    <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
                                                </telerik:GridNumericColumn>
                                                
                                                <telerik:GridNumericColumn DataField="SaldoSoles" HeaderText="Saldo S/" FooterAggregateFormatString="{0:N2}" DataFormatString="{0:N2}"
                                                    Aggregate="Sum"  FooterStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Right" FilterControlWidth="100%"
                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true">
                                                    <HeaderStyle HorizontalAlign="Right" />
                                                    <ItemStyle CssClass="gridtext" HorizontalAlign="Right" />
                                                    <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
                                                </telerik:GridNumericColumn>
                                                
                                                <telerik:GridNumericColumn DataField="DebeDolares" Aggregate="Sum"  FilterControlWidth="100%"
                                                    HeaderText="Debe US$"  FooterStyle-Font-Bold="true" FooterAggregateFormatString="{0:N2}" DataFormatString="{0:N2}"
                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true">
                                                    <ItemStyle CssClass="gridtext" HorizontalAlign="Right" />
                                                    <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
                                                    <HeaderStyle HorizontalAlign="Right" />
                                                 </telerik:GridNumericColumn> 
                                                
                                                <telerik:GridNumericColumn DataField="HaberDolares" UniqueName="HaberDolares" HeaderText="Haber US$" FooterAggregateFormatString="{0:N2}" DataFormatString="{0:N2}"
                                                    Aggregate="Sum"  FooterStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Right" FilterControlWidth="100%"
                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true">
                                                    <HeaderStyle HorizontalAlign="Right" />
                                                    <ItemStyle CssClass="gridtext" HorizontalAlign="Right" />
                                                    <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
                                                </telerik:GridNumericColumn>                                                                                                                                                                                                                                               
                                                                                                                                        
                                                <telerik:GridNumericColumn DataField="SaldoDolares" HeaderText="Saldo US $" FooterAggregateFormatString="{0:N2}" DataFormatString="{0:N2}"
                                                    Aggregate="Sum"  FooterStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Right" FilterControlWidth="100%"
                                                    CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true">
                                                    <HeaderStyle HorizontalAlign="Right" />
                                                    <ItemStyle CssClass="gridtext" HorizontalAlign="Right" />
                                                    <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
                                                </telerik:GridNumericColumn>
                                                                                                                                               
                                            </Columns>                                                                                                           
                                            
                                            <CommandItemTemplate>
                                            <table  style="width:100%" cellpadding="0" cellspacing="0" border="0" >
                                            <tr>
                                            <td style="width:50%; text-align:left; padding:2px">
                                       
                                            </td>
                                            <td style="width:50%">
                                            <asp:ImageButton runat="server" ID="ExcelExport" ImageUrl="~/images/page_excel.png" CommandName="ExportExcel" AlternateText="Excel" ToolTip="Excel" CausesValidation="false" /> 
                                            <asp:ImageButton runat="server" ID="PDFExport" ImageUrl="~/images/page_acrobat.png" CommandName="ExportPDF" AlternateText="Pdf" ToolTip="Pdf" />
                                            <asp:ImageButton runat="server" ID="WordExport" ImageUrl="~/images/page_word.png" CommandName="ExportWord" AlternateText="Word" ToolTip="Word" />
                                            <asp:ImageButton runat="server" ID="CSVExport" ImageUrl="~/images/page_csv.png" CommandName="ExportCSV" AlternateText="CSV" ToolTip="CSV" />
                                            <asp:ImageButton runat="server" ID="Print" ImageUrl="~/images/printer.png" CommandName="Print" AlternateText="Print" ToolTip="Imprimir" />
                                            </td>
                                            </tr>
                                            </table>
                                            </CommandItemTemplate>
                                              
                                                                     
                                            <GroupByExpressions>                                                
                                                <telerik:GridGroupByExpression>                                                
                                                    <GroupByFields>                                                                                                        
                                                        <telerik:GridGroupByField FieldName="CodigoCuenta"/> 
                                                    </GroupByFields>
                                                    <SelectFields>                                                    
                                                        <telerik:GridGroupByField FieldName="CodigoCuenta" HeaderText="Cuenta" />                                                        
                                                    </SelectFields>                                                    
                                                </telerik:GridGroupByExpression>                                                                                                
                                               
                                            </GroupByExpressions>
                                            
                                           
                                        </MasterTableView>
                                        <GroupHeaderItemStyle HorizontalAlign="Left" 
                                                Font-Strikeout="False" />
                                        <%--<GroupHeaderItemStyle HorizontalAlign="Left" />
                                        <GroupHeaderItemStyle CssClass="links" />--%>
                                          
                                        <GroupingSettings ShowUnGroupButton="True" CollapseTooltip="" ExpandTooltip="" 
                                            GroupContinuedFormatString="... Vienen" 
                                            GroupContinuesFormatString="Van..." 
                                             GroupSplitDisplayFormat="" />
                                        <GroupHeaderItemStyle HorizontalAlign="Left" />
                                        
                                        <ClientSettings EnableRowHoverStyle="true">
                                            <Selecting AllowRowSelect="True" />
                                            <Scrolling AllowScroll="True" UseStaticHeaders="true"/>
                                        </ClientSettings>
                                    </telerik:RadGrid>
                                    
                                </td>
                                
                            </tr>
                        </table>
                        
                       
            </td>
        </tr>
    </table>
              
              
              </td>
            </tr>
            <tr>
              <td colspan="2" style="height:40px">
                  
                  <uc1:pl_pie ID="pl_pie1" runat="server" />
                  
              </td>
            </tr>
          </table>
        </td>
      </tr>
      </table>
      
      <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"
        ShowSummary="False" ValidationGroup="Loggin" />
      <asp:ValidationSummary ID="ValidationSummary2" runat="server" ShowMessageBox="True"
        ShowSummary="False" ValidationGroup="CtrlPeriodo" />       
    
    </form>
</body>
</html>
