<?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_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>

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

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

    </sect1>

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

    </sect1>

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

    </sect1>

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

</chapter>
