<!--
      (Do not remove this comment block.)
  Version: 2.2.1
  Last modified: September 26, 2010
  Maintainers: 
                Tom Bullock  <tbullock@nd.edu> 
               Chris Lyttle  <chris@wilddev.net>
  Authors:
  		      Jon Lapham <lapham@extracta.com.br>
  	Updated	Bengt Thuree <bengt@thuree.com>
Originally written by Carol Champagne.
Translators:
       (translators put your name and email here)
-->
<chapter id="chapter_accts">
  <title>Accounts</title>

  <para>This chapter will discuss some useful concepts for organizing your
  accounts. Since &app; does not impose any specific account tree layout,
  you are free to design your account structure in any manner you wish.
  However, there are a few basic accounting concepts which you will probably
  want to follow when designing your accounts to maximize their
  utility.</para>

  <sect1 id="accts-concepts1">
    <title>Basic Accounting Concepts</title>

    <para>As we saw in the previous chapter, accounting is based on 5 basic
    account types: <guilabel>Assets</guilabel>,
    <guilabel>Liabilities</guilabel>, <guilabel>Equity</guilabel>,
    <guilabel>Income</guilabel> and <guilabel>Expenses</guilabel>. We will now
    expand on our understanding of these account types, and show how they are
    represented in &app;. But first, let's divide them into 2 groups, the
    balance sheet accounts and the income and expense accounts.</para>

    <para>Let's have a quick look at the Accounting Equation (<emphasis>Assets
    - Liabilities = Equity + (Income - Expenses)</emphasis>) again as a
    reminder, before we go deeper into each account type.</para>

    <screenshot id="accts-AccountRelationships">
      <mediaobject>
        <imageobject>
          <imagedata fileref="figures/basics_AccountRelationships.png"
                     format="PNG" srccredit="Jon Lapham" ></imagedata>
        </imageobject>

        <textobject>
          <phrase>The basic accounts relationships</phrase>
        </textobject>

        <caption>
          <para>A graphical view of the relationship between the 5 basic
          accounts. Net worth (equity) increases through income and decreases
          through expenses. The arrows represent the movement of value.</para>
        </caption>
      </mediaobject>
    </screenshot>

    <sect2 id="accts-bsa2">
      <title>Balance Sheet Accounts</title>

      <para>The three so-called <emphasis>Balance Sheet Accounts</emphasis>
      are <guilabel>Assets</guilabel>, <guilabel>Liabilities</guilabel>, and
      <guilabel>Equity</guilabel>. Balance Sheet Accounts are used to track
      the changes in value of things you own or owe.</para>

      <para><guilabel>Assets</guilabel> is the group of things that you own.
      Your assets could include a car, cash, a house, stocks, or anything else
      that has convertible value. Convertible value means that theoretically
      you could sell the item for cash.</para>

      <para><guilabel>Liabilities</guilabel> is the group of things on which
      you owe money. Your liabilities could include a car loan, a student
      loan, a mortgage, your investment margin account, or anything else which
      you must pay back at some time.</para>

      <para><guilabel>Equity</guilabel> is the same as "net worth." It
      represents what is left over after you subtract your liabilities from
      your assets. It can be thought of as the portion of your assets that you
      own outright, without any debt.</para>
    </sect2>

    <sect2 id="accts-ie2">
      <title>Income and Expense Accounts</title>

      <para>The two <guilabel>Income and Expense Accounts</guilabel> are used
      to increase or decrease the value of your accounts. Thus, while the
      balance sheet accounts simply <emphasis>track</emphasis> the value of
      the things you own or owe, income and expense accounts allow you to
      <emphasis>change</emphasis> the value of these accounts.</para>

      <para><guilabel>Income</guilabel> is the payment you receive for your
      time, services you provide, or the use of your money. When you receive a
      paycheck, for example, that check is a payment for labor you provided to
      an employer. Other examples of income include commissions, tips,
      dividend income from stocks, and interest income from bank accounts.
      Income will always increase the value of your Assets and thus your
      Equity.</para>

      <para><guilabel>Expenses</guilabel> refer to money you spend to purchase
      goods or services provided by someone else. Examples of expenses are a
      meal at a restaurant, rent, groceries, gas for your car, or tickets to
      see a play. Expenses will always decrease your Equity. If you pay for
      the expense immediately, you will decrease your Assets, whereas if you
      pay for the expense on credit you increase your Liabilities.</para>
    </sect2>
  </sect1>

  <sect1 id="accts-types1">
    <title>&app; Accounts</title>

    <para>This section will show how the &app; definition of an account fits
    into the view of the 5 basic accounting types.</para>

    <para>But first, let's begin with a definition of an
    <guilabel>account</guilabel> in &app;. A &app;
    <guilabel>account</guilabel> is an entity which contains other
    sub-accounts, or that contains <guilabel>transactions</guilabel>. Since an
    account can contain other accounts, you often see <guilabel>account
    trees</guilabel> in &app;, in which logically associated accounts reside
    within a common parent account.</para>

    <para>A &app; account must have a unique name (that you assign) and one
    of the predefined &app; "account types". There are a total of 12 account
    types in &app;. These 12 account types are based on the 5 basic
    accounting types; the reason there are more &app; account types than
    basic accounting types is that this allows &app; to perform specialized
    tracking and handling of certain accounts. There are 6 asset accounts
    (<emphasis>Cash</emphasis>, <emphasis>Bank</emphasis>,
    <emphasis>Stock</emphasis>, <emphasis>Mutual Fund</emphasis>,
    <emphasis>Accounts Receivable</emphasis>, and <emphasis>Other Assets</emphasis>
    ), 3 liability accounts (<emphasis>Credit Card</emphasis>,
    <emphasis>Accounts Payable</emphasis>, and <emphasis>Liability</emphasis>,
    ), 1 equity account (<emphasis>Equity</emphasis>), 1 income account
    (<emphasis>Income</emphasis>), and 1 expense account
    (<emphasis>Expense</emphasis>).</para>

      <para><emphasis>Please Note:</emphasis> For all &app; asset accounts, a 
      <emphasis>debit</emphasis> (left-column value entry) increases the account 
      balance and a <emphasis>credit</emphasis> (right-column value entry) 
      decreases the balance.</para>
      
    <para>These &app; account types are presented in more detail
    below.</para>

    <sect2 id="accts-gc-bsa2">
      <title>Balance Sheet Accounts</title>

      <para>The first balance sheet account we will examine is
      <emphasis>Assets</emphasis>, which, as you remember from the previous
      section, refers to things you own.</para>

      <para>To help you organize your asset accounts and to simplify
      transaction entry, &app; supports several types of asset
      accounts:</para>

      <orderedlist>
        <listitem>
          <para><guilabel>Cash</guilabel> Use this account to track the money
          you have on hand, in your wallet, in your piggy bank, under your
          mattress, or wherever you choose to keep it handy. This is the most
          <emphasis>liquid</emphasis>, or easily traded, type of asset.</para>
        </listitem>

        <listitem>
          <para><guilabel>Bank</guilabel> This account is used to track your
          cash balance that you keep in institutions such as banks, credit
          unions, savings and loan, or brokerage firms - wherever someone else
          safeguards your money. This is the second most
          <emphasis>liquid</emphasis> type of account, because you can easily
          convert it to cash on hand.</para>
        </listitem>

        <listitem>
          <para><guilabel>Stock</guilabel> Track your individual stocks and
          bonds using this type of account. The stock account's register
          provides extra columns for entering number of shares and price of
          your investment. With these types of assets, you may not be able to
          easily convert them to cash unless you can find a buyer, and you are
          not guaranteed to get the same amount of cash you paid for
          them.</para>
        </listitem>

        <listitem>
          <para><guilabel>Mutual Fund</guilabel> This is similar to the stock
          account, except that it is used to track funds. Its account register
          provides the same extra columns for entering share and price
          information. Funds represent ownership shares of a variety of
          investments, and like stocks they do not offer any guaranteed cash
          value.</para>
        </listitem>

        <listitem>
          <para><guilabel>Accounts Receivable</guilabel> (A/Receivable) This
          is typically a business use only account in which you place
          outstanding debts owed to you. It is considered an asset because you
          should be able to count on these funds arriving.</para>
        </listitem>

        <listitem>
          <para><guilabel>Other Assets</guilabel> No matter how diverse they 
          are, GnuCash handles many other situations easily.  The group 
          category, "Other Assets", covers all assets not listed above.</para>
          
          <para>Accounts are repositories of information used to track or record
          the kinds of actions that occur related to the purpose for which the 
          account is established.</para>
            
          <para>For businesses, activities being tracked and reported are 
          frequently subdivided more finely than what has been considered thus 
          far.  For a more developed treatment of the possibilities, please read
          the descriptions presented in 
          <xref linkend="chapter_other_assets" /> of this Guide.</para>
          
          <para>For personal finances a person can follow the business groupings 
          or not, as they seem useful to the activities the person is tracking 
          and to the kind of reporting that person needs to have to manage his 
          financial assets.  For additional information, consult 
          <xref linkend="chapter_other_assets" /> of this Guide.</para>
        </listitem>
      </orderedlist>

      <para>The second balance sheet account is
      <emphasis>Liabilities</emphasis>, which as you recall, refers to what
      you owe, money you have borrowed and are obligated to pay back some day.
      These represent the rights of your lenders to obtain repayment from you.
      Tracking the liability balances lets you know how much debt you have at
      a given point in time.</para>

      <para>&app; offers three liability account types:</para>

      <orderedlist>
        <listitem>
          <para><guilabel>Credit Card</guilabel> Use this to track your credit
          card receipts and reconcile your credit card statements. Credit
          cards represent a short-term loan that you are obligated to repay to
          the credit card company. This type of account can also be used for
          other short-term loans such as a line of credit from your
          bank.</para>
        </listitem>

        <listitem>
          <para><guilabel>Accounts Payable</guilabel> (A/Payable) This is
          typically a business use only account in which you place bills you
          have yet to pay.</para>
        </listitem>

        <listitem>
          <para><guilabel>Liability</guilabel> Use this type of account for
          all other loans, generally larger long-term loans such as a mortgage
          or vehicle loan. This account can help you keep track of how much
          you owe and how much you have already repaid.</para>
        </listitem>
      </orderedlist>

      <tip>
        <para>Liabilities in accounting act in an opposite manner from assets:
        <emphasis>credits</emphasis> (right-column value entries) increase
        liability account balances and <emphasis>debits</emphasis>
        (left-column value entries) decrease them. (See note later in this
        chapter)</para>
      </tip>

      <para>The final balance sheet account is <emphasis>Equity</emphasis>,
      which is synonymous with "net worth". It represents what is left over
      after you subtract your liabilities from your assets, so it is the
      portion of your assets that you own outright, without any debt. In
      &app;, use this type of account as the source of your opening bank
      balances, because these balances represent your beginning net
      worth.</para>

      <para>There is only a single &app; equity account, called naturally
      enough, <guilabel>Equity</guilabel>.</para>

      <tip>
        <para>In equity accounts, credits increase account balances and debits
        decrease them. (See note later in this chapter)</para>
      </tip>

      <note>
        <para>The accounting equation that links balance-sheet accounts is
        Assets = Liabilities + Equity or rearranged Assets - Liabilities =
        Equity. So, in common terms, the <emphasis>things you own</emphasis>
        minus the <emphasis>things you owe</emphasis> equals your
        <emphasis>net worth</emphasis>.</para>
      </note>
    </sect2>

    <sect2 id="accts-gc-ie2">
      <title>Income and Expense Accounts</title>

      <para><emphasis>Income</emphasis> is the payment you receive for your
      time, services you provide, or the use of your money. In &app;, use an
      <guilabel>Income</guilabel> type account to track these.</para>

      <tip>
        <para>Credits increase income account balances and debits decrease
        them. As described in <xref linkend="basics-accounting1"></xref>, 
        credits represent money transferred
        <emphasis>from</emphasis> an account. So in these special income
        accounts, when you transfer money <emphasis>from</emphasis> (credit)
        the income account to another account, the balance of the income
        account <emphasis>increases</emphasis>. For example, when you deposit
        a paycheck and record the transaction as a transfer from an income
        account to a bank account, the balances of both accounts
        increase.</para>
      </tip>

      <para><emphasis>Expenses</emphasis> refer to money you spend to purchase
      goods or services provided by someone else. In &app;, use an
      <guilabel>Expense</guilabel> type account to track your expenses.</para>

      <tip>
        <para>Debits increase expense account balances and credits decrease
        them. (See note later in this chapter.)</para>
      </tip>

      <note>
        <para>When you subtract total expenses from total income for a time
        period, you get net income. This net income is then added to the
        balance sheet as retained earnings, which is a type of
        <guilabel>Equity</guilabel> account.</para>
      </note>

      <para>Below are the standard <guilabel>Income</guilabel> and
      <guilabel>Expense</guilabel> accounts after selecting <guilabel>Common
      Accounts</guilabel> in the Druid for creating a new Account Hierarchy
      (<guimenu>File -&gt; New -&gt; New Account Hierarchy</guimenu>).</para>
      
      <screenshot id="accts-DefaultIncomeAccounts">
          <mediaobject>
            <imageobject>
              <imagedata fileref="figures/accts_DefaultIncomeAccounts.png"
                         format="PNG" srccredit="Bengt Thuree" ></imagedata>
            </imageobject>

            <textobject>
              <phrase>Default income accounts</phrase>
            </textobject>

            <caption>
              <para>This image shows the standard <guilabel>income</guilabel>
              accounts</para>
            </caption>
          </mediaobject>
        </screenshot> 
        <screenshot id="accts-DefaultExpenseAccounts">
          <mediaobject>
            <imageobject>
              <imagedata fileref="figures/accts_DefaultExpenseAccounts.png"
                         format="PNG" srccredit="Bengt Thuree" ></imagedata>
            </imageobject>

            <textobject>
              <phrase>Some default expense accounts</phrase>
            </textobject>

            <caption>
              <para>This image shows some standard <guilabel>expense</guilabel>
              accounts</para>
            </caption>
          </mediaobject>
        </screenshot>

      <note> <!-- <sidebar> -->
        <title>More on Debits and Credits</title>

        <para>Remember the terms debit and credit discussed in 
        <xref linkend="basics-accounting1"></xref>?
        Contrary to popular belief and even some dictionary definitions,
        accounting debits and credits do not mean decrease and increase. The
        only constant definition of debits and credits is that debits are
        left-column entries and credits are right-column entries. In fact,
        debits and credits each increase certain types of accounts and
        decrease others. In asset and expense type accounts, debits increase
        the balance and credits decrease the balance. In liability, equity and
        income type accounts, credits increase the balance and debits decrease
        the balance.</para>

        <para>For example, debits <emphasis>increase</emphasis> your bank
        account balance and credits <emphasis>decrease</emphasis> your bank
        account balance. Wait a minute, you might say, a
        <emphasis>debit</emphasis> card <emphasis>decreases</emphasis> the
        balance in my checking account, because I take money out of it. And
        when the bank gives me money back on something, they
        <emphasis>credit</emphasis> my account. So why is this reversed in
        accounting?</para>

        <para>Banks report transactions from <emphasis>their</emphasis>
        perspective, not yours. Their perspective is exactly opposite to
        yours. To you, your bank account represents an asset, something you
        own. To the bank, your bank account represents a loan, or liability,
        because they owe you that money. As explained in this chapter, asset
        and liability accounts are exact opposites in the way they behave. In
        a liability account, debits <emphasis>decrease</emphasis> the balance
        and credits <emphasis>increase</emphasis> the balance.</para>

        <para>When you take money out of your bank account, the balance in
        your account decreases. To you, this is a decrease in an asset, so you
        <emphasis>credit</emphasis> your bank account. To the bank, this is a
        decrease in a liability, so they <emphasis>debit</emphasis> your bank
        account.</para>
      </note> <!-- </sidebar> -->
      
    </sect2>
  </sect1>

  <sect1 id="accts-examples1">
    <title>Putting It All Together</title>

    <para>Let's go through the process of building a common personal finance
    <emphasis>chart of accounts</emphasis> using the information we have
    learned from this chapter. A chart of accounts is simply a new &app;
    file in which you group your accounts to track your finances. In building
    this chart of accounts, the first task is to divide the items you want to
    track into the basic account types of accounting. This is fairly simple,
    let's go through an example.</para>

    <sect2 id="accts-examples-situation2">
      <title>Simple Example</title>

      <para>Let us assume you have a checking and a savings account at a bank,
      and are employed and thus receive a paycheck. You have a credit card
      (Visa), and you pay monthly utilities in the form of rent, phone, and
      electricity. Naturally, you also need to buy groceries. For now, we will
      not worry about how much money you have in the bank, how much you owe on
      the credit card, etc. We want to simply build the framework for this
      chart of accounts.</para>

      <para>Your <guilabel>assets</guilabel> would be the bank savings and
      checking account. Your <guilabel>liabilities</guilabel> are the credit
      card. Your <guilabel>Equity</guilabel> would be the starting values of
      your bank accounts and credit card (we do not have those amounts yet,
      but we know they exist). You have <guilabel>income</guilabel> in the
      form of a salary, and <guilabel>expenses</guilabel> in the form of
      groceries, rent, electricity, phone, and taxes (Federal, Social
      Security, Medicare) on your salary.</para>
    </sect2>

    <sect2 id="accts-examples-toplevel2">
      <title>The Basic Top Level Accounts</title>

      <para>Now, you must decide how you want to group these accounts. Most
      likely, you want your assets grouped together, your liabilities grouped
      together, your Equity grouped together, your income grouped together,
      and your expenses grouped together. This is the most common way of
      building a &app; chart of accounts, and it is highly recommended that
      you always begin this way.</para>

      <para>Start with a clean &app; file (do not select any predefined
      accounts) and build this basic starting account structure
      (<guilabel>File</guilabel> -&gt; <guilabel>New
      Account...</guilabel>).</para>

      <orderedlist>
        <listitem>
          <para>Account name <guilabel>Assets</guilabel> (account type
          <guilabel>Assets</guilabel>, parent account <guilabel>New top level
          account</guilabel>)</para>

          <screenshot id="accts-CreateAssetsAccounts">
              <mediaobject>
                <imageobject>
                  <imagedata fileref="figures/accts_CreateAssetsAccount.png"
                             format="PNG" srccredit="Bengt Thuree" ></imagedata>
                </imageobject>

                <textobject>
                  <phrase>Creating an Assets account</phrase>
                </textobject>

                <caption>
                  <para>This image shows the dialog to create an asset
                  <guilabel>account</guilabel></para>
                </caption>
              </mediaobject>
            </screenshot>
        </listitem>

        <listitem>
          <para>Account name <guilabel>Liabilities</guilabel> (account type
          <guilabel>Liabilities</guilabel>, parent account <guilabel>New top
          level account</guilabel>)</para>
        </listitem>

        <listitem>
          <para>Account name <guilabel>Equity</guilabel> (account type
          <guilabel>Equity</guilabel>, parent account <guilabel>New top level
          account</guilabel>)</para>
        </listitem>

        <listitem>
          <para>Account name <guilabel>Income</guilabel> (account type
          <guilabel>Income</guilabel>, parent account <guilabel>New top level
          account</guilabel>)</para>
        </listitem>

        <listitem>
          <para>Account name <guilabel>Expenses</guilabel> (account type
          <guilabel>Expenses</guilabel>, parent account <guilabel>New top
          level account</guilabel>)</para>
        </listitem>
      </orderedlist>

      <para>When you have created the top-level accounts, the main Account page
      in &app; should look like below</para>

      <screenshot id="accts-toplevel">
        <mediaobject>
          <imageobject>
            <imagedata fileref="figures/accts_toplevel.png" format="PNG"
                       srccredit="Bengt Thuree" ></imagedata>
          </imageobject>

          <textobject>
            <phrase>The Basic Top-level Accounts</phrase>
          </textobject>

          <caption>
            <para>This image shows the basic top-level accounts.</para>
          </caption>
        </mediaobject>
      </screenshot>
    </sect2>

    <sect2 id="accts-examples-organization2">
      <title>Making Sub-Accounts</title>

      <para>You can now add to this basic top-level tree structure by inserting
      some real transaction-holding sub-accounts. Notice that the tax accounts
      are placed within a sub-account named "Taxes". You can make sub-accounts
      within sub-accounts. This is typically done with a group of related
      accounts (such as tax accounts in this example). <orderedlist>
          <listitem>
            <para>Account name <guilabel>Checking</guilabel> (account type
            <guilabel>Bank</guilabel>, parent account
            <guilabel>Asset</guilabel>)</para>
          </listitem>

          <listitem>
            <para>Account name <guilabel>Savings</guilabel> (account type
            <guilabel>Bank</guilabel>, parent account
            <guilabel>Asset</guilabel>)</para>
          </listitem>

          <listitem>
            <para>Account name <guilabel>Visa</guilabel> (account type
            <guilabel>Credit Card</guilabel>, parent account
            <guilabel>Liabilities</guilabel>)</para>
          </listitem>

          <listitem>
            <para>Account name <guilabel>Salary</guilabel> (account type
            <guilabel>Income</guilabel>, parent account
            <guilabel>Income</guilabel>)</para>
          </listitem>

          <listitem>
            <para>Account name <guilabel>Phone</guilabel> (account type
            <guilabel>Expenses</guilabel>, parent account
            <guilabel>Expenses</guilabel>)</para>
          </listitem>

          <listitem>
            <para>Account name <guilabel>Electricity</guilabel> (account type
            <guilabel>Expenses</guilabel>, parent account
            <guilabel>Expenses</guilabel>)</para>
          </listitem>

          <listitem>
            <para>Account name <guilabel>Rent</guilabel> (account type
            <guilabel>Expenses</guilabel>, parent account
            <guilabel>Expenses</guilabel>)</para>
          </listitem>

          <listitem>
            <para>Account name <guilabel>Groceries</guilabel> (account type
            <guilabel>Expenses</guilabel>, parent account
            <guilabel>Expenses</guilabel>)</para>
          </listitem>

          <listitem>
            <para>Account name <guilabel>Taxes</guilabel> (account type
            <guilabel>Expenses</guilabel>, parent account
            <guilabel>Expenses</guilabel>)</para>
          </listitem>

          <listitem>
            <para>Account name <guilabel>Federal</guilabel> (account type
            <guilabel>Expenses</guilabel>, parent account
            <guilabel>Expenses:Taxes</guilabel>)</para>
          </listitem>

          <listitem>
            <para>Account name <guilabel>Social Security</guilabel> (account
            type <guilabel>Expenses</guilabel>, parent account
            <guilabel>Expenses:Taxes</guilabel>)</para>
          </listitem>

          <listitem>
            <para>Account name <guilabel>Medicare</guilabel> (account type
            <guilabel>Expenses</guilabel>, parent account
            <guilabel>Expenses:Taxes</guilabel>)</para>
          </listitem>

          <listitem>
            <para>Account name <guilabel>Opening Balance</guilabel> (account
            type <guilabel>Equity</guilabel>, parent account
            <guilabel>Equity</guilabel>)</para>
          </listitem>
        </orderedlist></para>

      <para>After you have created these additional sub-accounts, the end
      result should look like below</para>

      <screenshot id="accts-tree">
        <mediaobject>
          <imageobject>
            <imagedata fileref="figures/accts_tree.png" format="PNG"
                       srccredit="Bengt Thuree" ></imagedata>
          </imageobject>

          <textobject>
            <phrase>The Basic Chart of Accounts</phrase>
          </textobject>

          <caption>
            <para>This image shows a simple chart of accounts.</para>
          </caption>
        </mediaobject>
      </screenshot>

      <para>Save this chart of accounts with the name
      <filename>gcashdata_3</filename>, as well as <filename>gcashdata_3emptyAccts</filename>,
      as we will continue to use them in the later chapters.</para>

      <para>You have now created a chart of accounts to track a simple
      household budget. With this basic framework in place, we can now begin
      to populate the accounts with transactions. The next chapter will cover
      this subject in greater detail.</para>
    </sect2>
  </sect1>
</chapter>
