<!--
      (Do not remove this comment block.)
  Version: 2.0.x
  Last modified: December 7th 2009
       modified: March 28th 2007
       modified: August 12th 2006
	   modified: February 28th 2005

  Maintainers:
               Alex Aycinena <alex.aycinena@gmail.com>
               Chris Lyttle <chris@wilddev.net>
               Neil Williams <linux@codehelp.co.uk>

  Author:
               Chris Lyttle <chris@wilddev.net>
  Translators:
               (translators put your name and email here)
-->

<chapter id="setup-accounts">
      <title>Setting Up, Editing &amp; Working with Accounts</title>

      <para>This section describes the process of setting up, editing and working with <application>&app;</application> Accounts.
        In <application>&app;</application> an Account is used as the basic tool to organize the recording of where money comes
        from and goes to. <application>&app;</application> also extends the concept of real world accounts such as a bank
        account or loan account to grouping income and expense accounts. This allows you to
        quickly see where you spent your money and what your major income and expenses are.
        <application>&app;</application> sets Account Types (as described in the next section) to help in organizing
        and grouping accounts. Account Types can be used to create a Chart of Accounts.
      </para>

      <sect1 id="acct-types">
        <title>Types of <application>&app;</application> Accounts</title>

        <para><application>&app;</application> supports a number of different account types. It is recommended to
         choose an appropriate account type based on the list of account types described
         below.</para>

         <warning>
           <para>The Accounts Payable and Accounts Receivable types are
              used internally by &app;&rsquo;s business features. Transactions involving these accounts should not be added,
              changed or deleted in any way other than by using
              <itemizedlist>
                <listitem><para>post/unpost bill/invoice/voucher or</para></listitem>
	        <listitem><para>process payment</para></listitem>
	      </itemizedlist>
	   </para>

         </warning>

        <table frame="topbot" id="TypeAccounts">
         <title>Types of <application>&app;</application> Accounts.</title>
          <tgroup cols="2">
            <thead>
              <row>
                <entry><para>Account Type</para></entry>
                <entry><para>Description</para></entry>
              </row>
            </thead>

            <tbody>
              <row>
                <entry><para>Accounts Payable</para></entry>
                <entry><para>Accounts Payable are used by businesses to record amounts that
                 must be paid. Example: The business has bought something, but the business
                 has not paid the bill until later.</para>
                  <note><para>Previous versions of this help defined A/P and A/R the other way
                   round.</para></note>
                </entry>
              </row>

              <row>
                <entry><para>Accounts Receivable</para></entry>
                <entry><para>Accounts Receivable records amounts for which money
                 has not yet been received. Example: A business has sold something and
                 issued a bill, but the client has not payed until later.</para>
                  <note><para>Previous versions of this help defined A/P and A/R the other way
                   round.</para></note>
                </entry>
              </row>

              <row>
                <entry><para>Asset</para></entry>
                <entry><para>Asset accounts are used for tracking things that are of
		 value and can be used or sold to pay debts. (Normally a placeholder account)
                 </para></entry>
              </row>

              <row>
                <entry><para>Bank</para></entry>
                <entry><para>The Bank account type denotes savings or checking accounts
                 held at a bank or other financial institution. Some of these accounts may
                 bear interest. This is also the appropriate account type for check (debit)
                 cards, which directly withdraw payments from a checking account. </para></entry>
              </row>

              <row>
                <entry><para>Cash</para></entry>
                <entry><para>The Cash account type is used to denote the cash that you store
                 in your wallet, shoe box, piggyback, or mattress.</para></entry>
              </row>

              <row>
                <entry><para>Credit Card</para></entry>
                <entry><para>The Credit Card account type is used to denote credit card
                 accounts, both for cards that allow floating lines of credit (e.g. VISA,
                 MasterCard, or Discover) and with cards that do not permit continuing
                 balances (e.g. American Express) </para></entry>
              </row>

              <row>
                <entry><para>Currency</para></entry>
                <entry><para>Currency Accounts were used for trading currencies, but have
                 been replaced by the Currency Transfer pane on the Transfer Funds Window
                 (<xref linkend="trans-win-enter"></xref>).</para></entry>
              </row>

              <row>
                <entry><para>Equity</para></entry>
                <entry><para>Equity accounts are used to store the opening balances when you
                 first start using <application>&app;</application> or start a new accounting period.</para></entry>
              </row>

              <row>
                <entry><para>Expense</para></entry>
                <entry><para>Any expense such as food, clothing, taxes, etc. This type is
                 called a category in Quicken.</para></entry>
              </row>

              <row>
                <entry><para>Income</para></entry>
                <entry><para>Any income received from sources such as salary, interest,
                 dividends, etc. This type is called a category in Quicken.</para></entry>
              </row>

              <row>
                <entry><para>Liability</para></entry>
                <entry><para>Liability accounts are used for tracking debts or financial
                 obligations. (Normally a placeholder account)</para></entry>
              </row>

              <row>
                <entry><para>Mutual Fund</para></entry>
                <entry><para>A professionally managed portfolio of stocks and bonds or other
                 investments divided up into shares.</para></entry>
              </row>

              <row>
                <entry><para>Stock</para></entry>
                <entry><para>A share of ownership in a corporation, which entitles its owner
                 to all the risks and rewards that go with it.</para></entry>
              </row>
            </tbody>
          </tgroup>
        </table>

        <para>The <emphasis role="bold">New Account Hierarchy Setup</emphasis> assistant described in the first section
         of this help is a convenient way of setting up a set of accounts to use as a framework of
         account types.</para>

        <para>When new accounts are created the available choices of account types are grayed
         out according to what type the parent account is. The following list contains the possible choices.</para>

        <itemizedlist>
          <listitem>
            <para>Accounts Payable: All accounts except Equity, Expense and Income can be child accounts.</para>
          </listitem>

          <listitem>
            <para>Accounts Receivable: All accounts except Equity, Expense and Income can be child accounts.</para>
          </listitem>

          <listitem>
            <para>Asset: All accounts except Equity, Expense and Income can be child accounts.</para>
          </listitem>

          <listitem>
            <para>Bank: All accounts except Equity, Expense and Income can be child accounts.</para>
          </listitem>

          <listitem>
            <para>Cash: All accounts except Equity, Expense and Income can be child accounts.</para>
          </listitem>

          <listitem>
            <para>Credit Card: All accounts except Equity, Expense and Income can be child accounts.</para>
          </listitem>

          <listitem>
            <para>Currency: All accounts except Equity, Expense and Income can be child accounts.</para>
          </listitem>

          <listitem>
            <para>Equity: Only Equity accounts can be child accounts.</para>
          </listitem>

          <listitem>
            <para>Expense: Only Expense or Income accounts can be child accounts.</para>
          </listitem>

          <listitem>
            <para>Income: Only Expense or Income accounts can be child accounts.</para>
          </listitem>

          <listitem>
            <para>Liability: All accounts except Equity, Expense and Income can be child accounts.</para>
          </listitem>

          <listitem>
            <para>Mutual Fund: All accounts except Equity, Expense and Income can be child accounts.</para>
          </listitem>

          <listitem>
            <para>Stock: All accounts except Equity, Expense and Income can be child accounts.</para>
          </listitem>

        </itemizedlist>

      </sect1>

      <sect1 id="chart-create">
        <title>Creating a Chart of Accounts</title>

        <para>The Chart of Accounts is like a table of contents for your finances. The best
        way to conceptualize a chart of accounts is as a tree. The main branches represent
        entire categories or groups, while the leaves of the tree denote individual bank
        accounts or expense categories. When a summary report is requested, typically only
        the main branches are shown in the report, rather than the individual accounts. For
        example, a chart of accounts might look like the following:</para>

         &chartacctseg;

        <note id="accts-code">
        <title>Accounts codes</title>
          <para>Note that accounts not only have names; they may have codes, to order the accounts.
          When a report is generated, the sort order is determined by the numbering. It&rsquo;s
          customary to have the leaf accounts end in non-zero digits, while parent nodes have
          increasing numbers of zeros.</para>
        </note>

        <warning>
          <para><application>&app;</application> does not prevent duplicate numbering, although we would encourage you
          to avoid this. Account codes are treated as numbers in base-36, thus, if you run out
          of numbers, you can use the letters, a through z.</para>
        </warning>

      </sect1>

      <sect1 id="chart-edit">
        <title>Editing a Chart of Accounts</title>

        <para>Editing the Chart of Accounts is done within the <guilabel>Parent Account</guilabel>
        pane of the <guilabel>Edit Account</guilabel> dialog. It is possible to move an account to any
        part of the Chart of Accounts.  It is recommended to keep accounts generally under the related
        types of accounts as described in <xref linkend="acct-types" />. This helps to preserve the Chart
        of Accounts structure.</para>

        <para>To move the selected account to a different parent account just select the
        account in the <guilabel>Parent Account</guilabel> pane. If <guilabel>New top level account</guilabel>
        is selected then the account will be moved to the top level.</para>
      </sect1>

      <sect1 id="acct-create">
        <title>Creating a New Account</title>

        <para>To create a new account go to <menuchoice><guimenu>Actions</guimenu><guimenuitem>New Account...</guimenuitem></menuchoice>
        or click the <guibutton>New</guibutton> <emphasis>Toolbar</emphasis> icon in the Account Tree Window. The <guilabel>New Account</guilabel>
        dialog will be opened.</para>

        <para>The <guilabel>New Account</guilabel> properties dialog consists of two tabs, the
        <guilabel>General</guilabel> tab and the <guilabel>Opening Balance</guilabel> tab.</para>

        <para>Creating a New Account involves planning in advance several details that are
         used in the <guilabel>New Account</guilabel> dialog. </para>

         <itemizedlist>
          <listitem>
            <para>What type of account is needed.</para>
          </listitem>

          <listitem>
            <para>Where it fits in the structure of the Chart of Accounts.</para>
          </listitem>

          <listitem>
            <para>If there is an Opening Balance.</para>
          </listitem>

          <listitem>
            <para>If there is a Commodity (security/currency) needed for the account.</para>
          </listitem>

          <listitem>
            <para>If on-line updating of the commodity price is needed.</para>
          </listitem>
        </itemizedlist>

        <para>These details are described below.</para>

        <sect2 id="gen-info">
          <title>General Information Tab</title>

          <para>The <guilabel>General</guilabel> tab is used to access the basic information about the
           account. It provides a way of connecting the account to stock information if it is
           one of the currency, mutual fund or stock account types. It can also be flagged as
           a <link linkend="accts-placeholder">Placeholder</link> account.
           It displays if it is flagged as a <guilabel>Tax Related</guilabel> account (which
           is set through the <menuchoice><guimenu>Edit</guimenu><guimenuitem>Tax Report
           Options</guimenuitem></menuchoice> dialog).</para>

          <para>There are seven fields in the <guilabel>Identification</guilabel> section of this tab.</para>

          <orderedlist>
            <listitem>
              <para><guilabel>Account Name:</guilabel> The name for the account such as First Bank
               Checking.</para>
            </listitem>

            <listitem>
              <para><guilabel>Account Code:</guilabel> The optional number code as described in <xref linkend="accts-code" />.</para>
            </listitem>

            <listitem>
              <para><guilabel>Description:</guilabel> Optional description for the account.</para>
            </listitem>

            <listitem>
              <para><guilabel>Security/Currency:</guilabel> </para>

                 <note><para>The <guilabel>Type</guilabel> field in the <guilabel>Select Security</guilabel> is determined by the selection
                 of <guilabel>Account Type</guilabel> panel in the <guilabel>New Account</guilabel> screen.</para></note>

          <itemizedlist>
            <listitem>
              <para>For accounts other than <emphasis>Stock</emphasis> or <emphasis>Mutual Fund</emphasis> this should be the
              default currency, USD (US Dollar) or your local currency symbol. If this account is for a foreign
              currency then use the <guibutton>Select...</guibutton> button to choose a different currency from the
              currencies pull-down list.</para>
            </listitem>

            <listitem>
              <para>For Accounts containing a <emphasis>Stock</emphasis> and <emphasis>Mutual Fund</emphasis>;
              first select <guilabel>stock</guilabel> or <guilabel>mutual fund</guilabel> in
              the <guilabel>Account Type</guilabel> panel, then the <guilabel>Parent Account</guilabel>, then use
              the <guibutton>Select...</guibutton> button, to choose the <guilabel>Type</guilabel> (usually the exchange
              the security is traded on) and security from the <guilabel>Select Security</guilabel> window.</para>

              <para>If the required security/fund is not on the list, and you have the correct <guilabel>Type</guilabel> you will need
              to create the security/fund.  To create a commodity for mutual fund and stock accounts select the
              <guibutton>New...</guibutton> button in the <guilabel>Select Security</guilabel> screen, to bring up the
              <guilabel>New Security:</guilabel> screen. The options are described in detail in the Security Editor
              <xref linkend="tool-security-edit"></xref> section.
              Fill in a <guilabel>name</guilabel>, <guilabel>symbol</guilabel> and <guilabel>type</guilabel> and <guibutton>Close</guibutton>
              to create the security.
              After the security is created select the <guilabel>Type:</guilabel> (usually the exchange the security
              is traded on) and the name in the <guilabel>Currency/security:</guilabel> drop down list and
              <guibutton>Close</guibutton> the screen.</para>
            </listitem>

           </itemizedlist>

          </listitem>

          <listitem>
              <para><guilabel>Smallest Fraction:</guilabel> The smallest fraction that will be tracked.</para>
          </listitem>

           <listitem>
              <para><guilabel>Account Color:</guilabel> The color to assign to the account&rsquo;s register tab.
              Click on the color button to open the <guilabel>Pick a Color</guilabel> screen. To reset the account color
              click the <guibutton>Default</guibutton> button.</para>
           </listitem>

          <listitem>
              <para><guilabel>Notes:</guilabel> This is a free form text box that can be used for any additional notes about
               the account.</para>
          </listitem>
         </orderedlist>

           <para>Below the panes are 3 check-boxes: one to show if the account is <guilabel>Tax
           Related</guilabel>, one to mark the account as a <guilabel>Placeholder</guilabel>, and one to 
           mark an account <guilabel>Hidden</guilabel>.</para>

           <para>The <guilabel>Tax Related</guilabel> check-box means that an account has been
           flagged to be included in the Tax Schedule Report. This flag is only displayed on the <guilabel>Edit
           Account</guilabel> dialog and is set in the <guilabel>Income Tax Information</guilabel> dialog
           (<menuchoice><guimenu>Edit</guimenu><guimenuitem>Tax Report Options</guimenuitem></menuchoice>).
           See the Tax Schedule Report and <acronym>TXF</acronym> Export section in Reports Chapter (<xref linkend="report-general"></xref>).</para>
           
           <para>The <guilabel>Placeholder</guilabel> check-box sets an account to read-only status and 
             prevents the addition of transaction data to the account.</para>

           <note id="accts-placeholder">
             <para>Setting an account to <guilabel>Placeholder</guilabel> will also hide that account in the pop-up 
             account list in a register. Sub-accounts to the placeholder account will still display 
             in the pop-up, however.</para>
           </note>

           <para>The <guilabel>Hidden</guilabel> check box hides an account (and any sub-accounts) in
           the account tree. To reset this option, you will
           first need to open the <menuchoice><guimenu>View</guimenu><guimenuitem>Filter By...</guimenuitem></menuchoice>
           dialog for the account tree and check the <guilabel>Show hidden accounts</guilabel> option.
           Doing so will allow you to select the account and reopen this dialog.</para>
           
           <note id="accts-hidden">
             <para>Hidden accounts still appear in the pop-up account list in a register. 
             To remove an account from this pop-up account list as well, check the 
             <guilabel>Placeholder</guilabel> check box.</para>
           </note>

          <para>Below these checkboxes is a pane that contains a list of <guilabel>Account Types</guilabel>. Select a type from the
          descriptions in <xref linkend="acct-types" />.</para>

           <para>The next pane contains an account tree to choose a <guilabel>Parent Account</guilabel>. To create a
           new account tree select <guilabel>New top level account</guilabel>.

           <note>
             <para>The available choices in the <guilabel>Account Type</guilabel> pane depends on the selected account in the
             <guilabel>Parent Account</guilabel> pane. For example if the
             <guilabel>Parent Account</guilabel> is <emphasis>Assets</emphasis> you will see only <emphasis>Equity</emphasis>
             in the <guilabel>Account Type</guilabel> pane.
             This is to help maintain a proper account structure for the Chart of Accounts.</para>
           </note>
           </para>

       <sect3 id="Online-price-setup"><title>Steps to enable On-line price updating</title>

           <itemizedlist>
            <listitem><para><application>&app;</application> relies on an external tool to retrieve online quotes. This
              tool is a Perl module named <quote>Finance::Quote</quote> and has to be installed
              on your computer independently from <application>&app;</application>. The first step in enabling online price
              updating should thus be to ensure <application>Finance::Quote</application> is properly installed.</para>

             <para>To determine if the Perl module <application>Finance::Quote</application> is already installed on
              your system, type <quote>perldoc Finance::Quote</quote> in a terminal window
              and check to see if there is any documentation available. If you see the
              documentation, then the module is installed, if you do not see the
              documentation, then it has not been installed.</para>

            <para>Installing <application>Finance::Quote</application> differs from one operating system to another. For
            the various supported systems, you can follow these guidelines:</para>

            <itemizedlist>
             <listitem><para><guilabel>Linux:</guilabel> Most linux distributions (like
              Fedora, openSuse, Mandriva, Ubuntu, and so on) have a package in their software
              repositories for the <application>Finance::Quote</application> perl module. So in most cases, you can
              simply use your preferred package manager (yum, apt, rpm, synaptics, yast,...)
              to install the module. The name of the package may vary from one distribution to
              another. It&rsquo;s often called something like <quote>perl-Finance-Quote</quote>.</para></listitem>

             <listitem><para><guilabel>Windows:</guilabel> <application>Finance::Quote</application> on Windows requires perl
              to be installed already. If you haven&rsquo;t done so, you should first install ActivePerl, or more recently,
              Strawberry Perl.</para>

              <para>The Windows installer from the <application>&app;</application> home page comes with a small helper program to
              install <application>Finance::Quote</application> for you. You can find it in the Start Menu under the <application>&app;</application>
              group and is called <quote>Install Online Price Retrieval</quote>.</para></listitem>

             <listitem><para><guilabel>Mac OS X:</guilabel> If you have installed <application>&app;</application>
              from the installer found on the <application>&app;</application> home page, <application>Finance::Quote</application> is already
              installed for you.</para></listitem>

             <listitem><para>If none of the above applies to your setup, you can try these
              alternative, more generic instructions:</para>
              <orderedlist>
               <listitem><para>Close any <application>&app;</application> applications you have running.</para></listitem>

               <listitem><para>Locate the folder where <application>&app;</application> is installed by searching for <quote>gnc-fq-update</quote>
                (without the quotes).</para></listitem>

               <listitem><para>Change to that directory, open a root shell and run the command <quote>gnc-fq-update</quote>
                (without the quotation marks). This will launch a Perl CPAN update session that will go out onto the
                Internet and install the <application>Finance::Quote</application> module on your system. The gnc-fq-update program is interactive,
                however, with most systems you should be able to answer <quote>no</quote> to the first question:
                <quote>Are you ready for manual configuration? [yes]</quote> and the update will continue automatically
                from that point.</para>
               </listitem>
              </orderedlist>

             </listitem>
            </itemizedlist>

             <para>After installation is complete, you should run the <quote>gnc-fq-dump</quote> test program, in the
              same directory, distributed with <application>&app;</application> to test if <application>Finance::Quote</application> is installed and working properly.</para>

             <note>
              <para>If you feel uncomfortable about performing any of these steps, please either email the <application>&app;</application>-user
               mailing list (<email>gnucash-user@gnucash.org</email>) for help or come to the <application>&app;</application> IRC channel on
               irc.gnome.org. More information is available on the <application>&app;</application> Wiki FAQ for example
               <ulink url="http://wiki.gnucash.org/wiki/FAQ#Q:_How_do_I_fix_a_.22system_error.22_or_.22unknown_error.22_when_getting_stock_quotes.3F" />
               You can also leave out this step and manually update your stock prices.</para>
             </note>
            </listitem>

            <listitem>
              <para>Create the Account for the mutual fund or stock with it listed in the
               <guilabel>Security/Currency</guilabel> field, as described above.</para>

                <tip><para>When creating these accounts it is a good time to create income accounts to track dividends,
                 capital gains (long and short) and expense account(s) for tracking commissions and losses (if you
                 track losses as expenses).</para></tip>
            </listitem>

            <listitem>
              <para>Create the mutual fund or stock with either the <guilabel>Security Editor</guilabel> for existing stock/funds or the
               <guilabel>New Security/Currency</guilabel> dialog for a new stock/fund.</para>
              <para>Select <guilabel>Get On-line Quotes:</guilabel>, <guilabel>Type of Quote Source</guilabel> and
              <guilabel>Timezone.</guilabel></para>

              <para>Online currency quotes require that the check-box for Online quotes and the timezone be
               selected in the Security screen and the Security Editor check-box for "get quote" box is checked for
               those currencies that are to be downloaded.</para>

          <itemizedlist>
            <listitem>
              <para><guilabel>Get On-line Quotes:</guilabel> This check-box is to enable this security/fund to
               have quotes downloaded from an on-line source.</para>
            </listitem>

            <listitem>
              <para><guilabel>Type of Quote Source</guilabel> use the radio buttons to select the type of source
               for the Online quotes.  <guilabel>Multiple:</guilabel> quote sources like <quote>Europe</quote> should be used if
               fail-over to multiple sites are desirable.  <guilabel>Single:</guilabel> selections will only return
               information from the specified source.</para>

               <para>After selecting the type of source for price quotes, select a quote source from the pull-down menu.
               Currently among the supported quote sources are; Yahoo, Yahoo Europe, Fidelity
               Investments, T. Rowe Price, the Vanguard Group, the Australian Stock Exchange
               (ASX) and TIAA-CREF.</para>

               <note><para>Note that Yahoo will provide price quotes for many mutual
               funds including Fidelity, T.Rowe Price and Vanguard, and that the quoted prices
               at Yahoo should be identical to those that may be found at the source sites.</para></note>

               <para>If you are outside the US and use one of the different Yahoo sources or
               multiple sources containing Yahoo, you should append the market code for the security
               such as PA for Paris, BE for Berlin, etc. Example: 12150.PA (a Peugeot security
               in the Paris market).  <xref linkend="gnc-tbl-fq-yahoo-exchange-codes"></xref> below lists suffixes for various
               markets around the world.</para>

              <para>Pseudo-symbols for TIAA-CREF funds are listed in table <xref linkend="PsSymbs-TIAA-CREF"></xref>.
              </para>
            </listitem>

            <listitem>
              <para><guilabel>Timezone for these quotes:</guilabel> Select the timezone for the source of the
               on-line quotes you are receiving. For example, Yahoo normally quotes Eastern
               timezone, so choose America/New York if you use that quote source.</para>
            </listitem>
          </itemizedlist>
          </listitem>


            <listitem>
              <para>Select a commodity to the Price Editor.</para>
            </listitem>

            <listitem>
              <para>Select <guibutton>Get Quotes</guibutton> in the Price Editor.</para>
            </listitem>

            <listitem>
              <para>Check the latest price for the selected security.</para>
            </listitem>
          </itemizedlist>

          <para>If you wish to update price quotes from the command line, you can do so by
           the following command:</para>

          <para><userinput>gnucash --add-price-quotes &lt;gnucash-file-name&gt;</userinput>
          </para>

          <para>The command <userinput>gnucash --add-price-quotes &lt;gnucash-file-name&gt;</userinput>
          can be used to fetch the current prices of your stocks.  The file specified
          <quote>&lt;gnucash-file-name&gt;</quote> will depend on the name and location of your
          data file.  This can be determined by the name displayed in the top frame of the <application>&app;</application> window,
          before the <quote>-</quote>.  The file name can also be found under <guimenu>File</guimenu>
          in the list of recently opened file; the first item, numbered 1, is the name of the currently
          open file.</para>

          <para>This can be automated in Mac OSX by creating a crontab entry. For example, to update your file every Friday
          evening (18:00) after markets close (modify the time accordingly for your time zone), you could add
          the following to your personal crontab:</para>

          <para><userinput>0 18 * * 5 /path/to/gnucash --add-price-quotes /path/to/gnucash-filename &gt; /dev/null 2&gt;&amp;1'</userinput></para>

          <para>For Linux, which needs dbus, usually started by the desktop
            manager, to communicate with dconf or gconf:</para>

          <para><userinput>0 18 * * 5 env `dbus-launch` sh -c 'trap "kill $DBUS_SESSION_BUS_PID" EXIT; /path/to/gnucash
            --add-price-quotes /path/to/gnucash-filename &gt; /dev/null 2&gt;&amp;1'</userinput></para>

          <para>Remember that Mutual Fund <quote>prices</quote> are really <quote>Net Asset Value</quote>
          and require several hours after the exchange closes before being available. If NAVs are downloaded before
          the current days NAVs are determined, yesterday&rsquo;s NAVs are retrieved.</para>

        </sect3>

        </sect2>

        <sect2 id="open-balance">
          <title>Opening Balance tab</title>

      <para>The <guilabel>Opening Balance</guilabel> tab is visible only when creating a new account, and is disabled for <guilabel>Stock</guilabel> and<guilabel> Mutual Fund </guilabel>accounts. In the latter case, opening balances must be created by hand. Please see Section 8.5.1 in the <emphasis role="italic">Tutorial and Concepts Guide</emphasis> for instructions if you need to create an opening balance in a <guilabel>Stock</guilabel> or <guilabel>Mutual Fund</guilabel> account. It is
           used to record the beginning balance for an account. This allows it to be used for
           two different scenarios. If using <application>&app;</application> for the first time to record transactions,
           it can be used as a beginning balance. If the accounts in use are closed at the end
           of a period and new accounts are created, it is used to close and carry balances
           forward.</para>

          <para>There are three panes in this tab. The top pane contains the <guilabel>Balance
           Information</guilabel>.</para>

          <itemizedlist>
            <listitem>
              <para><guilabel>Balance:</guilabel> The balance to start the account with.</para>
            </listitem>

            <listitem>
              <para><guilabel>Date:</guilabel> The date the opening balance should be recorded.</para>
            </listitem>
          </itemizedlist>

          <para>The next pane is the <guilabel>Transfer Type</guilabel> pane.</para>

          <itemizedlist>
            <listitem>
              <para><guilabel>Use Opening Balances Equity account:</guilabel> This transfers the opening balance
               for the account from a standard Equity account called Opening Balances.</para>
            </listitem>

            <listitem>
              <para><guilabel>Select Transfer Account:</guilabel> This enables the pane below so a different
               account can be used to transfer the opening balance.</para>
            </listitem>
          </itemizedlist>

          <para>The last pane is the <guilabel>Transfer Account</guilabel> pane. Select the account to use for
           opening balances from the list of accounts in this pane.</para>
        </sect2>
      </sect1>

      <sect1 id="acct-edit">
       <title>Editing an Account</title>
        <para>The <guilabel>Edit Account</guilabel> dialog consists of just the <guilabel>General</guilabel> tab. This tab
        has the same information that was described in <xref linkend="acct-create"></xref>.
        To access the <guilabel>Edit Account</guilabel> dialog go to <menuchoice><guimenu>Edit</guimenu>
        <guimenuitem>Edit Account</guimenuitem></menuchoice>
        (menu shortcut <keycombo><keycap>Ctrl</keycap><keycap>E</keycap></keycombo>) or
        click the <guibutton>Edit</guibutton> <emphasis>Toolbar</emphasis> icon in the Account Tree Window.</para>
      </sect1>

      <sect1 id="chart-renumber">
        <title>Renumbering Subaccounts</title>
          <para>Use <guilabel>Renumber Subaccounts</guilabel> to rewrite the account codes for all children of the
           current account.  For example, you have the following account structure:</para>

        <table frame="topbot" id="table-renumber1">
          <title>Starting account numbers.</title>

          <tgroup cols="2">
            <thead>
              <row>
                <entry><para>Code</para></entry>
                <entry><para>Name</para></entry>
              </row>
            </thead>

            <tbody>
              <row>
                <entry><para>10</para></entry>
                <entry><para>Colors</para></entry>
              </row>

              <row>
                <entry><para>10-1</para></entry>
                <entry><para>Red</para></entry>
              </row>

              <row>
                <entry><para>10-2</para></entry>
                <entry><para>Orange</para></entry>
              </row>

              <row>
                <entry><para>10-3</para></entry>
                <entry><para>Yellow.</para></entry>
              </row>

              <row>
                <entry><para>10-4</para></entry>
                <entry><para>Blue</para></entry>
              </row>

              <row>
                <entry><para>10-5</para></entry>
                <entry><para>Violet</para></entry>
              </row>
            </tbody>
          </tgroup>
        </table>

         <para>You now need to add the <quote>Green</quote> account, but you want it to sort between
          the Yellow and Blue accounts.  Instead of having to manually renumber all the
          accounts starting with Blue, you can use the <guilabel>Renumber subaccount</guilabel> command on the
          Colors account.  In the pop-up dialog the prefix value should default to <quote>10</quote>, the
          account code for the colors account.  If you set an interval value of <quote>5</quote> and click
          <guilabel>Renumber</guilabel> you will end up with the following account structure:</para>

        <table frame="topbot" id="table-renumber2">
          <title>Renumbered account numbers</title>

          <tgroup cols="2">
            <thead>
              <row>
                <entry><para>Code</para></entry>
                <entry><para>Name</para></entry>
              </row>
            </thead>

            <tbody>
              <row>
                <entry><para>10</para></entry>
                <entry><para>Colors</para></entry>
              </row>

              <row>
                <entry><para>10-05</para></entry>
                <entry><para>Red</para></entry>
              </row>

              <row>
                <entry><para>10-10</para></entry>
                <entry><para>Orange</para></entry>
              </row>

              <row>
                <entry><para>10-15</para></entry>
                <entry><para>Yellow.</para></entry>
              </row>

              <row>
                <entry><para>10-20</para></entry>
                <entry><para>Blue</para></entry>
              </row>

              <row>
                <entry><para>10-25</para></entry>
                <entry><para>Violet</para></entry>
              </row>
            </tbody>
          </tgroup>
        </table>

        <para>Now you have room in the account code numbering space to add the Green account
         with an account code to force the proper ordering.</para>

        <table frame="topbot" id="table-renumber3">
          <title>Final account numbers.</title>

          <tgroup cols="2">
            <thead>
              <row>
                <entry><para>Code</para></entry>
                <entry><para>Name</para></entry>
              </row>
            </thead>

            <tbody>
              <row>
                <entry><para>10</para></entry>
                <entry><para>Colors</para></entry>
              </row>

              <row>
                <entry><para>10-05</para></entry>
                <entry><para>Red</para></entry>
              </row>

              <row>
                <entry><para>10-10</para></entry>
                <entry><para>Orange</para></entry>
              </row>

              <row>
                <entry><para>10-15</para></entry>
                <entry><para>Yellow.</para></entry>
              </row>

              <row>
                <entry><para>10-18</para></entry>
                <entry><para>Green</para></entry>
              </row>

              <row>
                <entry><para>10-20</para></entry>
                <entry><para>Blue</para></entry>
              </row>

              <row>
                <entry><para>10-25</para></entry>
                <entry><para>Violet</para></entry>
              </row>
            </tbody>
          </tgroup>
        </table>

      </sect1>

      <sect1 id="acct-delete">
        <title>Deleting an Account</title>
        <para></para>
        <para>Deleting an Account means removing all transaction information and information about this
         account from the file. This cannot be undone. You will be prompted to verify that you wish to
         remove the account. If the account still contains transaction information you will be warned that this
         account contains transactions.</para>

        <para>A side effect of removing an account that contains transactions is that you will
         end up with unbalanced accounts. This will be indicated in the account by a gray
         check-box next to the debit and credit amounts. You can automatically repair these
         unbalanced accounts by using the <menuchoice><guimenu>Actions</guimenu><guimenuitem>Check &amp;
         Repair</guimenuitem></menuchoice> menu. This will automatically assign the unbalanced amounts
         to a new account named <emphasis role="bold">Imbalance.
         </emphasis></para>
      </sect1>

      <sect1 id="acct-reconcile">
        <title>Reconciling an Account to a Statement</title>

        <para>Reconciliation of Accounts in <application>&app;</application> with statements from a bank or other
         institution is a way of double checking the accuracy of your (and your banks) transactions and the balance
         of your accounts. It also is useful to track uncleared checks and other outstanding transactions.</para>

      <para>The reconciling process in <application>&app;</application> involves two dialogs: the
      <xref linkend="tool-reconcile" /> dialog followed by the <xref linkend="rec-win" /> window. They provide access
      to various <application>&app;</application> functions to make it easy to enter and update
      account information during the reconciliation.</para>

      <tip>
        <para>The Reconcile window is accessed from the account tree window or the account register window by
        going to <menuchoice><guimenu>Actions</guimenu><guimenuitem>Reconcile...</guimenuitem></menuchoice>
        or using the menu shortcut <keycombo><keycap>Alt</keycap><keycap>A</keycap></keycombo>, <keycap>R</keycap>.</para>
      </tip>

        <para>The <emphasis>Summary Bar</emphasis> at the bottom of the Account Register Window indicates the amounts
         of <guilabel>Present</guilabel> (Balance), <guilabel>Future</guilabel> (Balance), <guilabel>Cleared</guilabel>
         (Transactions), <guilabel>Reconciled</guilabel> (Transactions) and
         <guilabel>Projected Minimum</guilabel>. On-line account information can be used to
         mark which transactions the bank has processed by changing the <guilabel>R</guilabel> (reconciliation status)
         column in the register from <guilabel>n</guilabel> (new) to <guilabel>c</guilabel> (cleared). The bank statement is then used
         with the <guilabel>Reconcile</guilabel> window to reconcile the account which changes the <guilabel>R</guilabel> field to
         <guilabel>y</guilabel> (reconciled).</para>

    <sect2 id="tool-reconcile">
      <title>Reconciling Information</title>

        <para>The <guilabel>Reconcile Information</guilabel> dialog is used to indicate the closing <guilabel>Statement Date</guilabel>
        and the <guilabel>Starting Balance</guilabel> (fixed from last reconciliation) and <guilabel>Ending Balance</guilabel>
        from the statement. The <guilabel>Include Sub-accounts</guilabel> check-box is used if one or more subaccounts are used to track
        the account you are reconciling. The <guibutton>Enter Interest Payment</guibutton> button is used to add a transfer to the
        accounts for an interest payment. If selected a dialog will be displayed to add the
        <xref linkend="tool-ent-int" /> to the account.</para>
        <note>
          <para>The <guibutton>Enter Interest Payment</guibutton> button is shown only if you are reconciling an account of
          <emphasis>Bank</emphasis> type.</para>
        </note>

        <para>When you have entered all relevant data, press <guibutton>Ok</guibutton> to proceed to the
        <xref linkend="rec-win" /> dialog or <guibutton>Cancel</guibutton> to discard the reconciliation process.</para>

        <sect3 id="tool-ent-int">
          <title>Interest Payment</title>
            <para>There are three panes in the <guilabel>Interest Payment</guilabel> dialog. At the bottom is a
            button called <guibutton>No Auto Interest Payments for this Account</guibutton> which will cancel the
            dialog. The top pane contains the <guilabel>Payment Information</guilabel>.</para>

            <itemizedlist>
              <listitem>
                <para><guilabel>Amount:</guilabel> Enter the amount of the interest payment.</para>
              </listitem>

              <listitem>
                <para><guilabel>Date:</guilabel> Select the date for the interest payment.</para>
              </listitem>

                <listitem>
                  <para><guilabel>Num:</guilabel> Enter a number for the transaction (optional).</para>
                </listitem>

                <listitem>
                  <para><guilabel>Description:</guilabel> Enter an informational description for the transaction.</para>
                </listitem>

                <listitem>
                  <para><guilabel>Memo:</guilabel> Enter a note about the transaction (optional).</para>
                </listitem>
              </itemizedlist>


            <para>The <guilabel>Reconcile Account</guilabel> pane highlights in the tree the account that the
            interest payment will be transferred to or from.</para>

            <para>The <guilabel>Payment From</guilabel> pane contains a list of accounts where you can select the source
            account.</para>

            <note>
              <para>If the payment is for a credit or loan account then usually the payment would be from an
              <emphasis>Expense</emphasis> account. If the payment is for a checking or savings account then
              usually this would be from an <emphasis>Income</emphasis> account.</para>
            </note>

	    <tip>
              <para>The <guibutton>Show Income/Expense</guibutton> check-box shows or hides the
              <emphasis>Income</emphasis> and <emphasis>Expense</emphasis> accounts.</para>
            </tip>

            <para>Select <guibutton>OK</guibutton> to enter the interest transaction (or <guibutton>Cancel</guibutton>
            the payment) and return to the initial reconciliation screen.</para>

          </sect3>

        </sect2>

        <sect2 id="rec-win">
          <title>Reconcile</title>
          <note>
            <para>For a detailed description of menu items and buttons on the reconcile window, see
            <xref linkend="rcn-menu" />.</para>
          </note>

          <para>The <guilabel>Reconcile</guilabel> dialog is where the actual process of matching your statement
          to <application>&app;</application> data takes place on a per transaction basis.</para>
          <para>The <guilabel>Reconcile</guilabel> dialog is composed of a <emphasis>toolbar</emphasis> and three
          panes; <guilabel>Funds In</guilabel> on the left, <guilabel>Funds out</guilabel> on the right and a balance pane.</para>

          <note>
            <para>If you enabled the option <guilabel>Use formal accounting labels</guilabel> in the
            <guilabel>Accounts</guilabel> section of the <application>&app;</application> preferences,
            you will see <guilabel>Debits</guilabel> and <guilabel>Credits</guilabel> panes instead of
            <guilabel>Funds In</guilabel> and <guilabel>Funds Out</guilabel> panes.</para>
          </note>

          <para>The <guilabel>Funds In</guilabel> and <guilabel>Funds Out</guilabel> pane shows all unreconciled
          deposits to the account. Both panes are composed of five columns.</para>

          <tip>
            <para>To order the listed transactions with a preferred criteria, click on the relevant column header.
            To reverse the selected order click a second time on the column header.</para>
          </tip>

          <variablelist>
            <varlistentry>
              <term><guilabel>Date</guilabel></term>
              <listitem>
                <para>The date of the unreconciled transaction.</para>
              </listitem>
            </varlistentry>

            <varlistentry>
              <term><guilabel>Num</guilabel></term>
              <listitem>
                <para>The number of the unreconciled transaction.</para>
              </listitem>
            </varlistentry>

            <varlistentry>
              <term><guilabel>Description</guilabel></term>
              <listitem>
                <para>The Description of the unreconciled
                transaction.</para>
              </listitem>
            </varlistentry>

            <varlistentry>
              <term><guilabel>Amount</guilabel></term>
            <listitem>
              <para>The Amount of the unreconciled transaction.</para>
            </listitem>
            </varlistentry>

            <varlistentry>
              <term><guilabel>R</guilabel></term>
              <listitem>
                <para>Shows a check if the transaction will be
                reconciled when done.</para>
              </listitem>
            </varlistentry>
          </variablelist>

          <para>To mark a transaction as reconciled just click on it and a checkmark will appear
          on the relevant <guilabel>R</guilabel> column.</para>

     <tip>
       <para>You can check or uncheck the reconcile status of all transactions in 
       either pane by clicking on a transaction in the required pane then clicking 
       <keycap>Ctrl-A</keycap> followed by <keycap>space</keycap>. This will toggle 
       the reconcile status of all transactions in the pane to either checked or 
       unchecked state. This procedure can be repeated to achieve the desired status 
       for the transactions in the pane.</para>
     </tip>

          <note>
            <para>Under each pane a <guilabel>Total</guilabel> for
            reconciled transactions is shown.</para>
          </note>

          <para>The balance pane shows a summary of the balances used in
          reconciliation.</para>

          <variablelist>
            <varlistentry>
              <term><guilabel>Statement Date</guilabel></term>
              <listitem>
                <para>The date on the statement set on the <xref linkend="tool-reconcile" />.</para>
              </listitem>
            </varlistentry>

            <varlistentry>
              <term><guilabel>Starting Balance</guilabel></term>
              <listitem>
                <para>The balance at the end of the last reconciliation.</para>
              </listitem>
            </varlistentry>

            <varlistentry>
              <term><guilabel>Ending Balance</guilabel></term>
              <listitem>
                <para>The balance entered from the statement.</para>
              </listitem>
            </varlistentry>

            <varlistentry>
              <term><guilabel>Reconciled Balance</guilabel></term>
              <listitem>
                <para>The balance of selected transactions.</para>
              </listitem>
            </varlistentry>

            <varlistentry>
              <term><guilabel>Difference</guilabel></term>
              <listitem>
                <para>The difference between the <guilabel>Reconciled</guilabel> and
                <guilabel>Ending</guilabel> balances.</para>
              </listitem>
            </varlistentry>
          </variablelist>

          <para>The set of unreconciled transactions in the <guilabel>Funds In</guilabel> and <guilabel>Funds Out</guilabel> panes can
          be changed by using the menus and <emphasis>Toolbar</emphasis> to access the account and transaction
          information. You can create a <guibutton>New</guibutton> transaction, <guibutton>Edit</guibutton> a selected transaction,
          add a <guilabel>Balance</guilabel> transaction (of the same amount as listed under <guilabel>Difference</guilabel> in the balance pane),
          and delete the selected transaction.</para>

          <tip>
            <para>To modify a listed transaction, double click on it.</para>
          </tip>

	  <para>By pressing the <guilabel>Open</guilabel> icon the register of the account to reconcile will be opened.</para>

	  <para>If you wish to postpone the reconciliation until later use the
          <menuchoice><guimenu>Reconcile</guimenu><guimenuitem>Postpone</guimenuitem></menuchoice>
          menu item (menu shortcut <keycombo><keycap>Ctrl</keycap><keycap>P</keycap></keycombo>) or pressing the
          <guibutton>Postpone</guibutton> icon. If you wish to cancel the reconciliation use the
          <menuchoice><guimenu>Reconcile</guimenu><guimenuitem>Cancel</guimenuitem></menuchoice> menu item or press the
          <guibutton>Cancel</guibutton> icon.</para>

	  <para>All previous commands are also available in the <guilabel>Reconcile</guilabel> dialog menu.</para>

          <para>Select each unreconciled transaction matching a transaction on the statement so a
          green tick appears in the <guilabel>R</guilabel> column. The <guilabel>Balance</guilabel> pane changes to reflect each
          selected transaction until the <guilabel>Ending Balance</guilabel> <emphasis>equals</emphasis>
          the <guilabel>Reconciled Balance</guilabel> and the <guilabel>Difference</guilabel> is <emphasis>zero</emphasis>.
          Once this is done select the <guibutton>Finish</guibutton> button or
          <menuchoice><guimenu>Reconcile</guimenu><guimenuitem>Finish</guimenuitem></menuchoice>
          (menu shortcut <keycombo><keycap>Ctrl</keycap><keycap>F</keycap></keycombo>) to finish the reconcile process.</para>
        </sect2>

   </sect1>

</chapter>

