<%@ Page Language="C#" MasterPageFile="~/inner.Master" AutoEventWireup="true"
    CodeBehind="invoice.aspx.cs" Inherits="SedonaWeb.invoices.invoice" %>
<%@ Reference Control="MasterAccountBillerInvoice.ascx" %>
<%@ Reference Control="MasterAccountBillerInvoiceDetail.ascx" %>
<%@ Reference Control="MasterAccountDetailsByCustomer.ascx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphContent" runat="server">
    <asp:HyperLink ID="HyperLinkPrintableVersion" NavigateUrl="" Text="Printable Version"
        Target="_blank" Visible="true" runat="server" />
    <div style="float: right">
        <asp:Label ID="lblPaymentPending" runat="server" Text="Payment Pending" Visible="false"
            ForeColor="Blue" Font-Bold="true" Font-Size="15px" />
        <asp:HyperLink ID="HyperLinkMakePayment" NavigateUrl="../payment_methods/default.aspx"
            Font-Size="15px" Text="Pay It" Visible="true" runat="server" />
    </div>
    <hr />
    <div id="ShownDiv" ClientIDMode="Static" runat="server">
        <asp:Table ID="CompanyTable" CssClass="TableType1" runat="server">
            <asp:TableRow>
                <asp:TableCell ColumnSpan="3" ID="CompanyNameField" CssClass="" Width="65%" runat="server">
                    <asp:Label ID="CompanyName" CssClass="LargeLabel" Text="" runat="server" />
                    <asp:Label ID="Address1" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="Address2" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="Address3" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="CompanyPhoneNumber1" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="CompanyPhoneNumber2" CssClass="SmallLabel" Text="" runat="server" />
                </asp:TableCell>
                <asp:TableCell ColumnSpan="3" ID="InvoiceTableCell" Width="35%" runat="server">
                    <asp:Table ID="InvoiceHeaderTable" Width="100%" BorderWidth="1px" BorderColor="#C0C0C0"
                        BorderStyle="NotSet" CssClass="TableType3" runat="server">
                        <asp:TableRow>
                            <asp:TableCell ID="InvoiceTitleHeader" RowSpan="1" ColumnSpan="2" BorderWidth="1px"
                                BorderStyle="NotSet" BorderColor="#C0C0C0" CssClass="TableCellAlignCenter" Font-Bold="true"
                                runat="server">
                                <asp:Label CssClass="LargeLabel" ID="InvoiceTableLabel" runat="server" Text="Invoice" />
                            </asp:TableCell>
                        </asp:TableRow>
                        <asp:TableRow>
                            <asp:TableCell ID="InvoiceNumberHeader" BorderWidth="1px" BorderStyle="NotSet" BorderColor="#C0C0C0"
                                CssClass="TableCellAlignCenter" Width="50%" Text="Invoice Number" runat="server" />
                            <asp:TableCell ID="InvoiceDateHeader" BorderWidth="1px" BorderStyle="NotSet" BorderColor="#C0C0C0"
                                CssClass="TableCellAlignCenter" Width="50%" Text="Date" runat="server" />
                        </asp:TableRow>
                        <asp:TableRow>
                            <asp:TableCell ID="InvoiceNumberField" BorderWidth="1px" BorderStyle="NotSet" BorderColor="#C0C0C0"
                                CssClass="TableCellAlignCenter" Font-Bold="true" Text="" runat="server" />
                            <asp:TableCell ID="InvoiceDateField" BorderWidth="1px" BorderStyle="NotSet" BorderColor="#C0C0C0"
                                CssClass="TableCellAlignCenter" Font-Bold="true" Text="" runat="server" />
                        </asp:TableRow>
                        <asp:TableRow>
                            <asp:TableCell ID="AmountDueHeader" BorderWidth="1px" BorderStyle="NotSet" BorderColor="#C0C0C0"
                                CssClass="TableCellAlignCenter" Text="Amount Due" runat="server" />
                            <asp:TableCell ID="DueDateHeader" BorderWidth="1px" BorderStyle="NotSet" BorderColor="#C0C0C0"
                                CssClass="TableCellAlignCenter" Text="Due Date" runat="server" />
                        </asp:TableRow>
                        <asp:TableRow>
                            <asp:TableCell ID="AmountDueField" BorderWidth="1px" BorderStyle="NotSet" BorderColor="#C0C0C0"
                                CssClass="TableCellAlignCenter" Font-Bold="true" Text="" runat="server" />
                            <asp:TableCell ID="DueDateField" BorderWidth="1px" BorderStyle="NotSet" BorderColor="#C0C0C0"
                                CssClass="TableCellAlignCenter" Font-Bold="true" Text="" runat="server" />
                        </asp:TableRow>
                    </asp:Table>
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>

        <asp:Table ID="CustomerTable" CssClass="TableType1" runat="server">
            <asp:TableRow>
                <asp:TableCell ID="CustomerToHeader" CssClass="TableCellAlignLeft" Width="5%" Text="To:"
                    runat="server" />
                <asp:TableCell ID="CustomerBillingAddressField" Width="45%" Text="" runat="server">
                    <asp:Label ID="InvoiceBillToName" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="InvoiceBillToAddress1" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="InvoiceBillToAddress2" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="InvoiceBillToAddress3" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="InvoiceBillToCityStateZipPlus4" CssClass="invoice_standard_label_text"
                        Text="" runat="server" />
                </asp:TableCell><asp:TableCell ID="CustomerRemitHeader" CssClass="TableCellAlignLeft" Width="10%"
                    Text="Remit To:" runat="server" />
                <asp:TableCell ID="CustomerRemitAddressField" Text="" Width="40%" runat="server">
                    <asp:Label ID="InvoiceRemitToName" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="InvoiceRemitToAddress1" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="InvoiceRemitToAddress2" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="InvoiceRemitToAddress3" CssClass="SmallLabel" Text="" runat="server" />
                    <%--<asp:Label id="InvoiceRemitToCityStateZipPlus4" CssClass="invoice_standard_label_text" Text="" runat="server" />--%>
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
        
        <!-- INVISIBLE For Master Account Billers -->
        <asp:Table ID="AmountDueTable" CssClass="TableType1" runat="server">
            <asp:TableRow>
                <asp:TableHeaderCell ID="NetDueEnclosed" Width="40%" CssClass="SmallLabel"
                    Text="Amount Enclosed: _______________________" runat="server" />
                <asp:TableHeaderCell ID="NetDueHeader" Width="10%" CssClass="MediumLabelItalics"
                    Text="Net Due" runat="server" />
                <asp:TableHeaderCell ID="NetDueField" Width="10%" CssClass="MediumLabelItalics"
                    Text="" runat="server" />
                <asp:TableHeaderCell ID="NetDueComment" Width="40%" CssClass="SmallLabelItalics"
                    Text="Detach And Return Top Portion With Your Payment" runat="server" />
            </asp:TableRow>
        </asp:Table>
        
        <asp:PlaceHolder ID="InvoicePlaceholder" Visible="False" runat="server"></asp:PlaceHolder>
        <asp:PlaceHolder ID="InvoiceDetailsPlaceholder" Visible="False" runat="server"></asp:PlaceHolder>
        
        <!-- INVISIBLE For Master Account Billers -->
        <asp:Table ID="BillCustomerTable" Caption="Customer Detail" CssClass="TableType2" runat="server">
            <asp:TableRow>
                <asp:TableHeaderCell BackColor="#C0C0C0" ID="BillCustomerNameHeader" CssClass="TableCellAlignLeft"
                    Font-Bold="true" Text="Customer Name" runat="server" />
                <asp:TableHeaderCell BackColor="#C0C0C0" ID="BillCustomerNumberHeader" CssClass="TableCellAlignLeft"
                    Font-Bold="true" Text="Customer Number" runat="server" />
                <asp:TableHeaderCell BackColor="#C0C0C0" ID="BillPONumberHeader" CssClass="TableCellAlignLeft"
                    Font-Bold="true" Text="P.O. Number" runat="server" />
                <asp:TableHeaderCell BackColor="#C0C0C0" ID="BillInvoiceDateHeader" CssClass="TableCellAlignCenter"
                    Font-Bold="true" Text="Invoice Date" runat="server" />
                <asp:TableHeaderCell BackColor="#C0C0C0" ID="BillDueDateHeader" CssClass="TableCellAlignRight"
                    Font-Bold="true" Text="Due Date" runat="server" />
            </asp:TableRow>
            <asp:TableRow>
                <asp:TableCell ID="BillCustomerNameField" CssClass="TableCellAlignLeft" Text="" runat="server" />
                <asp:TableCell ID="BillCustomerNumberField" CssClass="TableCellAlignLeft" Text=""
                    runat="server" />
                <asp:TableCell ID="BillPONumberField" CssClass="TableCellAlignLeft" Text="" runat="server" />
                <asp:TableCell ID="BillInvoiceDateField" CssClass="TableCellAlignCenter" Text=""
                    runat="server" />
                <asp:TableCell ID="BillDueDateField" CssClass="TableCellAlignRight" Text="" runat="server" />
            </asp:TableRow>
        </asp:Table>
        
        <!-- The ItemTable is built dynamically at run time only  -->
        <!-- INVISIBLE For Master Account Billers -->
        <asp:Table ID="ItemTable" CssClass="TableType2" runat="server">
        </asp:Table>
        
        <!-- INVISIBLE For Master Account Billers -->
        <asp:Table ID="BillAmountTable" CssClass="TableType2" runat="server">
            <asp:TableRow>
                <asp:TableHeaderCell BackColor="#C0C0C0" ID="BillAmountDateHeader" CssClass="TableCellAlignCenter"
                    Font-Bold="true" Text="Date" runat="server" />
                <asp:TableHeaderCell BackColor="#C0C0C0" ID="BillAmountInvoiceHeader" CssClass="TableCellAlignCenter"
                    Font-Bold="true" Text="Invoice #" runat="server" />
                <asp:TableHeaderCell BackColor="#C0C0C0" ID="BillAmountDescriptionHeader" CssClass="TableCellAlignCenter"
                    Font-Bold="true" Text="Description" runat="server" />
                <asp:TableHeaderCell BackColor="#C0C0C0" ID="BillAmountAmountHeader" CssClass="TableCellAlignCenter"
                    Font-Bold="true" Text="Amount" runat="server" />
                <asp:TableHeaderCell BackColor="#C0C0C0" ID="BillAmountBalanceDueHeader" CssClass="TableCellAlignRight"
                    Font-Bold="true" Text="Balance Due" runat="server" />
            </asp:TableRow>
            <asp:TableRow>
                <asp:TableCell ID="BillAmountDateField" CssClass="TableCellAlignCenter" Text="" runat="server" />
                <asp:TableCell ID="BillAmountInvoiceField" CssClass="TableCellAlignCenter" Text="" runat="server" />
                <asp:TableCell ID="BillAmountDescriptionField" CssClass="TableCellAlignCenter" Text="" runat="server" />
                <asp:TableCell ID="BillAmountAmountField" CssClass="TableCellAlignCenter" Text="" runat="server" />
                <asp:TableCell ID="BillAmountBalanceDueField" CssClass="TableCellAlignRight" Text="" runat="server" />
            </asp:TableRow>
        </asp:Table>

        <asp:Table ID="CompanyFooterTable" CssClass="TableType1" runat="server" Visible="false">
            <asp:TableRow>
                <asp:TableCell ID="CompanyFooterField" runat="server">
                    <asp:Label ID="CompanyFooterName" CssClass="LargeLabel" Text="" runat="server" />
                    <asp:Label ID="CompanyFooterAddress1" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="CompanyFooterAddress2" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="CompanyFooterAddress3" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="CompanyFooterPhoneNumber1" CssClass="SmallLabel" Text="" runat="server" />
                    <asp:Label ID="CompanyFooterPhoneNumber2" CssClass="SmallLabel" Text="" runat="server" />
                </asp:TableCell></asp:TableRow></asp:Table>
        
        <!-- INVISIBLE For Master Account Billers -->
        <asp:Table ID="tblPayments" runat="server" CssClass="TableType2">
            <asp:TableHeaderRow>
                <asp:TableHeaderCell ColumnSpan="4">Payments Applied</asp:TableHeaderCell>
            </asp:TableHeaderRow>
            <asp:TableRow>
                <asp:TableHeaderCell ID="tbDate" runat="server" Text="Date"></asp:TableHeaderCell>
                <asp:TableHeaderCell ID="tbType" runat="server" Text="Type"></asp:TableHeaderCell>
                <asp:TableHeaderCell ID="tbReference" runat="server" Text="Reference"></asp:TableHeaderCell>
                <asp:TableHeaderCell ID="tbAmount" runat="server" Text="Amount"></asp:TableHeaderCell>
            </asp:TableRow>
        </asp:Table>
        
        <asp:Table ID="tblMemo" runat="server" CssClass="TableType2">
            <asp:TableRow>
                <asp:TableHeaderCell>Memo</asp:TableHeaderCell>
            </asp:TableRow>
            <asp:TableRow>
                <asp:TableCell>
                    <asp:Label ID="lblMemos" runat="server" Text="" />
                </asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </div>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphScripts" runat="server"></asp:Content>