<!--                                                                  -->
<!--  Copyright (C) 2006 RoyaltyShare, Inc.   All Rights Reserved     -->
<!--  $Id$  -->
<!--                                                                  -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:dyn="http://exslt.org/dynamic" extension-element-prefixes="dyn">

    <xsl:variable name="pendingTransactionCount" select="count(/Root/Form/Account/FinanceAccount/PendingTransactionList/PendingTransaction)" />

    <xsl:variable name="pendingPrefix">Form_Account_FinanceAccount_PendingTransactionList_PendingTransaction_</xsl:variable>

    <xsl:template name="payorTransactionLayout">
        <form name="payorTransaction" id="payorTransaction" method="post" action="{$area}">
            <xsl:call-template name="payorTransactionEdit" />
            <xsl:call-template name="buttons" />
        </form>
    </xsl:template>


    <xsl:template name="payorTransactionEdit">
        <div class="PayorTransactionEdit">
            <xsl:if test="$area = 'license' or $area = 'ca_license' or $area = 'publisher' or $area = 'ca_publisher'">
                <xsl:call-template name="helpLink" />
            </xsl:if>

            <input type="hidden" name="formSubmit" value="1" />
            <input type="hidden" name="c" value="{$cmd}" />

            <xsl:if test="Params/PayorID">
                <input type="hidden" name="PayorID" value="{Params/PayorID}" />
            </xsl:if>

            <xsl:if test="Params/ArtistPayeeID">
                <input type="hidden" name="ArtistPayeeID" value="{Params/ArtistPayeeID}" />
            </xsl:if>

            <xsl:if test="Params/LabelPayeeID">
                <input type="hidden" name="LabelPayeeID" value="{Params/LabelPayeeID}" />
            </xsl:if>

            <xsl:if test="Params/PublisherID">
                <input type="hidden" name="PublisherID" value="{Params/PublisherID}" />
            </xsl:if>

            <xsl:if test="Params/TrackLicenseID">
                <input type="hidden" name="TrackLicenseID" value="{Params/TrackLicenseID}" />
            </xsl:if>

            <xsl:if test="$area = 'publisher' or $area = 'ca_publisher'">
                <xsl:call-template name="publisherView">
                    <xsl:with-param name="publisher" select="Form/Publisher" />
                </xsl:call-template>
            </xsl:if>

            <xsl:if test="$area = 'artist_payee'">
                <xsl:call-template name="payeeView">
                    <xsl:with-param name="payee" select="Form/ArtistPayee" />
                </xsl:call-template>
            </xsl:if>

            <xsl:if test="$area = 'label_payee'">
                <xsl:call-template name="payeeView">
                    <xsl:with-param name="payee" select="Form/LabelPayee" />
                </xsl:call-template>
            </xsl:if>

            <xsl:if test="($area = 'license' or $area = 'ca_license') and $cmd = 'account'">
                <xsl:call-template name="licenseView">
                    <xsl:with-param name="licenseTitle"><xsl:value-of select="$licenseHeading" /></xsl:with-param>
                    <xsl:with-param name="license" select="Form/TrackLicense" />
                    <xsl:with-param name="track" select="Form/Track" />
                </xsl:call-template>
            </xsl:if>

            <xsl:if test="($area = 'license' or $area = 'ca_license') and $cmd = 'crossed_account'">
                <xsl:call-template name="licenseView">
                    <xsl:with-param name="crossed" select="'1'" />
                    <xsl:with-param name="licenseTitle">Crossed <xsl:value-of select="$licenseHeading" />s</xsl:with-param>
                    <xsl:with-param name="license" select="Form/Account/CrossedLicenseList" />
                    <xsl:with-param name="track" select="Form/Track" />
                </xsl:call-template>
            </xsl:if>

            <xsl:call-template name="openRunStatusMessage" />

            <xsl:if test="$area = 'publisher' or $area = 'ca_publisher' or $area = 'artist_payee' or $area = 'label_payee'">

                <xsl:call-template name="payorMinPayment" />
            </xsl:if>

            <xsl:if test="$area = 'publisher' or $area = 'ca_publisher' or $area = 'artist_payee' or $area = 'label_payee' or $area = 'license' or $area = 'ca_license'">
                <xsl:call-template name="pendingTransactions" />
            </xsl:if>

            <xsl:if test="Form/Account/FinanceAccount/TransactionList/Transaction">
                <xsl:call-template name="payorTransactionHistory" />
            </xsl:if>
        </div>
    </xsl:template>


    <xsl:template name="payorMinPayment">
        <section class="PayorTransactionEdit-section">
            <h2>Payor</h2>
            <table class="Table">
                <thead>
                    <tr class="Table-row Table-row-header">
                        <th class="Table-col">Name</th>
                        <th class="Table-col">Client Payor #</th>
                        <th class="Table-col">Status</th>
                        <th class="Table-col">Default</th>
                        <th class="Table-col Table-col-shrink">Minimum Payment (<xsl:value-of select="Form/Account/FinanceAccount/CurrencyCode" />)</th>
                    </tr>
                </thead>
                <tbody>
                    <tr class="Table-row Table-row-data">
                        <td class="Table-col">
                            <xsl:value-of select="Form/Payor/Name" />
                        </td>
                        <td class="Table-col">
                            <xsl:value-of select="Form/Payor/ClientPayorID" />
                        </td>
                        <td class="Table-col">
                            <xsl:if test="Form/Payor/Inactive = 1">Inactive</xsl:if>
                            <xsl:if test="Form/Payor/Inactive = 0">Active</xsl:if>
                        </td>
                        <td class="Table-col">
                            <xsl:if test="Form/Payor/IsDefault = 1">Yes</xsl:if>
                            <xsl:if test="Form/Payor/IsDefault = 0">No</xsl:if>
                        </td>
                        <td class="Table-col Table-col-shrink">
                            <div class="Form-item Form-item-price-field">
                                <xsl:attribute name="class">
                                    <xsl:text>Form-item Form-item-price-field</xsl:text>
                                    <xsl:if test="Form/Account/MinPayment[@e]">
                                        <xsl:text> Form-item-error</xsl:text>
                                    </xsl:if>

                                </xsl:attribute>
                                <label class="Form-label">
                                    <div class="Form-input-wrapper">
                                        <input name="Form_Account_MinPayment" class="Input Form-input dollarField" id="Form_Account_MinPayment" type="text" value="{Form/Account/MinPayment}">
                                            <xsl:if test="$openRuns &gt; 0">
                                                <xsl:attribute name="disabled">disabled</xsl:attribute>
                                            </xsl:if>
                                        </input>
                                    </div>
                                </label>
                                <xsl:call-template name="inlineError">
                                    <xsl:with-param name="path">Form/Account/MinPayment</xsl:with-param>
                                    <xsl:with-param name="displayName">Minimum Payment</xsl:with-param>
                                </xsl:call-template>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </section>
    </xsl:template>


    <xsl:template name="payorTransactionHistory">
        <section class="PayorTransactionEdit-section">
            <h2>Transaction History</h2>
            <table class="Table Table-with-highlight" id="transactionHistory">
                <thead>
                    <tr class="Table-row Table-row-header">
                        <th class="Table-col">Type</th>
                        <th class="Table-col Table-col-amount">Amount</th>
                        <th class="Table-col">Transaction Date</th>
                        <th class="Table-col">Check #</th>
                        <th class="Table-col">Memo</th>
                        <th class="Table-col Table-col-amount">Balance</th>
                    </tr>
                </thead>
                <tbody>
                    <xsl:for-each select="Form/Account/FinanceAccount/TransactionList/Transaction">
                        <tr class="Table-row Table-row-data">
                            <td class="Table-col">
                                <xsl:call-template name="transactionTypeCode">
                                    <xsl:with-param name="typeCode" select="TypeCode" />
                                </xsl:call-template>
                            </td>
                            <td class="Table-col Table-col-amount">
                                <xsl:value-of select="Amount" />
                            </td>
                            <td class="Table-col"><xsl:value-of select="TransactionDate" /></td>
                            <td class="Table-col"><xsl:value-of select="CheckNumber" /></td>
                            <td class="Table-col">
                                <xsl:call-template name="replaceLineBreak">
                                    <xsl:with-param name="string" select="Memo"/>
                                </xsl:call-template>
                            </td>
                            <td class="Table-col Table-col-amount">
                                <xsl:value-of select="Balance" />
                            </td>
                        </tr>
                    </xsl:for-each>
                </tbody>
            </table>
        </section>
    </xsl:template>


    <xsl:template name="transactionTypeCode">
        <xsl:param name="typeCode" />
        <xsl:if test="$typeCode = 1">Opening Balance</xsl:if>
        <xsl:if test="$typeCode = 2">Adjustment</xsl:if>
        <xsl:if test="$typeCode = 3">Advance</xsl:if>
        <xsl:if test="$typeCode = 4">Payment</xsl:if>
        <xsl:if test="$typeCode = 5">Closing Balance</xsl:if>
    </xsl:template>


    <xsl:template name="pendingTransactions">
        <section class="PageShow-section PayorTransactionEdit-pending">
            <h2>Pending Transactions</h2>
            <xsl:if test="//*[@e]">
                <xsl:call-template name="errorMessageGeneral" />
            </xsl:if>
            <div class="Form-header">
                <p>Enter transaction information here.</p>
            </div>

            <table class="Table" id="transactionTable">
                <thead>
                    <tr class="Table-row Table-row-header">
                        <th class="Table-col PayorTransactionEdit-type-code-col">Type</th>
                        <th class="Table-col">
                            <span class="Table-col-wrapper">
                                Amount (<xsl:value-of select="Form/Account/FinanceAccount/CurrencyCode" />)
                            </span>
                            <xsl:call-template name="helpIcon">
                                <xsl:with-param name="tip">Positive Adjustment adds to the payee balance, a negative&lt;br&gt;Adjustment subtracts from the payee balance</xsl:with-param>
                            </xsl:call-template>
                        </th>
                        <th class="Table-col Table-col-shrink">Transaction Date</th>
                        <th class="Table-col">Check #</th>
                        <th class="Table-col">Memo</th>
                        <th class="Table-col Table-col-icon">Delete</th>
                    </tr>
                </thead>
                <tbody>
                    <xsl:choose>
                        <xsl:when test="$pendingTransactionCount &gt; 0">
                            <xsl:for-each select="Form/Account/FinanceAccount/PendingTransactionList/PendingTransaction">
                                <xsl:call-template name="pendingTransactionRow" />
                            </xsl:for-each>
                        </xsl:when>
                        <xsl:otherwise>
                            <xsl:call-template name="pendingTransactionRow" />
                        </xsl:otherwise>
                    </xsl:choose>
                </tbody>
            </table>
            <xsl:if test="$openRuns = 0">
                <xsl:call-template name="uiButton">
                    <xsl:with-param name="content" select="'Add Another Transaction'" />
                    <xsl:with-param name="type" select="'text-inline'" />
                    <xsl:with-param name="iconLeftType" select="'add'" />
                    <xsl:with-param name="className" select="'Table-add-row-button'" />
                    <xsl:with-param name="id" select="'add-transaction-button'" />
                </xsl:call-template>
            </xsl:if>
        </section>
    </xsl:template>


    <xsl:template name="pendingTransactionRow">
        <xsl:variable name="transactionPosition" select="position() - 1" />
        <tr class="Table-row Table-row-data Table-row-inputs" id="transaction{position()}" data-prefix="{$pendingPrefix}">
            <td class="Table-col PayorTransactionEdit-type-code-col">
                <div class="Form-item">
                    <xsl:attribute name="class">
                        <xsl:text>Form-item</xsl:text>
                        <xsl:if test="TypeCode[@e]">
                            <xsl:text> Form-item-error</xsl:text>
                        </xsl:if>

                    </xsl:attribute>
                    <label class="Form-label">
                        <div class="Form-input-wrapper PayorTransactionEdit-type-code-field">

                            <xsl:variable name="payorTransactionTypeItems">
                                <map>
                                    <mapEntry><name>Choose...</name><value></value></mapEntry>
                                    <mapEntry><name>Adjustment</name><value>2</value></mapEntry>
                                    <mapEntry><name>Advance</name><value>3</value></mapEntry>
                                    <xsl:if test="$area != 'license'">
                                        <mapEntry><name>Payment</name><value>4</value></mapEntry>
                                    </xsl:if>
                                </map>
                            </xsl:variable>
                            <xsl:call-template name="uiDropdown">
                                <xsl:with-param name="items" select="$payorTransactionTypeItems"/>
                                <xsl:with-param name="name">
                                    <xsl:value-of select="$pendingPrefix" />
                                    <xsl:value-of select="$transactionPosition" />
                                    <xsl:text>_TypeCode</xsl:text>
                                </xsl:with-param>
                                <xsl:with-param name="id">
                                    <xsl:value-of select="$pendingPrefix" />
                                    <xsl:value-of select="$transactionPosition" />
                                    <xsl:text>_TypeCode</xsl:text>
                                </xsl:with-param>
                                <xsl:with-param name="active" select="TypeCode"/>
                                <xsl:with-param name="className" select="''"/>
                                <xsl:with-param name="disabled">
                                    <xsl:if test="$openRuns &gt; 0">
                                        <xsl:text>true</xsl:text>
                                    </xsl:if>
                                </xsl:with-param>
                            </xsl:call-template>

                        </div>
                    </label>
                    <div class="Form-error-text-wrapper">
                        <p class="Form-error">Type must be selected</p>
                    </div>
                </div>
            </td>
            <td class="Table-col">
                <div class="Form-item">
                    <xsl:attribute name="class">
                        <xsl:text>Form-item</xsl:text>
                        <xsl:if test="Amount[@e]">
                            <xsl:text> Form-item-error</xsl:text>
                        </xsl:if>

                    </xsl:attribute>
                    <label class="Form-label">
                        <div class="Form-input-wrapper">
                            <input name="{$pendingPrefix}{$transactionPosition}_Amount" class="Input Form-input" id="{$pendingPrefix}{$transactionPosition}_Amount" type="text" value="{Amount}">
                                <xsl:if test="$openRuns &gt; 0">
                                    <xsl:attribute name="disabled">disabled</xsl:attribute>
                                </xsl:if>
                            </input>
                        </div>
                    </label>
                    <div class="Form-error-text-wrapper">
                        <xsl:if test="//Amount[@e = 'field_blank']"><p class="Form-error">Amount cannot be blank</p></xsl:if>
                        <xsl:if test="//Amount[@e = 'field_invalid']"><p class="Form-error">Amount is invalid.</p></xsl:if>
                        <xsl:if test="//Amount[@e = 'field_out_of_range']"><p class="Form-error">Amount must be a positive number.</p></xsl:if>
                    </div>
                </div>
            </td>
            <td class="Table-col Table-col-shrink">
                <div class="Form-item">
                    <xsl:attribute name="class">
                        <xsl:text>Form-item</xsl:text>
                        <xsl:if test="TransactionDate[@e]">
                            <xsl:text> Form-item-error</xsl:text>
                        </xsl:if>

                    </xsl:attribute>
                    <label class="Form-label">
                        <div class="Form-input-wrapper">
                            <xsl:call-template name="uiDatepicker">
                                <xsl:with-param name="name">
                                    <xsl:value-of select="$pendingPrefix"/>
                                    <xsl:value-of select="$transactionPosition"/>
                                    <xsl:text>_TransactionDate</xsl:text>
                                </xsl:with-param>
                                <xsl:with-param name="id">
                                    <xsl:value-of select="$pendingPrefix"/>
                                    <xsl:value-of select="$transactionPosition"/>
                                    <xsl:text>_TransactionDate</xsl:text>
                                </xsl:with-param>

                                <xsl:with-param name="value" select="TransactionDate" />
                                <xsl:with-param name="disabled">
                                    <xsl:if test="$openRuns &gt; 0">
                                        <xsl:text>true</xsl:text>
                                    </xsl:if>
                                </xsl:with-param>
                                <xsl:with-param name="iconId">
                                    <xsl:text>calendarIcon</xsl:text>
                                    <xsl:value-of select="$transactionPosition" />
                                </xsl:with-param>

                            </xsl:call-template>
                        </div>
                    </label>
                    <div class="Form-error-text-wrapper">
                        <p class="Form-error">Transaction Date is invalid</p>
                    </div>
                </div>
            </td>
            <td class="Table-col">
                <div class="Form-item">
                    <xsl:attribute name="class">
                        <xsl:text>Form-item</xsl:text>
                        <xsl:if test="CheckNumber[@e]">
                            <xsl:text> Form-item-error</xsl:text>
                        </xsl:if>

                    </xsl:attribute>
                    <label class="Form-label">
                        <div class="Form-input-wrapper">
                            <input name="{$pendingPrefix}{$transactionPosition}_CheckNumber" id="{$pendingPrefix}{$transactionPosition}_CheckNumber" type="text" value="{CheckNumber}" class="Input Form-input">
                                <xsl:if test="$openRuns &gt; 0">
                                    <xsl:attribute name="disabled">disabled</xsl:attribute>
                                </xsl:if>
                            </input>
                        </div>
                    </label>
                    <div class="Form-error-text-wrapper">
                        <p class="Form-error">Check # is invalid</p>
                    </div>
                </div>
            </td>
            <td class="Table-col">
                <div class="Form-item">
                    <xsl:attribute name="class">
                        <xsl:text>Form-item</xsl:text>
                        <xsl:if test="Memo[@e]">
                            <xsl:text> Form-item-error</xsl:text>
                        </xsl:if>
                    </xsl:attribute>
                    <label class="Form-label">
                        <div class="Form-input-wrapper">
                            <input name="{$pendingPrefix}{$transactionPosition}_Memo" id="{$pendingPrefix}{$transactionPosition}_Memo" type="text" value="{Memo}" class="Input Form-input">
                                <xsl:if test="$openRuns &gt; 0">
                                    <xsl:attribute name="disabled">disabled</xsl:attribute>
                                </xsl:if>
                            </input>
                        </div>
                    </label>
                </div>
            </td>
            <td class="Table-col Table-col-icon PayorTransactionEdit-delete-col">
                <div class="Form-item Form-item-inline">
                    <div class="Form-label">
                        <div class="Form-input-wrapper">
                            <div class="Form-input-wrapper">
                                <xsl:call-template name="uiDeleteRowTrigger">
                                    <xsl:with-param name="name">
                                        <xsl:value-of select="$pendingPrefix"/>
                                        <xsl:value-of select="$transactionPosition"/>
                                        <xsl:text>_Delete</xsl:text>
                                    </xsl:with-param>
                                    <xsl:with-param name="id">
                                        <xsl:value-of select="$pendingPrefix"/>
                                        <xsl:value-of select="$transactionPosition"/>
                                        <xsl:text>_Delete</xsl:text>
                                    </xsl:with-param>
                                    <xsl:with-param name="value" select="1"/>
                                    <xsl:with-param name="disabled">
                                        <xsl:if test="$openRuns &gt; 0">
                                            <xsl:text>true</xsl:text>
                                        </xsl:if>
                                    </xsl:with-param>
                                </xsl:call-template>
                            </div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
    </xsl:template>

    <xsl:template name="payorList">
        <xsl:variable name="accountCurrencyCode">
            <xsl:choose>
                <xsl:when test="$area = 'publisher'">USD</xsl:when>
                <xsl:when test="$area = 'ca_publisher'">CAD</xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="Client/Locale/CurrencyFormat/CurrencyCode" />
                </xsl:otherwise>
            </xsl:choose>
        </xsl:variable>
        <section class="PayorTransactionEdit-payor-view" id="payorViewTable">
            <h2>Payors</h2>
            <table class="Table">
                <thead>
                    <tr class="Table-row Table-row-header">
                        <th class="Table-col">Payor</th>
                        <xsl:if test="$area = 'publisher' or $area = 'ca_publisher'">
                            <th class="Table-col Table-col-amount">License Count</th>
                        </xsl:if>
                        <th class="Table-col Table-col-amount">Minimum Payment (<xsl:value-of select="$accountCurrencyCode" />)</th>
                        <th class="Table-col Table-col-amount">
                            <span class="Table-col-wrapper">Pending Transactions (<xsl:value-of select="$accountCurrencyCode" />)</span>
                            <xsl:call-template name="helpIcon">
                                <xsl:with-param name="tip">Sum of all non-committed transactions</xsl:with-param>
                            </xsl:call-template>
                        </th>
                        <th class="Table-col Table-col-icon">Edit</th>
                    </tr>
                </thead>
                <tbody>
                    <xsl:for-each select="Form/PayorList/Payor">
                        <xsl:variable name="payorID" select="PayorID" />
                        <tr class="Table-row Table-row-data">
                            <td class="Table-col">
                                <xsl:value-of select="Name" />
                            </td>
                            <xsl:if test="$area = 'publisher' or $area = 'ca_publisher'">
                                <td class="Table-col Table-col-amount">
                                    <xsl:choose>
                                        <xsl:when test="PublisherLicenseCount &gt; 0">
                                            <a href="?c=list_licenses&amp;publisherID={/Root/Params/PublisherID}&amp;payorID={$payorID}"><xsl:value-of select="PublisherLicenseCount" /></a>
                                        </xsl:when>
                                        <xsl:otherwise>0</xsl:otherwise>
                                    </xsl:choose>
                                </td>
                            </xsl:if>
                            <td class="Table-col Table-col-amount">
                                <xsl:if test="/Root/Form/Publisher/Account[PayorID = $payorID]">
                                    <xsl:if test="normalize-space(/Root/Form/Publisher/Account[PayorID = $payorID]/MinPayment)"><xsl:value-of select="/Root/Form/Publisher/Account[PayorID = $payorID]/FinanceAccount/Balance/@currency_symbol" /></xsl:if>
                                    <xsl:value-of select="/Root/Form/Publisher/Account[PayorID = $payorID]/MinPayment" />
                                </xsl:if>
                                <xsl:if test="/Root/Form/ArtistPayee/Account[PayorID = $payorID]">
                                    <xsl:if test="normalize-space(/Root/Form/ArtistPayee/Account[PayorID = $payorID]/MinPayment)"><xsl:value-of select="/Root/Form/ArtistPayee/Account[PayorID = $payorID]/FinanceAccount/Balance/@currency_symbol" /></xsl:if>
                                    <xsl:value-of select="/Root/Form/ArtistPayee/Account[PayorID = $payorID]/MinPayment" />
                                </xsl:if>
                                <xsl:if test="/Root/Form/LabelPayee/Account[PayorID = $payorID]">
                                    <xsl:if test="normalize-space(/Root/Form/LabelPayee/Account[PayorID = $payorID]/MinPayment)"><xsl:value-of select="/Root/Form/LabelPayee/Account[PayorID = $payorID]/FinanceAccount/Balance/@currency_symbol" /></xsl:if>
                                    <xsl:value-of select="/Root/Form/LabelPayee/Account[PayorID = $payorID]/MinPayment" />
                                </xsl:if>
                            </td>
                            <td class="Table-col Table-col-amount">
                                <xsl:if test="/Root/Form/Publisher/Account[PayorID = $payorID]">
                                    <xsl:call-template name="formatDollars">
                                        <xsl:with-param name="dollarAmount" select="/Root/Form/Publisher/Account[PayorID = $payorID]/FinanceAccount/PendingBalance" />
                                    </xsl:call-template>
                                </xsl:if>
                                <xsl:if test="/Root/Form/ArtistPayee/Account[PayorID = $payorID]">
                                    <xsl:call-template name="formatDollars">
                                        <xsl:with-param name="dollarAmount" select="/Root/Form/ArtistPayee/Account[PayorID = $payorID]/FinanceAccount/PendingBalance" />
                                    </xsl:call-template>
                                </xsl:if>
                                <xsl:if test="/Root/Form/LabelPayee/Account[PayorID = $payorID]">
                                    <xsl:call-template name="formatDollars">
                                        <xsl:with-param name="dollarAmount" select="/Root/Form/LabelPayee/Account[PayorID = $payorID]/FinanceAccount/PendingBalance" />
                                    </xsl:call-template>
                                </xsl:if>
                            </td>
                            <td class="Table-col Table-col-icon">
                                <xsl:variable name="editHref">
                                    <xsl:value-of select="$area" />?PayorID=<xsl:value-of select="PayorID" />&amp;c=account&amp;<xsl:if test="$area = 'publisher' or $area = 'ca_publisher'">PublisherID=<xsl:value-of select="/Root/Form/Publisher/PublisherID" /></xsl:if><xsl:if test="$area = 'artist_payee'">ArtistPayeeID=<xsl:value-of select="/Root/Form/ArtistPayee/ArtistPayeeID" /></xsl:if><xsl:if test="$area = 'label_payee'">LabelPayeeID=<xsl:value-of select="/Root/Form/LabelPayee/LabelPayeeID" /></xsl:if>
                                </xsl:variable>
                                <xsl:call-template name="uiEditTrigger">
                                    <xsl:with-param name="url" select="$editHref" />
                                </xsl:call-template>
                            </td>
                        </tr>
                    </xsl:for-each>
                </tbody>
            </table>
        </section>
    </xsl:template>

</xsl:stylesheet>
