<!--
      (Do not remove this comment block.)
  Version: 1.8.4
  Last modified: April 10th 2004
  Maintainers: 
               Chris Lyttle <chris@wilddev.net>
  Author:
  		Jon Lapham <lapham@extracta.com.br>
  Originally written by Carol Champagne.
  Translators:
               (translators put your name and email here)
-->

 <chapter id="chapter4">
  <title>Transactions</title>
    <para>
This chapter will give you the basic information you need to understand and use transactions in GnuCash.  Whereas accounts are the framework and structure of a chart of accounts, transactions are the data which fills each account.
    </para>
  <sect1 id="txns_concepts1">
   <title>Basic Concepts</title>
    <para>
A <emphasis>transaction</emphasis> in a double entry accounting system such as GnuCash is an exchange between at least 2 accounts.  Thus, a single transaction must always consist of at least two parts, a "from" and a "to" account.  The "from" account is passing value to the "to" account.  Accountants call these parts of a transaction <emphasis>Ledger Entries</emphasis>.  In GnuCash, they are called <emphasis>Splits</emphasis>.
   </para>
   <para>
For example, you receive a paycheck and deposit it into your savings account at the bank.  The <emphasis>transaction</emphasis> that occurs is that your bank savings account (an asset) received money from your income account.  Two accounts are affected, and in this case there is a net increase in your equity.
   </para>
   <para>
Working with transactions in GnuCash is performed using what is known as the <emphasis>account register</emphasis>.  Every account you create has an account register.  It will appear familiar to you as it looks very similar to the log used to track checkbooks.
   </para>
  </sect1>

  <sect1 id="txns_registers1">
   <title>The Account Register</title>
    <para>
The <emphasis>account register</emphasis> is the GnuCash window which allows you to view or edit preexisting transactions, or add new transactions for a particular account.  To enter the account register, simply highlight the account name in the account tree window and double-click to open it.  You can also click the <guibutton>Open</guibutton> button in the tool bar or use the right mouse button menu to open the account.  GnuCash will display the account register window.
    </para>

    <sect2 id="txns_registers_twoaccount2">
      <title>Simple Transaction</title>
    <para>
For example, starting with the chart of accounts we created in the previous chapter, double click on the <guilabel>checking</guilabel> asset account.  Let's add a simple transaction to the checking account.  When you first create your accounts in GnuCash, it is common to start them off with an initial balance.  
   </para>
   <para>
In the first transaction row, enter a date (eg: June 1, 2003), a description (eg: "Opening Balance"), click on the Transfer pop-up menu and select <guilabel>Equity:Starting Balances</guilabel>, add a deposit value of $1000, and press the Enter key.  The account register should now appear similar to this figure:
   </para>
     <screenshot id="txns_register_2account">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_register_2account.png"
      srccredit="Chris Lyttle" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>The Checking Account - Register</phrase>
	    </textobject>
	    <caption>
	       <para>This image shows <guilabel>Asset:Checking -
	       Register</guilabel> after inserting a starting value transaction.
	       </para>
	    </caption>
          </mediaobject>
        </screenshot>
   <para>
Setting the starting balances of an account is an example of a simple two account transaction.  In this case, affecting the <guilabel>Asset:Checking</guilabel> and the <guilabel>Equity:Starting Balances</guilabel> accounts.
   </para>
   <para>
As another example of a simple 2 account transaction, add another transaction to describe the purchase of $45.21 worth of groceries.  From within the Asset:Checking account, you would set <guilabel>Transfer</guilabel> to <guilabel>Expenses:Groceries</guilabel>.  The account register should now appear:
   </para>
     <screenshot id="txns_register_2account2">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_register_2account2.png"
      srccredit="Chris Lyttle" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>The Checking Account - Register</phrase>
	    </textobject>
	    <caption>
	       <para>This image shows <guilabel>Asset:Checking -
	       Register</guilabel> after adding a transaction for groceries.
	       </para>
	    </caption>
          </mediaobject>
        </screenshot>
  </sect2>

    <sect2 id="txns_registers_multiaccount2">
      <title>Split Transaction</title>
  <para>
The need for 3 or more account transactions occurs when you need to split either the "from" or the "to" account in a transaction into multiple accounts.  The classic example of this is when you receive a paycheck.  Your take home pay from a paycheck will typically be less than your net pay, with the difference being due to taxes, retirement account payments, and/or other items.  Thus, the single transaction of you receiving a paycheck involves other accounts besides simply  <guilabel>Assets:Checking</guilabel> and <guilabel>Income:Salary</guilabel>.
  </para>
  <para>
To add a paycheck transaction from the <guilabel>Assets:Checking</guilabel> account register window, click on a new transaction line, and click on <guilabel>Split</guilabel>.  First enter the description of this transaction on the first line (eg: "Employers R Us").  In the "split" line below this, the the gross total of your paycheck (eg: $1000) as a withdrawal transfer from <guilabel>Income:Salary</guilabel>.  Now, individually insert deposits to <guilabel>Asset:Checking</guilabel> (eg: $670), <guilabel>Expenses:Taxes:Federal</guilabel> (eg: $180), <guilabel>Expenses:Taxes:Medicare</guilabel> (eg: $90), and <guilabel>Expenses:Taxes:Social Security</guilabel> (eg: $60).  The final split should look like this:
  </para>
     <screenshot id="txns_register_multiaccount">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_register_multiaccount.png"
      srccredit="Chris Lyttle" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Account Register - Split Transaction</phrase>
	    </textobject>
	    <caption>
	       <para>This image shows <guilabel>Asset:Checking -
	       Register</guilabel> after adding a split transaction for salary.
	       </para>
	    </caption>
          </mediaobject>
        </screenshot>
   </sect2>

    <sect2 id="txns_registers_features2">
      <title>Features of the Account Register</title>
    <para>
The title bar of the account register displays the account name, which in this case is <guilabel>Asset:Checking</guilabel>.   Below the title bar, the menu bar displays the menu items available within the account register, and the tool bar contains handy buttons that help you work with the account register.
    </para>
    <para>
Although each transaction has at least two splits, all you see in the basic register is a summary of the splits affecting the current account.  In the Transfer column, you can see the other account from which money is <emphasis>transferred</emphasis> into or out of this account.   If the transaction affects more than two accounts, GnuCash displays <guilabel>-- Split Transaction --</guilabel> to show it is a multiple-split transaction.  You can see the individual splits of each transaction by clicking the <guilabel>Split</guilabel> button in the tool bar while selecting the appropriate transaction.
    </para>
    <para>
For split transactions, the first line of the transaction is the <emphasis>transaction line</emphasis>.   It contains a <guilabel>Date</guilabel>, optional <guilabel>Num</guilabel> (such as a check number), transaction <guilabel>Description</guilabel>, total amount affecting the current account (<guilabel>Tot Deposit</guilabel> here), and updated account <guilabel>Balance</guilabel> after the current transaction.  Note that in the expanded view, the <guilabel>Transfer</guilabel> column heading disappears, and there is no account name listed in that field.  This line shows you only a summary of the transaction's effect on the current account.  For more detailed information, you need to look at the individual splits that make up the transaction.
    </para>
    <para>
The partial lines below the transaction line are the <emphasis>split lines</emphasis>, and they are separated by gray lines.   As you highlight one of the split lines, the column headings change to show the split-related  fields:

<screenshot id="txns_registersplit2">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_registersplit2.png"
      srccredit="Chris Lyttle" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>How split headings change</phrase>
	    </textobject>
	    <caption>
	       <para>This image shows how split headings change.
	       </para>
	    </caption>
          </mediaobject>
        </screenshot>

    </para>
    <para>
Each split contains an optional <guilabel>Action</guilabel>, or type of split, which you can either type in or choose from a pull-down list. The split also contains an optional <guilabel>Memo</guilabel> which describes the split.  Each split affects an <guilabel>Account</guilabel>, which can be selected from a pull-down list of your accounts.  The <guilabel>R</guilabel> field indicates whether the split has been reconciled.  The last two columns show the amount of the split and whether money is coming into or going out of the account.
    </para>
    <para>
As we discussed in section 2.1, total debits (left-column entries) must equal total credits (right-column entries) for each transaction.  In the example shown above, the total debits equal the total credits, so this transaction is balanced.   If you notice, the transaction line contains the same debit amount as the <guilabel>Checking</guilabel> split line.  Why is this shown twice?  Because the transaction line is merely a <emphasis>summary</emphasis> of the transaction's effect on the current account.   The same transaction in a different account will have a different transaction line, one that shows the effect on that particular account.  You can see this by highlighting another split line and clicking the <guilabel>Jump</guilabel> button on the tool bar.
    </para>
    <para>
In this example, if you jump to the <guilabel>Income:Salary</guilabel> account, GnuCash brings up the same transaction in the <guilabel>Income:Salary - Register</guilabel>:

<screenshot id="txns_registersplit3">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_registersplit3.png"
      srccredit="Chris Lyttle" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>A jump to the Income:Salary account</phrase>
	    </textobject>
	    <caption>
	       <para>This image shows a jump to the <guilabel>Income:Salary
	       </guilabel> account.
	       </para>
	    </caption>
          </mediaobject>
        </screenshot>

    </para>
    <para>
Note that the transaction line total now summarizes the effect on the <guilabel>Income:Salary</guilabel> account instead of the <guilabel>Checking Account</guilabel>, because you are looking at the <guilabel>Income:Salary</guilabel> account register.    The splits are exactly the same, but the transaction line now reflects the credit to the <guilabel>Income:Salary</guilabel> account.
    </para>
    <para>
At the bottom left of the register window, GnuCash displays helpful messages as you move about the register.   To the right, you can see the current account balance and the total of cleared splits.
    </para>
   </sect2>

  </sect1>

  <sect1 id="txns_regstyle1">
   <title>Choosing a Register Style</title>
    <para>
GnuCash offers several options for viewing your registers.  The default style is <guilabel>Basic Ledger</guilabel> mode, which displays only the summary of splits affecting the current account.  This is the style that most closely resembles other popular personal financial packages.
    </para>
     <para>
You can choose a different register style by selecting <guimenu>View</guimenu> -&gt; <guisubmenu>Style</guisubmenu> from the menu.  The <guimenuitem>Auto-Split Ledger</guimenuitem> style expands the current transaction automatically.  As you highlight a new transaction in the register, the transaction automatically expands to show all splits.    The <guimenuitem>Transaction Journal</guimenuitem> style is more like an accounting journal, in which all splits are shown for all transactions.
    </para>
     <para>
All styles permit you to view your data in either single-line or double-line format.  In the <guimenu>View</guimenu> -&gt; <guisubmenu>Style</guisubmenu> menu item, check the box next to <guimenuitem>Double Line</guimenuitem>, and you will see your transaction line expand to two register lines.
    </para>
  </sect1>

  <sect1 id="txns_shortcuts1">
   <title>Using Entry Shortcuts</title>
    <para>
GnuCash provides several time-saving shortcuts for entering your data.  When you type the first few characters of a description that you have used before, the QuickFill feature automatically fills in the rest of the transaction as you last entered it.   When you type in the first characters of an account name in either the <guilabel>Transfer</guilabel> field of the transaction line or the <guilabel>Account</guilabel> field of the split line, QuickFill will automatically complete the name from your account list.  It also helps you with entering sub-accounts in these fields: simply type the first characters of the parent account name followed by a colon and the first characters of the sub-account name.  For example, to enter <guilabel>Assets:Checking</guilabel>, you might type <userinput>A:C</userinput> and let GnuCash fill in the rest.
    </para>
    <para>
Register keyboard shortcuts also save you time, and GnuCash provides several of them.  In the date field, you can type:
    </para>
   <itemizedlist>
    <listitem>
     <para>
<keycap>+</keycap> or <keycap>=</keycap> to increment the date and <keycap>-</keycap> or <keycap>_</keycap> to decrement the date
    </para>
    </listitem>
    <listitem>
     <para>
<keycap>]</keycap> or <keycap>}</keycap> to increment the month and <keycap>[</keycap> or <keycap>{</keycap> to decrement the month
    </para>
    </listitem>
    <listitem>
     <para>
<keycap>M</keycap> or <keycap>m</keycap> to enter the first date of the month
    </para>
    </listitem>
    <listitem>
     <para>
<keycap>H</keycap> or <keycap>h</keycap> to enter the last date of the month
    </para>
    </listitem>
    <listitem>
     <para>
<keycap>Y</keycap> or <keycap>y</keycap> to enter the first date of the year
    </para>
    </listitem>
    <listitem>
     <para>
<keycap>R</keycap> or <keycap>r</keycap> to enter the last date of the year
    </para>
    </listitem>
    <listitem>
     <para>
<keycap>T</keycap> or <keycap>t</keycap> to enter today's date
    </para>
    </listitem>
   </itemizedlist>
     <para>
In the <guilabel>Num</guilabel> field of the transaction line, you can type <keycap>+</keycap> to increment the transaction number from the last one you typed in.  Typing <keycap>-</keycap> will decrement the number.  This will also work in the <guilabel>Action</guilabel> field of the split line, if you choose to enter split numbers there.  The <guilabel>Action</guilabel> field also supports QuickFill - if you type the first characters of a common action (such as <guilabel>Deposit</guilabel>), GnuCash will fill in the rest.
    </para>
     <para>
In any of the amount fields, you can use a built-in calculator.  Simply type in the first value, followed by <keycap>+</keycap>, <keycap>-</keycap>, <keycap>*</keycap>, or <keycap>/</keycap>, then type in the second value.  GnuCash will perform the calculation and return the resulting value to the amount field when you press the <keycap>Tab</keycap> key.
    </para>
     <para>
Most of the menu items have keyboard shortcuts, and these are marked by underlined characters in the menu names.  Press <keycap>Alt</keycap> + [underlined character] to bring up the menu,  then select an item by typing its underlined character.  For example, typing <keycombo><keycap>Alt</keycap><keycap>T</keycap></keycombo> brings up the Transaction menu, then typing <keycap>S</keycap> will split the transaction.  A few of the menu items use <keycap>Ctrl</keycap> key shortcuts instead, and these are listed next to the item.
    </para>
     <para>
To move around the register, use these keys to save time:
    </para>
   <itemizedlist>
    <listitem>
     <para>
<keycap>Tab</keycap> to move to the next field, <keycombo><keycap>Shift</keycap><keycap>Tab</keycap></keycombo> to move to the previous field
    </para>
    </listitem>
    <listitem>
     <para>
<keycap>Home</keycap> to move to the beginning of the field, <keycap>End</keycap> to move to the end of the field
    </para>
    </listitem>
    <listitem>
     <para>
<keycap>Enter</keycap> or <keycap>&darr;</keycap> to move to the next transaction, <keycap>&uarr;</keycap> to move to the previous transaction
    </para>
    </listitem>
    <listitem>
     <para>
<keycap>Page Up</keycap> to move up one screen, <keycap>Page Down</keycap> to move down one screen
    </para>
    </listitem>
    <listitem>
     <para>
<keycombo><keycap>Shift</keycap><keycap>Page Up</keycap></keycombo> to go to the first transaction, <keycombo><keycap>Shift</keycap><keycap>Page Down</keycap></keycombo> to go to the last transaction
    </para>
    </listitem>
   </itemizedlist>
     <para>
In the <guilabel>Reconcile</guilabel> window you can use these keyboard shortcuts:
    </para>
   <itemizedlist>
    <listitem>
     <para>
<keycap>Tab</keycap> moves to the next box and <keycap>Shift</keycap><keycap>Tab</keycap> moves to the previous box
    </para>
    </listitem>
    <listitem>
     <para>
Space bar toggles the status between reconciled and not reconciled
    </para>
    </listitem>
    <listitem>
     <para>
<keycap>&uarr;</keycap> and <keycap>&darr;</keycap> navigate through the entries within the current box
    </para>
    </listitem>
   </itemizedlist>
  </sect1>

  <sect1 id="txns_reconcile1">
  <title>Reconciliation</title>
  <para>Transactions are typically checked against bank statements - a process known as "reconciliation". GnuCash keeps track of the reconciliation status of each transaction.</para>
  <para>The reconciliation status of a transaction is shown by the reconciliation (R) field. 'y' indicates that a transaction has been reconciled, 'n' indicates that it has not, and 'c' indicates that it has been cleared, but not reconciled. You can toggle the reconciliation status between 'n' and 'c' by clicking in the (R) field; you can set it to 'y' by using the Reconciliation Window.</para>
  <para>At the bottom of the account window, there are two running totals: 'Balance', and 'Cleared'. 'Cleared' should correspond to how much money the bank thinks you have in your account, while 'Balance' includes outstanding transactions.</para>

  <sect2 id="txns_reconcile_window2">
  <title>Reconcile Window</title>
  <para>The Reconciliation Window is used to reconcile a GnuCash account with a statement that a bank or other institution has sent you. Reconciliation is useful not only to double-check your records against those of your bank, but also to get a better idea of outstanding transactions, e.g. uncashed checks.</para>
  <para>At the bottom of the account window, there are two running balances: the "cleared and reconciled" balance, and the "total" balance. The "cleared and reconciled" balance should correspond to how much money the bank thinks you have in your account, and the "total" balance includes outstanding transactions.</para>
  <para>For example, when you write a check for something, you should enter the transaction into GnuCash. The reconciliation (R) field of the transaction will initially contain n (new). Your new entry will contribute to the "total" balance, but not to the "cleared and reconciled" balance. Later, if you think that the check has been cashed, you might click on the transaction's R field to change it to c (cleared). When you do this, the "cleared and reconciled" balance will change to include this amount. When the bank statement arrives, you can then compare it to what you've recorded in GnuCash in the Reconciliation window. There, you will be able to change the R field to y (reconciled). You cannot reconcile in the register window, you must use the reconciliation window. Once a transaction has been marked "reconciled", it can no longer be easily changed.</para>
  <para>To use the Reconciliation Windows, select an account from the account tree and click on <guimenu>Actions</guimenu> -> <guimenu>Reconcile</guimenu>.  A window will appear in which you can enter the reconcile information.</para>

<screenshot id="txns_reconcile_window_1">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_reconcile_window1.png"
      srccredit="Jon Lapham" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Reconcile Window</phrase>
	    </textobject>
	    <caption>
	       <para>The initial reconcile window.</para>
	    </caption>
          </mediaobject>
        </screenshot>

  <itemizedlist>
  <listitem>
  <para><emphasis>Reconcile Info: Statement Date</emphasis> - this is the date of the statement you will be reconciling against.</para>
  </listitem>
  <listitem>
  <para><emphasis>Reconcile Info: Starting Balance</emphasis> - this is a non-editable item which displays the balance from the previous reconciliation.  It should match the starting balance in your statement.</para>
  </listitem>
  <listitem>
  <para><emphasis>Reconcile Info: Ending Balance</emphasis> - this is the ending balance as it appears in the statement.</para>
  </listitem>
  <listitem>
  <para><emphasis>Reconcile Info: Include Sub-accounts</emphasis> - select this if you want to include the sub-accounts of the currently selected account in this reconciliation.</para>
  </listitem>
  <listitem>
  <para><emphasis>Enter Interest Payment</emphasis> - click here to enter an interest payment to XXX (??).</para>
  </listitem>
  </itemizedlist>
  
  <para>Click on the <guibutton>Ok</guibutton> button, and you will see the transactions listing reconcile window:</para>

<screenshot id="txns_reconcile_window_2">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_reconcile_window2.png"
      srccredit="Jon Lapham" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Reconcile Window</phrase>
	    </textobject>
	    <caption>
	       <para>The transactions listing in the reconcile window.</para>
	    </caption>
          </mediaobject>
        </screenshot>

  <para>The two lists called <guilabel>Funds In</guilabel> and <guilabel>Funds Out</guilabel> lists all the unreconciled transactions. The 'R' columns show whether the transactions have been cleared or reconciled.</para>
  <para>Now, examine each item on the bank statement, and look for the matching item in the Reconcile window.</para>
  <para>If you cannot find one, then perhaps you forgot to enter a transaction, or did not know that the transaction had happened. You can use the New button on the tool bar, or the New menu item in the Transaction menu, to open a register window and enter the missing transaction. The new item will appear in the Reconcile window when you press enter after entering the transaction.</para>
  <para>When you find the item in the Reconcile window, compare the amount in the item to the amount on the statement. If they disagree, you may have made an error when you entered the transaction in GnuCash. You can use the <guibutton>Edit</guibutton> button on the tool bar, or the <guimenu>Edit</guimenu> menu item in the Transaction menu, to open a register window and correct the transaction.</para>
  <para>If the amounts agree, click on the item in the Reconcile window. The 'R' column will change to 'y' (reconciled) from 'n' or 'c'.</para>
  <para>You then repeat this for each item that appears on the bank statement, verifying that the amounts match with the amounts in GnuCash, and marking off transactions in GnuCash as they are reconciled.</para>
  <para>At the bottom of the "Reconcile" window is a "Difference" field, which should show $0.00 when you are done reconciling. If it shows some other value, then either you have missed transactions, or some amounts may be incorrect in GnuCash. (Or, less likely, the bank may have made an error.)</para>
  <para>When you have marked off all the items on the bank statement, and when the difference is $0.00, press the Finish button on the tool bar or select Finish from the Reconcile menu (the latter method will work even if your "Difference" isn't $0.00). The Reconcile window will close. In the Register window, the R field of the reconciled transactions will change to 'y'. </para>
  </sect2>
  </sect1>

  <sect1 id="txns_sxn1">
  <title>Scheduled Transactions</title>
  <para>
Scheduled transactions is made to help entering repetitive money operations, like subscriptions, insurances or taxes. By using scheduled transactions, you only have to enter the concerned transaction once, set a few parameters like start date, frequency and a little description, and then GnuCash will tell you whenever a scheduled transaction is ready to create, and create it for you.
  </para>
  <para>
In this howto, we'll take a monthly Internet subscription of 20 EUR as example, which is taken on the first day of each month.
  </para>
  <para>
In GnuCash, there are two ways of creating scheduled transactions, from the ledger or from the scheduled transactions editor.
  </para>
  <sect2 id="txns_sxn_ledger2">
  <title>Creating from the Ledger</title>
  <para>
Enter the first occurence of your to-schedule transaction in the ledger.
<screenshot id="txns_sxn_ledger_1">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_sxn_ledger1.png"
      srccredit="Sebastien Millet" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Step one creating scheduled transaction from the ledger</phrase>
	    </textobject>
	    <caption>
	       <para>Step one creating scheduled transaction from the ledger</para>
	    </caption>
          </mediaobject>
        </screenshot>
  </para>
  <para>
  Then you right click on your transaction and select "Schedule..."
<screenshot id="txns_sxn_ledger_2">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_sxn_ledger2.png"
      srccredit="Sebastien Millet" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Step two creating scheduled transaction from the ledger</phrase>
	    </textobject>
	    <caption>
	       <para>Step two creating scheduled transaction from the ledger</para>
	    </caption>
          </mediaobject>
        </screenshot>
  </para>
  <para>
  A window like this will appear:
<screenshot id="txns_sxn_ledger_3">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_sxn_ledger3.png"
      srccredit="Sebastien Millet" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Step three creating scheduled transaction from the ledger</phrase>
	    </textobject>
	    <caption>
	       <para>Step three creating scheduled transaction from the ledger</para>
	    </caption>
          </mediaobject>
        </screenshot>
  </para>
  <para>
Let's fill the values, we know that the subscription is taken on the first of each month, and the next one is for next month (since we entered the one for this month manually) :
<screenshot id="txns_sxn_ledger_4">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_sxn_ledger4.png"
      srccredit="Sebastien Millet" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Filling in data to a scheduled transaction</phrase>
	    </textobject>
	    <caption>
	       <para>Filling in data to a scheduled transaction</para>
	    </caption>
          </mediaobject>
        </screenshot>
  </para>
  <para>
Click the OK button, and the transaction will be scheduled.  GnuCash now has memorized this scheduled transaction and on the first of next month, it will pop up a window asking if it should create it (see far below for a screenshot of this window).
  </para>
  </sect2>

  <sect2 id="txns_sxn_editor2">
  <title>Creating from the Editor</title>
  <para>
Another way of entering a scheduled transaction is from the Scheduled Transaction Editor, it may be faster if we have several scheduled transactions to create at once.
  </para>
  <para>
From the main accounts windows, go in the Actions menu, select Scheduled Transactions, a submenu will open in which you'll click Scheduled transaction Editor.
<screenshot id="txns_sxn_editor_1">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_sxn_editor1.png"
      srccredit="Sebastien Millet" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Step one creating scheduled transaction from the editor</phrase>
	    </textobject>
	    <caption>
	       <para>Step one creating scheduled transaction from the editor</para>
	    </caption>
          </mediaobject>
        </screenshot>
  </para>
  <para>
A window like this will pop up :
<screenshot id="txns_sxn_editor_2">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_sxn_editor2.png"
      srccredit="Sebastien Millet" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Step two creating scheduled transaction from the editor</phrase>
	    </textobject>
	    <caption>
	       <para>Step two creating scheduled transaction from the editor</para>
	    </caption>
          </mediaobject>
        </screenshot>
  </para>
  <para>
This window contains a list, now empty, of all the scheduled transactions. Let's create a new one by clicking on the "New" button, another window will pop up :
<screenshot id="txns_sxn_editor_3">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_sxn_editor3.png"
      srccredit="Sebastien Millet" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Step three creating scheduled transaction from the editor</phrase>
	    </textobject>
	    <caption>
	       <para>Step three creating scheduled transaction from the editor</para>
	    </caption>
          </mediaobject>
        </screenshot>
  </para>
  <para>
This window mays seem complicated but it's fairly eay to understand.  First, let's enter a name for this new scheduled transaction, this name will only identify it in the Scheduled Transaction Editor, it will never
appear in the ledger.
  </para>
  <para>
Then we'll enter the transaction's parameters. We know that the subscription is taken on the first day of each month, so the start date will be Nov 1, 2003 (assuming november is the next month), the frequency
will be "Monthly", it will be taken every month on the 1st.
 </para>
 <para>
In the "Options" tab you have three options :
 </para>
   <itemizedlist>
    <listitem>
    <para>
"Create automatically" will insert this transaction in the ledger
without asking you before (see below)
    </para>
    </listitem>
    <listitem>
    <para>
"Create n days in advance" is explicit
    </para>
    </listitem>
    <listitem>
    <para>
"Remind me n days in advance" is explicit and used for example when you have to pay something by check, GnuCash can remind you one week before so you send your check before the deadline.
    </para>
    </listitem>
    </itemizedlist>
 <para>
The End tab allows you to tell GnuCash that this scheduled transaction won't last for ever, for example if you are repaying a loan, you can enter the loan end date.
 </para>
 <para>
Since in our example the internet subscription is automatically taken from the account, we have no need to create it in advance, nor give an end date.
  </para>
  <para>
Finally, enter your transaction in the lower part as you would do in the ledger, with the only difference of having no date.
  </para>

  <note>
  <para>
Warning: don't use the ENTER key like in the ledger, as it will activate the default button of the whole window : Cancel. Instead, use TAB to go to the next field, and when you have finished entering your transaction, click on the "Enter" button to validate it.
  </para>
  </note>

  <note>
  <para>
Note: In the version I have (1.8.5) the "Debit Formula" and "Credit Formula" are swapped, so I typed 20 as debit for my bank account, but you'll see below that it will be recorded as funds in. Look in your version if the bug is still here, and remember that the debit column is the right one, and the credit the left one.
  </para>
  </note>

  <para>
Now, you should have a window like this:
<screenshot id="txns_sxn_editor_4">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_sxn_editor4.png"
      srccredit="Sebastien Millet" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Validate a scheduled transaction from the editor</phrase>
	    </textobject>
	    <caption>
	       <para>Validate a scheduled transaction from the editor</para>
	    </caption>
          </mediaobject>
        </screenshot>  
  </para>
  <para>
You have to validate the transaction you just entered, like in the ledger, before clicking the OK button. Many users reported problems creating scheduled transactions because they were not validating the template, and the scheduled transaction was not created.
  </para>
  <para>
Now click OK, it takes you to the previous window, now with one item in
the list :
<screenshot id="txns_sxn_editor_5">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_sxn_editor5.png"
      srccredit="Sebastien Millet" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Validate a scheduled transaction from the editor</phrase>
	    </textobject>
	    <caption>
	       <para>Validate a scheduled transaction from the editor</para>
	    </caption>
          </mediaobject>
        </screenshot>
    </para>

  <para>
If you click in the calendar part on the first day of one month, a small window, following your mouse, will show you what is planned for this day.
  </para>
  <para>
You can now close the Scheduled Transaction Editor window, and save your work.
  </para>
  <para>
From now on, on each first day of month (or the next time you launch GnuCash after this day) a windows will pop up to remind you to create this transaction :
<screenshot id="txns_sxn_editor_6">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_sxn_editor6.png"
      srccredit="Sebastien Millet" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Scheduled transaction popup reminder</phrase>
	    </textobject>
	    <caption>
	       <para>Scheduled transaction popup reminder</para>
	    </caption>
          </mediaobject>
        </screenshot>
  </para>
  <para>
You can click on the list entry to see the detailed transaction in the lower part, then just click on Next to advance.
  </para>
  <para>
When you click Next, a window summaring all transactions to be created will appear :
<screenshot id="txns_sxn_editor_7">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_sxn_editor7.png"
      srccredit="Sebastien Millet" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Scheduled transaction summary</phrase>
	    </textobject>
	    <caption>
	       <para>Scheduled transaction summary</para>
	    </caption>
          </mediaobject>
        </screenshot>
  </para>
  <para>
In this window you can adjust the transactions that will be created.  For example, this month my ISP made a special offer and my subscription only costed 10EUR, so I just modified the amount from 20 to 10.
  </para> 
  <para>
When you have finished with this window, just click "Finish". The window will disappear and the transactions will be created.
  </para>
  <para>
Then if you take a look in your bank account, you'll see the transaction has been created :
<screenshot id="txns_sxn_editor_8">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_sxn_editor8.png"
      srccredit="Sebastien Millet" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Scheduled transaction created transaction</phrase>
	    </textobject>
	    <caption>
	       <para>Scheduled transaction created transaction</para>
	    </caption>
          </mediaobject>
        </screenshot>
  </para>
  </sect2>
  </sect1>

  <sect1 id="txns_puttoget1">
  <title>Putting It All Together</title>
  <para>
In the previous sections of this chapter the concepts and mechanics of working with transactions in GnuCash has been discussed.  This section will expand upon the chart of accounts initially built in the previous chapter.
  </para>
  <para>
Start by opening your chart of accounts file.  Assuming you have been following the progress of this example chart of accounts, you should have 3 transactions already saved within the checking account.  The main window should look something like this:
<screenshot id="txns_puttoget">
  <mediaobject>
    <imageobject>
      <imagedata fileref="figures/txns_puttoget1.png"
      srccredit="Chris Lyttle" format="PNG"/>
            </imageobject>
	    <textobject>
	        <phrase>Starting point for Putting It All Together</phrase>
	    </textobject>
	    <caption>
	       <para>This image shows the starting point for this section.
	       </para>
	    </caption>
          </mediaobject>
        </screenshot>
  </para>

  <sect2 id="txns_puttoget_open2">
  <title>Opening Balances</title>
  <para>
As shown earlier with the <guilabel>Asset:Checking</guilabel> account, the starting balances in an account are typically assigned to a special account called <guilabel>Equity:Starting Balances</guilabel>.  To start filling in this chart of account, begin by setting the starting balances for the accounts.  Assume that there is $1000 in the savings account and $500 charged on the credit card.  
  </para>
  <orderedlist>
  <listitem>
  <para>
  Open the <guilabel>Assets:Savings</guilabel> account register.  Select <guimenu>View</guimenu> -&gt; <guisubmenu>Style</guisubmenu> from the menu and check to make sure you are in Basic Ledger style.  You will view your transactions in the other modes later, but for now let's enter a basic transaction using the basic default style.
  </para>
  </listitem>
  <listitem>
  <para>
From the <guilabel>Asset:Savings</guilabel> account register window, enter a basic 2 account transaction to set your starting balance to $1000, transferred from <guilabel>Equity:Starting Balances</guilabel>.  Remember, basic transactions transfer money from a source account to a destination account.  Record the transaction (press the 'enter' key, or click on the 'enter' icon).
  </para>
  </listitem>
  <listitem>
  <para>
From the <guilabel>Asset:Checking</guilabel> account register window, confirm that you have already set the starting balance to $1000, transferred from <guilabel>Equity:Starting Balances</guilabel>.  This should already have been done previously from the example earlier in this chapter, but if not, do so now.
  </para>
  </listitem>
  <listitem>
  <para>
From the <guilabel>Liabilities:Visa</guilabel> account register window, enter
a basic 2 account transaction to set your starting balance to $500, transferred from <guilabel>Equity:Starting Balances</guilabel>.  This is done by entering the $500 as a "decrease", since it is money you borrowed.  Record the transaction (press the 'enter' key, or click on the 'enter' icon).
  </para>
  </listitem>
  </orderedlist>
  <para>
You should now have 3 accounts with opening balances set.  <guilabel>Assets:Checking</guilabel>, <guilabel>Assets:Savings</guilabel>, and <guilabel>Liabilities:Visa</guilabel>.
  </para>
  </sect2>

  <sect2 id="txns_puttoget_add2">
  <title>Additional Transaction Examples</title>

  <para>
Now add some more transactions to simulate a month's expenses.  During the month, $78 is spent on electricity, $45 on phone, and $350 on rent.  All paid by check.  Finally, let's move $100 from the savings account to the checking account.
  </para>

  <orderedlist>
  <listitem>
  <para>
Open the <guilabel>Expenses:Electricity</guilabel> account register and enter a simple 2 account transaction to pay the $78 electrical bill at the end of the current month (eg: June 30, 2003).  Enter a description (eg: Light Company) and the check number (eg: 101).  The <guilabel>Transfer</guilabel> account should be <guilabel>Assets:Checking</guilabel>.
  </para>
  </listitem>
  <listitem>
  <para>
Open the <guilabel>Assets:Checking</guilabel> account register and enter a simple 2 account transaction to pay the $45 phone bill at the end of the current month (eg: June 30, 2003).  Enter a description (eg: Phone Company Name) and the check number (eg: 102).  The <guilabel>Transfer</guilabel> account should be <guilabel>Expenses:Phone</guilabel>.  Notice that you can enter expense transactions from either the credit side (the expense accounts) or the debit side (the asset account).
  </para>
  </listitem>
  <listitem>
  <para>
Open the <guilabel>Expenses:Rent</guilabel> account register and enter a simple 2 account transaction to pay the $350 in rent at the end of the current month (eg: June 30, 2003).  Enter a description (eg: June Rent) and the check number (eg: 101).  The <guilabel>Transfer</guilabel> account should be <guilabel>Assets:Checking</guilabel>.
  </para>
  <para>
Duplicate this transaction using the <guibutton>Duplicate</guibutton> button in the tool bar.  Start by clicking on the current rent transaction, and click on the <guilabel>Duplicate</guilabel> icon.  Enter the transaction date a month out in the future (eg: July 31, 2003) and set the check number (eg: 102), and notice the blue line separator that GnuCash uses to separate future transactions from current ones.  In this way, you can enter transactions before they occur.
  </para>
  <para>
You could also set up a scheduled transaction to pay your rent, since the value of the rent is likely to be constant for the foreseeable future.  FIXME, add scheduled transaction stuff.
  </para>
  </listitem>
  <listitem>
  <para>
To transfer money from you savings account to your checking account, open the <guilabel>Assets:Savings</guilabel> account register, add a new transaction setting the Transfer to <guilabel>Assets:Checking</guilabel> in the amount of $100.
  </para>
  </listitem>
  </orderedlist>

  </sect2>
  </sect1>
 </chapter>
