<%@ Page Language="C#" AutoEventWireup="true" CodeFile="frmAnexoBalance.aspx.cs" Inherits="frmAnexoBalance" %>
<%@ 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">
    <title>Anexos</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 Regresar() {
            
            var ventana = window.self;
            ventana.opener = window.self;
            ventana.opener.focus();
    }
  
        function CerraryRegresar() {
            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);
        }                                            
    </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>
        </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>
              <%--<td align=right colspan="2" style="height:20px" bgcolor="#A9CE53" ><a href="#" class="linksblanco" onClick="cerrar()"> Cerrar</a>&nbsp;&nbsp</td>--%>
              <td>
                 <table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td style="width:1px;">
                            <img id="Img3" runat="server" src="~/images/TitleLeftLightBlue.png" alt="" />
                        </td>
                        <td background="images/LineBodySky.png" style="padding-left:20px; text-align:left" class=" gridtextbold">
                            
                            <asp:Label ID="lblTitulo" runat="server" Text="ANEXOS DEL BALANCE GENERAL - "></asp:Label>
                            
                <asp:Label ID="lblAcumulado" runat="server"></asp:Label>
                            Mes de <asp:Label ID="lblMes" class="arial10bold" runat="server" 
                                Text=""></asp:Label>
                &nbsp;de
                <asp:Label ID="lblEjercicio" class="arial10bold" runat="server" Text="Label"></asp:Label>
                &nbsp;Expresado en <asp:Label ID="lblMonedaNombre" runat="server" Text="Label"></asp:Label>
                &nbsp;Historico</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" 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" class="gridtextbold">
                            <a href="#" class="gridtext"  onClick="CerraryRegresar()">Cerrar</a>
                        </td>
                        <td style="text-align:right; width:1px;">
                            <img id="Img1" class="gridtext" runat="server" src="~/images/TitleRightLightGray.png" alt="" />
                        </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="arial10bold" style="height: 15px;" valign="top">
                &nbsp;</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;">
                            <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: " Width="110px"></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" id="label_desde_html" runat="server">Desde: </span>
                            <asp:Label CssClass="gridtextgray" ID="lblDesde" runat="server" Text="Label"></asp:Label>
                            &nbsp;
                            <span class="gridtextgray" id="label_hasta_html" runat="server">Hasta: </span>
                            <asp:Label CssClass="gridtextgray" ID="lblHasta" runat="server" Text="Label"></asp:Label>
                            
                        </td>
                    </tr>                   
                    <tr>
                        <td style="text-align: center; height: 21px; padding: 4px;">
                                                            
                         <telerik:RadGrid 
                                    AutoGenerateColumns="False" 
                                    ID="tk_Grid" 
                                    AllowPaging="True" 
                                    PageSize="100" 
                                    Height="500px"
                                    runat="server" 
                                    GridLines="None"
                                    ShowFooter="false" 
                                    BorderStyle="None" 
                                    onitemdatabound="tk_Grid_ItemDataBound" 
                                onitemcommand="tk_Grid_ItemCommand" Skin="Office2007" 
                                onneeddatasource="tk_Grid_NeedDataSource">
                                    
                                    
                                <PagerStyle Mode="NextPrevAndNumeric" PageButtonCount="15" />
                                <ClientSettings EnableRowHoverStyle="true">
                                    <Selecting AllowRowSelect="true" />
                                    <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                                </ClientSettings>
                                
                                <MasterTableView CommandItemDisplay="Top" CellSpacing="0" ShowGroupFooter="true" AllowMultiColumnSorting="true" ShowFooter="true" GroupLoadMode="Client">
                                <CommandItemTemplate>
                                    <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" />
                                </CommandItemTemplate>
                                 <CommandItemStyle Height="24px" VerticalAlign="Middle" HorizontalAlign="Right" />
                                 
                                    <Columns>                                                                                                                                                    
                                                                                        
                                        
                                        <telerik:GridBoundColumn Aggregate="none" DataField="NombreFormatoGanaciasPerdidas" Display="false"
                                            HeaderText="Descripción" FooterText="Total" FooterAggregateFormatString="{0:g}" FooterStyle-Font-Bold="true">
                                            <ItemStyle HorizontalAlign="Left" />
                                            <FooterStyle Font-Bold="True" />
                                         </telerik:GridBoundColumn> 
                                         
                                          <telerik:GridBoundColumn Aggregate="none" DataField="PlanCuentaID"  Display="false"
                                            HeaderText="Codigo" FooterText="Total" FooterAggregateFormatString="{0:g}" FooterStyle-Font-Bold="true">
                                            <ItemStyle CssClass="gridtext" HorizontalAlign="Left" />
                                            <FooterStyle Font-Bold="True" />
                                         </telerik:GridBoundColumn> 
                                         
                                         <telerik:GridBoundColumn Aggregate="none" DataField="CodigoPlanCuenta" HeaderStyle-Width="80px"
                                            HeaderText="Codigo" FooterText="Total" FooterAggregateFormatString="{0:g}" FooterStyle-Font-Bold="true">
                                             <HeaderStyle Width="80px" />
                                            <ItemStyle CssClass="gridtext" HorizontalAlign="Left" />
                                            <FooterStyle Font-Bold="True" />
                                         </telerik:GridBoundColumn> 
                                         
                                         <telerik:GridBoundColumn Aggregate="none" DataField="NombrePlanCuenta" 
                                            HeaderText="Descripción" FooterText="Total" FooterAggregateFormatString="{0:g}" FooterStyle-Font-Bold="true">
                                            <HeaderStyle Width="350px" />
                                             <ItemStyle CssClass="gridtext" HorizontalAlign="Left" />
                                            <FooterStyle Font-Bold="True" />
                                         </telerik:GridBoundColumn>                                                                                                                         
                                         
                                        <telerik:GridBoundColumn Aggregate="sum" DataField="SaldoAnterior" HeaderText="Saldo Anterior" FooterAggregateFormatString="{0:N2}" DataFormatString="{0:N2}" FooterStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Right">
                                            <HeaderStyle HorizontalAlign="Right" />
                                            <ItemStyle HorizontalAlign="Right" CssClass="gridtext" />
                                            <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
                                        </telerik:GridBoundColumn>
                                                                                                                                                                                        
                                        <telerik:GridBoundColumn Aggregate="sum" DataField="totalDebe" HeaderText="Debe" FooterAggregateFormatString="{0:N2}" DataFormatString="{0:N2}" FooterStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Right">
                                            <HeaderStyle HorizontalAlign="Right" />
                                            <ItemStyle HorizontalAlign="Right" CssClass="gridtext" />
                                            <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
                                        </telerik:GridBoundColumn>
                                        
                                        <telerik:GridBoundColumn Aggregate="sum" DataField="totalHaber" HeaderText="Haber" FooterAggregateFormatString="{0:N2}" DataFormatString="{0:N2}" FooterStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Right">
                                            <HeaderStyle HorizontalAlign="Right" />
                                            <ItemStyle HorizontalAlign="Right" CssClass="gridtext" />
                                            <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
                                        </telerik:GridBoundColumn>
                                                                                     
                                        <%--<telerik:GridCalculatedColumn HeaderText="Saldo Actual" UniqueName="SaldoActual" DataType="System.Double" DataFields="SaldoAnterior, totalDebe, totalHaber" Expression="{0}+{1}-{2}" Aggregate="Sum" HeaderStyle-HorizontalAlign="Right" FooterAggregateFormatString="{0:N2}" DataFormatString="{0:N2}">
                                            <HeaderStyle HorizontalAlign="Right" />
                                            <ItemStyle CssClass="gridtext" HorizontalAlign="Right" />
                                            <FooterStyle CssClass="gridtext" Font-Bold="true" HorizontalAlign="Right" />
                                        </telerik:GridCalculatedColumn>--%> 
                                        
                                        <telerik:GridBoundColumn Aggregate="sum" DataField="SaldoActual" HeaderText="SaldoActual" FooterAggregateFormatString="{0:N2}" DataFormatString="{0:N2}" FooterStyle-Font-Bold="true" HeaderStyle-HorizontalAlign="Right">
                                            <HeaderStyle HorizontalAlign="Right" />
                                            <ItemStyle HorizontalAlign="Right" CssClass="gridtext" />
                                            <FooterStyle Font-Bold="True" HorizontalAlign="Right" />
                                        </telerik:GridBoundColumn>
                                                                                                                                       
                                    </Columns>                                                                                                           
                                                             
                                    <GroupByExpressions>                
                                        
                                        
                                                                                                                    
                                        <telerik:GridGroupByExpression>                                                
                                            <GroupByFields>                                                                                                        
                                                <telerik:GridGroupByField FieldName="NombreFormatoGanaciasPerdidas"/> 
                                            </GroupByFields>
                                            <SelectFields>
                                                <telerik:GridGroupByField FieldName="NombreFormatoGanaciasPerdidas" HeaderText="Texto" />
                                                
                                            </SelectFields>
                                            
                                        </telerik:GridGroupByExpression>
                                                                                         
                                    </GroupByExpressions>

                                </MasterTableView>
                                 
                                <GroupingSettings ShowUnGroupButton="True" CollapseTooltip="" ExpandTooltip="" 
                                    GroupContinuedFormatString="... Vienen" 
                                    GroupContinuesFormatString="Van..." 
                                     GroupSplitDisplayFormat="" />
                                
                                <GroupHeaderItemStyle CssClass="linkstotal" HorizontalAlign="Left" />
                                <%--<GroupHeaderItemStyle CssClass="linkstotal" Font-Bold="true" />--%>
                                                                   
                            </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>
