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

<!--
      (Do not remove this comment block.)
  Originally designed by Carol Champagne.
  Version: 2.0.0
  Last modified: Sep 19th 2015
  Maintainers: 
               Chris Lyttle <chris@wilddev.net>
  Author:
  		Jon Lapham <lapham@extracta.com.br>
        updated Patrick Schweiger <pks@spiffykitty.com>
                        Chris Good <chris.good@ozemail.com.au>
  Translators:
               (translators put your name and email here)
-->

<!--
A lot of the following text is duplicated in the GnuCash help. The text here in the guide should be 
corrected to be less describing of the interface and more tutorial oriented
-->

<chapter id="chapter_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>
 
  <sect1 id="bus-ap-setup1">
    <title>Initial Setup</title>
    <para>Perform set up tasks listed in <xref linkend="chapter_bus_setup" />.
    </para>
  </sect1>

  <sect1 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>
  </sect1>

  <sect1 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>
 
    <sect2 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>
      <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>
          <caption>
            <para>New Vendor Registration Window</para>
          </caption>
        </mediaobject>
      </screenshot>
    </sect2>
  
    <sect2 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>
    <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>
        <caption>
          <para>Find Vendor Window</para>
        </caption>
      </mediaobject>
    </screenshot>

    <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>
  </sect2>
</sect1>

  <sect1 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>

  <sect2 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>
    <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>
        <caption>
          <para>New Bill Registration Window
          </para>
        </caption>
      </mediaobject>
    </screenshot>

    <para>When you click the <guibutton>OK</guibutton> the <guilabel>Edit Bill</guilabel> opens.</para>
  </sect2>

  <sect2 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>
    <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>
        <caption>
          <para>Edit Bill Window</para>
        </caption>
      </mediaobject>
    </screenshot>

    <para>When you have finished entering all the items, <guilabel>Post</guilabel> the bill. </para>
  </sect2>

  <sect2 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>
      
    <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>
        <caption>
          <para>Post Bill Window</para>
        </caption>
      </mediaobject>
    </screenshot>
  </sect2>

  <sect2 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>
  </sect2>
</sect1>

  <sect1 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>
    
    <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>
        <caption>
          <para>New Vendor Job</para>
        </caption>
      </mediaobject>
    </screenshot>

    <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>
  </sect1>

  <sect1 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 Receivable payment window.</para>
    <screenshot id="bus-ap-payment">
      <mediaobject>
        <imageobject>
          <imagedata fileref="figures/bus_ap_payment.png" srccredit="Patrick Schweiger" format="PNG"/>
        </imageobject>
        <textobject>
          <phrase>Process Payment</phrase>
        </textobject>
        <caption>
         <para>Process Payment Window
         </para>
        </caption>
      </mediaobject>
    </screenshot>

  </sect1>

</chapter>
