/
ch_basics.xml
1577 lines (1352 loc) · 72.2 KB
/
ch_basics.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter SYSTEM "gnc-docbookx.dtd">
<!--
(Do not remove this comment block.)
Version: 2.0.0
Last modified: 2014-08-28 (fell)
modified: October 25th 2010
modified: January 12th 2007
modified: July 9th 2006
Maintainers:
Cristian Marchi <cri.penta@gmail.com>
Chris Lyttle <chris@wilddev.net>
Author:
Jon Lapham <lapham@extracta.com.br>
Updated Bengt Thuree <bengt@thuree.com>
Originally written by Carol Champagne.
Translators:
(translators put your name and email here)
-->
<chapter id="chapter_basics">
<title>The Basics</title>
<para>This chapter will introduce some of the basics of using &app;. It is
recommended that you read through this chapter, before starting to do any
real work with &app;. Next chapters will begin to show
you hands on examples.</para>
<sect1 id="basics-accounting1">
<title>Accounting Concepts</title>
<para>&app; is easy enough to use that you do not need to have a
complete understanding of accounting principles to find it useful.
However, you will find that some basic accounting knowledge will prove to
be invaluable as &app; was designed using these principles as a
template. It is highly recommended that you understand this section of the
guide before proceeding.</para>
<sect2 id="basics-accounting52">
<title>The 5 Basic Accounts</title>
<para>Basic accounting rules group all finance related things into 5
fundamental types of <quote>accounts</quote>. That is, everything that
accounting deals with can be placed into one of these 5 accounts:</para>
<variablelist>
<title>Account types</title>
<varlistentry>
<term><emphasis>Assets</emphasis></term>
<listitem>
<para>Things you own</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Liabilities</emphasis></term>
<listitem>
<para>Things you owe</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Equity</emphasis></term>
<listitem>
<para>Overall net worth</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Income</emphasis></term>
<listitem>
<para>Increases the value of your
accounts</para>
</listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Expenses</emphasis></term>
<listitem>
<para>Decreases the value of your
accounts</para>
</listitem>
</varlistentry>
</variablelist>
<para>It is clear that it is possible to categorize your financial world
into these 5 groups. For example, the cash in your bank account is an
asset, your mortgage is a liability, your paycheck is income, and the
cost of dinner last night is an expense.</para>
</sect2>
<sect2 id="basics-accountingequation2">
<title>The Accounting Equation</title>
<para>With the 5 basic accounts defined, what is the relationship
between them? How does one type of account affect the others? Firstly,
equity is defined by assets and liability. That is, your net worth is
calculated by subtracting your liabilities from your assets:</para>
<equation id="accounting_equation_static">
<title>The static accounting equation</title>
<mathphrase>Assets - Liabilities = Equity</mathphrase>
</equation>
<para>Furthermore, you can increase your equity through income, and
decrease equity through expenses. This makes sense of course, when you
receive a paycheck you become <quote>richer</quote> and when you pay for dinner you
become <quote>poorer</quote>. This is expressed mathematically in what is known as
the Accounting Equation:</para>
<equation id="accounting_equation_dynamic">
<title>The (dynamic) accounting equation</title>
<mathphrase>Assets - Liabilities = Equity + (Income - Expenses)</mathphrase>
</equation>
<para>This equation must always be balanced, a condition that can only
be satisfied if you enter values to multiple accounts. For example: if
you receive money in the form of income you must see an equal increase
in your assets. As another example, you could have an increase in assets
if you have a parallel increase in liabilities.</para>
<figure pgwide="1">
<title>The basic accounts relationships</title>
<screenshot id="basics-AccountRelationships">
<mediaobject>
<imageobject role="html">
<imagedata fileref="figures/basics_AccountRelationships.png"
format="PNG" srccredit="Geert Janssens" ></imagedata>
</imageobject>
<imageobject role="fo">
<imagedata fileref="figures/basics_AccountRelationships.svg"
format="SVG" srccredit="Geert Janssens"
contentwidth="4in"></imagedata>
</imageobject>
<textobject>
<phrase>The basic accounts relationships</phrase>
</textobject>
<caption>
<para>A graphical view of the relationship between the 5 basic
accounts. Net worth (equity) increases through income and
decreases through expenses. The arrows represent the movement of
value.</para>
</caption>
</mediaobject>
</screenshot>
</figure>
</sect2>
<sect2 id="basics-debits-credits">
<title>Debits and Credits</title>
<para>The use of debits and credits in accounting and their effect on accounts of different types
is often confusing when first encountered in acccounting. The accounting equation introduced above
is the key to understanding which accounts types are debited or credited and when. First of all we need
to rearrange the expanded form a little bit with Assets on the left hand side of the equal sign and
transposing any account type with a negative sign to the other side to obtain:
</para>
<equation id="accounting_equation_rearranged">
<title>The rearranged accounting equation</title>
<mathphrase> Assets + Expenses = Liabilities + Equity + Income</mathphrase>
</equation>
<para>With the accounting equation in this form, the accounts on the left hand side of the equal sign
are known as <emphasis>debit balance accounts</emphasis> in accounting practice,
that is the normal positive balance for these accounts is increased by <emphasis>debit</emphasis> entries to accounts of these types.
Conversely credit entries to accounts of these types will decrease the balance of accounts of these types.
</para>
<para>Similarly, the account types on the right hand side of the equal sign are known as <emphasis>credit balance
accounts</emphasis>, that is the normal positive balance for these account types is increased by <emphasis>credit</emphasis> entries to
the accounts of these types. Again debit entries to accounts of these types will reduce the balance in the account.
</para>
<table frame='all' id="basics-debits-credits-effect-tbl">
<title>Summary of effect of debits (Dr) and credits (Cr) on the balance of accounts of the 5 account types</title>
<tgroup cols='3' align='left' colsep='1' rowsep='1'>
<colspec colname='c1'/><colspec colname='c2'/><colspec colname='c3'/>
<thead>
<row><entry>Account Type</entry><entry namest="c2" nameend="c3" align ="center">Effect on Account Balance</entry></row>
<row><entry> </entry><entry>Debit (Dr)</entry><entry>Credit (Cr)</entry></row>
</thead>
<tbody>
<row><entry>Assets</entry><entry morerows='1' valign='middle'>Increase</entry><entry morerows='1' valign='middle'>Decrease</entry></row>
<row><entry>Expenses</entry></row>
<row><entry>Liabilities</entry><entry morerows='2' valign='middle'>Decrease</entry><entry morerows='2' valign='middle'>Increase</entry></row>
<row><entry>Equity</entry></row>
<row><entry>Income</entry></row>
</tbody>
</tgroup>
</table>
</sect2>
<sect2 id="basics-accountingdouble2">
<title>Double Entry</title>
<para>The accounting equation is the very heart of a <firstterm>double entry
accounting system</firstterm>. For every change in value of one account in the
Accounting Equation, there must be a balancing change in another. This
concept is known as the <firstterm>Principle of Balance</firstterm>, and
is of fundamental importance for understanding &app; and other double
entry accounting systems. When you work with &app;, you will always be
concerned with at least 2 accounts, to keep the accounting equation
balanced.</para>
<para>Balancing changes (or transfers of money) among accounts are
done by debiting one account and simultaneously crediting another.
Accounting <firstterm>debits</firstterm> and
<firstterm>credits</firstterm> do not mean <quote>decrease</quote>
and <quote>increase</quote>. Debits and credits each increase certain
types of accounts and decrease others as described in the previous section. In asset and expense accounts,
debits increase the balance and credits decrease the balance. In
liability, equity and income accounts, credits increase the balance
and debits decrease the balance.</para>
<para>In traditional double-entry accounting, the left column in the
register is used for debits, while the right column is used for credits.
Accountants record increases in asset and expense accounts on the
debit (left) side, and they record increases in liability, revenue, and equity
accounts on the credit (right) side. &app;
follows this convention in the register.</para>
<note>
<para>This accounting terminology can be confusing to new users,
which is why &app; allows you to use the
common terms <guilabel>Deposit</guilabel> and
<guilabel>Withdrawal</guilabel>. If you prefer the formal accounting
terms, you can change the account register column headings to use
them in the <guilabel>Accounts</guilabel> tab under
<guilabel>Preferences</guilabel> (see the
&app; Help Manual for more information on
setting preferences).</para>
</note>
<warning>
<para>Common use of the words <emphasis>debit</emphasis> and <emphasis>credit</emphasis>
does not match how accountants use these words. In common use,
<emphasis>credit</emphasis> generally has positive associations; in accounting,
<emphasis>credit</emphasis> means
<emphasis>affecting the right column</emphasis> of the ledger sheet of an account.
This is associated with a <emphasis>decrease</emphasis> in asset and expense,
but an <emphasis>increase</emphasis> of income, liability and equity accounts.</para>
<para>For more details see <ulink url="http://en.wikipedia.org/wiki/Debits_and_credits"></ulink>.</para>
</warning>
</sect2>
</sect1>
<sect1 id="basics-entry1">
<title>Data Entry Concepts</title>
<para>When entering data in &app;, you should be aware of the 3 levels
of organization in which &app; divides your data: files, accounts and
transactions. These levels are presented in their order of complexity, one
file contains many accounts and one account contains many transactions.
This division is fundamental to understanding how to use &app;.</para>
<sect2 id="basics-files2">
<title>Files</title>
<para>&app; stores information at the
highest level in files. A file can be stored on your computer either
as a single <acronym>XML</acronym> file (in all versions of
&app;), or in a <acronym>SQL</acronym>
database (in &app; version 2.4 and higher).</para>
<note>
<para><acronym>SQL</acronym> is pronounced <quote>sequel</quote>,
so in spoken and written language we would say <quote>a SQL
database</quote>.</para>
</note>
<para>With the <acronym>XML</acronym> file format,
&app; stores your data in an
<acronym>XML</acronym> data file, usually in compressed format
(although this can be changed in the <guilabel>General</guilabel>
tab of the &app; <guilabel>Preferences</guilabel>).</para>
<para>With <acronym>SQL</acronym> storage,
&app; stores your data in a
<acronym>SQL</acronym> database under the database application you
select (SQLite3, MySQL or PostgreSQL).</para>
<para>You will need one main file or database for each set of
accounts you are maintaining. To learn how to create and manage
&app; files, see <xref
linkend="basics-files1"/>.</para>
<note>
<para>If you think you might need more than one set of accounts,
you might want to consult a professional accountant or bookkeeper
before proceeding. Most users will probably have only one data
file.</para>
</note>
<para>Backup files and log files are automatically generated by
&app; when appropriate. Backup and log
files are described in <xref linkend="basics-backup1"/>.</para>
</sect2> <!-- basics-files2 -->
<sect2 id="basics-accounts2">
<title>Accounts</title>
<para>An <glossterm linkend="gnc-gl_account">account</glossterm> keeps track of what you own,
owe, spend or receive. Each &app; file can
contain any number of accounts, and each account can contain many
sub-accounts up to an arbitrary number of levels. This simple feature
gives &app; much of its power in managing
your finances, as you will see in later chapters.</para>
<para>Examples of accounts include: checking accounts, savings
accounts, credit card accounts, mortgages, and loans. Each
&app; account tracks the activity for that
<quote>real</quote> account, and can inform you of its status.</para>
<para>In addition, accounts are also used to categorize the money you
receive or spend. For example, you can create expense accounts to
track the money you pay on utilities or groceries. Even though these
are not accounts that receive statements, they allow you to determine
how much money is being spent in each of these areas.</para>
<para>Accounts will be covered in more detail in <xref
linkend="chapter_accts"/>.</para>
</sect2> <!-- basics-accounts2 -->
<sect2 id="basics-transactions2">
<title>Transactions</title>
<para>A <firstterm>transaction</firstterm> represents the movement of
money among accounts. Whenever you spend or receive money, or
transfer money between accounts, that is a transaction.</para>
<para>Examples of transactions are: paying a phone bill, transferring
money from savings to checking, buying a pizza, withdrawing money,
and depositing a paycheck. <xref linkend="chapter_txns"/> goes more
in depth on how to enter transactions.</para>
<para>In <link linkend="basics-accountingdouble2">double entry accounting</link>,
transactions always involve at least two accounts–a source
account and a destination account.
&app; manages this by inserting a line
into the transaction for every account that is affected, and
recording the amounts involved in each line. A line within a
transaction that records the account and amount of money involved is
called a <firstterm>split</firstterm>. A transaction can contain an
arbitrary number of splits.</para>
<note>
<para>Splits in transactions will be covered in <xref
linkend="txns-registers-multiaccount2"/></para>
</note>
</sect2> <!-- basics-transactions2 -->
</sect1> <!-- basics-entry1 -->
<sect1 id="basics-running-gnucash">
<title>Running &app;</title>
<para>&app; can be run from your desktop main menu by selecting the associated menu entry.</para>
<para>Alternatively it can be run from a command line prompt with the command <command>gnucash</command>.</para>
<para>During start up, &app; will display the
Splash Screen, where some information about the program (version number, build, etc.)
and the loading process are displayed.</para>
<sect2 id="basics-welcome-to-gnucash">
<title><guilabel>Welcome to &appname;</guilabel> dialog</title>
<para>The very first time you open &app;, you will see the
<guilabel>Welcome to &appname;!</guilabel> screen. This dialog includes three choices:</para>
<!-- Recommend screen shot here of Welcome to GnuCash! dialog -->
<itemizedlist id="welcome-screen-options">
<listitem>
<para><guilabel>Create a new set of accounts</guilabel> - Runs the
<guilabel>New Account Hierarchy Setup</guilabel> assistant (see <xref linkend="basics-acct-hierarchy"/>). Select
this option if you want to be assisted in creating a set of accounts.</para>
</listitem>
<listitem>
<para><guilabel>Import my QIF files</guilabel> - Runs the
<guilabel>Import QIF Files</guilabel> assistant (see <xref linkend="importing-qif"/>). Select this option
if you already have Quicken files (<filename>.qif</filename> files) and wish
to import them into &app;.</para>
</listitem>
<listitem>
<para><guilabel>Open the new user tutorial</guilabel> -
Opens the &app; Tutorial and Concepts Guide. Select this
option if you are completely new to &app; and
accounting concepts.</para>
</listitem>
</itemizedlist>
<note>
<para>It is possible to access each of these items after you have left this screen,
but the <guilabel>Welcome to &appname;!</guilabel> screen will not reappear.
To create a new set of accounts, see <xref linkend="basics-acct-hierarchy" />. To import
QIF files, see <xref linkend="importing-qif" />.</para>
</note>
</sect2>
<sect2 id="basics-acct-hierarchy">
<title>New Account Hierarchy Setup</title>
<para>The <emphasis>New Account Hierarchy Setup</emphasis> assistant helps you
to create a set of &app; accounts. It will
appear if you choose <guibutton>Create a new set of accounts</guibutton>
in the <guilabel>Welcome to &appname;!</guilabel> menu, or when you select
<menuchoice><guimenu>File</guimenu><guimenuitem>New</guimenuitem></menuchoice>.</para>
<para>This assistant will create a new blank &app; file and
guide you through the creation of a <emphasis>Chart of Accounts</emphasis>. There are several
steps in the assistant, which are outlined below.</para>
<orderedlist>
<listitem>
<para>The first screen briefly describes what this assistant does. </para>
</listitem>
<listitem>
<para><guilabel>New Book Options</guilabel> allows you to set different attributes
for your file that affect the file as a whole. This screen has four tabs:
Accounts, Budgeting, Business, and Counters. These items are explained elsewhere in
the Guide, and can be changed at a later point.</para>
</listitem>
<listitem>
<para><guilabel>Choose Currency</guilabel> sets the default currency for new accounts.
This is based on the computer locale settings, and can be modified later in the
<guilabel>Accounts</guilabel> tab under <guilabel>Preferences</guilabel>
(see <xref linkend="configuring-preferences-accounts"/>).</para>
</listitem>
<listitem>
<para><guilabel>Choose accounts to create</guilabel> allows you to create
an initial set of accounts. These can be edited as needed afterward.
The screen is divided into three parts.</para>
<itemizedlist>
<listitem>
<para>The left upper portion has a list of
<guilabel>Categories</guilabel> for commonly used hierarchies of
accounts. Select from this list the types of accounts you wish to
use. You can select as many of the categories of accounts as you
wish.</para>
</listitem>
<listitem>
<para>The left lower section has a <guilabel>Category
Description</guilabel> that displays a detailed description of the
category currently highlighted.</para>
</listitem>
<listitem>
<para>The right side has a list of the <guilabel>Accounts</guilabel>
that will be created from a selected category. Note that the accounts
listed here are <emphasis>only</emphasis> the selected category; your
final data file will include <emphasis>all</emphasis> of the accounts
for all of the selected Categories.</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para><guilabel>Setup selected accounts</guilabel> lists all the accounts you
selected on <guilabel>Choose accounts to create</guilabel>, and allows you to
enter opening balances and to designate <emphasis>Placeholder</emphasis> accounts.</para>
<note>
<para>Equity accounts do not have opening balances, so the
opening balance value for this kind of account
is locked and set to zero.</para>
</note>
<note id="placeholder-acct">
<para><emphasis>Placeholder</emphasis> accounts are used to create a hierarchy of accounts and
normally do not have transactions or opening balances.</para>
</note>
<itemizedlist>
<listitem>
<para>The left side of the screen has a list of <guilabel>Account
Names</guilabel>. Select an account by "clicking" once in the
<guilabel>Account Names</guilabel> column with the account highlighted. This will open
the account name for changes.</para>
</listitem>
<listitem>
<para>The right side of the screen has a check-box to make an
account a <guilabel>Placeholder</guilabel> and a box to add the
<guilabel>Opening Balance</guilabel> for the selected account. Again
a single click in the <guilabel>Opening Balance</guilabel> or
<guilabel>Placeholder</guilabel> column will
open the field for changes.</para>
</listitem>
</itemizedlist>
</listitem>
<listitem>
<para><guilabel>Finish account setup</guilabel> is the last screen and
gives you a final option to cancel the process.</para>
<warning>
<para>If you choose to cancel, any selections you have made up to
this point will be lost.</para>
</warning>
</listitem>
</orderedlist>
</sect2>
<sect2 id="basics-tip2">
<title>Tip of the Day</title>
<para>&app; provides a <guilabel>Tip of the Day</guilabel> screen to
give helpful hints for using the program:</para>
<screenshot id="basics-TipOfDay">
<mediaobject>
<imageobject>
<imagedata fileref="figures/basics_TipOfDay.png" format="PNG"
srccredit="Cristian Marchi" ></imagedata>
</imageobject>
<textobject>
<phrase>The Tip of the Day</phrase>
</textobject>
<caption>
<para>This image shows the <guilabel>Tip of the
Day</guilabel>.</para>
</caption>
</mediaobject>
</screenshot>
<para>These tips provide useful information for beginning users. To view
more of the tips, click <guibutton>Forward</guibutton> to continue. If you
do not wish to see this screen box on start-up, deselect the box next to
<guilabel>Show tips at startup</guilabel>. When you have
finished viewing the helpful tips, click <guibutton>Close</guibutton> to
close the <guilabel>Tip of the Day</guilabel> screen.</para>
</sect2>
<sect2 id="basics-main2">
<title>Account Tree Window</title>
<para>You should now see the <guilabel>Accounts</guilabel> window, which
appears as shown below. The exact layout of the account tree will depend
on which default accounts you selected during the New Account Hierarchy
Setup. In this example, the <guilabel>Common Accounts</guilabel> are shown.</para>
<screenshot id="basics-Accounts">
<mediaobject>
<imageobject>
<imagedata fileref="figures/basics_Accounts.png" format="PNG"
srccredit="Cristian Marchi" ></imagedata>
</imageobject>
<textobject>
<phrase>The Account Tree Window</phrase>
</textobject>
<caption>
<para>This image shows the <guilabel>Accounts</guilabel>
window.</para>
</caption>
</mediaobject>
</screenshot>
<para>The Account Tree window (also known as a Chart of Accounts, or CoA) provides an overview of the data contained
in the current file. It contains a list of account names and their
current balances.</para>
<para>From this window, you can open the register of any
account either by double-clicking the account name, right clicking the account name and selecting <guilabel>Open Account</guilabel> from the
menu, or by using the <guibutton>Open</guibutton> button on the toolbar. &app; allows you to have as many account registers open as you wish. For more information on using account registers, see <xref linkend="basics-register2" />.</para>
<tip>
<para>Clicking the small triangle to the left of an account that has children will expand the tree view showing child accounts.</para>
</tip>
<para>At the top of this window is the <emphasis>Titlebar</emphasis>, which displays the
file name for this set of accounts (once you have saved the file.) Below that is the <emphasis>Menubar</emphasis>.
You can access the menu options by either clicking on these menu
headings or by using shortcuts and access keys (see <xref linkend="basics-shortcut2" />).
Next is the <emphasis>Toolbar</emphasis>, which contains buttons
for the most common functions.</para>
<para>The account tree appears below the <emphasis>Toolbar</emphasis>. Once you have
started creating accounts, the account names will appear in the account
tree. You can customize which headings show up by using the
small <guiicon>down-arrow</guiicon> at the far right just above the account tree.</para>
<para>At the bottom is the <emphasis>Statusbar</emphasis>, which tells you
information about what you own (Net Assets) and how much money you have
made (Profits).</para>
</sect2>
<sect2 id="basics-register2">
<title>Account Register Window</title>
<para>Account Register windows are used to enter and edit your
account data. As the name suggests, they look similar to a checkbook
register.</para>
<screenshot id="basics-CheckAccount">
<mediaobject>
<imageobject role="html">
<imagedata fileref="figures/basics_CheckAccount.png" format="PNG"
srccredit="Bengt Thuree" width="510"></imagedata>
</imageobject>
<imageobject role="fo">
<imagedata fileref="figures/basics_CheckAccount.png" format="PNG"
srccredit="Bengt Thuree" ></imagedata>
</imageobject>
<textobject>
<phrase>The Checking Account Register</phrase>
</textobject>
<caption>
<para>This image shows the <guilabel>Checking Account - Register
</guilabel> with several transactions.</para>
</caption>
</mediaobject>
</screenshot>
<para><xref linkend="chapter_txns"></xref> explains more about account
register windows and how to
enter data into them. For now, note that the parts of an account
register window are similar to the parts of the account tree window
described earlier. The <emphasis>Titlebar</emphasis> at the top contains the account name.
Below that, the <emphasis>Menubar</emphasis> contains menu options related to the account
register. <emphasis>Toolbar</emphasis> buttons simplify common data entry functions. The
<emphasis>Statusbar</emphasis> at the bottom of the window, displays some account balances
covered in <xref linkend="chapter_txns"></xref>. At the bottom of the
account register window,
information appears about the current location of the cursor.</para>
<note>
<para>In the register windows, you can resize the various columns that
&app; displays, <emphasis>but keep in mind that
the Description and Balance columns behave differently from other columns</emphasis>.</para>
<para>The <guilabel>Description</guilabel> column is designed to expand
automatically to fill all unused horizontal screen space.
Therefore you should set the widths of all your other columns before
setting the Description column width.</para>
<para>The <guilabel>Balance</guilabel> column must be resized by
double-clicking on the column heading.</para>
</note>
</sect2>
<sect2 id="basics-toolbar2">
<title>Toolbar Buttons</title>
<para>Both the account tree window and the account register window
contain <emphasis>Toolbar</emphasis> buttons. These buttons provide quick access to common
functions such as <guibutton>Save</guibutton> and
<guibutton>Open</guibutton> in the account tree window and
<guibutton>Record</guibutton> and <guibutton>Delete</guibutton> in the
account register window. If you are not sure what a button does, move
the mouse pointer over that button, and you should see a description of
the function appear.</para>
<para>Here is a summary of the account tree window buttons:</para>
<variablelist>
<title>Account tree window buttons</title>
<varlistentry>
<term><guibutton>Save</guibutton></term>
<listitem>
<para>Save the current file to disk</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guibutton>Close</guibutton></term>
<listitem>
<para>Close the current notebook page</para>
</listitem>
</varlistentry>
<varlistentry>
<term><guibutton>Open</guibutton>, <guibutton>Edit</guibutton>,
<guibutton>New</guibutton> and <guibutton>Delete</guibutton></term>
<listitem>
<para>These are functions related to accounts. They are discussed in
<xref linkend="chapter_accts"></xref>.</para>
</listitem>
</varlistentry>
</variablelist>
<para>Register-specific buttons are discussed in <xref linkend="chapter_txns"></xref>.
</para>
</sect2>
<sect2 id="basics-tabbar">
<title>Tab Bar</title>
<para>&app; uses a tabbed model that allows you to open multiple account registers and reports simultaneously. Each open window (which can include account registers, reports, or Scheduled Transactions windows) is given a tab on this bar that you can click to view that window. Tabs can be configured in Preferences to appear along any side of the &app; window.</para>
<para>To see the full name for a tab, hover the mouse pointer over an account window tab.</para>
<para>If more screens are open than can be displayed across the screen, some tabs
will not display. You can move through all tabs by clicking the arrows on
either end of the tab bar. A complete list of tabs can be viewed by
right-clicking the Tab Bar and any tab can be selected by clicking it.</para>
</sect2>
<sect2 id="basics-options2">
<title>Menu Items</title>
<para>The account tree window and the account register window both
contain menu headings in a <emphasis>Menubar</emphasis>. Clicking on a menu heading brings
up the menu items for that heading.</para>
<para>You can click on the account tree menu headings and then move the
mouse pointer over the menu items to see what they do. As the pointer
moves over a menu item, a description of the item appears in the lower
left-hand corner of the window (inside the <emphasis>Statusbar</emphasis>). To select a menu item, click on
it.</para>
<para>You can also access the most common menu items in a window by
right-clicking the mouse anywhere in that window. In the account tree
window, this will bring up a list of account items. In the account
register window, this will bring up a list of transaction items.</para>
<para>Other ways of accessing menu items are through keyboard shortcuts
and access keys, described next.</para> </sect2>
<sect2 id="basics-shortcut2">
<title>Menu Shortcuts</title>
<para>All of the menu items have access keys which are
marked by underlined characters in the menu names. Pressing the
<keycap>Alt</keycap> key with the underlined character in the menu
heading will bring up the menu items for that heading. Once the menu
items are displayed, type the underlined character in the menu item to
activate it. For example, typing <keycombo><keycap>Alt</keycap>
<keycap>F</keycap></keycombo> in the main window brings up the <guimenu>File</guimenu>
menu, then typing <keycap>S</keycap> will save the file. Access keys
are fixed and cannot be changed by users.</para>
<para>Some of the more commonly used menu items also have shortcut keys
that directly activate the command without having to traverse the menu
structure. These shortcuts typically use the <keycap>Ctrl</keycap>
key, although they can use any key combination. Menu shortcuts are
displayed at the end of each menu item.</para>
</sect2>
</sect1>
<sect1 id="basics-files1">
<title>Storing your financial data</title>
<sect2 id="basics-files1-overview">
<title>Overview</title>
<para>&app; offers several formats for storing
your financial data. The default file storage format is <acronym>XML</acronym>,
while <acronym>SQL</acronym> storage is available in SQLite, MySQL, and PostgreSQL
formats. Users can choose a file format for new files from <menuchoice><guimenu>File</guimenu>
<guimenuitem>Save </guimenuitem></menuchoice> and for existing files from <menuchoice><guimenu>File</guimenu>
<guimenuitem>Save As...</guimenuitem></menuchoice> dialogs.</para>
<para>The <acronym>XML</acronym> storage format is a text file that by default is compressed,
which is a preference that is set at <menuchoice><guimenu>Edit</guimenu>
<guimenuitem>Preferences</guimenuitem></menuchoice> <guilabel>General</guilabel>
<guilabel>Compress files</guilabel>. SQLite storage is also available, and stores
your data in a single file on your system, like the <acronym>XML</acronym> format. However,
internally, an SQLite file is managed as a database. The MySQL and PostgreSQL storage options
require access to a MySQL or PostgreSQL database server and the installation of
additional database drivers on your machine.</para>
<tip>
<para>Users can change the format at any time by using <menuchoice><guimenu>File</guimenu>
<guimenuitem>Save As...</guimenuitem></menuchoice>. This will create a copy of
the data file in the selected format.</para>
</tip>
</sect2>
<sect2 id="basics-files-storage-comparison">
<title>Storage Comparison and Recommendations</title>
<para>Each storage format has benefits and shortcomings that users should
consider for their needs and abilities. See the
<link linkend='basics-storage-comparison-table' endterm="basics-storage-comparison-tbltitle"/> below
for further details.</para>
<para>The <acronym>XML</acronym> format is the most stable and established,
and for this reason, it is recommended for most users. <acronym>SQL</acronym>
storage was added for the 2.4 release and has become an increasingly popular
choice for users. The SQLite format allows users to realize the benefits of
<acronym>SQL</acronym> storage without the overhead of installing or managing
a full <acronym>DBMS</acronym>. MySQL and PostgreSQL require the installation
of MySQL and PostgreSQL <acronym>DBMS</acronym>, respectively, and are best
maintained only by experienced database administrators.</para>
<note>
<para>Use of a <acronym>SQL</acronym> back end for storage implies to many
that &app; has fully implemented <acronym>DBMS</acronym>
features, including multi-user and incremental data manipulation. However,
&app; does not currently implement these features,
although it is a long term goal of the development team. </para>
</note>
</sect2>
<sect2 id="basics-storage-comparison-tblsect">
<title>Storage Comparison Table</title>
<table frame="topbot" id="basics-storage-comparison-table">
<title id="basics-storage-comparison-tbltitle">Storage Comparison</title>
<tgroup align="left" cols="5">
<colspec colname="c1item" ></colspec>
<colspec colname="c2xml" ></colspec>
<colspec colname="c3sqlite" ></colspec>
<colspec colname="c4mysql" ></colspec>
<colspec colname="c5pgsql" ></colspec>
<thead>
<row>
<entry> </entry>
<entry align="center">XML</entry>
<entry align="center">SQLite</entry>
<entry align="center">MySQL</entry>
<entry align="center">PostgreSQL</entry>
</row>
</thead>
<tbody>
<row>
<entry namest="c1item" >Availability</entry>
<entry align="center" namest="c2xml" > Built-in </entry>
<entry align="center" namest="c3sqlite" nameend="c5pgsql" > Depends on packaging<footnote>
<para>SQLite relies on an additional package and driver (called libdbi
and libdbd-sqlite3, respectively), which are installed by
default on Mac OS and Windows. Linux users may need to manually
install these for SQLite.</para>
<para>MySQL and PostgreSQL may require the installation of additional software drivers
(libdbd-mysql and libdbd-pgsql).</para>
</footnote>
</entry>
</row>
<row>
<entry namest="c1item" >File extension</entry>
<entry align="center" namest="c2xml" nameend="c3sqlite" > gnucash </entry>
<entry align="center" namest="c4mysql" nameend="c5pgsql" > N/A<footnote>
<para>MySQL and PostgreSQL place data within their own storage system.</para></footnote></entry>
</row>
<row>
<entry namest="c1item" >Additional software</entry>
<entry align="center" namest="c2xml" nameend="c3sqlite" > None </entry>
<entry align="center" namest="c4mysql" > MySQL </entry>
<entry align="center" namest="c5pgsql" > PostgreSQL </entry>
</row>
<row>
<entry namest="c1item" >Additional expertise</entry>
<entry align="center" namest="c2xml" nameend="c3sqlite" > None </entry>
<entry align="center" namest="c4mysql" nameend="c5pgsql" > Database Administrator </entry>
</row>
<row>
<entry namest="c1item" >Compression</entry>
<entry align="center" namest="c2xml" > gzip </entry>
<entry align="center" namest="c3sqlite" nameend="c5pgsql" > N/A </entry>
</row>
<row>
<entry namest="c1item" >File Save</entry>
<entry align="center" namest="c2xml" > On command </entry>
<entry align="center" namest="c3sqlite" nameend="c5pgsql" > On commit </entry>
</row>
<row>
<entry namest="c1item" >Multi-user</entry>
<entry align="center" namest="c2xml" > No </entry>
<entry align="center" namest="c3sqlite" > No </entry>
<entry align="center" namest="c4mysql" > No </entry>
<entry align="center" namest="c5pgsql" > No </entry>
</row>
</tbody>
</tgroup>
</table>
</sect2>
<sect2 id="basics-create-data">
<title>Creating a file</title>
<para>To create a new &app; file do the following:</para>
<orderedlist>
<listitem>
<para>From the &app; <emphasis>Menubar</emphasis>, choose <menuchoice><guimenu>File</guimenu>
<guimenuitem>New File</guimenuitem></menuchoice>. The <guilabel>New Account Hierarchy setup</guilabel>
assistant will start.</para>
<note>
<para>If you are running &app; for the first time, you will be presented
with the <guilabel>Welcome to &appname;!</guilabel> screen. This screen is described in detail in the
&app; manual.</para>
</note>
</listitem>
<listitem>
<para>Set your preferences in the assistant and move through the screens with the
<guibutton>Forward</guibutton>, <guibutton>Cancel</guibutton> and <guibutton>Previous</guibutton>
buttons.</para>
</listitem>
</orderedlist>
</sect2>
<sect2 id="basics-store-data">
<title>Saving data</title>
<para>Follow these steps to save the file under your preferred name:</para>
<orderedlist>
<listitem>
<para>Choose <menuchoice><guimenu>File</guimenu> <guimenuitem>Save
As...</guimenuitem></menuchoice> from the <emphasis>Menubar</emphasis> or select the
<guibutton>Save</guibutton> <emphasis>Toolbar</emphasis> button. &app; will bring
up the save window.</para>
</listitem>
<listitem>
<para>Select the <guilabel>Data Format</guilabel> of the file you are saving from the
drop down list. The default selection is <acronym>XML</acronym> but if you have set up a
database back end you can change to that format.</para>
<para>Depending on the selected <guilabel>Data Format</guilabel> the window can change as
described in the following.</para>
</listitem>
<listitem>
<para></para>
<itemizedlist>
<listitem>
<para>If you selected <acronym>XML</acronym> or <acronym>sqlite3</acronym> you will see a screen like this:</para>
<figure>
<title>Save screen when <acronym>XML</acronym> or <acronym>sqlite3</acronym> is selected.</title>
<screenshot id="basics-SaveXML">
<mediaobject>
<imageobject role="html">
<imagedata fileref="figures/basics_SaveXML.png" format="PNG"
srccredit="Cristian Marchi" width="510px"></imagedata>
</imageobject>
<imageobject role="fo">
<imagedata fileref="figures/basics_SaveXML.png" format="PNG"
srccredit="Cristian Marchi"></imagedata>
</imageobject>
<textobject>
<phrase>The Save screen</phrase>
</textobject>
<caption>
<para>This image shows the <guilabel>Save</guilabel> screen when the selected
<guilabel>Data Format</guilabel> is <acronym>XML</acronym> or <acronym>sqlite3</acronym>.</para>
</caption>
</mediaobject>
</screenshot>
</figure>
<para>Type your chosen filename in the <guilabel>Name</guilabel> field. It is not necessary to specify an
extension when you write the file name. &app; will automatically add the extension
<filename>.gnucash</filename> to the file.</para>
<note>
<para>The <filename>.gnucash</filename> extension was introduced in the 2.3 series of &app;.
For already existing files, the extension will never be changed. So if you open an existing file named
<filename>Myoldfile</filename>, that name won’t be changed if the file is saved. You might use the
<guimenuitem>Save As...</guimenuitem> command and give the file a new name in order to have it saved with the
extension <filename>.gnucash</filename>.</para>
</note>
<para>Select the path where the file will be saved by browsing the tree in the lower panes.</para>
<tip>
<para>Click on the <guibutton>Create Folder</guibutton> button to create a new folder with a
custom name in the selected path.</para>
</tip>
</listitem>
<listitem>
<para>If you selected <acronym>mysql</acronym> or <acronym>postgres</acronym>
<guilabel>Data Format</guilabel> you will see a screen like this:</para>
<figure>
<title>Save screen when <acronym>mysql</acronym> or <acronym>postgres</acronym> is selected.</title>
<screenshot id="basics-SaveSQL">
<mediaobject>
<imageobject role="html">
<imagedata fileref="figures/basics_SaveSQL.png" format="PNG"
srccredit="Marchi Cristian" width="510px"></imagedata>
</imageobject>
<imageobject role="fo">
<imagedata fileref="figures/basics_SaveSQL.png" format="PNG"
srccredit="Cristian Marchi"></imagedata>
</imageobject>
<textobject>
<phrase>The Save screen</phrase>
</textobject>
<caption>
<para>This image shows the <guilabel>Save</guilabel> screen when the selected
<guilabel>Data Format</guilabel> is <acronym>mysql</acronym> or <acronym>postgres</acronym>.</para>
</caption>
</mediaobject>
</screenshot>
</figure>
<para>Enter in this window the <guilabel>Database Connection</guilabel> information:
<guilabel>Host</guilabel>, <guilabel>Database</guilabel>, <guilabel>Username</guilabel>
and <guilabel>Password</guilabel>.</para>
<warning>
<para>Saving to <acronym>mysql</acronym> or <acronym>postgres</acronym> requires the proper permissions in that
database, that is you need to have the permissions to create a new database with the given database name, or
you need to have write access to an existing database with the given database name.</para>