<div id="kb" class="block">
    <div class="block_title">
        <h3><b><a href="#">[l]Client Info[/l]</a> &raquo; <a href="index.php?fuse=clients&view=ViewInvoices">[l]Invoices[/l]</a> &raquo; <a href="#">[l]Invoice[/l] #{ACTIVEINVOICENUMBER}</a></b></h3>
    </div>
    <ul>
        <li>
            <h1>[l]Invoice Summary[/l]</h1>
            <p class="kb st" style="background: url(templates/{TEMPLATE}/images/public/icon_submit_ticket.jpg) no-repeat  0 8px;">[l]The invoice summary for the selected invoice is listed below.[/l]</p>
        </li>
        <li>
          <h1>[l]Invoice[/l]: {ACTIVEINVOICENUMBER}</h1><br />
          <div style="padding-left: 15px;">
                <br />

                <!-- BEGIN DYNAMIC BLOCK: uninvoicedEntriesHeader -->
                <table cellpadding="0">
                    <tr>
                        <td>
                            <div id="statusContainer" class="statusContainer" style="display:none">
                                <span class="statusMsg" id="statusMsg" />
                            </div>
                        </td>
                    </tr>
                </table>
                <!-- END DYNAMIC BLOCK: uninvoicedEntriesHeader -->

                <!-- BEGIN DYNAMIC BLOCK: activeinvoiceinfo -->
                <div class="invoice_summary">
                    <span><b>[l]Sent[/l]:</b></span> <span>{INVOICEDATESENT}</span><br />
                    <span><b>[l]Paid[/l]:</b></span> <span>{INVOICEDATEPAID}</span><br />
                </div>
                <!-- END DYNAMIC BLOCK: activeinvoiceinfo -->

                <!-- BEGIN DYNAMIC BLOCK: multicurrencyoptions -->
                <script language="javascript">
                    function RedirectFilter(value){
                        this.location = "index.php?fuse=clients&view=Invoice_View&billdetailid={ACTIVEINVOICENUMBER}&price="+value;
                    }
                </script>
                
                [l]Price:[/l]&nbsp;&nbsp;
                <select class="body" id="price" name="price" onchange="RedirectFilter(this.value)">
                    <option value="0" {PRICE0SELECTED}>[l]Real Price[/l]&nbsp;&nbsp;&nbsp;&nbsp;</option>
                    <option value="1" {PRICE1SELECTED}>[l]Customer's Price Estimation[/l]&nbsp;&nbsp;&nbsp;&nbsp;</option>
                </select>
                
                <!-- BEGIN DYNAMIC BLOCK: multicurrencynotice -->
                <div id="divdetails" class="table-summary" style="margin-bottom: 10px; margin-top: 10px;">
                    <br>
                    <h2>
                        <font color=red>[l]Notice[/l]:</font>
                    </h2>
                    <h2>
                        [l]You are using the Customer's Price Estimation, so all the values below are approximated values depending on the currencies rates.[/l]
                    </h2>
                </div>
                <!-- END DYNAMIC BLOCK: multicurrencynotice -->
                <!-- END DYNAMIC BLOCK: multicurrencyoptions -->

                <div class="ts">
                    <form name="workitems">
                        <table width="100%">
                            <tr class="caption">
                                <td>[l]Due Date[/l]</td>
                                <td>[l]Description[/l]</td>
                                <td>[l]Billing Type[/l]</td>
                                <td>[l]Amount[/l]</td>
                                <!-- BEGIN DYNAMIC BLOCK: taxcolumnheader -->
                                <td>{TAXNAME}&nbsp;({TAXRATE})</td>
                                <!-- END DYNAMIC BLOCK: taxcolumnheader -->
                                <!-- BEGIN DYNAMIC BLOCK: tax2columnheader -->
                                <td>{TAX2NAME}&nbsp;({TAX2RATE})</td>
                                <!-- END DYNAMIC BLOCK: tax2columnheader -->
                            </tr>
                            <!-- BEGIN DYNAMIC BLOCK: ierow -->
                            <tr>
                                <td>&nbsp;{COL2DATA}</td>
                                <td>&nbsp;{COL3DATA}</td>
                                <td>&nbsp;{COL4DATA}</td>
                                <td align="right">&nbsp;{COL5DATA}</td>
                                <!-- BEGIN DYNAMIC BLOCK: taxcolumndata -->
                                <td align="right">&nbsp;{COL6DATA}</td>
                                <!-- END DYNAMIC BLOCK: taxcolumndata -->
                                <!-- BEGIN DYNAMIC BLOCK: tax2columndata -->
                                <td align="right">&nbsp;{COL7DATA}</td>
                                <!-- END DYNAMIC BLOCK: tax2columndata -->
                            </tr>
                            <!-- END DYNAMIC BLOCK: ierow -->

                            <!-- BEGIN DYNAMIC BLOCK: tax -->
                            <tr>
                                <td colspan="2"></td>
                                <td align="right" bgcolor="#F5F5DC">[l]Subtotal[/l] </td>
                                <td align="right" bgcolor="#F5F5DC">{SUBTOTAL}</td>
                                {TAXCOL}
                                {TAX2COL}
                            </tr>
                                <!-- BEGIN DYNAMIC BLOCK: tax1 -->
                            <tr>
                                <td colspan="2"></td>
                                <td align="right" bgcolor="#F5F5DC">{TAXNAME} </td>
                                <td align="right" bgcolor="#F5F5DC">{TOTALTAXED}</td>
                                {TAXCOL}
                                {TAX2COL}
                            </tr>
                                <!-- END DYNAMIC BLOCK: tax1 -->
                                <!-- BEGIN DYNAMIC BLOCK: tax2 -->
                            <tr>
                                <td colspan="2"></td>
                                <td align="right" bgcolor="#F5F5DC">{TAX2NAME} </td>
                                <td align="right" bgcolor="#F5F5DC">{TOTALTAXED2}</td>
                                {TAXCOL}
                                {TAX2COL}
                            </tr>
                                <!-- END DYNAMIC BLOCK: tax2 -->
                            <!-- END DYNAMIC BLOCK: tax -->
                            <tr>
                                <td colspan="2"></td>
                                <td align="right" bgcolor="#F5F5DC"><b style='font-size:10px;'>[l]Total[/l]</b></td>
                                <td align="right" bgcolor="#F5F5DC"><b style='font-size:10px;'>{TOTAL}</b></td>
                                {TAXCOL}
                                {TAX2COL}
                            </tr>
                            <!-- BEGIN DYNAMIC BLOCK: balance -->
                            <tr>
                                <td colspan="2"></td>
                                <td align="right" bgcolor="#F5F5DC">[l]Paid[/l] </td>
                                <td align="right" bgcolor="#F5F5DC">{PARTIALLYPAID}</td>
                                {TAXCOL}
                                {TAX2COL}
                            </tr>
                            <tr>
                                <td colspan="2"></td>
                                <td align="right" bgcolor="#F5F5DC"><b style='font-size:10px;'>[l]Balance Due[/l]</b></td>
                                <td align="right" bgcolor="#F5F5DC"><b style='font-size:10px;'>{BALANCEDUE}</b></td>
                                {TAXCOL}
                                {TAX2COL}
                            </tr>
                            <!-- END DYNAMIC BLOCK: balance -->
                            
                        </table>
                    </form>
                </div>

                <!-- BEGIN DYNAMIC BLOCK: invoicebuttons -->
                <div id="invoicebutton_{INVOICEBUTTON_PAY}" style="float:right; padding-right:4px; display:{INVOICEBUTTON_DISPLAY}">
                    <form method=post action=index.php>
                        <input type="button" name="invoicebutton" value='{INVOICEBUTTON_VALUE}' onclick="{INVOICEBUTTON_JSFUNCTION}">
                    </form>
                </div>
                <!-- END DYNAMIC BLOCK: invoicebuttons -->

                <br/><br/>

                <!-- BEGIN DYNAMIC BLOCK: paywith -->
                <p>
                <h3>[l]How would you like to pay?[/l]</h3>
                <span>
                    [l]Check out securely online with any of our supported payment methods below.[/l]
                </span>

                <br/><br/>

                <form name="paymethodform" id="paymentmethodform">
                    <div style="padding-left:15px;">
                        <table border="0">
                            <tbody>
                                <!-- BEGIN DYNAMIC BLOCK: payoption -->
                                <tr>
                                  <td align="left"><input name="paymentmethod" value="{PAYMENT_TYPE}" type="radio" onclick="refreshCCSection(this.value);" {PAYMENTTYPESELECTED}></td>

                                  <!-- BEGIN DYNAMIC BLOCK: payoption_cc -->
                                  <td align="left" nowrap="nowrap">
                                    <img src="templates/{TEMPLATE}/images/creditcards/visa.gif" alt="Visa" style="display: {VISADISPLAY};" />
                                    <img src="templates/{TEMPLATE}/images/creditcards/mc.gif" alt="Mastercard" style="display: {MCDISPLAY};"  />
                                    <img src="templates/{TEMPLATE}/images/creditcards/amex1.gif" alt="American Express" style="display: {AMEXDISPLAY};"  />
                                    <img src="templates/{TEMPLATE}/images/creditcards/discover.gif" alt="Discover" style="display: {DISCOVERDISPLAY};" />
                                  </td>
                                  <!-- END DYNAMIC BLOCK: payoption_cc -->

                                  <!-- BEGIN DYNAMIC BLOCK: payoption_noncc -->
                                  <td align="left" nowrap="nowrap">
                                    <!-- BEGIN DYNAMIC BLOCK: payoption_noncc_image -->
                                    <img src="{image_path}" align="left" alt="{PAYMENT_TYPE}">
                                    <!-- END DYNAMIC BLOCK: payoption_noncc_image -->
                                    &nbsp; {PAYMENT_TYPE_DESC}
                                  </td>
                                  <!-- END DYNAMIC BLOCK: payoption_noncc -->
                                  
                                </tr>
                                <tr><td></td><td><div name="ccinfo" id="ccinfo_{PAYMENT_TYPE}" style="align:left;display:none;"></div></td></tr>
                                <!-- END DYNAMIC BLOCK: payoption -->
                                
                                <!-- BEGIN DYNAMIC BLOCK: account_credit -->
                                <tr>
                                    <td colspan="2"><br/><input name="commit" onclick="PerformAsyncActionOnInvoices(true,'{ACTIVEINVOICENUMBER}','billing','ApplyAccountCreditToInvoices_Async'); return false;" value="[l]Apply Account Credit[/l]" type="button">&nbsp;&nbsp;&nbsp;&nbsp;[l]Credit Balance[/l]:&nbsp;&nbsp;{balance}</td>
                                </tr>
                                <!-- END DYNAMIC BLOCK: account_credit -->
                                <tr>
                                    <td colspan="2"><br/><input name="commit" onclick="PayInvoice('{ACTIVEINVOICENUMBER}','PayInvoice','billing'); return false;" value="[l]Pay Invoice[/l]" type="button"></td>
                                </tr>
				<tr><td colspan="2"><span style="color:red" id="errMessages">[l][/l]</span></td>
                            </tbody>
                        </table>
                    </div>
                </form>
                </p>
                <!-- END DYNAMIC BLOCK: paywith -->


                <!--BEGIN DYNAMIC BLOCK: noButtonsMsg -->
                [l]You can't perform any operation on this(these) invoice(s)[/l]
                <!--END DYNAMIC BLOCK: noButtonsMsg -->

                <div id="ccinfo" style='align:left;display:none'>
                    {CCINFO}
                </div>

                <script type="text/javascript">
                    refreshCCSection('{DEFAULTPAYMENTTYPE}');
                </script>

                <!-- BEGIN DYNAMIC BLOCK: invoiceadditionalinfosec -->
                <div class="clearline">&nbsp;</div>
                <div id="invoiceadditionalinfo" class="additional_info">
                    <h3>[l]Additional Instructions[/l]</h3><br />{INVOICEADDITIONALINFOTEXT}
                </div>
                <!-- END DYNAMIC BLOCK: invoiceadditionalinfosec -->

                <br /><br /><br />

            </div>
        </li>
    </ul>
</div>
