<?xml version="1.0" encoding="UTF-8"?>
<chapter id="details.budgets">
<chapterinfo>
  <authorgroup>
    <author> &Colin.Wright; &Colin.Wright.mail; </author>
    <author> &Jack.H.Ostroff; &Jack.H.Ostroff.mail; </author>
  </authorgroup>
  <date>2011-06-29</date>
  <releaseinfo>4.6</releaseinfo>
</chapterinfo>

<title>Budgets</title>

<sect1 id="details.budgets.define">
<title>What is a budget?</title>

<para>
  A budget is a categorized list of expected income and expenses for a period.
</para>

<para>
  The Budget facility of &kmymoney; allows you to create annual budgets.  More
  than one Budget can be created for any year. You set monthly Budget values
  against any Income or Expense categories that you have defined. The values can
  be set in three ways, depending on the Period:
</para>

<variablelist>
  <varlistentry>
    <term>Monthly</term>
    <listitem><para>(Default) specify a single value applied to every month in
      the Budget</para></listitem>
  </varlistentry>

  <varlistentry>
    <term>Yearly</term>
    <listitem><para>Specify a single value to divide evenly across each month in
      the Budget</para></listitem>
  </varlistentry>

  <varlistentry>
    <term>Individual</term>
    <listitem><para>Specify separate values for each month.</para>
      <para>This is used for income and expenses spread irregularly through the
          year.</para></listitem>
  </varlistentry>
</variablelist>

<para>
  &kmymoney; provides a number of reports which compare actual income
  and expenses against the entered Budgets.  These are described in
  more detail in 
  <link linkend="budget.details.reports">another section</link>.
</para>
</sect1>

<sect1 id="details.budgets.create" >
<title>Your budgets</title>

<para>
  You can access your budgets by clicking the appropriate icon in the navigation
  pane at the left hand side of your &kmymoney; window.
</para>

<para>
  There are two major sections to the budget window.  These are
  described in more detail below.  On the left, the main section
  displays the list of budgets you have created.  Above that are
  buttons for creating, renaming, and deleting budgets.  On the right,
  there are three sections.  At the top is the Accounts List.  At the
  bottom is a display of the amounts assigned to the budget for the
  category selected in the Accounts List above.  Between those two
  areas are some additional controls for managing the budget.
</para>

<sect2>
<title>Viewing, creating, renaming, and deleting budgets</title>

<para>
  This section of the Budgets window displays the list of Budgets
  contained in the current &kmymoney; file. If no Budget has yet been
  created the list will be empty.  The list of Budgets has two
  columns:
</para>

<variablelist>
  <varlistentry>
    <term>Name</term>
    <listitem>
      <para>Name of the Budget</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Year</term>
    <listitem>
      <para>Fiscal year of the Budget.  Note that the starting month
        and day of the fiscal year can be specified in
        the <link linkend="details.settings.general.global">Configure
        &kmymoney; dialog.</link></para>
    </listitem>
  </varlistentry>
</variablelist>

<para>
  Values from the selected Budget are displayed to the right. To select a
  different Budget you can click on the Budget in the list.  Alternatively, when
  the list has focus, you can select a different Budget using the &Up; and &Down;
  keys. If you have made changes to a Budget and then select a different budget
  &kmymoney; will ask you whether you want to save or discard the changes.
</para>

<para>
  There are three buttons above the list of Budgets.
</para>

<variablelist>
  <varlistentry>
    <term>New</term>
    <listitem>
      <para>
	Create a new, empty budget.  The default name of a new budget
	is "Budget &lt;year&gt;" where &lt;year&gt; is the current
	fiscal year.
      </para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Rename</term>
    <listitem>
      <para>Edit the name of the selected Budget.</para>

      <para>You can also edit the name of a Budget by double-clicking
        on the name of a Budget in the list.</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Delete</term>
    <listitem>
      <para>Delete the selected Budget.</para>
    </listitem>
  </varlistentry>

<!--  buttons moved in the UI - they are now described below.  Will remove
      from here after this chapter has been reviewed.
  <varlistentry>
    <term>Revert</term>
    <listitem>
      <para>Reverts the selected Budget to its last stored state.</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Save</term>
    <listitem>
      <para>Accepts any unsaved changes to the selected Budget and
        stores them.</para>
    </listitem>
  </varlistentry>
 -->
</variablelist>

<para>
  Additional options are available on a menu accessed by right-clicking on a
  Budget.
</para>

<variablelist>
  <varlistentry>
    <term>New Budget</term>
    <listitem>
      <para>Create a new, empty Budget.</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Rename Budget</term>
    <listitem>
      <para>Rename the selected Budget.</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Change budget year</term>
    <listitem>
      <para>Displays a window with a list of years to select a
        different fiscal year for the budget.</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Delete budget</term>
    <listitem>
      <para>Delete the selected Budget.</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Copy budget</term>
    <listitem>
      <para>Creates a copy of the selected Budget. The new Budget has the name
        "Copy of &lt;budget&gt;", where &lt;budget&gt; is the name of the copied
        Budget.</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Budget based on forecast</term>
    <listitem>
      <para>Fills in budget amounts based on data from &kmymoney;'s
	Forecast values.  See the section on
	<link linkend="details.forecast.define">Forecasts</link> for
	more information.
      </para>
    </listitem>
  </varlistentry>
</variablelist>
</sect2>

<sect2>
<title>Account List</title>

<para>
  The Accounts List displays the list of Income and Expense Categories.
  (Remember, within &kmymoney;, categories are treated as a special type of
  account.)  As in other places in &kmymoney;, the list is organized in a tree
  structure. The list can be expanded or collapsed to show or hide Subcategories
  within a Category. The Accounts List has a number of columns:
</para>

<variablelist>
  <varlistentry>
    <term>Account</term>
    <listitem>
      <para>Account (Category) name</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Type</term>
    <listitem>
      <para>Category Type (Income or Expense)</para>
    </listitem>
  </varlistentry>

<!-- these seem to have been removed from the display.  Remove from here
     once this is confirmed by the programmers.
  <varlistentry>
    <term>Tax</term>
    <listitem>
      <para>Checked if a Category included in Tax Reports</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>VAT</term>
    <listitem>
      <para>Checked if a Category marked as a VAT Category</para>
    </listitem>
  </varlistentry>
-->

  <varlistentry>
    <term>Total Balance</term>
    <listitem>
      <para>Current balance of Account.  This will be blank for Categories, unless the Category
        is defined in a foreign currency.  In this case, Total Balance will show the value for the
        Category in its defined currency.</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Total Value</term>
    <listitem>
      <para>Total yearly value in the Budget. If a Category has Subcategories
        and the Category's list of Subcategories is collapsed the value displayed
        is the sum of the values for the Category and all of its Subcategories.
        If a Category is defined in a foreign currency, the Total Value will show
        the value in the base currency.</para>
    </listitem>
  </varlistentry>
</variablelist>

<!-- It would be nice to include the actual button icons here to confirm
     which buttons are referred to.  -->
<para>
  Below the Accounts List are several controls. The <guibutton>Update</guibutton>
  and <guibutton>Revert</guibutton> buttons are described further below. The collapse
  and expand buttons collapse or expand the entire Accounts List.
</para>

<para>
  The Accounts List can be filtered in two ways. Checking the <guilabel>Hide
  unused categories</guilabel> checkbox hides any Categories for which no value
  has been assigned to the Category or any of its Subcategories.  To
  the right of this, is an unlabelled text box.  Only categories which
  include whatever is typed in this box are listed, but their parent
  categories are also listed.
</para>

<para>
  Note that changing either the <guilabel>Hide unused budget categories</guilabel>
  or the filter value is likely to change the list of Categories display.
  You may need to re-expand the list to see all the Categories that
  should be displayed with the current settings.
</para>

</sect2>

<sect2>
<title>Assignments</title>

<para>
  The Assignments area shows the values for the Category selected in
  the Accounts List.
</para>

<variablelist>
  <varlistentry>
    <term>Account</term>
    <listitem>
      <para>Displays the name of the selected Category. If the
        Category is a Subcategory, its full name is displayed in the
        Category:Subcategory format.</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Total</term>
    <listitem>
      <para>Displays the total yearly value assigned to the Category.</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Include subaccounts</term>
    <listitem>
      <para>If this is checked, then Reports show actual income or
        expenses in Subcategories belonging to the Category against
        the Category instead of the Subcategory.</para>

      <para>If a Subcategory has a value defined in the Budget, then
        the income and expenses are shown against the
        Subcategory.</para>

      <para>If the Category selected in the Accounts List has its
        Subcategories collapsed, although its Total Value will show the
        sum of the Total Values for all its Subcategories, the amounts
        in the Assignments area may still show 0, unless this box has
        been checked or an amount has explicitly been assigned to the
        Category.</para>

      <para>In general, for you will either check this box and assign
        values to the Category and not to any of its Subcategories, or
        not check the box, and assign values to the Subcategories but
        not the Category.  If any Subcategories have assigned amounts
        when this box is checked, then those amounts are rolled up to
        the Category.</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Clear</term>
    <listitem>
      <para>The <guibutton>Clear</guibutton> button resets the budgeted
        category value or values to zero.</para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Period</term>
    <listitem>
      <para>The <guilabel>Period</guilabel> radio buttons allow you to
        select the period for which the value applies</para>

      <variablelist>
	<varlistentry>
	  <term>Monthly</term>
	  <listitem>
	    <para>A single value is entered, specifying the amount per
              month. This is the default setting.</para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>Yearly</term>
	  <listitem>
	    <para>A single value is entered, specifying the amount per
              year.</para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>Individual</term>
	  <listitem>
	    <para>Values are specified for each Calendar month. This is used
              where expense or income is spread irregularly through the
              year.</para>
	  </listitem>
	</varlistentry>
      </variablelist>

      <para>
        If a value is or values are already specified and the Period is changed
        &kmymoney; will ask whether to use the current total yearly value to
        assign the new values.
      </para>
    </listitem>
  </varlistentry>
</variablelist>
</sect2>

<sect2>
<title>Update and Revert</title>

<para>
  For performance reasons, changes made to a Budget are not saved immediately.
  Instead, they must first be stored using the <guibutton>Update</guibutton>
  button and then permanently saved using the <guibutton>Save</guibutton> button.
</para>

<para>
  When a Budget's values are first modified, the <guibutton>Update</guibutton>
  and <guibutton>Revert</guibutton> buttons are enabled. Multiple changes can be
  made to the Budget. Pressing <guibutton>Update</guibutton> will store the changes
  and disable these buttons.
</para>

<para>
  The <guibutton>Save</guibutton> button only saves changes that have been stored
  using the <guibutton>Update</guibutton> button. Thus, if you have modified a Budget
  but not yet stored the changes <guibutton>Save</guibutton> button will not affect
  the modified Budget and the <guibutton>Update</guibutton> and <guibutton>Revert</guibutton>
  buttons remain enabled.
</para>

<para>
  Revert undoes any changes made to a Budget since the last Update and disables
  the <guibutton>Update</guibutton> and <guibutton>Revert</guibutton> buttons.
</para>

<para>
  Changes stored using <guibutton>Update</guibutton> but not yet saved using
  <guibutton>Save</guibutton> can only be reverted by reloading the &kmymoney; file.
</para>
</sect2>
</sect1>

<sect1 id="budget.details.reports">
<title>Budget Reports</title>

<para>
  &kmymoney; provides a number of reports to compare actual income and expenses
  against a Budget. These are listed in Reports under "Budgeting". There are two
  types of Budget Reports:
</para>

<variablelist>
  <varlistentry>
    <term>Budget only</term>
    <listitem><para>These reports display values from a Budget.</para>
      <variablelist>
        <varlistentry>
          <term>Monthly Budget</term> 
          <listitem><para>Displays the monthly values from a Budget.</para>
          </listitem></varlistentry>
        <varlistentry>
          <term>Yearly Budget</term> 
          <listitem><para>Displays the monthly values from a Budget,
              with yearly total.</para>
          </listitem></varlistentry>
      </variablelist>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Budget vs. Actual</term>
    <listitem><para>These reports compare values from a Budget to
      actual income and expenses.  In each budget report you can find
      the columns Budget, Actual, and Difference. Each report differs
      in the period that is shown.</para>
      <variablelist>
      <varlistentry>
      <term>Budget vs. Actual This Year</term> 
      <listitem><para>From the beginning of the year until today</para>
      </listitem></varlistentry>
      <varlistentry>
      <term>Budget vs. Actual This Year (YTM)</term> 
      <listitem><para>From the beginning of the year until the last
	  day of the previous month</para>
      </listitem></varlistentry>
      <varlistentry>
      <term>Monthly Budgeted vs. Actual</term> 
      <listitem><para>From the beginning of the year until the last
	  day of the current month</para>
      </listitem></varlistentry>
      <varlistentry>
      <term>Yearly Budgeted vs. Actual</term> 
      <listitem><para>From January 1st until December 31st</para>
      </listitem></varlistentry>
      <varlistentry>
      <term>Yearly Budgeted vs. Actual (Graph)</term> 
      <listitem><para>Same as the previous report but it shows the
	  graph by default</para>
      </listitem></varlistentry>
      </variablelist>

      <para>These reports provide a base from which custom reports can
	be created by changing the date range and Budget, among other
	options. </para>
    </listitem>
  </varlistentry>
</variablelist>
</sect1>
</chapter>
