<%@ Page Language="C#" MasterPageFile="~/inner.Master" AutoEventWireup="true"
    CodeBehind="AgingReport.aspx.cs" Inherits="SedonaWeb.reports.AgingReport" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphContent" runat="server">
    <asp:HyperLink ID="HyperLinkPrintableVersion" NavigateUrl="~/reports/AgingReport.aspx?cmd=PRT" Text="Printable Version"
        Target="_blank" Visible="true" runat="server" />
    <hr />
    <div id="ShownDiv">
        <telerik:RadGrid ID="rgCustomers" AutoGenerateColumns="false" AllowSorting="true" Visible="true" runat="server">
            <MasterTableView AutoGenerateColumns="false" ShowFooter="true">
                <Columns>  
                    <telerik:GridBoundColumn AllowSorting="true" DataField="Customer_Number" DataType="System.Int32" DataFormatString="{0:n}" 
                        HeaderText="Customer Number" SortExpression="Customer_Number"  UniqueName="Customer_Number" />
                    <telerik:GridBoundColumn AllowSorting="true" DataField="Customer_Name" DataType="System.String" DataFormatString="{0:g}" 
                        HeaderText="Customer Name" SortExpression="Customer_Name"  UniqueName="Customer_Name" FooterText="Totals:"
                        HeaderStyle-HorizontalAlign="Center" FooterStyle-HorizontalAlign="Right" />
                    <telerik:GridBoundColumn AllowSorting="true" DataField="Bal_Current" DataType="System.Decimal" DataFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderText="Current" SortExpression="Bal_Current"  UniqueName="Bal_Current" 
                        Aggregate="Sum" FooterAggregateFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" />
                    <telerik:GridBoundColumn AllowSorting="true" DataField="Bucket_1" DataType="System.Decimal" DataFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderText="set in code" SortExpression="Bucket_1"  UniqueName="Bucket_1"
                        Aggregate="Sum" FooterAggregateFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" />
                    <telerik:GridBoundColumn AllowSorting="true" DataField="Bucket_2" DataType="System.Decimal" DataFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderText="set in code" SortExpression="Bucket_2"  UniqueName="Bucket_2"
                        Aggregate="Sum" FooterAggregateFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" />
                    <telerik:GridBoundColumn AllowSorting="true" DataField="Bucket_3" DataType="System.Decimal" DataFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderText="set in code" SortExpression="Bucket_3"  UniqueName="Bucket_3"
                        Aggregate="Sum" FooterAggregateFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" />
                    <telerik:GridBoundColumn AllowSorting="true" DataField="Bucket_4" DataType="System.Decimal" DataFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderText="set in code" SortExpression="Bucket_4"  UniqueName="Bucket_4"
                        Aggregate="Sum" FooterAggregateFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" />
                    <telerik:GridBoundColumn AllowSorting="true" DataField="Bucket_5" DataType="System.Decimal" DataFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderText="set in code" SortExpression="Bucket_5"  UniqueName="Bucket_5"
                        Aggregate="Sum" FooterAggregateFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" />
                    <telerik:GridBoundColumn AllowSorting="true" DataField="Total" DataType="System.Decimal" DataFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderText="Total" SortExpression="Total"  UniqueName="Total"
                        Aggregate="Sum" FooterAggregateFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" />
                    <telerik:GridBoundColumn AllowSorting="true" DataField="Credits" DataType="System.Decimal" DataFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderText="Credits" SortExpression="Credits"  UniqueName="Credits"
                        Aggregate="Sum" FooterAggregateFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" />
                    <telerik:GridBoundColumn AllowSorting="true" DataField="NetDue" DataType="System.Decimal" DataFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderText="Net Due" SortExpression="NetDue"  UniqueName="NetDue"
                        Aggregate="Sum" FooterAggregateFormatString="{0:#,##0.00;(#,##0.00)}" 
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" />
                    <telerik:GridBoundColumn AllowSorting="true" DataField="Date_Last_Aged" DataType="System.DateTime" DataFormatString="{0:d}" 
                        HeaderText="Last Aged Date" SortExpression="Date_Last_Aged"  UniqueName="Date_Last_Aged"
                        HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Right" />
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphScripts" runat="server">
</asp:Content>
