<?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>2024-12-01</date>
  <releaseinfo>5.2.0</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 in the <guilabel>Budgets View</guilabel>, which you can
  display by clicking the appropriate icon in the View Selector at the left hand side
  of your &kmymoney; window.
</para>

<para>
  There are two major sections in the Budgets View.  On the left, there is a 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
  Categories List.  At the bottom is a display of the amounts assigned to the budget
  selected on the left for the category selected in the Categories 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>
  The left section of the Budgets View 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>
        To change the fiscal year of a Budget, double click the year.
      </para>
    </listitem>
  </varlistentry>
</variablelist>

<para>
  Values from the selected Budget are displayed to the right.  To select a different
  Budget you can click the budget name in the list on the left.  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.  You can also edit the name of a Budget
        by double-clicking the name of a Budget in the list.
      </para>
    </listitem>
  </varlistentry>

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

<para>
  Additional options are available on the <guilabel>Budget Options</guilabel> context
  menu accessed by right-clicking 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>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>Categories List</title>
<para>
  The Categories List displays the list of Income and Expense Accounts.  (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
  Categories List has a number of columns:
</para>

<para>
  Aside from the Name column, all other columns may be shown or hidden by
  right-clicking any column header, and checking or unchecking the checkbox next to
  the column name.  For more details about the meaning of each column, see the <link
  linkend="details.categories.view">Categories View</link> section.  Only the columns
  specifically relevant to Budgets are listed below, but all Category columns may be
  displayed.
</para>

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

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

  <varlistentry>
    <term>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, 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>

<para>
  Below the Categories List are several controls. The <guiicon> <inlinemediaobject>
  <imageobject> <imagedata fileref="icon-gtk-floppy.svg" format="SVG"/>
  </imageobject> </inlinemediaobject> </guiicon> <guibutton>Upd</guibutton> (Update)
  and <guiicon> <inlinemediaobject> <imageobject> <imagedata
  fileref="icon-edit-undo.svg" format="SVG"/> </imageobject> </inlinemediaobject>
  </guiicon> <guibutton>Res</guibutton> (Reset) buttons are described further below.
  The <guiicon> <inlinemediaobject> <imageobject> <imagedata
  fileref="icon-zoom-out.svg" format="SVG"/> </imageobject>
  </inlinemediaobject></guiicon> collapse and <guiicon> <inlinemediaobject>
  <imageobject> <imagedata fileref="icon-zoom-in.svg" format="SVG"/> </imageobject>
  </inlinemediaobject></guiicon> expand buttons collapse or expand the entire
  Categories List.
</para>

<para>
  The Categories List can be filtered in two ways.  Checking the <guilabel>Hide
  unused budget categories</guilabel> checkbox hides any Categories for which no
  value has been assigned to the Category or any of its Subcategories in the selected
  budget.  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 displayed.  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 Categories
  List.
</para>

<variablelist>
  <varlistentry>
    <term>Account</term>
    <listitem>
      <para>
        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>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 Categories 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, 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>
        Clicking this button resets the budgeted category value or values to zero.
      </para>
    </listitem>
  </varlistentry>

  <varlistentry>
    <term>Period</term>
    <listitem>
      <para>
        This 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>
  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>
</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>
