<!--                                                                  -->
<!--  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:output method="html" indent="no" doctype-system="" encoding="utf-8" />

    <xsl:include href="/app/tools/bookpub/templates/help/help_layout.xsl" />

    <xsl:template name="helpHeader">Help - Revenue Tab</xsl:template>
    <xsl:template name="helpPage">
        <xsl:choose>
            <xsl:when test="Params/period_id != 0">
                <xsl:call-template name="closedPeriodHelp" />
            </xsl:when>
            <xsl:otherwise>
                <xsl:call-template name="currentPeriodHelp" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

    <xsl:template name="currentPeriodHelp">
        <h1>Current Period</h1>
        <a name="top" />
        <ul class="tableOfContents">
            <li><a href="#guide">User Guide for Sales File Management</a></li>
            <li><a href="#general">General Information</a></li>
            <li><a href="#sales_period_name">Sales Period Name</a></li>
            <li><a href="#download_reports">Download Current Period Reports</a></li>
            <li><a href="#upload_files">Upload Sales File</a></li>
            <li><a href="#new_files">New Files</a></li>
            <li><a href="#open_files">Open Files</a></li>
            <li><a href="#finished_files">Finished Files</a></li>
        </ul>
        <a name="guide" />
        <h2>User Guide for Sales File Management</h2>
        <p>A step-by-step guide to uploading and processing sales files for digital aggregated output files and royalty runs is now available.</p>
        <p>
            <xsl:call-template name="uiDownloadLink">
                <xsl:with-param name="url" select="'?c=sales_file_guide'" />
                <xsl:with-param name="text" select="'RoyaltyShare User Guide - Sales File Management Process for eBooks'" />
            </xsl:call-template>
        </p>
        <xsl:call-template name="backToTop" />
        <a name="general" />
        <h2>General Information</h2>
        <p>The "Revenue" tab, also called the "Royalty Status Tracker", provides an interface for uploading and processing sales files from distributors and digital service providers (DSPs).</p>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-current-price_validation.png" class="HelpImage" />
        <xsl:call-template name="backToTop" />
        <p>This page contains six main sections:</p>
        <a name="sales_period_name" />
        <h2>"Sales Period Name" section</h2>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-current-period_name.png" class="HelpImage" />
        <p>The sales period name appears as a header at the top of the page.  From here, you can navigate to previous closed periods through the "Previous Period" link, or adjust the name of the current period.  By default, the current sales period name is automatically configured with the date when the last period was closed and noting it is to the present, as in "Nov 01, 2009 – Present (Current)."  When selecting the revenue tab, the first period seen is always the current period.</p>
        <p>The current period name can be renamed by clicking on the notepad icon and accessing the "Edit Period Name" page.  Note that closed period names cannot be changed.</p>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-current-edit_period_name.png" class="HelpImage" />
        <xsl:call-template name="backToTop" />
        <a name="download_reports" />
        <h2>"Download Current Period Reports" section</h2>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-current-download_reports.png" class="HelpImage" />
        <p>This section contains reports relevant to sales files being processed in the current period.  These reports provide different data sets taken from the sales file information in the "Open Files" and "Finished Files" sections.
            <dl>
                <dt>Current Reconciliation Report</dt>
                <dd>provides revenue, unit, and record information for all current and suspense files from the "Open Files" and "Finished Files" sections of the revenue tab, including the totals received, previously processed, processed for the current period, and unprocessed.
                    <ul>
                        <li>Note: files that have been fully processed (all exceptions matched) in a previously closed period do not appear in the Current Reconciliation Report.</li>
                    </ul>
                </dd>
                <dt>File Summary</dt>
                <dd>provides a snapshot of the current files in the "Open Files" and "Finished Files" sections.</dd>
                <dt>All <xsl:if test="Params/price_validation">Catalog </xsl:if>Exceptions</dt>
                <dd>provides a tab-delimited text file containing all <xsl:if test="Params/price_validation">catalog </xsl:if>exceptions remaining in sales files in the "Open Files" section.  The exceptions file contains the information seen in the original sales file.
                    <ul>
                        <li>Note: this report must be initially generated by the user through the "Generate Exceptions Report" link, and must be continually generated for the report to reflect exception resolution.</li>
                    </ul>
                </dd>
                <xsl:if test="Params/price_validation">
                    <dt>All Price Exceptions</dt>
                    <dd>provides a tab-delimited text file containing all price exceptions remaining in sales files in the “Open Files” section.  The exceptions file contains the information seen in the original sales file, along with comparison information to catalog data to show the variance amount.
                        <ul>
                            <li>Note: this report must be initially generated by the user through the “Generate Exceptions Report” link, and must be continually generated for the report to reflect exception resolution or any changes to price validation thresholds.</li>
                        </ul>
                    </dd>
                </xsl:if>
            </dl>
        </p>
        <xsl:call-template name="backToTop" />
        <a name="upload_files" />
        <h2>"Upload Sales File" section</h2>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-current-upload_files.png" class="HelpImage" />
        <p>Sales files can be added to the "Royalty Status Tracker" for data aggregation and royalty processing by browsing for and uploading sales files in the "Upload Sales Files" section.</p>
        <p>Sales files in text (.txt, .csv, .tsv) and Excel 97 – 2003 (.xls,) formats can be uploaded.  Summaries received with sales files in PDF or Word, zipped folder formats, and Excel 2007 (.xlsx) files cannot be processed and are automatically rejected by the system.</p>
        <xsl:call-template name="backToTop" />
        <a name="new_files" />
        <h2>"New Files" section</h2>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-current-new_files.png" class="HelpImage" />
        <p>Sales files appear in the "New Files" section of the "Royalty Status Tracker" immediately after they are uploaded.  This section is present on the tracker page only when files are processing or attempting to process.</p>
        <p>The following fields appear in the "New Files" section after a file is uploaded:
            <dl>
                <dt>Service</dt>
                <dd>the name of the distributor or DSP providing the sales file.  The initial service name for all files appears as "Unknown" until processing begins and the system can recognize the distributor or DSP.  It will remain "Unknown" if the system cannot recognize the file.</dd>
                <dt>File Name</dt>
                <dd>the name of the file, including the file format extension.  Files uploaded to the "New Files" section can be downloaded by clicking on the file name link.</dd>
                <dt>(Delete File)
                    <xsl:call-template name="icon">
                        <xsl:with-param name="type" select="'delete'" />
                    </xsl:call-template>
                </dt>
                <dd class="iconInTerm">clicking this icon deletes the sales file from the "New Files" section.  Once clicked, a pop-up window will ask you to confirm the deletion before any action is taken.</dd>
                <dt>Errors</dt>
                <dd>defines any errors encountered while the file was processing or attempting to process.  </dd>
                <dt>Received</dt>
                <dd> the date the file was uploaded to the "New Files" section.</dd>
                <dt>Status</dt>
                <dd>defines the status of the sales file as it relates to processing.  You must refresh your webpage in order to view changes in processing after a file is uploaded.
                    <ul>
                        <li>"In Queue" is the initial status of all files until processing begins.</li>
                        <li>"Processing" will appear once the system has recognized the file.  A processed record count will appear in parentheses, starting with "(0)."
                            <ul>
                                <li>During processing transactions are automatically matched to catalog data based on Title, Author, and ISBN.</li>
                                <li>As transaction lines within a sales file are processed, the record count will increment.</li>
                            </ul>
                        </li>
                        <li>"Invalid" appears if the file contains errors that prevent it from being processed or if the file was not recognized by the system as from a currently supported service.</li>
                    </ul>
                </dd>
            </dl>
        </p>
        <xsl:call-template name="backToTop" />
        <a name="open_files" />
        <h2>"Open Files" section</h2>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-current-open_files.png" class="HelpImage" />
        <p>The "Open Files" section of the "Royalty Status Tracker" contains all sales files accepted into the system.  Sales files that are "Finished" and included in a closed period will be included in aggregated output files and are available for royalty processing.</p>
        <p>Files can be viewed in groups of 25, 50, 100, or all files available can be viewed.  Filters are also available for showing only current files or suspense files.  These settings can be adjusted using the "Now Viewing" dropdowns.
            <ul>
                <li>Current files – lists only new files that have been uploaded into the open period</li>
                <li>Suspense files – lists only files that have been split in a previous period.</li>
                <li>$0.00 revenue files – lists only files that do not have any revenue associated with them.</li>
                <li>All Files – Lists all files that are available in the current period.</li>
            </ul>
        </p>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-current-open_files_filter.png" class="HelpImage" />
        <p>Within a filtered view, the "Open Files" section can be sorted in ascending or descending order by clicking on the header for any available field.</p>
        <p>The following fields appear in the "Open Files" section:
            <dl>
                <dt>Service</dt>
                <dd>the name of the distributor or DSP providing the sales file.</dd>
                <dt>File Name</dt>
                <dd>the name of the file, including the file format extension.
                    <ul>
                        <li>New files that have not previously been finished can be downloaded by clicking on the file name link.</li>
                        <li>Split files cannot be downloaded.  These files were originally processed in a prior period, and were finished with exceptions remaining in the "Open Files" section.  Their file name has been appended with "(1)," "(2)", "(3)", etc., depending on the number of times the file has been split.</li>
                    </ul>
                </dd>
                <dt>(Delete File)
                    <xsl:call-template name="icon">
                        <xsl:with-param name="type" select="'delete'" />
                    </xsl:call-template>
                </dt>
                <dd class="iconInTerm">clicking this icon deletes the sales file from the "New Files" section.  Once clicked, a pop-up window will ask you to confirm the deletion before any action is taken.</dd>
                <dt>Notes
                    <xsl:call-template name="icon">
                        <xsl:with-param name="type" select="'note'" />
                    </xsl:call-template>
                </dt>
                <dd class="iconInTerm">clicking this icon takes the user to the "View/Edit Notes" page where a text string can be entered for informational purposes.  Only the first three letters of the text string entered will be viewable in the "Open Files" section.</dd>
                <dt>Received</dt>
                <dd>the date the file was processed and first appeared in the "Open Files" section.</dd>
                <dt>Units </dt>
                <dd>the total number of units being processed in the sales file.</dd>
                <dt>Revenue</dt>
                <dd>the amount of revenue being processed from the file in the base currency of the RoyaltyShare website.
                    <ul>
                        <li>Foreign revenue amounts will appear in parentheses next to the base currency amount, with the base currency appearing as a link in order to access the "Currency Conversion" page.</li>
                        <li>If no revenue is present in the detail of the sales file, a link will appear that allows the user to access the "Input Revenue" page.</li>
                    </ul>
                </dd>
                <dt>Records</dt>
                <dd>the total number of records, or lines, being processed in the sales file.</dd>
                <xsl:choose>
                    <xsl:when test="Params/price_validation">
                        <dt>Exceptions / Catalog</dt>
                        <dd>the number of records from the sales file that currently have not been matched to catalog data.  If any records are left as exceptions, the number appears as a link which allows the user to access the “Resolve Exceptions” page.</dd>
                        <dt>(Download Catalog Exceptions File)
                            <xsl:call-template name="icon">
                                <xsl:with-param name="type" select="'download'" />
                            </xsl:call-template>
                        </dt>
                        <dd class="iconInTerm">clicking this icon downloads a report of all records from the sales file that currently have not been matched to catalog.</dd>
                        <dt>Exceptions / Price</dt>
                        <dd>the number of records with an unapproved price variance in the sales file.  This number appears as a link if any exceptions have not been approved, or if price exceptions previously approved have been reported by a service again.</dd>
                        <dt>(Download Price Exceptions File)
                            <xsl:call-template name="icon">
                                <xsl:with-param name="type" select="'download'" />
                            </xsl:call-template>
                        </dt>
                        <dd class="iconInTerm">clicking this icon downloads a report of all records from the sales file that contain a price variance greater than the threshold allowed, both approved and unapproved.</dd>
                    </xsl:when>
                    <xsl:otherwise>
                        <dt>Exceptions / Initial</dt>
                        <dd>the total number of records from the sales file that could not be automatically matched to catalog data when the file was received.</dd>
                        <dt>(Download Error File)
                            <xsl:call-template name="icon">
                                <xsl:with-param name="type" select="'download'" />
                            </xsl:call-template>
                        </dt>
                        <dd class="iconInTerm">clicking this icon downloads an Excel report of all records from the sales file that currently have not been matched to catalog.</dd>
                        <dt>Exceptions / Left</dt>
                        <dd>the number of records from the sales file that currently have not been matched to catalog data.  If any records are left as exceptions, the number appears as a link which allows the user to access the "Resolve Exceptions" page.</dd>
                    </xsl:otherwise>
                </xsl:choose>
                <dt>Status</dt>
                <dd>defines available actions for the sales file, once processed.
                    <ul>
                        <li>"Open" – the file was previously split for a closed period, and none of the exceptions left have been matched to catalog data.  No action can be taken with an "Open" file.</li>
                        <li>"Finish" – any file, new or previously split, that has had exceptions resolved can be finished and included in the close for the current period.  A file can be finished by clicking the "Finish" link, or by selecting the check box next to the file and clicking the "Finish Selected Files" button at the bottom of the "Open Files" section.  All checkboxes can be selected by clicking the checkbox in the header of the "Open Files" section.</li>
                        <li>"Force" – a new file with no records matched to catalog data can have a record of its receipt forced into a closed period by clicking the "Force" link.  No sales records will be finished, but an empty record will be finished and available for the period close, and will appear on the "Reconciliation" report in the closed period.</li>
                    </ul>
                </dd>
            </dl>
        </p>
        <xsl:call-template name="backToTop" />
        <a name="finished_files" />
        <h2>"Finished Files" section</h2>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-current-finished_files.png" class="HelpImage" />
        <p>The "Finished Files" section shows all files for the current period that will be included in the close of the current period.  Once the period is closed, all sales in these finished files will move to the closed period and will then be eligible for royalty processing.  All closed digital sales will appear in the aggregated output file for the period and will show in the corresponding reconciliation report.</p>
        <p>The information available in this section is the same as the information available in the "Open Files" section, with a few exceptions:
            <ul>
                <li>The field "Closed" replaces "Status," showing the date the file was finished.</li>
                <li>Files cannot be deleted from the "Finished Files" section.  Instead, files can be re-opened and added back to the "Open Files" section, removing them from being part of the closed period.  To re-open a file, click on the arrows:
                    <xsl:call-template name="icon">
                        <xsl:with-param name="type" select="'refresh'" />
                        <xsl:with-param name="role" select="'action'" />
                    </xsl:call-template>
                </li>
            </ul>
        </p>
        <p>At least one file must be processed and included in the "Finished Files" section before a period can be closed.  If no files have been finished and fully processed, the "Close Current Period" button will be unavailable."</p>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-current-disabled_close.png" class="HelpImage" />
        <xsl:call-template name="backToTop" />
    </xsl:template>

    <xsl:template name="closedPeriodHelp">
        <h1>Closed Periods</h1>
        <a name="top" />
        <ul class="tableOfContents">
            <li><a href="#general">General Information</a></li>
            <li><a href="#sales_period_name">Period Name</a></li>
            <li><a href="#download_reports">Download Reports</a></li>
            <li><a href="#finished_files">Finished Files</a></li>
        </ul>
        <a name="general" />
        <h2>General Information</h2>
        <p>Closed periods contain sales that have been aggregated into royalty output files and are eligible for royalty payouts.  <strong>Closed periods and sales files cannot be reopened.</strong></p>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-closed.png" class="HelpImage" />
        <xsl:call-template name="backToTop" />
        <p>This page contains three main sections:</p>
        <a name="sales_period_name" />
        <h2>"Period Name" section</h2>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-closed-period_name.png" class="HelpImage" />
        <p>The period name appears as a header at the top of the page.  From here, you can navigate to previous closed periods through the "Previous Period" link, or back to more recent periods or the current period using the "Next Period" link.</p>
        <p>Once a sales period has been closed, the period name cannot be changed.</p>
        <xsl:call-template name="backToTop" />
        <a name="download_reports" />
        <h2>"Download Reports" section</h2>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-closed-download_reports.png" class="HelpImage" />
        <p>
            This section contains reports relevant to sales files being processed in the period being viewed. These reports contain information taken from the sales files in the "Finished Files" section.
            <dl>
                <dt>Output File (text) </dt>
                <dd>provides an aggregated report of all digital sales from all sales files in the closed period.  The output file is tab-delimited text version containing all sales information.  The "Report Configuration Tool" found in the "Admin" tab can be used to determine which variables are present within the output file as well as the order and delimiter used.</dd>
                <dt>Reconciliation Report (text)</dt>
                <dd>provides summary revenue, unit, and record information for all closed files in the "Finished Files" section, including the totals received, previously processed, processed for the current period, and unprocessed.</dd>
            </dl>
        </p>
        <xsl:call-template name="backToTop" />
        <a name="finished_files" />
        <h2>"Finished Files" section</h2>
        <img src="/production/redesign/images/help/bookpub/{Params/a}/main-closed-finished_files.png" class="HelpImage" />
        <p>The "Finished Files" section of the "Royalty Status Tracker" closed period page contains all sales files that have been closed and aggregated for royalty processing.</p>
        <p>The following fields appear in the "Finished Files" section:
            <dl>
                <dt>Service</dt>
                <dd>the name of the distributor or DSP providing the sales file.</dd>
                <dt>File Name</dt>
                <dd>the name of the file, including the file format extension.
                    <ul>
                        <li>Files that have been finished without being split can be downloaded by clicking on the file name link.</li>
                        <li>Split files cannot be downloaded.  These files were originally processed in a prior period, and were finished with exceptions remaining in the "Open Files" section.  Their file name has been appended with "(1)," "(2)", "(3)", etc., depending on the number of times the file has been split.</li>
                    </ul>
                </dd>
                <dt>Notes
                    <xsl:call-template name="icon">
                        <xsl:with-param name="type" select="'note'" />
                    </xsl:call-template>
                </dt>
                <dd class="iconInTerm">clicking this icon takes the user to the "View/Edit Notes" page where a text string can be entered for informational purposes.  Only the first three letters of the text string entered will be viewable in the "Open Files" section.</dd>
                <dt>Received</dt>
                <dd>the date the file was processed and first appeared in the "Open Files" section.</dd>
                <dt>Units </dt>
                <dd>the total number of units being processed in the sales file.</dd>
                <dt>Revenue</dt>
                <dd>the amount of revenue being processed from the file in the base currency of the RoyaltyShare website.  Foreign revenue amounts will appear in parentheses next to the base currency amount.</dd>
                <dt>Records</dt>
                <dd>the total number of records, or lines, being processed in the sales file.</dd>
                <dt>Closed</dt>
                <dd>the date the file was originally finished.</dd>
            </dl>
        </p>
        <xsl:call-template name="backToTop" />
    </xsl:template>

</xsl:stylesheet>
