<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter SYSTEM "gnc-docbookx.dtd">

<!--
      (Do not remove this comment block.)
  Version: 1.0.0
  Last modified: Sep 19th 2015
  Maintainers:
               Chris Good <chris.good@ozemail.com.au>
  Author:
  		Chris Good <chris.good@ozemail.com.au>
	updated [FirstName LastName] <name@company.com>
  Translators:
               (translators put your name and email here)
-->

<chapter id="chapter_bus_features">
  <title>Business Features</title>
  <sect1 id="bus-intro">
      <title>Introduction to Business Features</title>
      <para>The accounting needs of a business are quite different from that of
      a person. Businesses have customers that owe money, vendors which are owed
      money, employee payroll, more complex tax laws, etc. &app; offers
      business oriented features to facilitate these needs.</para>

      <para><emphasis>Accounts Receivable</emphasis> (A/R) are used by businesses to record sales for
        which they are not immediately paid. This is represented on the balance sheet as an asset,
        because the expectation is that you will receive payment soon.
      </para>

      <para><emphasis>Accounts Payable</emphasis> (A/P) record bills that businesses have received, but may not pay until later.
        This is represented on the balance sheet as a liability because you will have to pay for them.
      </para>

      <para>A/R and A/P accounts are used primarily when you have a lot of bills and receipts
        flowing in and out, and do not want to lose track of them just because you
        do not pay or get paid right away. For most home users, A/R and A/P are
        too complicated to be worthwhile.
      </para>
    </sect1>
  <sect1 id="bus_setup">
    <title>Business Setup</title>

    <para>To set up &app; to handle accounts receivable or accounts payable
      for a company, these preliminary steps must be done.
      <itemizedlist>
        <listitem><para>Build an appropriate Account Hierarchy.</para></listitem>
        <listitem><para>Set up Sales Tax Tables.</para></listitem>
        <listitem><para>Enter the company information in &app;.</para></listitem>
        <listitem><para>Set Business Preferences.</para></listitem>
        <listitem><para>Set up Billing Terms.</para></listitem>
      </itemizedlist>
    </para>

    <sect2 id="bus-setupacct">
      <title>Account Setup</title>

      <para>There are many different ways to set up a business account
      hierarchy. You can start with the Business Accounts setup which is
      available from the New Account Hierarchy assistant, or you could build one
      manually. To access the prebuilt Business Accounts, start &app; and
      click on <menuchoice><guimenu>File</guimenu><guimenuitem>New File</guimenuitem></menuchoice> and
      proceed until you see the list of available accounts, select Business
      Accounts.</para>

      <para>The prebuilt Business Account hierarchy will not meet your needs
      exactly. You will need make adjustments to the hierarchy so that it will
      meet your particular needs. It should be close enough, however, that it
      is recommended you begin with it.</para>

      <para>To use &app;&rsquo;s integrated accounts
        receivable system, you must first set up a special account (usually a
        sub-account under Assets) to hold transactions for receivables. This account
        must be defined with account type <emphasis>A/Receivable</emphasis>.
        &app; will use this account to place transactions
        related to the integrated accounts receivable system.
      </para>

      <para>To use &app;&rsquo;s integrated accounts
        payable system, you must first set up an account (usually a
        sub-account under Liabilities) to hold transactions for payables.
        This account must be defined with account type <emphasis>A/Payable</emphasis>.
        &app; will use this account to place transactions
        related to the integrated accounts payable system.
      </para>

      <literallayout>
Basic A/R and A/P Account Hierarchy:

-Assets
   -Accounts Receivable
   -Checking
-Expenses
  ...(as required)
-Income
   -Sales
-Liabilities
  -Accounts Payable
  -Tax
      -Tax on Purchases
      -Tax on Sales
  </literallayout>

      <para>You need to add additional accounts to this hierarchy for it to be useful.</para>

      <note>
        <para>You do not need to create an individual A/R account for each
          customer. &app; keeps track of customers internally and provides
          per-customer reports based on the internal tracking. The same applies to A/P and vendors.
        </para>
      </note>
      <note>
        <para>
          If you deal with customers in more than one currency you will need a separate
          <guilabel>Accounts Receivable</guilabel> account <emphasis>for each currency</emphasis>.
        </para>

        <para>
          If you deal with vendors in more than one currency you will need a separate
          <guilabel>Accounts Payable</guilabel> account <emphasis>for each currency</emphasis>.
        </para>
      </note>
      <note>
        <para>Transactions involving an Accounts Receivable or Accounts Payable account should not be
          added, changed or deleted in any way other than by using Post/Unpost 
          Bill/Invoice/Voucher or Process Payment!
        </para>
      </note>
    </sect2>

    <sect2 id="bus-setuptaxtables">
      <title>Setting up Sales Tax Tables</title>

      <para>Sales Tax Tables can used to determine the tax for customer invoices (or vendor bills).
      </para>

      <para> A tax table entry can be assigned to an invoice line or bill line.</para>

      <para>Set up distinct tax tables for customers and vendors.</para>

      <para>The default invoice tax table entry can be assigned to each customer and the default bill
        tax table entry can be assigned to each vendor.
      </para>

      <para>The default tax table entry for new customers or new vendors can be specified in the <emphasis>Book Options</emphasis>
        window which can be accessed by
        <menuchoice><guimenu>File</guimenu>
          <guisubmenu>Properties</guisubmenu>
          <guimenuitem>Business tab.</guimenuitem>
        </menuchoice>
      </para>

      <para>Sales Tax Tables are maintained using the <emphasis>Sales Tax Table</emphasis> editor which is accessed via menu
        <menuchoice><guimenu>Business</guimenu><guimenuitem>Sales Tax Table</guimenuitem></menuchoice>.
      </para>

      <figure>
        <title>Sales Tax Tables Editor</title>
        <screenshot id="bus-taxmain">
          <mediaobject>
            <imageobject role="html">
              <imagedata fileref="figures/bus_tax_main.png" format="PNG"
                         srccredit="Chris Good" width="510px" />
            </imageobject>
            <imageobject role="fo">
              <imagedata fileref="figures/bus_tax_main.png" format="PNG"
                        srccredit="Chris Good" />
            </imageobject>

            <textobject>
              <phrase>Sales Tax Tables Editor</phrase>
            </textobject>
          </mediaobject>
        </screenshot>
      </figure>

      <figure>
        <title>New Sales Tax Table Entry</title>
        <screenshot id="bus-taxnew">
          <mediaobject>
            <imageobject>
              <imagedata fileref="figures/bus_tax_new.png" format="PNG"
                         srccredit="Chris Good" />
            </imageobject>

            <textobject>
              <phrase>New Sales Tax Table Entry</phrase>
            </textobject>
          </mediaobject>
        </screenshot>
      </figure>

      <itemizedlist>
        <listitem>
          <para><guilabel>Name</guilabel> This is the tax table name.</para>
        </listitem>
        <listitem>
          <para><guilabel>Type</guilabel> Either <guilabel>Percent %</guilabel> or <guilabel>Value $</guilabel>.</para>
        </listitem>
        <listitem>
          <para><guilabel>Value</guilabel> This is the percentage or value depending on <guilabel>Type</guilabel>.</para>
        </listitem>
        <listitem>
          <para><guilabel>Account</guilabel> This is the account to which tax will be posted.
            For tax collected from customers, this should probably be a Liability account as it must be payed to the government.
            For tax paid to vendors, if tax laws allow tax paid to vendors to offset tax collected from customers, this should probably
            also be a Liability account (even though it will usually have a debit balance)
            so that the net tax owed to the government can be easily observed.
          </para>
          <para>If you set up Tax on Purchases and Tax on Sales as subaccounts of Liabilities:Tax then the net tax will be rolled up
            and can be seen in the  &app; Accounts tab.
          </para>
          <para><emphasis>If unsure about tax law requirements, get professional advice. </emphasis></para>
        </listitem>
      </itemizedlist>

      <para>The following charts illustrate sample tax tables and
      may be used as starting points to determine the setup
      appropriate for a particular jurisdiction.</para>

      <table frame='all' id="bus-tax-tbl-eu">
        <title>Sample Tax Table Entries for EU country (e.g. 21% / 6%
        / 0% Belgium, 20% / 5% / 0% UK etc.)  (2017)</title>
        <tgroup cols='3' align='left' colsep='1' rowsep='1'>
          <thead>
            <row>
              <entry>Tax Table</entry>
              <entry>Tax Table Entries [Asset/Liability]</entry>
              <entry>Percentage or Amount</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry>Standard VAT Sales</entry>
              <entry>VAT:Sales:Standard [L]</entry>
              <entry>21%</entry>
            </row>
            <row>
              <entry>Reduced VAT Sales</entry>
              <entry>VAT:Sales:Reduced [L]</entry>
              <entry>6%</entry>
            </row>
            <row>
              <entry>Zero-Rated VAT Sales</entry>
              <entry>VAT:Sales:Zero [L]</entry>
              <entry>0%</entry>
            </row>
            <row>
              <entry morerows='1'>EC Sales</entry>
              <entry>VAT:Sales:EC [L]</entry>
              <entry>21%</entry>
            </row>
            <row>
              <entry>VAT:Sales:Reverse EC [L]</entry>
              <entry>-21%</entry>
            </row>
            <row>
              <entry>Standard VAT Purchases</entry>
              <entry>VAT:Purchases:Standard [A]</entry>
              <entry>21%</entry>
            </row>
            <row>
              <entry>Reduced VAT Purchases</entry>
              <entry>VAT:Purchases:Reduced [A]</entry>
              <entry>6%</entry>
            </row>
            <row>
              <entry>Zero-Rated VAT Purchases</entry>
              <entry>VAT:Purchases:Zero [A]</entry>
              <entry>0%</entry>
            </row>
          </tbody>
        </tgroup>
      </table>

      <table frame='all' id="bus-tax-tbl-au">
        <title>Sample Tax Table Entries for Australia (2017)
        </title>
        <tgroup cols='3' align='left' colsep='1' rowsep='1'>
          <thead>
            <row>
              <entry>Tax Table</entry>
              <entry>Tax Table Entries [Asset/Liability]</entry>
              <entry>Percentage or Amount</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry>Standard GST Sales</entry>
              <entry>GST:Sales:Standard [L]</entry>
              <entry>10%</entry>
            </row>
            <row>
              <entry>GST-free Sales</entry>
              <entry>GST:Sales:Zero [L]</entry>
              <entry>0%</entry>
            </row>
            <row>
              <entry>Standard GST Purchases</entry>
              <entry>GST:Purchases:Standard [A]</entry>
              <entry>10%</entry>
            </row>
            <row>
              <entry>GST-free Purchases</entry>
              <entry>GST:Purchases:Zero [A]</entry>
              <entry>0%</entry>
            </row>
          </tbody>
        </tgroup>
      </table>

      <table frame='all' id="bus-tax-tbl-us">
        <title>Sample Tax Table Entries for Cook County, Illinois (2017)</title>
        <tgroup cols='3' align='left' colsep='1' rowsep='1'>
          <thead>
            <row>
              <entry>Tax Table</entry>
              <entry>Tax Table Entries [Asset/Liability]</entry>
              <entry>Percentage or Amount</entry>
            </row>
          </thead>
          <tbody>
            <row>
              <entry morerows='3'>Chicago Sales Taxes</entry>
              <entry>Taxes:Sales:State [L]</entry>
              <entry>6.25%</entry>
            </row>
            <row>
              <entry>Taxes:Sales:City [L]</entry>
              <entry>1.25%</entry>
            </row>
            <row>
              <entry>Taxes:Sales:County [L]</entry>
              <entry>1.75%</entry>
            </row>
            <row>
              <entry>Taxes:Sales:Region [L]</entry>
              <entry>1%</entry>
            </row>
          </tbody>
        </tgroup>
      </table>

    </sect2>

    <sect2 id="bus-setupcname">
      <title>Enter Company Information</title>

      <para>After you have built the account structure and defined your tax tables, designate your
      company in the &app; file. To do this, select the <guilabel>Business</guilabel> tab
      in the <guilabel>Book Options</guilabel> window, which can be accessed from 
      <menuchoice><guimenu>File</guimenu><guimenuitem>Properties</guimenuitem>
      </menuchoice>.
      </para>

      <figure>
        <title>Entering Company Information</title>
        <screenshot id="bus-co-reg">
          <mediaobject>
           <imageobject>
              <imagedata fileref="figures/bus_co_reg.png" format="PNG"
                        srccredit="Chris Good" />
            </imageobject>

            <textobject>
              <phrase>Company Information</phrase>
            </textobject>
          </mediaobject>
        </screenshot>
      </figure>

      <para>Here you can:</para>

      <itemizedlist>
        <listitem>
          <para>Enter the name of your company along with contact information
          such as your phone number, fax number, e-mail address and website
          URL.</para>
        </listitem>

        <listitem>
          <para>Enter your company&rsquo;s tax payer id number in the
          <guilabel>Company ID</guilabel> field.</para>
        </listitem>

        <listitem>
          <para>Select default tax tables applicable to your most common
          customers and vendors.</para>
        </listitem>
      </itemizedlist>

    </sect2>

    <sect2 id="bus_setup_pref">
      <title>Setting Business Preferences</title>
      <para>Set options on the Business tab of the &app; preferences, which is
        accessed via <menuchoice><guimenu>Edit</guimenu><guimenuitem>Preferences</guimenuitem></menuchoice>
    (<menuchoice><guimenu>GnuCash</guimenu><guimenuitem>Preferences</guimenuitem></menuchoice> on MacOS).
        See Help manual chapter 10.3.3 Business Book Options Tab.
      </para>

    </sect2>

    <sect2 id="bus-setupterms">
      <title>Setting Billing Terms</title>

      <para>Billing Terms can be used to determine the payment due date and be a
        guide for determining discount for early payment of invoices (or vendor bills).
      </para>

        <note>
        <para>As of &app; 2.6.7, Billing Terms are only
          partially supported. Date due is calculated using the Billing Terms
          but discount amount is not.
        </para>
        <para>
          Discount for early invoice payment is not implemented. There are 2 ways this may be done, although neither is recommended, and
          professional advice should be used to confirm that regulations are being complied with:
          <itemizedlist>
            <listitem>
              <para>After creating and posting a payment which pays the invoice in full, manually edit the payment transaction (usually strongly discouraged)
                and split the payment to reduce it by the amount of the discount and create a compensating split in an income (discount) account.
              </para>
            </listitem>

            <listitem>
              <para>Alternatively, after creating and posting a payment for the discounted amount, create a credit note for the discount using a specific negative
                sales income (discount) account for the transfer account.
              </para>
            </listitem>
            </itemizedlist>
        </para>
      </note>

      <para>You can specify the billing terms on each invoice/bill.
        Invoice billing terms will default from the customer billing terms.
        Bill billing terms will default from the vendor billing terms.
      </para>

      <para>Billing Terms are maintained using the Billing Terms Editor which is accessed via menu
        <menuchoice><guimenu>Business</guimenu><guimenuitem>Billing Terms Editor</guimenuitem></menuchoice>.
      </para>

      <figure>
        <title>Billing Terms Editor</title>
        <screenshot id="bus-termsmain">
          <mediaobject>
            <imageobject>
              <imagedata fileref="figures/bus_terms_main.png" format="PNG"
                        srccredit="Chris Good" />
            </imageobject>

            <textobject>
              <phrase>Billing Terms Editor</phrase>
            </textobject>
          </mediaobject>
        </screenshot>
      </figure>

      <figure>
        <title>New Billing Term</title>
        <screenshot id="bus-termsnew">
          <mediaobject>
            <imageobject>
              <imagedata fileref="figures/bus_terms_new.png" format="PNG"
                         srccredit="Chris Good" />
            </imageobject>

            <textobject>
              <phrase>New Billing Term</phrase>
            </textobject>
          </mediaobject>
        </screenshot>
      </figure>

      <itemizedlist>
        <listitem>
          <para><guilabel>Name</guilabel> The internal name of the billing term. For some examples of billing term names and descriptions see
             <ulink url="&url-wiki-pmt-term;" />.
             <!-- Translators, add a reference to a list of terms common in your language -->
          </para>
        </listitem>
        <listitem>
          <para><guilabel>Description</guilabel> The description of the billing term, printed on invoices</para>
        </listitem>
        <listitem>
          <para>There are 2 types of billing terms, with different information to be entered</para>
          <itemizedlist>
            <listitem>
              <para>Type Days</para>
              <itemizedlist>
                <listitem>
                  <para><guilabel>Due Days</guilabel> The invoice or bill is due to be paid within this number of days after the post date</para>
                </listitem>
                <listitem>
                  <para><guilabel>Discount Days</guilabel> The number of days after the post date during which a discount will
                    be applied for early payment
                  </para>
                </listitem>
                <listitem>
                  <para><guilabel>Discount %</guilabel> The percentage discount applied for early payment</para>
                </listitem>
              </itemizedlist>
            </listitem>
            <listitem>
              <para>Type Proximo</para>
              <itemizedlist>
                <listitem>
                  <para><guilabel>Due Day</guilabel> The day of the month bills are due</para>
                </listitem>
                <listitem>
                  <para><guilabel>Discount Day</guilabel> The last day of the month for the early payment discount</para>
                </listitem>
                <listitem>
                  <para><guilabel>Discount %</guilabel> The discount percentage applied if paid early</para>
                </listitem>
                <listitem>
                  <para><guilabel>Cutoff Day</guilabel> The cutoff day for applying bills to the next month. After the
                    cutoff, bills are applied to the following month. Negative values
                    count backwards from the end of the month.
                  </para>
                </listitem>
              </itemizedlist>
            </listitem>
          </itemizedlist>
        </listitem>
      </itemizedlist>
    </sect2>
  </sect1>
  <sect1 id="bus_ar">
    <title>Accounts Receivable</title>
    <para>Accounts Receivable (or A/R) refers to products or services provided
       by your company for which payment has not yet been received.</para>
        
        <sect2 id="bus-ar-components1">
            <title>System Components</title>
            
            <para>Transactions generated by the A/R system are recorded within the Accounts
                Receivable account. <emphasis>You should not work directly with this account.</emphasis>
                Instead, you will work with the four integrated &app; A/R application
                components available through the <menuchoice><guimenu>Business</guimenu>
                    <guisubmenu>Customer</guisubmenu></menuchoice> sub-menu. These four components are:</para>
            
            <itemizedlist>
                <listitem>
                    <para><guilabel>Customers</guilabel> are people or companies to whom
                        you sell products or services on credit.</para>
                </listitem>
                
                <listitem>
                    <para><guilabel>Invoices</guilabel> represent the physical invoice you
                        send to a customer to request payment. This invoice contains an
                        itemized list of things you sold.</para>
                    <para>In addition, GnuCash also has support for <guilabel>Credit Notes</guilabel>
                        which represent the inverse of Invoices. A credit note is usually handed to
                        a customer to correct items that were incorrectly invoiced or returned.</para>
                    <para>Both document types will be set up using the same menu items. Credit notes were introduced starting with
                        &app; stable release 2.6.0.
                    </para>
                </listitem>
                
                <listitem>
                    <para><guilabel>Jobs</guilabel> (optional) is where you register
                        Customer Jobs. Jobs are a mechanism by which you can group multiple
                        invoices to a particular customer.</para>
                </listitem>
                
                <listitem>
                    <para><guilabel>Process Payments</guilabel> is used to register
                        payments you received from a customer.</para>
                </listitem>
            </itemizedlist>
        </sect2>
        
        <sect2 id="bus-ar-customers1">
            <title>Customers</title>
            
            <para>Customers are people or companies to whom you sell goods or
                services. They must be registered within the A/R system.</para>
            
            <sect3 id="bus-ar-custnew2">
                <title>New</title>
                
                <para>To register a new customer, enter the menu <menuchoice>
                    <guimenu>Business</guimenu><guisubmenu>Customer</guisubmenu>
                    <guimenuitem>New Customer</guimenuitem></menuchoice>. Fill in customer information, such as
                Company Name, Address, Phone, Fax, etc.</para>
                
                <figure>
                  <title>New Customer Registration Window</title>
                  <screenshot id="bus-ar-custnew">
                    <mediaobject>
                        <imageobject>
                            <imagedata fileref="figures/bus_ar_custnew.png" format="PNG"
                            srccredit="Patrick Schweiger" />
                        </imageobject>
                        
                        <textobject>
                            <phrase>New Customer Registration Window</phrase>
                        </textobject>
                    </mediaobject>
                  </screenshot>
                </figure>
            </sect3>
            
            <sect3 id="bus-ar-custfind2">
                <title>Find and Edit</title>
                
                <para>To search for an existing customer, use the <menuchoice>
                    <guimenu>Business</guimenu><guisubmenu>Customer</guisubmenu>
                    <guimenuitem>Find Customer</guimenuitem></menuchoice> window. You select a customer to
                <guilabel>View/Edit</guilabel> from the results of the search. This
                window is also used to look up customers when creating invoices and
                    processing payments.</para>
                
                <figure>
                  <title>Find Customer Window</title>
                  <screenshot id="bus-ar-custfind">
                    <mediaobject>
                        <imageobject>
                            <imagedata fileref="figures/bus_ar_custfind.png" format="PNG"
                            srccredit="Patrick Schweiger" />
                        </imageobject>
                        
                        <textobject>
                            <phrase>Find Customer Window</phrase>
                        </textobject>
                   </mediaobject>
                  </screenshot>
                </figure>
                
                <para>If many customers match the search criteria you provide, the
                    search can be refined by running an additional search within the current
                    results. The current result set is searched when the <guilabel>Refine
                        Current Search</guilabel> radio button is selected. In fact, &app;
                    selects this option for you after you run the initial search.</para>
                
                <para>If the customer you are searching for does not match the supplied
                    search criteria, change the search criteria, click the <guilabel>New
                        Search</guilabel> radio button and then the <guilabel>Find</guilabel>
                    button. The relevant step is the <guilabel>New Search</guilabel>
                    selection. If the customer is not in the result of the original search,
                    and you only search within this set, the customer cannot be found,
                    regardless of new search criteria.</para>
                
                <note>
                    <para>To return a list of all registered active customers, set the
                        search criterion to <guilabel>matches regex</guilabel>, and place a
                        single dot "." in the text field area. Make sure <guilabel>Search only
                            active data</guilabel> is checked, then click
                        <guibutton>Find</guibutton>. The regular expression "." means to match
                        anything.</para>
                </note>
            </sect3>
        </sect2>
        
        <sect2 id="bus-ar-invoices1">
            <title>Invoices</title>
            
            <para>An invoice is the paperwork you send to a customer to request
                payment for products or services rendered. &app; can generate and track
                invoices.</para>
            
            <para>A credit note is the paperwork you send to a customer to correct
                products or services rendered that were incorrectly invoiced. &app; can generate and track
                credit notes via the same menu entries as invoices.</para>
            
            <note>
                <para>This section applies to both invoices and
                    credit notes. In order to avoid repeating everything twice and to keep
                    the text easier to read it will refer only to invoices. You can apply
                    it equally to credit notes. Only where the behavior of credit notes
                    differs from invoices this will be explicitly mentioned.</para>
            </note>
            
            <sect3 id="bus-ar-invoicenew2">
                <title>New</title>
                
                <para>To send an invoice to a customer you must first create the new
                    document. To create an invoice use <menuchoice><guimenu>Business</guimenu>
                        <guisubmenu>Customer</guisubmenu><guimenuitem>New Invoice</guimenuitem></menuchoice>. The
                    New Invoice window must be filled in appropriately.</para>
                
                <figure>
                  <title>Creating a New Invoice</title>
                  <screenshot id="bus-ar-invoicenew">
                    <mediaobject>
                        <imageobject>
                            <imagedata fileref="figures/bus_ar_invoicenew.png" format="PNG"
                            srccredit="Patrick Schweiger" />
                        </imageobject>
                        
                        <textobject>
                            <phrase>Creating a New Invoice</phrase>
                        </textobject>
                    </mediaobject>
                  </screenshot>
                </figure>
                
                <para>When you click the <guibutton>OK</guibutton> button, the
                    <guilabel>Edit Invoice</guilabel> window opens.</para>
            </sect3>
            
            <sect3 id="bus-ar-invoiceedit2">
                <title>Edit</title>
                
                <para>From the Edit Invoice window you can enter an itemized list of
                    goods and services you sold on this invoice in a manner similar to how the account
                    register works. For credit notes you enter an itemized list of goods and
                    services you refunded instead.</para>
                
                <figure>
                  <title>Edit Invoice Window</title>
                  <screenshot id="bus-ar-invoiceedit">
                    <mediaobject>
                        <imageobject>
                            <imagedata fileref="figures/bus_ar_invoiceedit.png" format="PNG"
                            srccredit="Patrick Schweiger" />
                        </imageobject>
                        
                        <textobject>
                            <phrase>Edit Invoice Window</phrase>
                        </textobject>
                    </mediaobject>
                  </screenshot>
                </figure>
                
                <para>When you have finished entering all the items, you can
                    <guilabel>Post</guilabel> and print the invoice.</para>
            </sect3>
            
            <sect3 id="bus-ar-invoicepost2">
                <title>Post</title>
                
                <para>When you finish editing an invoice and are ready to print, you
                    must <guilabel>Post</guilabel> the invoice. The invoice does not have to
                    be posted immediately. In fact, you should only post an invoice when you
                    are ready to print it. Posting an invoice places the transactions in an
                    accounts receivable account.</para>
                
                <figure>
                  <title>Post Invoice Window</title>
                  <screenshot id="bus-ar-invoicepost">
                    <mediaobject>
                        <imageobject>
                            <imagedata fileref="figures/bus_ar_invoicepost.png" format="PNG"
                            srccredit="Patrick Schweiger" />
                        </imageobject>
                        
                        <textobject>
                            <phrase>Post Invoice Window</phrase>
                        </textobject>
                    </mediaobject>
                  </screenshot>
                </figure>
                
            </sect3>
            
            <sect3 id="bus-ar-invoicefind2">
                <title>Find</title>
                
                <para>To find an existing invoice, use the <menuchoice><guimenu>Business</guimenu>
                    <guisubmenu>Customer</guisubmenu><guimenuitem>Find Invoice</guimenuitem></menuchoice>
                menu item. From the results of the search, you can select an invoice
                    to edit or view.</para>
                
                <note>
                    <para>Before you can edit a posted invoice, you will need to
                        <guilabel>Unpost</guilabel> it.</para>
                </note>
                
                <para>One of the design goals in &app;&rsquo;s Account Receivable system was
                    to allow different processes to get to the same state, so you can reach
                    an invoice from different directions based on the way you think about
                    the problem:</para>
                
                <itemizedlist>
                    <listitem>
                        <para>You can search for the customer first, then list their
                            invoices.</para>
                    </listitem>
                    
                    <listitem>
                        <para>You can search for invoices by number or by company
                            name.</para>
                    </listitem>
                    
                    <listitem>
                        <para>You can list invoices associated with a customer job.</para>
                    </listitem>
                </itemizedlist>
            </sect3>
            
            <sect3 id="bus-ar-invoiceprint2">
                <title>Print</title>
                
                <para>After you post an invoice, you should print it and send it to your
                    customer. To print an invoice use <menuchoice><guimenu>File</guimenu>
                        <guimenuitem>Print Invoice</guimenuitem></menuchoice> menu item.</para>
                
                <figure>
                  <title>Invoice Print Output</title>
                  <screenshot id="bus-ar-invoiceprint">
                    <mediaobject>
                        <imageobject>
                            <imagedata fileref="figures/bus_ar_invoiceprint.png" format="PNG"
                            srccredit="Patrick Schweiger" />
                        </imageobject>
                        
                        <textobject>
                            <phrase>Invoice Print Output</phrase>
                        </textobject>
                    </mediaobject>
                  </screenshot>
                </figure>
                
                <note>
                    <para>You can modify the appearance of the invoice, IE: add a company
                        logo, etc. To do so, see the <xref
                        linkend="bus-ar-invoicechange" />.</para>
                </note>
                
                <para>Invoices can also be printed from the main window by selecting
                    <menuchoice><guimenu>Reports</guimenu><guisubmenu>Business Reports</guisubmenu>
                        <guimenuitem>Printable Invoice</guimenuitem></menuchoice> from the main menu. The
                    resulting report window states that no valid invoice is selected. To
                    select the invoice to print:</para>
                
                <orderedlist>
                    <listitem>
                        <para>Use the <guibutton>Options</guibutton> <emphasis>Toolbar</emphasis> button or select
                            <menuchoice><guimenu>Edit</guimenu><guimenuitem>Report Options</guimenuitem></menuchoice> from
                            the main menu.</para>
                    </listitem>
                    
                    <listitem>
                        <para>Select the <guilabel>General</guilabel> tab of the report
                            options dialog.</para>
                    </listitem>
                    
                    <listitem>
                        <para>Click the <guibutton>Select</guibutton> button next to the
                            <guilabel>Invoice Number</guilabel> field.</para>
                    </listitem>
                    
                    <listitem>
                        <para>Search for the invoice as usual.</para>
                    </listitem>
                </orderedlist>
                
                <para>You can also print invoices from within the Process Payment
                    dialog. See the <xref linkend="bus-ar-payment1" /> for instructions on
                    how to do so.</para>
            </sect3>
            
            <sect3 id="bus-ar-invoicestarting2">
                <title>Assign Starting Invoice Number</title>
                
                <para>By default, &app; starts with invoice number 1 and increments from there. You can
                    manually type an invoice number into the text box each time you create
                    an invoice, but this gets tiring and sooner or later leads to duplicate
                    numbers.</para>
                
                <para>You can change the starting invoice number if it is important you.
                    Use <menuchoice><guimenu>File</guimenu><guimenuitem>Properties</guimenuitem></menuchoice>, access
                    the <guilabel>Counters</guilabel> tab, change the <guilabel>Invoice number</guilabel> value to be
                    one less than your desired starting invoice number and click the <guibutton>OK</guibutton> button or the
                    <guibutton>Apply</guibutton> button.</para>
            </sect3>
        </sect2>
        
        <sect2 id="bus-ar-jobs1">
            <title>Customer Jobs</title>
            
            <para>Customer Jobs are used to group multiple invoices and credit notes to the same
                customer. Use of the Customer Jobs feature is optional. The feature is
                useful when you have multiple <guilabel>jobs</guilabel> for the same customer, and would like
                to view all the invoices and credit notes related to a single job.</para>
            
            <figure>
              <title>New Customer Job</title>
              <screenshot id="bus-ar-jobnew">
                <mediaobject>
                    <imageobject>
                        <imagedata fileref="figures/bus_ar_jobnew.png" format="PNG"
                        srccredit="Patrick Schweiger" />
                    </imageobject>
                    
                    <textobject>
                        <phrase>New Customer Job</phrase>
                    </textobject>
                </mediaobject>
              </screenshot>
            </figure>
            
            <para>To use customer jobs, you must create them using the <menuchoice>
                <guimenu>Business</guimenu><guisubmenu>Customer</guisubmenu>
                <guimenuitem>New Job</guimenuitem></menuchoice> menu item. You will see the <guilabel>New
                    Job</guilabel> window.</para>
            
            <para>To edit an existing customer job, use the <menuchoice>
                <guimenu>Business</guimenu><guisubmenu>Customer</guisubmenu>
                <guimenuitem>Find Job</guimenuitem></menuchoice> menu item. Select the desired job in the
            search results, and click the <guilabel>View/Edit Job</guilabel>
                button.</para>
            
            <para>To select from the invoices and credit notes associated with a given job, use <menuchoice>
                <guimenu>Business</guimenu><guisubmenu>Customer</guisubmenu><guimenuitem>Find
                    Job</guimenuitem></menuchoice> menu item. Select the desired job in the
            search results and click the <guilabel>View Invoices</guilabel> button. A
            window listing invoices and credit notes associated with this job appears. Select an
            invoice or credit note and click the <guilabel>View Invoice</guilabel> button to open an
                invoice editor in the main application window.</para>
        </sect2>
        
        <sect2 id="bus-ar-payment1">
            <title>Process Payment</title>
            
            <para>Eventually, you will receive payment from your customers for
                outstanding invoices. To register these payments, use the Process Payment
                application found in <menuchoice><guimenu>Business</guimenu>
                    <guisubmenu>Customer</guisubmenu><guimenuitem>Process
                        Payment</guimenuitem></menuchoice>.</para>
            
            <figure>
              <title>Process Customer Payment</title>
              <screenshot id="bus-ar-payment">
                <mediaobject>
                    <imageobject role="html">
                        <imagedata fileref="figures/bus_ar_payment.png" format="PNG"
                        srccredit="Patrick Schweiger" width="510px" scalefit="0" />
                    </imageobject>
                    
                    <imageobject role="fo">
                        <imagedata fileref="figures/bus_ar_payment.png" format="PNG"
                        srccredit="Patrick Schweiger" />
                    </imageobject>
                    
                    <textobject>
                        <phrase>Process Payment from Customer</phrase>
                    </textobject>
                    
                    <caption><para>Process Payment from Customer</para></caption>
                </mediaobject>
              </screenshot>
            </figure>
            
        </sect2>
        
        <sect2 id="bus-ar-invoicechange">
            <title>Changing the Invoice Appearance</title>
            
            <para>The default Invoice style, as shown in <xref
                linkend="bus-ar-invoiceprint2" />, is fairly barren. The default invoice
                style leaves the top part of the form blank, so you can print on company
                letterhead paper. There are some things you can do to change invoice
                appearance.</para>
            
            <para>Use <menuchoice><guimenu>File</guimenu><guimenuitem>Properties</guimenuitem></menuchoice> to
                enter your Company information in the <guilabel>Business</guilabel> tab of the <guilabel>Book Options</guilabel> window.
                Some of the entered information is printed on the right side of invoices.</para>
            
            <para>To add a customized background, heading banner or logo to invoices,
                modify the invoice style sheets. To do this, go to <menuchoice><guimenu>Edit</guimenu>
                    <guimenuitem>Style Sheets</guimenuitem></menuchoice> and select the <guibutton>New</guibutton>
                button in the <guilabel>Select HTML Style Sheet</guilabel> window that will appear.
                You will then see a window like this:</para>
            
            <figure>
              <title>The New Style Sheet Window</title>
              <screenshot id="bus-ar-invoicechange1">
                <mediaobject>
                     <imageobject>
                        <imagedata fileref="figures/bus_ar_invoicechange1.png" format="PNG"
                        srccredit="Cristian Marchi" />
                    </imageobject>
                    
                    <textobject>
                        <phrase>New Style Sheet Window</phrase>
                    </textobject>
                </mediaobject>
              </screenshot>
            </figure>
            
            <para>Give a <guilabel>Name</guilabel> to the new style sheet (e.g. <guilabel>Custom Invoice</guilabel>) and select the
                <guilabel>Fancy</guilabel> <guilabel>Template</guilabel>. When you click the
                <guibutton>OK</guibutton> button, the <guilabel>HTML Style Sheet Properties</guilabel> window is
                displayed. This window presents you five sections listed in the left pane: <guilabel>Colors</guilabel>, <guilabel>Fonts</guilabel>,
                <guilabel>General</guilabel>, <guilabel>Images</guilabel>, and <guilabel>Tables</guilabel>. The <guilabel>Colors</guilabel>
                section allows you to change the colors of various items of the invoice. The <guilabel>Fonts</guilabel> section lets you
                set fonts type and dimensions. The <guilabel>General</guilabel> section allows you to set the <guilabel>Preparer</guilabel> and
                <guilabel>Prepared for</guilabel> information, and to <guilabel>Enable Links</guilabel>. The <guilabel>Images</guilabel> section allows you
                to import graphics into the style sheet. The <guilabel>Tables</guilabel> section allows you to
                adjust the spacing around the tables which make up the invoice.</para>
            
            <para>To include a company logo, banner heading and background image, use
                your favorite graphics application such as <application>The Gimp</application> or <application>OpenOffice Draw</application> to
                save the images in either <acronym>GIF</acronym> or <acronym>PNG</acronym> format. Then import them into the
                style sheet using the <guilabel>Images</guilabel> section described above.</para>
            
            <para>Below is an example that imports all three types of images.</para>
            
            <figure>
              <title>HTML Style Sheets Example Window</title>
              <screenshot id="bus-ar-invoicechange2">
                <mediaobject>
                    <imageobject role="html">
                        <imagedata fileref="figures/bus_ar_invoicechange2.png" format="PNG"
                        srccredit="Cristian Marchi" width="510"/>
                    </imageobject>
                    
                    <imageobject role="fo">
                        <imagedata fileref="figures/bus_ar_invoicechange2.png" format="PNG"
                        srccredit="Cristian Marchi"/>
                    </imageobject>
                    
                    <textobject>
                        <phrase>HTML Style Sheets Example Window</phrase>
                    </textobject>
                    
                    <caption><para>The <acronym>HTML</acronym> Style Sheets window with an example Background
                        Tile, Heading Banner, and Logo.</para></caption>
                </mediaobject>
              </screenshot>
            </figure>
            
            <note>
                <para>The images are placed in the invoice as follows. The
                    <guilabel>Background Tile</guilabel> is tiled to become the background
                    image, the <guilabel>Heading Banner</guilabel> goes to above the invoice
                    text, and the <guilabel>Logo</guilabel> is placed in the upper left corner
                    of the invoice to the left of the Heading Banner. You will probably have
                    to try a few different sized images until you get the invoices to print
                    nicely. Some sizing suggestions are that the Logo should be 1 square cm
                    (~0.5 inch), and the Heading Banner should be 15 cm (~6 inches) wide and 1
                    cm (~0.5 inch) tall.</para>
            </note>
            
            <para>With the style sheet configured, when you print the invoice, you
                select the style sheet to use from the <guimenu>Options</guimenu> menu.
                Below is the resultant invoice after applying the style sheet demonstrated
                above.</para>
            
            <figure>
              <title>HTML Style Sheets Example Output</title>
              <screenshot id="bus-ar-invoicechange3">
                <mediaobject>
                   <imageobject>
                        <imagedata fileref="figures/bus_ar_invoicechange3.png" format="PNG"
                        srccredit="Patrick Schweiger" />
                    </imageobject>
                    
                    <textobject>
                        <phrase>HTML Style Sheets Example Output</phrase>
                    </textobject>
                    
                    <caption><para>The hideous invoice which results from the graphics
                        selected in the style sheet.</para></caption>
                </mediaobject>
              </screenshot>
            </figure>
        </sect2>
    </sect1>
  <sect1 id="bus_ap">
     <title>Accounts Payable</title>
     <para>Accounts Payable (or A/P) refers to the accounting of products or services which a company has
        bought and needs to pay for.</para>
     
     <sect2 id="bus-ap-components1">
        <title>System Components</title>
        <para>&app; has an integrated accounts payable system. The transactions generated by the A/P system are placed within the Accounts Payable account,
           as a record of what occurs. Generally you do not directly work with this account but use the four integrated &app; A/P application components.
           The A/P components are available from the <menuchoice><guimenu>Business</guimenu><guisubmenu>Vendor</guisubmenu></menuchoice> sub-menu. These A/P components are:
        </para>
        
        <itemizedlist>
           <listitem>
              <para><guilabel>Vendors</guilabel> are people or companies from which you buy products or services on credit.</para>
           </listitem>
           
           <listitem>
              <para><guilabel>Bills</guilabel> represent the physical bills vendors send to request payment from you. A bill contains an itemized list of things you purchased.</para>
              <para>In addition, GnuCash also has support for <guilabel>Credit Notes</guilabel>
                 which represent the inverse of Bills. A credit note is usually received from
                 a vendor to correct items that were erroneously billed or returned.
              </para>
              <para>Both document types will be set up using the same menu items.</para>
           </listitem>
           
           <listitem>
              <para><guilabel>Jobs</guilabel> (optional) is where you register Vendor Jobs. Jobs are mechanism by which you can group multiple bills from a particular vendor.
              </para>
           </listitem>
           
           <listitem>
              <para><guilabel>Process Payments</guilabel> is where you register payments to a vendor to whom you owe money.</para>
           </listitem>
        </itemizedlist>
        
        <para>The following sections introduce the individual Accounts Payable application components.</para>
     </sect2>
     
     <sect2 id="bus-ap-vendors1">
        <title>Vendors</title>
        <para>A vendor is a company or person from whom you purchase goods or services. Vendors must be registered within the A/P system.</para>
        
        <sect3 id="bus-ap-vendornew2">
           <title>New</title>
           <para>To register a new vendor, select the <menuchoice><guimenu>Business</guimenu><guisubmenu>Vendor</guisubmenu><guimenuitem>
              New Vendor</guimenuitem></menuchoice> menu item. Fill in general information about the vendor, such as Company Name, Address, Phone,
           Fax, etc. Below is a list of the other options: </para>   <para>This is what the New Vendor registration window looks like:
           </para>
           <figure>
             <title>New Vendor Registration Window</title>
             <screenshot id="bus-ap-vendornew">
                <mediaobject>
                  <imageobject>
                      <imagedata fileref="figures/bus_ap_vendornew.png" srccredit="Patrick Schweiger" format="PNG"/>
                   </imageobject>
                   <textobject>
                      <phrase>New Vendor Registration Window</phrase>
                   </textobject>
                </mediaobject>
             </screenshot>
           </figure>
        </sect3>
        
        <sect3 id="bus-ap-vendorfind2">
            <title>Find and Edit</title>
           
            <para>To search for an existing vendor, use the <menuchoice><guimenu>Business</guimenu><guisubmenu>Vendor</guisubmenu><guimenuitem>
              Find Vendor</guimenuitem></menuchoice> window. You select a vendor to <guibutton>View/Edit</guibutton> from the results of the search.
              This window is also used to look up a vendor when entering bills and processing payments.
            </para>
            <figure>
              <title>Find Vendor Window</title>
              <screenshot id="bus-ar-vendorfind">
                <mediaobject>
                  <imageobject>
                     <imagedata fileref="figures/bus_ap_vendorfind.png" srccredit="Patrick Schweiger" format="PNG"/>
                  </imageobject>
                  <textobject>
                     <phrase>Find Vendor Window</phrase>
                  </textobject>
                </mediaobject>
              </screenshot>
            </figure>
            
           <para>If many vendors match the search criteria you provide, the
              search can be refined by running an additional search within the current
              results. The current result set is searched when the <guilabel>Refine
                 Current Search</guilabel> radio button is selected. In fact, &app;
              selects this option for you after you run the initial search.</para>
           
           <para>If the vendor you are searching for does not match the supplied
              search criteria, change the search criteria, click the <guilabel>New
                 Search</guilabel> radio button and then the <guibutton>Find</guibutton>
              button. The relevant step is the <guilabel>New Search</guilabel>
              selection. If the vendor is not in the result of the original search,
              and you only search within this set, the vendor cannot be found,
              regardless of new search criteria.
           </para>
           
           <note>
              <para>To return a list of all registered active vendors, set the search criterion to <guilabel>matches regex</guilabel>, and place a single dot <quote>.</quote> in the text field area. Make sure <guilabel>Search only active data</guilabel> is checked, then click <guibutton>Find</guibutton>. The regular expression <quote>.</quote> means to match anything.
              </para>
           </note>
        </sect3>
     </sect2>
     
     <sect2 id="bus-ap-bills1">
        <title>Bills</title>
        <para>A bill is a request for payment you receive from a vendor. &app; can track bills.</para>
        
        <para>A credit note is the document you receive from a vendor to correct
           products or services rendered that you were incorrectly charged for on a bill. &app; can generate and track
           credit notes via the same menu entries as bills.</para>
        
        <note>
           <para>This section applies to both bills and
              credit notes. In order to avoid repeating everything twice and to keep
              the text easier to read it will refer only to bills. You can apply
              it equally to credit notes. Only where the behaviour of credit notes
              differs from bills this will be explicitly mentioned.</para>
        </note>
        
        <sect3 id="bus-ap-billnew2">
           <title>New</title>
           <para>When you receive a bill from a vendor and want to enter it into &app;, you must create a new bill. To create a new bill use the <menuchoice><guimenu>Business</guimenu><guisubmenu>Vendor</guisubmenu><guimenuitem>New Bill</guimenuitem></menuchoice> menu item, and fill in the resulting window appropriately.</para>
           <figure>
             <title>New Bill Registration Window</title>
             <screenshot id="bus-ap-billnew">
               <mediaobject>
                 <imageobject>
                    <imagedata fileref="figures/bus_ap_billnew.png" srccredit="Patrick Schweiger" format="PNG"/>
                 </imageobject>
                 <textobject>
                    <phrase>New Bill Registration Window</phrase>
                 </textobject>
               </mediaobject>
             </screenshot>
           </figure>
           
           <para>When you click the <guibutton>OK</guibutton> button the <guilabel>Edit Bill</guilabel> window opens.</para>
        </sect3>
        
        <sect3 id="bus-ap-billedit2">
           <title>Edit</title>
           <para>From the Edit Bill window you can enter an itemized list of
              goods and services you purchased, in a manner similar to how the account
              register works. For credit notes you enter an itemized list of goods and
              services the vendor refunded instead.
           </para>
           <figure>
             <title>Edit Bill Window</title>
             <screenshot id="bus-ap-billedit">
               <mediaobject>
                 <imageobject>
                    <imagedata fileref="figures/bus_ap_billedit.png" srccredit="Patrick Schweiger" format="PNG"/>
                 </imageobject>
                 <textobject>
                    <phrase>Edit Bill Window</phrase>
                 </textobject>
               </mediaobject>
             </screenshot>
           </figure>
           
           <para>When you have finished entering all the items, <guilabel>Post</guilabel> the bill. </para>
        </sect3>
        
        <sect3 id="bus-ap-billpost2">
           <title>Post</title>
           <para>When you finish editing a bill, you should <guilabel>Post</guilabel> the bill. You do not have to post the bill,
              you can close it and return to it later. You have to post the bill eventually. Posting a bill places its transactions into an accounts payable account.
              The Post Bill window appears and asks you to enter information:
           </para>
           
           <figure>
             <title>Post Bill Window</title>
             <screenshot id="bus-ap-billpost">
               <mediaobject>
                 <imageobject>
                    <imagedata fileref="figures/bus_ap_billpost.png" srccredit="Patrick Schweiger" format="PNG"/>
                 </imageobject>
                 <textobject>
                    <phrase>Post Bill Window</phrase>
                 </textobject>
               </mediaobject>
             </screenshot>
           </figure>
        </sect3>
        
        <sect3 id="bus-ap-billfind2">
           <title>Find</title>
           <para>To find an existing bill, use the <menuchoice><guimenu>Business</guimenu><guisubmenu>Vendor</guisubmenu><guimenuitem>Find Bill</guimenuitem></menuchoice> menu item. From the results of the search, you can select a bill to edit, or view.</para>
           <note>
              <para>Before you can edit a posted bill, you will need to <guilabel>Unpost</guilabel> it.</para>
           </note>
           
           <note>
              <para>There are other ways to access an existing bill. These are similar to accessing invoices for your customers. See <xref linkend="bus-ar-invoicefind2" /> for more information.</para>
           </note>
        </sect3>
     </sect2>
     
     <sect2 id="bus-ap-jobs1">
        <title>Vendor Jobs</title>
        <para>Vendor Jobs are used to group multiple bills and credit notes from a single vendor. Use of the vendor jobs feature is optional.
           The feature is useful when you have multiple <guilabel>jobs</guilabel> for the same vendor, and would like to view all the bills and
           credit notes for a single job.
        </para>
        <para>To use vendor jobs, you must create them using the
           <menuchoice><guimenu>Business</guimenu><guisubmenu>Vendor</guisubmenu><guimenuitem>New Job</guimenuitem>
           </menuchoice> menu item. You will see the <guilabel>New Job</guilabel> window.
        </para>
        
        <figure>
          <title>New Vendor Job</title>
          <screenshot id="bus-ap-jobnew">
            <mediaobject>
              <imageobject>
                 <imagedata fileref="figures/bus_ap_jobnew.png" srccredit="Jon Lapham" format="PNG"/>
              </imageobject>
              <textobject>
                 <phrase>New Vendor Job</phrase>
              </textobject>
            </mediaobject>
          </screenshot>
        </figure>
        
        <para>To edit an existing vendor job, use the <menuchoice>
           <guimenu>Business</guimenu><guisubmenu>Vendor</guisubmenu>
           <guimenuitem>Find Job</guimenuitem></menuchoice> menu item. Select the desired job in the
        search results, and click the <guilabel>View/Edit Job</guilabel>
           button.</para>
        
        <para>To select from the bills associated with a given job, use <menuchoice>
           <guimenu>Business</guimenu><guisubmenu>Vendor</guisubmenu>
           <guimenuitem>Find Job</guimenuitem></menuchoice> menu item. Select the desired job in the
        search results and click the <guilabel>View Invoices</guilabel> button. A
        window listing bills and credit notes associated with this job appears. Select a
        bill or credit note and click the <guilabel>View Invoice</guilabel> button to open a
           bill editor in the main application window.</para>
     </sect2>
     
     <sect2 id="bus-ap-payment1">
        <title>Process Payment</title>
        <para>Eventually, you need to pay your bills. To do so, use the Process Payment application found in
           <menuchoice><guimenu>Business</guimenu><guisubmenu>Vendor</guisubmenu><guimenuitem>Process Payment</guimenuitem>
           </menuchoice>.
        </para>
        
        <para>Below is the &app; Accounts Payable payment window.</para>
        <figure>
          <title>Process Vendor Payment</title>
          <screenshot id="bus-ap-payment">
            <mediaobject>
              <imageobject role="html">
                 <imagedata fileref="figures/bus_ap_payment.png" srccredit="Patrick Schweiger" format="PNG" width="510"/>
              </imageobject>
              <imageobject role="fo">
                 <imagedata fileref="figures/bus_ap_payment.png" srccredit="Patrick Schweiger" format="PNG"/>
              </imageobject>
              <textobject>
                 <phrase>Process Payment to Vendor</phrase>
              </textobject>
              <caption>
                 <para>Process Payment to Vendor
                 </para>
              </caption>
            </mediaobject>
          </screenshot>
        </figure>
     </sect2>
  </sect1>
  <sect1 id="bus_payroll">
     <title>Payroll</title>
     <para>Payroll is a financial record of wages, net pay, paid vacations, and deductions for an employee. This section demonstrates how to track payroll using &app;.</para>
     <sect2 id="bus-payroll-concepts">
        <title>Basic Concepts</title>
        <para>Payroll is a financial record of wages, net pay, paid vacations, and deductions for an employee. Basically, anything that relates to giving money or benefits to an employee. Payroll is one of the more complex tasks in accounting, because there are many different accounts, people, and agencies involved in paying salaries.</para>
        <para>Payroll is typically accounted for as an expense. Sometimes accountants <quote>store</quote> some payroll expenses in a short term liability account. This is useful for things such as payroll taxes, which may be paid at a different time than the employee. The employee might get paid biweekly, while taxes are paid quarterly. This chapter presents a methodology which expenses payroll immediately for salaries, but stores taxes in liability accounts.</para>
        <note>
           <para>&app; does not have an integrated payroll system. While you can track payroll expenses in &app;, the calculation of taxes and deductions has to be done outside of &app;.</para>
        </note>
     </sect2>
     
     <sect2 id="bus-payroll-acct">
        <title>Account Setup</title>
        
        <para>Local tax law must be considered when setting up accounts. Because there are many different ways payroll taxes are handled throughout the world, this section presents a very simple structure. From this, you should be able to adapt your particular payroll deductions setup.</para>
        <para>Assume that you must pay 2 taxes, Tax1 and Tax2, and that each has an employee contribution and an employer contribution.</para>
        <para>The employee&rsquo;s salary and these two taxes are expense accounts. The tax components are liability accounts. The tax liability accounts are where you accumulate the taxes withheld for all of your employees. The taxes are later paid to the appropriate government agency.</para>
        <para>
           <literallayout>
              Simple Payroll Account Layout:
              
              -Assets
              --Checking
              -Liabilities
              --Tax1  (short term <quote>storage</quote> account)
              --Tax2  (short term <quote>storage</quote> account)
              -Expenses
              --Salaries
              --Tax1
              --Tax2
           </literallayout>
           
           <note>
              <para>Resist the temptation to create per-employee sub-accounts to track
                 individual salaries. Creating a sub-account for each employee leads to
                 unmanageably large lists of accounts. Imagine the account structure after
                 a few years of employees coming and going. It is much simpler to keep all
                 of your employees&rsquo; payroll records within a single account
                 (<emphasis>Expenses:Salaries</emphasis> for example) and use reports to
                 view per-employee information.
              </para>
              
              <para>The Transaction report can be used to sort and total by description or
                 memo (but not by part of them).
              </para>
              
              <para>To report salary transactions for a specific employee where the
                 employee name or code is entered in the transaction description or memo,
                 use the <guilabel>Find Transaction</guilabel> assistant
                 (<menuchoice><guimenu>Edit</guimenu><guimenuitem>Find</guimenuitem>
                 </menuchoice>) to select the transactions, and then report on them
                 using <menuchoice><guimenu>Reports</guimenu><guimenuitem>Account Report
                 </guimenuitem></menuchoice>. Further formatting or analysis may be done
                 by copying and pasting the report into a spreadsheet. See
                 <ulink type="help" url="ghelp:gnucash-help?tool-find-txn">Find
                    Transaction</ulink> in the &app; Help Manual.</para>
           </note>
        </para>
     </sect2>
     
     <sect2 id="bus-payroll-protocol">
        <title>Payroll Protocol Sample</title>
        <para>&app; does not have an integrated payroll system. &app; can track your payroll expenses, but you need to develop a payroll protocol and perform the calculations outside of &app;, in a spreadsheet for example. In this section, one such protocol is presented. You can use the sample protocol as a model.</para>
        
        <sect3 id="bus-pay-protocol-1">
           <title>Step 1: Deductions list</title>
           <para>The first step to the payroll protocol is to create a list of all the possible taxes and deductions for each employee. Each entry should include definitions and formulas for calculating each value. Once the protocol is established it needs to be changed only when payroll laws or tax rates change.</para>
           
           <para>In the proposed scenario, such a list would look like this:</para>
           <itemizedlist spacing="compact">
              <listitem>
                 <para><emphasis>E_GROSS_SALARY</emphasis> - Employee gross salary</para>
              </listitem>
              <listitem>
                 <para><emphasis>E_TAX1</emphasis> - Employee contribution to tax1 (X% of E_GROSS_SALARY)</para>
              </listitem>
              <listitem>
                 <para><emphasis>E_TAX2</emphasis> - Employee contribution to tax2 (X% of E_GROSS_SALARY)</para>
              </listitem>
              <listitem>
                 <para><emphasis>C_TAX1</emphasis> - Company contribution to tax1 (X% of E_GROSS_SALARY)</para>
              </listitem>
              <listitem>
                 <para><emphasis>C_TAX2</emphasis> - Company contribution to tax2 (X% of E_GROSS_SALARY)</para>
              </listitem>
           </itemizedlist>
           <note>
              <para>The employee&rsquo;s net salary (E_NET_SALARY) is defined as E_GROSS_SALARY - E_TAX1 - E_TAX2 and need not be placed in this list since it is composed of items that already exist.</para>
           </note>
           <para>Place the actual formulas for calculating each deduction in this list. Sometimes these formulas are quite complex, and sometimes they simply say "look it up in table XYZ of the tax codes".</para>
           <para>Notice that you can calculate some interesting values using the above definitions. One such value is the total cost to the company: E_GROSS_SALARY + C_TAX1 + C_TAX2.</para>
        </sect3>
        
        <sect3 id="bus-pay-protocol-2">
           <title>Step 2: Create the Transaction Map</title>
           <para>When you record payroll in &app;, do so with a single split transaction. This split transaction populates the appropriate expense and liability accounts. If you need to look the payroll details at a later time, open the split transaction.</para>
           <para>With the deductions list from above, an employee split transaction map can be generated. Each of the items in the list is mapped to a &app; account.</para>
           
           <para>
              <table id="bus-payroll-txn-tbl">
                 <title>Payroll Transaction Map</title>
                 <tgroup cols="3">
                    <thead>
                       <row>
                          <entry>Account</entry><entry>Increase</entry><entry>Decrease</entry>
                       </row>
                    </thead>
                    <tbody>
                       <row>
                          <entry>Assets:Checking</entry><entry></entry><entry>E_NET_SALARY</entry>
                       </row>
                       <row>
                          <entry>Expenses:Salaries</entry><entry>E_GROSS_SALARY</entry><entry></entry>
                       </row>
                       <row>
                          <entry>Liabilities:Tax1</entry><entry></entry><entry>E_TAX1</entry>
                       </row>
                       <row>
                          <entry>Liabilities:Tax2</entry><entry></entry><entry>E_TAX2</entry>
                       </row>
                       <row>
                          <entry>Expenses:Tax1</entry><entry>C_TAX1</entry><entry></entry>
                       </row>
                       <row>
                          <entry>Liabilities:Tax1</entry><entry></entry><entry>C_TAX1</entry>
                       </row>
                       <row>
                          <entry>Expenses:Tax2</entry><entry>C_TAX2</entry><entry></entry>
                       </row>
                       <row>
                          <entry>Liabilities:Tax2</entry><entry></entry><entry>C_TAX2</entry>
                       </row>
                    </tbody>
                 </tgroup>
              </table>
           </para>
           
           <para>Note that the C_TAX1 and C_TAX2 components have entries in the both the liability and expense accounts. The company component of each tax is expensed at the time of payroll, but remains a liability until taxes are due.</para>
        </sect3>
        
        <sect3 id="bus-pay-protocol-3">
           <title>Step 3: Pay the Employee</title>
           <para>Go to the account from which the employee will be paid, for example your <emphasis>Assets:Checking</emphasis> account. Open a split transaction and enter the real values using the Transaction Map above as a guide. Repeat this for all employees.</para>
           <tip>
              <para>This manual process is tedious, especially if you have a large number of employees.</para>
              <para>One &app; tool you certainly want use when entering employee payroll is duplicate transaction (use the <guibutton>Duplicate</guibutton> <emphasis>Toolbar</emphasis> button). This saves you from having to enter all the transaction splits for each employee. You still need to change the amounts of money to match each employee&rsquo;s real payroll values, but you will not have to build the split for each employee.</para>
              <para>If payroll transactions do not change significantly every pay period, you can also use the duplicate transaction feature to duplicate each employee&rsquo;s most recent payroll transaction for the current pay period. If you find you are doing so all the time, read about the Schedule Transactions feature and save even more time!</para>
           </tip>
        </sect3>
        
        <sect3 id="bus-pay-protocol-4">
           <title>Step 4: Pay the Government</title>
           <para>The final thing to do is to pay the taxes to the government. The liability accounts have been collecting the taxes for various government agencies, and periodically you need to send a check to the government to pay this charge. To do so, you simply enter a 2 account transaction in (for example) your checking account to pay off the tax liability. The transaction is between the checking account and the liability account, no expense account is involved. The expense accounts are charged at the time the tax liability is recorded.</para>
        </sect3>
        
     </sect2>
     
     <sect2 id="bus-payroll-example">
        <title>Business Payroll Example</title>
        <para>Using the account setup seen previously, let&rsquo;s go through an example. Assume that there are 2 employees (E1 and E2) who each earn $1000 per month gross salary. The employee contribution to Tax1 and Tax2 are 10% and 5% respectively. The company contribution to Tax1 and Tax2 are 15% and 10% each on top of the employee&rsquo;s gross salary.</para>
        <para>Starting with $50k in the bank, and before doing any payroll, the account hierarchy looks like this:</para>
        <figure>
          <title>Payroll Example: Initial Setup</title>
          <screenshot id="bus-pay-ex1">
            <mediaobject>
              <imageobject>
                 <imagedata fileref="figures/bus_pay_ex1.png"
                 srccredit="Patrick Schweiger" format="PNG"/>
              </imageobject>
              <textobject>
                 <phrase>Payroll Example 1</phrase>
              </textobject>
            </mediaobject>
          </screenshot>
        </figure>
         
        <para>The deductions list for employee 1 are:</para>
           <itemizedlist>
              <listitem>
                 <para><emphasis>E_GROSS_SALARY</emphasis> - Employee gross salary - <emphasis>$1000</emphasis></para>
              </listitem>
              <listitem>
                 <para><emphasis>E_TAX1</emphasis> - Employee contribution to tax1 - <emphasis>$100</emphasis> (10% of E_GROSS_SALARY)</para>
              </listitem>
              <listitem>
                 <para><emphasis>E_TAX2</emphasis> - Employee contribution to tax2 - <emphasis>$50</emphasis> (5% of E_GROSS_SALARY)</para>
              </listitem>
              <listitem>
                 <para><emphasis>C_TAX1</emphasis> - Company contribution to tax1 - <emphasis>$150</emphasis> (15% of E_GROSS_SALARY)</para>
              </listitem>
              <listitem>
                 <para><emphasis>C_TAX2</emphasis> - Company contribution to tax2 - <emphasis>$100</emphasis> (10% of E_GROSS_SALARY)</para>
              </listitem>
           </itemizedlist>
           
           <para>
              <table id="bus-payroll-txn-empl-tbl">
                 <title>Payroll Transaction Map for Employee 1</title>
                 <tgroup cols="3">
                    <thead>
                       <row>
                          <entry>Account</entry><entry>Increase</entry><entry>Decrease</entry>
                       </row>
                    </thead>
                    <tbody>
                       <row>
                          <entry>Assets:Checking</entry><entry></entry><entry>$850 (E_NET_SALARY)</entry>
                       </row>
                       <row>
                          <entry>Expenses:Salaries</entry><entry>$1000 (E_GROSS_SALARY)</entry><entry></entry>
                       </row>
                       <row>
                          <entry>Liabilities:Tax1</entry><entry></entry><entry>$100 (E_TAX1)</entry>
                       </row>
                       <row>
                          <entry>Liabilities:Tax2</entry><entry></entry><entry>$50 (E_TAX2)</entry>
                       </row>
                       <row>
                          <entry>Expenses:Tax1</entry><entry>$150 (C_TAX1)</entry><entry></entry>
                       </row>
                       <row>
                          <entry>Liabilities:Tax1</entry><entry></entry><entry>$150 (C_TAX1)</entry>
                       </row>
                       <row>
                          <entry>Expenses:Tax2</entry><entry>$100 (C_TAX2)</entry><entry></entry>
                       </row>
                       <row>
                          <entry>Liabilities:Tax2</entry><entry></entry><entry>$100 (C_TAX2)</entry>
                       </row>
                    </tbody>
                 </tgroup>
              </table>
           </para>
           
           <para>From the checking account, enter the split transaction for employee 1. It should look like this:</para>
           
          <figure>
            <title>Payroll Example: Employee Split Transaction</title>
            <screenshot id="bus-pay-ex2">
              <mediaobject>
                 <imageobject>
                    <imagedata fileref="figures/bus_pay_ex2.png"
                    srccredit="Patrick Schweiger" format="PNG"/>
                 </imageobject>
                 <textobject>
                    <phrase>Payroll Example 2</phrase>
                 </textobject>
                 <caption>
                    <para>The Split Transaction for Employee 1
                    </para>
                 </caption>
              </mediaobject>
            </screenshot>
          </figure>

           <tip>
              <para>When paying employees, enter only the employee name in the Description area. If you decide to use &app;&rsquo;s check printing capabilities, the check is automatically made out to the correct employee. If you want to record other information in the transaction besides the employee name, use the Notes area, available when viewing the Register in double-line mode.</para>
           </tip>
           <para>Repeat this for the second employee, which leaves the account hierarchy looking like this:</para>
           
          <figure>
            <title>Payroll Example: Accounts After Salaries Paid</title>
            <screenshot id="bus-pay-ex3">
              <mediaobject>
                 <imageobject>
                    <imagedata fileref="figures/bus_pay_ex3.png"
                    srccredit="Patrick Schweiger" format="PNG"/>
                 </imageobject>
                 <textobject>
                    <phrase>Payroll Example 3</phrase>
                 </textobject>
              </mediaobject>
            </screenshot>
          </figure>
        
          <para>Now, you will enter the company contributions. The <emphasis>Liabilities:Tax1</emphasis> and
            <emphasis>Liabilities:Tax2</emphasis> accounts track how much you must pay to the
            government for each tax type. When it is time to pay these agencies, you will
            make a transaction from the checking account to these liability accounts.
            No expense accounts are involved. The main account will then appear like this:</para>
           
           <figure>
             <title>Payroll Example: Accounts After Paying Government</title>
             <screenshot id="bus-pay-ex4">
              <mediaobject>
                 <imageobject>
                    <imagedata fileref="figures/bus_pay_ex4.png"
                    srccredit="Patrick Schweiger" format="PNG"/>
                 </imageobject>
                 <textobject>
                    <phrase>Payroll Example 4</phrase>
                 </textobject>
               </mediaobject>
             </screenshot>
           </figure>
         </sect2>
     </sect1>
</chapter>
