GnuCash Daily Diff

Dave Peticolas peticolas@linas.org
Sun, 3 Jun 2001 08:03:23 -0500 (CDT)


Index: gnucash/ChangeLog
diff -u gnucash/ChangeLog:1.546 gnucash/ChangeLog:1.550
--- gnucash/ChangeLog:1.546	Sat Jun  2 06:31:45 2001
+++ gnucash/ChangeLog	Sat Jun  2 20:43:20 2001
@@ -1,5 +1,53 @@
 2001-06-02  Dave Peticolas  <dave@krondo.com>
 
+	* src/gnome/top-level.c (gnc_ui_start_event_loop): remove
+	debugging comment
+
+	* src/scm/report/register.scm: fix bugs
+
+	* src/scm/html-utilities.scm: fix bugs
+
+	* src/gnome/window-register.c: fix bugs
+
+	* src/scm/report/price-scatter.scm: same as below
+
+	* src/scm/prefs.scm: same as below
+
+	* src/gnc-ui-util.c: same as below
+
+	* src/gnome/druid-qif-import.c: same as below
+
+	* src/gnome/dialog-price-editor.c: same as below
+
+	* src/gnome/dialog-fincalc.c: same as below
+
+	* src/SplitLedger.c: use gnc_default_currency instead
+	of gnc_locale_default_currency.
+
+	* src/scm/options-utilities.scm: use new func
+
+	* src/scm/report/transaction-report.scm: handle splits with no
+	account
+
+	* src/gnome/dialog-account.c: use new func
+
+	* src/gnome/window-main-summarybar.c: use new func
+
+	* src/guile/gnc.gwp: wrap new func below
+
+	* src/guile/global-options.c (gnc_default_currency): new func
+	to return user-set default currency
+
+	* src/engine/gnc-book.c (gnc_book_backup_file): use g_free
+	instead of free.
+
+2001-06-02  Christian Stimming  <stimming@tuhh.de>
+
+	* po/gnc-glossary.txt: Updated glossary, 15 new terms, and lots of
+	explanations. Feedback welcome.
+
+2001-06-02  Dave Peticolas  <dave@krondo.com>
+
 	* src/register/gnome/gnucash-date-picker.c (gnc_date_picker_new):
 	fix bug
 
Index: gnucash/doc/sgml/C/Makefile.am
diff -u gnucash/doc/sgml/C/Makefile.am:1.25 gnucash/doc/sgml/C/Makefile.am:1.26
--- gnucash/doc/sgml/C/Makefile.am:1.25	Thu May 31 02:33:46 2001
+++ gnucash/doc/sgml/C/Makefile.am	Sun Jun  3 05:32:18 2001
@@ -136,6 +136,6 @@
 	mkdir $(distdir)/gnucash/image
 	mkdir $(distdir)/gnucash/stylesheet-images
 	cp gnucash/*.html $(distdir)/gnucash
-	cp gnucash/*.css $(distdir)/gnucash
 	cp gnucash/image/*.png $(distdir)/gnucash/image
-	cp gnucash/stylesheet-images/*.gif $(distdir)/gnucash/stylesheet-images
+	-cp gnucash/*.css $(distdir)/gnucash
+	-cp gnucash/stylesheet-images/*.gif $(distdir)/gnucash/stylesheet-images
Index: gnucash/doc/sgml/es/Makefile.am
diff -u gnucash/doc/sgml/es/Makefile.am:1.4 gnucash/doc/sgml/es/Makefile.am:1.6
--- gnucash/doc/sgml/es/Makefile.am:1.4	Sun Apr 29 20:58:20 2001
+++ gnucash/doc/sgml/es/Makefile.am	Sun Jun  3 05:34:20 2001
@@ -39,6 +39,7 @@
 	xacc-tax-report.sgml \
 	xacc-ticker.sgml \
 	xacc-trans-report.sgml \
+	xacc-txf-categories.sgml \
 	xacc-txf-export-anomalies.sgml \
 	xacc-txf-export.sgml \
         xacc-userdocs.sgml \
@@ -119,6 +120,6 @@
 	mkdir $(distdir)/gnucash/image
 	mkdir $(distdir)/gnucash/stylesheet-images
 	cp gnucash/*.html $(distdir)/gnucash
-	cp gnucash/*.css $(distdir)/gnucash
 	cp gnucash/image/*.png $(distdir)/gnucash/image
-	cp gnucash/stylesheet-images/*.gif $(distdir)/gnucash/stylesheet-images
+	-cp gnucash/*.css $(distdir)/gnucash
+	-cp gnucash/stylesheet-images/*.gif $(distdir)/gnucash/stylesheet-images
Index: gnucash/doc/sgml/pt_PT/Makefile.am
diff -u gnucash/doc/sgml/pt_PT/Makefile.am:1.7 gnucash/doc/sgml/pt_PT/Makefile.am:1.8
--- gnucash/doc/sgml/pt_PT/Makefile.am:1.7	Wed May 30 19:01:56 2001
+++ gnucash/doc/sgml/pt_PT/Makefile.am	Sun Jun  3 05:32:21 2001
@@ -133,6 +133,6 @@
 	mkdir $(distdir)/gnucash/image
 	mkdir $(distdir)/gnucash/stylesheet-images
 	cp gnucash/*.html $(distdir)/gnucash
-	cp gnucash/*.css $(distdir)/gnucash
 	cp gnucash/image/*.png $(distdir)/gnucash/image
-	cp gnucash/stylesheet-images/*.gif $(distdir)/gnucash/stylesheet-images
+	-cp gnucash/*.css $(distdir)/gnucash
+	-cp gnucash/stylesheet-images/*.gif $(distdir)/gnucash/stylesheet-images
Index: gnucash/po/de.po
diff -u gnucash/po/de.po:1.79 gnucash/po/de.po:1.80
--- gnucash/po/de.po:1.79	Fri Jun  1 11:12:56 2001
+++ gnucash/po/de.po	Sat Jun  2 13:38:37 2001
@@ -9,7 +9,7 @@
 msgstr ""
 "Project-Id-Version: gnucash 1.5\n"
 "POT-Creation-Date: 2001-05-27 23:32-0700\n"
-"PO-Revision-Date: 2001-06-01 11:23+00:00\n"
+"PO-Revision-Date: 2001-06-02 20:37+02:00\n"
 "Last-Translator: Christian Stimming <stimming@tuhh.de>\n"
 "Language-Team: DE\n"
 "MIME-Version: 1.0\n"
@@ -47,6 +47,9 @@
 "   %s\n"
 "The host, username or password were incorrect."
 msgstr ""
+"Verbindung konnte nicht aufgebaut werden zu Rechner\n"
+"   %s\n"
+"Der Rechnername, Benutzername oder Passwort waren falsch."
 
 #: src/FileDialog.c:90
 #, c-format
@@ -55,6 +58,9 @@
 "   %s\n"
 "Connection was lost, unable to send data."
 msgstr ""
+"Verbindung konnte nicht aufgebaut werden zu Rechner\n"
+"   %s\n"
+"Verbindung verloren. Daten konnten nicht gesendet werden."
 
 #: src/FileDialog.c:97
 #, c-format
@@ -63,6 +69,9 @@
 "    %s\n"
 "is in use by another user."
 msgstr ""
+"Die URL\n"
+"    %s\n"
+"wird von einem anderen Anwender benutzt."
 
 #: src/FileDialog.c:104
 #, c-format
@@ -71,6 +80,9 @@
 "    %s\n"
 "does not contain GnuCash data or the data is corrupt."
 msgstr ""
+"Die URL\n"
+"    %s\n"
+"verweist nicht auf GnuCash-Daten oder diese Daten sind fehlerhaft."
 
 #: src/FileDialog.c:111
 #, c-format
@@ -79,6 +91,9 @@
 "    %s\n"
 "experienced an error or encountered bad or corrupt data."
 msgstr ""
+"Der Server unter der URL\n"
+"    %s\n"
+"stiess auf einen Fehler oder benutzte falsche oder fehlerhafte Daten."
 
 #: src/FileDialog.c:118
 #, c-format
@@ -86,6 +101,8 @@
 "An error occurred while processing\n"
 "    %s\n"
 msgstr ""
+"Fehler aufgetreten beim Verarbeiten von\n"
+"    %s\n"
 
 #: src/FileDialog.c:124
 msgid ""
@@ -679,6 +696,8 @@
 "You must select a transfer account or choose\n"
 "the opening balances equity account."
 msgstr ""
+"Sie müssen ein Gegenkonto eingeben oder ein Ausgleichskonto für den\n"
+"Eröffnungssaldo wählen."
 
 #: src/gnome/dialog-account.c:1637
 msgid "New top level account"
@@ -1054,7 +1073,7 @@
 msgid ""
 "An error occurred while importing QIF transactions into GnuCash. Your "
 "accounts are unchanged."
-msgstr ""
+msgstr "Es ist ein Fehler während des QIF Imports aufgetreten. Ihre Konten wurden nicht geändert."
 
 #: src/gnome/druid-qif-import.c:1287 src/gnome/druid-qif-import.c:1724
 msgid "(split)"
@@ -1508,7 +1527,7 @@
 
 #: src/gnome/glade-gnc-dialogs.c:1534
 msgid "Match transaction tags (CURRENTLY INOPERABLE)"
-msgstr ""
+msgstr "Passende Buchungsarten (z.Zt. außer Betrieb)"
 
 #: src/gnome/glade-gnc-dialogs.c:1549
 msgid "Find transactions with the tag:"
@@ -2933,11 +2952,11 @@
 
 #: src/gnome/gnc-html.c:1040
 msgid "Badly formed gnc-register: URL."
-msgstr ""
+msgstr "Fehlerhafte URL der Sorte \"gnc-register:\"."
 
 #: src/gnome/gnc-html.c:1063
 msgid "Badly formed gnc-options: URL."
-msgstr ""
+msgstr "Fehlerhafte URL der Sorte \"gnc-options:\"."
 
 #: src/gnome/gnc-html.c:1209
 msgid ""
@@ -2945,6 +2964,9 @@
 "You can enable it in the Network section of\n"
 "the Preferences dialog."
 msgstr ""
+"Der verschlüsselte HTTP Zugang ist deaktiviert.\n"
+"Um ihn zu aktivieren, wählen Sie den Netzwerk Abschnitt der\n"
+"Einstellungen und aktivieren die entsprechende Option."
 
 #: src/gnome/gnc-html.c:1216
 msgid ""
@@ -2981,25 +3003,25 @@
 
 #: src/gnome/gnc-network.c:169
 msgid "Enter GnuCash Network passphrase:"
-msgstr ""
+msgstr "GnuCash Netzwerk Mantra (passphrase) eingeben:"
 
 #: src/gnome/gnc-network.c:224
 msgid "GnuCash Network authorization failed."
-msgstr ""
+msgstr "Authorisierung des Zugangs zum GnuCash Netzwerk fehlgeschlagen."
 
 #. start: get first passphrase
 #: src/gnome/gnc-network.c:357
 msgid "Enter passphrase:"
-msgstr ""
+msgstr "Mantra (passphrase) eingeben:"
 
 #. get another and check for equality
 #: src/gnome/gnc-network.c:371
 msgid "Verify passphrase:"
-msgstr ""
+msgstr "Mantra (passphrase) bestätigen:"
 
 #: src/gnome/gnc-network.c:382
 msgid "Passphrases did not match."
-msgstr ""
+msgstr "Mantraas stimmten nicht überein."
 
 #: src/gnome/new-user-interface.c:84
 msgid "New User Account setup"
@@ -3016,6 +3038,10 @@
 "will appear If you choose New File in the File menu unless you have set the\n"
 "\"No account list setup on new file\" option in the Preferences window."
 msgstr ""
+"Dieser Assistent hilft Ihnen, eine Reihe von vorgefertigten Konten zu\n"
+"erstellen. Dieser Assistent erscheint, wenn Sie \"Neue Datei\" im\n"
+"Datei-Menü wählen, außer Sie haben die Option \"Keine Konteneinrichtung\n"
+"bei neuer Datei\" in den Einstellungen deaktiviert."
 
 #: src/gnome/new-user-interface.c:121
 msgid "Choose Currency"
@@ -3045,22 +3071,22 @@
 
 #: src/gnome/new-user-interface.c:321
 msgid "Check and Enter Final Account Info"
-msgstr ""
+msgstr "Konteninformationen überprüfen und bestätigen"
 
 #: src/gnome/new-user-interface.c:331
 msgid ""
 "If you would like the accounts to have an opening balance click on the "
 "account line and enter the starting balance in the box on the right.  All "
 "accounts but Equity may have a value set."
-msgstr ""
+msgstr "Wenn Sie einen Eröffnungssaldo für die neuen Konten einrichten möchten, klicken Sie auf die jeweilige Zeile und geben Sie einen Betrag in den rechten Kasten ein. Jede Kontoart außer Equity kann einen Eröffnungssaldo haben."
 
 #: src/gnome/new-user-interface.c:432
 msgid "Finish Account Setup"
-msgstr "Beenden des Konten Erstellen"
+msgstr "Konteneinrichten Beenden"
 
 #: src/gnome/new-user-interface.c:433
 msgid "Press `Finish' if everything is OK."
-msgstr ""
+msgstr "Drücken Sie \"Beenden\", wenn Sie zufrieden sind."
 
 #: src/gnome/new-user-interface.c:495
 msgid "Canceling"
@@ -3069,11 +3095,11 @@
 #: src/gnome/new-user-interface.c:516
 msgid ""
 "Uncheck if you do not want this dialog to run if you start GnuCash up again. "
-msgstr ""
+msgstr "Deaktivieren Sie dies, um den Assistenten beim nächsten Start nicht wieder anzuzeigen."
 
 #: src/gnome/new-user-interface.c:525
 msgid "Run dialog for new user again?"
-msgstr ""
+msgstr "Beim nächsten Start Assistenten wieder anzeigen?"
 
 #: src/gnome/new-user-interface.c:571 src/scm/report/guile-strings.c:719
 msgid "Welcome to GnuCash 1.6!"
@@ -3093,7 +3119,7 @@
 
 #: src/gnome/print-session.c:86
 msgid "Print GnuCash Document"
-msgstr ""
+msgstr "GnuCash Drucken"
 
 #: src/gnome/print-session.c:139
 msgid "Print Preview"
@@ -3259,7 +3285,7 @@
 
 #: src/gnome/window-acct-tree.c:890
 msgid "Setup tax information for all income and expense accounts"
-msgstr ""
+msgstr "Steuerrelevante Informationen für Einkommens- und Ausgabenskonten einrichten"
 
 #: src/gnome/window-acct-tree.c:901 src/gnome/window-reconcile.c:1227
 #: src/gnome/window-register.c:1577
@@ -3268,7 +3294,7 @@
 
 #: src/gnome/window-help.c:297
 msgid "Enter URI to load:"
-msgstr ""
+msgstr "Anzuzeigende URL eingeben:"
 
 #: src/gnome/window-help.c:575 src/gnome/window-report.c:631
 msgid "Back"
@@ -3304,7 +3330,7 @@
 
 #: src/gnome/window-help.c:613 src/gnome/window-report.c:659
 msgid "Cancel outstanding HTML requests"
-msgstr ""
+msgstr "Unbeantwortete HTML-Anfragen abbrechen "
 
 #: src/gnome/window-help.c:622 src/gnome/window-register.c:919
 #: src/gnome/window-register.c:1361 src/gnome/window-report.c:686
@@ -3334,11 +3360,11 @@
 
 #: src/gnome/window-main.c:716
 msgid "You cannot save to that filename."
-msgstr ""
+msgstr "Sie können die Datei nicht mit diesem Namen speichern."
 
 #: src/gnome/window-main.c:729 src/gnome/window-main.c:755
 msgid "You cannot save to that file."
-msgstr ""
+msgstr "Sie können nicht in diese Datei speichern."
 
 #: src/gnome/window-main.c:795
 msgid "There was an error saving the file."
@@ -3426,15 +3452,15 @@
 
 #: src/gnome/window-main.c:998
 msgid "View and edit the commodities for stocks and mutual funds"
-msgstr ""
+msgstr "Wertpapiere für Depots und Investmentfonds anzeigen und bearbeiten"
 
 #: src/gnome/window-main.c:1005
 msgid "_Price Editor"
-msgstr ""
+msgstr "_Preis-Editor"
 
 #: src/gnome/window-main.c:1006
 msgid "View and edit the prices for stocks and mutual funds"
-msgstr ""
+msgstr "Preise für Währungen/Wertpapiere anzeigen und bearbeiten"
 
 #: src/gnome/window-main.c:1013
 msgid "Financial _Calculator"
@@ -3559,11 +3585,11 @@
 
 #: src/gnome/window-reconcile.c:1078
 msgid "_Postpone"
-msgstr ""
+msgstr "_Unterbrechen"
 
 #: src/gnome/window-reconcile.c:1079
 msgid "Postpone the reconciliation of this account"
-msgstr "Die Abstimmung dieses Kontos später beenden"
+msgstr "Das Abgleichen des Kontos unterbrechen"
 
 #: src/gnome/window-reconcile.c:1086 src/gnome/window-register.c:1471
 #: src/gnome/window-register.c:1660
@@ -3683,7 +3709,7 @@
 
 #: src/gnome/window-reconcile.c:1978
 msgid "Do you want to postpone this reconciliation and finish it later?"
-msgstr ""
+msgstr "Möchten Sie dieses Abgleichen jetzt unterbrechen später fertigstellen?"
 
 #: src/gnome/window-reconcile.c:2012
 msgid ""
@@ -4034,6 +4060,9 @@
 "\n"
 "You would be deleting a transaction with reconciled splits!"
 msgstr ""
+"Diese Auswahl wird die ganze Buchung löschen.\n"
+"\n"
+"Beachten Sie, daß Sie eine Buchung mit abgeglichenen Teilbuchungen löschen würden."
 
 #: src/gnome/window-register.c:2824
 msgid ""
@@ -4073,7 +4102,7 @@
 
 #: src/gnome/window-register.c:2964
 msgid "You would be deleting a reconciled split!"
-msgstr ""
+msgstr "Beachten Sie, daß Sie eine abgeglichene Teilbuchung löschen würden."
 
 #: src/gnome/window-register.c:2970
 msgid "(no memo)"
@@ -4085,7 +4114,7 @@
 
 #: src/gnome/window-register.c:3007
 msgid "You would be deleting a transaction with reconciled splits!"
-msgstr ""
+msgstr "Beachten Sie, daß Sie eine Buchung mit abgeglichenen Teilbuchungen löschen würden."
 
 #: src/gnome/window-report.c:107
 msgid "(Report not found)"
@@ -4278,7 +4307,7 @@
 #. Action: Distribution
 #: src/register/splitreg.c:240
 msgid "Dist"
-msgstr ""
+msgstr "Ausschüttung"
 
 #: src/register/splitreg.c:723
 msgid "Enter the transaction number, such as the check number"
@@ -4327,67 +4356,67 @@
 #. ============ END OF FILE =====================
 #: src/scm/guile-strings.c:1
 msgid "Show GnuCash version"
-msgstr ""
+msgstr "GnuCash Version anzeigen"
 
 #: src/scm/guile-strings.c:2
 msgid "Show GnuCash usage information"
-msgstr ""
+msgstr "GnuCash Aufruf-Parameter anzeigen"
 
 #: src/scm/guile-strings.c:3
 msgid "Show this help message"
-msgstr ""
+msgstr "Diese Mitteilung anzeigen"
 
 #: src/scm/guile-strings.c:4
 msgid "Enable debugging mode"
-msgstr ""
+msgstr "Debug-Modus aktivieren"
 
 #: src/scm/guile-strings.c:5
 msgid "Set the logging level from 0 (least) to 6 (most)"
-msgstr ""
+msgstr "Logging-Level wählen, von 0 (am wenigsten) bis 6 (am meisten)"
 
 #: src/scm/guile-strings.c:6
 msgid "Do not load the last file opened"
-msgstr ""
+msgstr "Letzte geöffnete Datei nicht öffnen"
 
 #: src/scm/guile-strings.c:7
 msgid "Set configuration directory"
-msgstr ""
+msgstr "Konfigurations-Verzeichnis setzen"
 
 #: src/scm/guile-strings.c:8
 msgid "Set shared directory"
-msgstr ""
+msgstr "Datenablage-Verzeichnis setzen"
 
 #: src/scm/guile-strings.c:9
 msgid "Set the search path for .scm files."
-msgstr ""
+msgstr "Suchpfad für .scm (Scheme) Dateien setzen"
 
 #: src/scm/guile-strings.c:10
 msgid "Set the search path for documentation files"
-msgstr ""
+msgstr "Suchpfad für Hilfedateien setzen"
 
 #: src/scm/guile-strings.c:11
 msgid "Evaluate the guile command"
-msgstr ""
+msgstr "Das gegebene Guile (Scheme) Kommando ausführen"
 
 #: src/scm/guile-strings.c:12
 msgid "Load the given .scm file"
-msgstr ""
+msgstr "Die gegebene .scm Datei laden"
 
 #: src/scm/guile-strings.c:13
 msgid "Add price quotes to given FILE."
-msgstr ""
+msgstr "Börsenkurse zu angegebener Datei hinzufügen"
 
 #: src/scm/guile-strings.c:14
 msgid "Load the user configuration"
-msgstr ""
+msgstr "Benutzereinstellungen laden"
 
 #: src/scm/guile-strings.c:15
 msgid "Load the system configuration"
-msgstr ""
+msgstr "Systemeinstellungen laden"
 
 #: src/scm/guile-strings.c:16
 msgid "Run the RPC Server"
-msgstr ""
+msgstr "RPC Server starten"
 
 #: src/scm/guile-strings.c:17
 msgid "Current Year Start"
@@ -4663,7 +4692,7 @@
 
 #: src/scm/guile-strings.c:98
 msgid "Payables/Receivables"
-msgstr ""
+msgstr "Verbindlichkeiten/Forderungen"
 
 #: src/scm/guile-strings.c:100
 msgid "Reports"
@@ -4700,7 +4729,7 @@
 
 #: src/scm/guile-strings.c:111
 msgid "TXF Anomalies"
-msgstr ""
+msgstr "TXF Ungewöhnlichkeiten"
 
 #: src/scm/guile-strings.c:112
 msgid "Printing"
@@ -4728,7 +4757,7 @@
 
 #: src/scm/guile-strings.c:118
 msgid "GnuCash Network Home"
-msgstr ""
+msgstr "Startseite des GnuCash Netzwerkes"
 
 #: src/scm/guile-strings.c:119
 msgid "URL Tests"
@@ -4749,7 +4778,7 @@
 #: src/scm/guile-strings.c:123 src/scm/guile-strings.c:446
 #: src/scm/report/guile-strings.c:513
 msgid "Default"
-msgstr ""
+msgstr "Voreinstellung"
 
 #: src/scm/guile-strings.c:125
 msgid "Account name"
@@ -4779,13 +4808,13 @@
 msgid ""
 "The selected accounts contain no data/transactions (or only zeroes) for the "
 "selected time period"
-msgstr ""
+msgstr "Die gewählten Konten enthalten keine Daten/Buchungen (oder nur solche mit Nullen) für die gewählte Zeitspanne."
 
 #: src/scm/guile-strings.c:135
 msgid ""
 "If you keep multiple account views open, it may be helpful to give each one "
 "a descriptive name"
-msgstr ""
+msgstr "Wenn Sie mehrere Kontenansichten öffnen, sollten Sie jeder Ansicht einen beschreibenden Namen geben."
 
 #: src/scm/guile-strings.c:138
 msgid "Double click expands parent accounts"
@@ -4919,23 +4948,23 @@
 
 #: src/scm/guile-strings.c:195 src/scm/report/guile-strings.c:312
 msgid "The weighted average of all currency transactions of the past"
-msgstr ""
+msgstr "Der gewichtete Durchschnitt aller bisherigen Währungsbuchungen der Vergangenheit"
 
 #: src/scm/guile-strings.c:196
 msgid "Most recent"
-msgstr ""
+msgstr "Neuester"
 
 #: src/scm/guile-strings.c:197
 msgid "The most recent recorded price"
-msgstr ""
+msgstr "Der neueste aufgezeichnete Preis"
 
 #: src/scm/guile-strings.c:198
 msgid "Nearest in time"
-msgstr ""
+msgstr "Zeitlich nächster"
 
 #: src/scm/guile-strings.c:199
 msgid "The price recorded nearest in time to the report date"
-msgstr ""
+msgstr "Der Preis, der dem Berichtsdatum am nächsten kommt"
 
 #: src/scm/guile-strings.c:200
 msgid "Width of plot in pixels."
@@ -4947,7 +4976,7 @@
 
 #: src/scm/guile-strings.c:202
 msgid "Choose the marker for each data point."
-msgstr ""
+msgstr "Wählen Sie die Markierung für jeden Datenpunkt"
 
 #: src/scm/guile-strings.c:203
 msgid "GnuCash Configuration Options"
@@ -5256,7 +5285,7 @@
 
 #: src/scm/guile-strings.c:316 src/scm/guile-strings.c:319
 msgid "User Info"
-msgstr ""
+msgstr "Benutzerinformationen"
 
 #: src/scm/guile-strings.c:317
 msgid "User Name"
@@ -5264,7 +5293,7 @@
 
 #: src/scm/guile-strings.c:318
 msgid "The name of the user. This is used in some reports."
-msgstr ""
+msgstr "Der Name des Benutzers. Dies wird in manchen Berichten verwendet."
 
 #: src/scm/guile-strings.c:320
 msgid "User Address"
@@ -5272,7 +5301,7 @@
 
 #: src/scm/guile-strings.c:321
 msgid "The address of the user. This is used in some reports."
-msgstr ""
+msgstr "Die Adresse des Benutzers. Dies wird in manchen Berichten verwendet."
 
 #: src/scm/guile-strings.c:322 src/scm/guile-strings.c:325
 #: src/scm/guile-strings.c:334 src/scm/guile-strings.c:345
@@ -5301,11 +5330,11 @@
 
 #: src/scm/guile-strings.c:326
 msgid "Toolbar Buttons"
-msgstr ""
+msgstr "Werkzeugleisten-Knöpfe"
 
 #: src/scm/guile-strings.c:327
 msgid "Choose whether to display icons, text, or both for toolbar buttons"
-msgstr ""
+msgstr "Wählen Sie, ob die Werkzeugleiste das Symbol, Text oder beides anzeigen soll"
 
 #: src/scm/guile-strings.c:328
 msgid "Icons and Text"
@@ -5333,35 +5362,33 @@
 
 #: src/scm/guile-strings.c:335
 msgid "Application MDI mode"
-msgstr ""
+msgstr "Fenstermodus"
 
 #: src/scm/guile-strings.c:336
 msgid "Choose how new windows are created for reports and account trees."
-msgstr ""
+msgstr "Wählen Sie, wie mehrere Fenster für Berichte und Kontenfenster angezeigt werden."
 
 #: src/scm/guile-strings.c:337
 msgid "Notebook"
-msgstr "Kartei"
+msgstr "Karteikarten"
 
 #: src/scm/guile-strings.c:338
 msgid ""
 "New windows are created as notebook tabs in the current top-level window"
-msgstr ""
-"Neue Fenster werden als Karteikarten im aktuellen Top-Level Fenster\n"
-"geöffnet"
+msgstr "Neue Fenster werden als Karteikarten im aktuellen Top-Level Fenster geöffnet"
 
 #: src/scm/guile-strings.c:340
 msgid "Create a new top-level window for each report or account tree"
-msgstr ""
+msgstr "Ein neues Fenster für jeden Bericht öffnen"
 
 #: src/scm/guile-strings.c:341
 msgid "Single window"
-msgstr "Einzelnes Fenster"
+msgstr "Ein Fenster"
 
 #: src/scm/guile-strings.c:342
 msgid ""
 "One window is used for all displays (select contents through Window menu)"
-msgstr ""
+msgstr "Ein Fenster für alle Berichte (Inhalt im Fenster Menü wechseln)"
 
 #: src/scm/guile-strings.c:343
 msgid "Use GNOME default"
@@ -5369,7 +5396,7 @@
 
 #: src/scm/guile-strings.c:344
 msgid "Default MDI mode can be set in the GNOME Control Center"
-msgstr ""
+msgstr "Die Voreinstellung für den Fenstermodus kann im GNOME Kontrollzentrum gesetzt werden."
 
 #: src/scm/guile-strings.c:346
 msgid "Account Separator"
@@ -5491,13 +5518,13 @@
 
 #: src/scm/guile-strings.c:383
 msgid "No account list setup on new file"
-msgstr "Es wird keine neue Kontostruktur für die neue Datei erstellt."
+msgstr "Keine Konteneinrichtung bei neuer Datei"
 
 #: src/scm/guile-strings.c:384
 msgid ""
 "Popup the new account list dialog when you choose \"New File\" from the "
 "\"File\" menu"
-msgstr ""
+msgstr "Assistent für neue Konteneinrichtung öffnen, wenn \"Neue Datei\" im Menü \"Datei\" gewählt wird"
 
 #: src/scm/guile-strings.c:386
 msgid "Verbose documentation"
@@ -5543,35 +5570,35 @@
 
 #: src/scm/guile-strings.c:399
 msgid "Host to connect to for user registration and support services"
-msgstr ""
+msgstr "Rechner für Benutzerregistrierung und Support"
 
 #: src/scm/guile-strings.c:400
 msgid "Show version."
-msgstr ""
+msgstr "Version anzeigen."
 
 #: src/scm/guile-strings.c:401 src/scm/guile-strings.c:402
 msgid "Generate an argument summary."
-msgstr ""
+msgstr "Kommandozeilenparameter zusammenfassen."
 
 #: src/scm/guile-strings.c:403
 msgid "Don't load any file, including autoloading the last file."
-msgstr ""
+msgstr "Keine Datei laden, auch nicht die zuletzt geöffnete."
 
 #: src/scm/guile-strings.c:404
 msgid "Configuration directory."
-msgstr ""
+msgstr "Verzeichnis für Einstellungen."
 
 #: src/scm/guile-strings.c:405
 msgid "Shared files directory."
-msgstr ""
+msgstr "Verzeichnis für Daten."
 
 #: src/scm/guile-strings.c:406
 msgid "Enable debugging code."
-msgstr ""
+msgstr "Debug-Befehle aktivieren."
 
 #: src/scm/guile-strings.c:407
 msgid "Logging level from 0 (least logging) to 5 (most logging)."
-msgstr ""
+msgstr "Logging-Level von 0 (am wenigsten) bis 6 (am meisten) setzen."
 
 #: src/scm/guile-strings.c:408
 msgid ""
@@ -5594,35 +5621,37 @@
 "You are missing some needed Perl libraries.\n"
 "Run 'update-finance-quote' as root to install them."
 msgstr ""
+"Ihnen fehlen einige benötigte Perl Bibliotheken.\n"
+"Führen Sie 'update-finance-quote' als root aus, um diese zu installieren."
 
 #: src/scm/guile-strings.c:417 src/scm/guile-strings.c:418
 msgid "Unable to get quotes or diagnose the problem."
-msgstr ""
+msgstr "Abrufen der Marktwerte fehlgeschlagen. Genauere Diagnose ebenfalls fehlgeschlagen."
 
 #: src/scm/guile-strings.c:419 src/scm/guile-strings.c:421
 #: src/scm/guile-strings.c:422
 msgid "Unable to retrieve quotes for these items:"
-msgstr ""
+msgstr "Abrufen von Marktwerten für diese Werte fehlgeschlagen:"
 
 #: src/scm/guile-strings.c:420
 msgid "Continue using only the good quotes?"
-msgstr ""
+msgstr "Mit den benutzbaren Werten fortsetzen?"
 
 #: src/scm/guile-strings.c:423
 msgid "Continuing with good quotes."
-msgstr ""
+msgstr "Es wird mit den benutzbaren Werten fortgesetzt."
 
 #: src/scm/guile-strings.c:424 src/scm/guile-strings.c:426
 msgid "Unable to create prices for these items:"
-msgstr ""
+msgstr "Preis-Eintrag für folgende Werte fehlgeschlagen:"
 
 #: src/scm/guile-strings.c:425
 msgid "Add remaining good quotes?"
-msgstr ""
+msgstr "Übrige benutzbare Werte eintragen?"
 
 #: src/scm/guile-strings.c:427
 msgid "Adding remaining good quotes."
-msgstr ""
+msgstr "Benutzbare Werte werden eingetragen."
 
 #: src/scm/guile-strings.c:428
 msgid "_Reports"
@@ -5642,7 +5671,7 @@
 
 #: src/scm/guile-strings.c:432
 msgid "_Utility"
-msgstr ""
+msgstr "_Unterstützung"
 
 #: src/scm/guile-strings.c:435 src/scm/report/guile-strings.c:360
 #: src/scm/report/guile-strings.c:363 src/scm/report/guile-strings.c:366
@@ -5677,11 +5706,11 @@
 
 #: src/scm/guile-strings.c:441
 msgid "Welcome Extravaganza"
-msgstr ""
+msgstr "Willkommensgruß"
 
 #: src/scm/guile-strings.c:442
 msgid "Welcome-to-GnuCash screen"
-msgstr ""
+msgstr "Willkommen-zu-GnuCash-Oberfläche"
 
 #: src/scm/guile-strings.c:443
 msgid "Enter a descriptive name for this report"
@@ -6270,19 +6299,19 @@
 
 #: src/scm/report/guile-strings.c:117
 msgid "Shows a barchart with the Income per interval developing over time"
-msgstr ""
+msgstr "Balkendiagramm des Einkommens pro Zeit anzeigen"
 
 #: src/scm/report/guile-strings.c:118
 msgid "Shows a barchart with the Expenses per interval developing over time"
-msgstr ""
+msgstr "Balkendiagramm der Ausgaben pro Zeit anzeigen"
 
 #: src/scm/report/guile-strings.c:119
 msgid "Shows a barchart with the Assets developing over time"
-msgstr ""
+msgstr "Balkendiagramm der Aktiva pro Zeit anzeigen"
 
 #: src/scm/report/guile-strings.c:120
 msgid "Shows a barchart with the Liabilities developing over time"
-msgstr "Tortendiagramm der Passiva-Entwicklung pro Zeit anzeigen"
+msgstr "Balkendiagramm der Passiva pro Zeit anzeigen"
 
 #: src/scm/report/guile-strings.c:121
 msgid "Income Over Time"
@@ -6519,24 +6548,21 @@
 msgid ""
 "For help on writing reports, or to contribute your brand new, totally cool "
 "report, consult the mailing list %s."
-msgstr ""
-"Um Hilfe beim Schreiben von Berichten zu bekommen oder Ihren eigenen,\n"
-"brandneuen Bericht uns zu senden, wenden Sie sich an die Mailingliste\n"
-"%s."
+msgstr "Um Hilfe beim Schreiben von Berichten zu bekommen oder Ihren eigenen, brandneuen Bericht uns zu senden, wenden Sie sich an die Mailingliste %s."
 
 #: src/scm/report/guile-strings.c:202
 #, c-format
 msgid "For details on subscribing to that list, see %s."
-msgstr ""
+msgstr "Einzelheiten zum Abonnieren der Liste siehe %s."
 
 #: src/scm/report/guile-strings.c:203
 #, c-format
 msgid "You can learn more about writing scheme using this %s."
-msgstr ""
+msgstr "Mehr über die Programmiersprache Scheme unter %s."
 
 #: src/scm/report/guile-strings.c:204
 msgid "online book"
-msgstr ""
+msgstr "Onlinebuch"
 
 #: src/scm/report/guile-strings.c:205
 #, c-format
@@ -6598,11 +6624,11 @@
 
 #: src/scm/report/guile-strings.c:217
 msgid "Items you selected:"
-msgstr ""
+msgstr "Ausgewählte Punkte:"
 
 #: src/scm/report/guile-strings.c:218
 msgid "List items selected"
-msgstr ""
+msgstr "Ausgewählte Listeneinträge:"
 
 #: src/scm/report/guile-strings.c:219
 msgid "(You selected no list items.)"
@@ -6618,11 +6644,11 @@
 
 #: src/scm/report/guile-strings.c:223
 msgid "A sample report with examples."
-msgstr ""
+msgstr "Ein Beispielbericht."
 
 #: src/scm/report/guile-strings.c:225 src/scm/report/guile-strings.c:228
 msgid "URL to frame"
-msgstr ""
+msgstr "URL-Fenster"
 
 #: src/scm/report/guile-strings.c:226
 msgid "URL to display in report"
@@ -6630,7 +6656,7 @@
 
 #: src/scm/report/guile-strings.c:229
 msgid "Frame URL"
-msgstr ""
+msgstr "URL-Fenster"
 
 #: src/scm/report/guile-strings.c:237 src/scm/report/guile-strings.c:302
 msgid "Show Net Profit"
@@ -6638,7 +6664,7 @@
 
 #: src/scm/report/guile-strings.c:238 src/scm/report/guile-strings.c:303
 msgid "Show Asset & Liability bars"
-msgstr ""
+msgstr "Aktiva und Passiva Balken anzeigen"
 
 #: src/scm/report/guile-strings.c:239 src/scm/report/guile-strings.c:304
 msgid "Show Net Worth bars"
@@ -6650,7 +6676,7 @@
 
 #: src/scm/report/guile-strings.c:244
 msgid "Show the Asset and the Liability bars?"
-msgstr ""
+msgstr "Balken für Aktiva und Passiva anzeigen?"
 
 #: src/scm/report/guile-strings.c:245
 msgid "Show the net profit?"
@@ -6666,7 +6692,7 @@
 
 #: src/scm/report/guile-strings.c:248
 msgid "Net Worth Chart"
-msgstr ""
+msgstr "Bilanz Übersicht"
 
 #: src/scm/report/guile-strings.c:255
 msgid "Net Worth"
@@ -6711,7 +6737,7 @@
 
 #: src/scm/report/guile-strings.c:288
 msgid "Listing"
-msgstr ""
+msgstr "Börsennotierung"
 
 #: src/scm/report/guile-strings.c:289
 msgid "Units"
@@ -6719,7 +6745,7 @@
 
 #: src/scm/report/guile-strings.c:293
 msgid "Investment Portfolio"
-msgstr ""
+msgstr "Portfolio"
 
 #: src/scm/report/guile-strings.c:299
 msgid "Price of Commodity"
@@ -6735,7 +6761,7 @@
 
 #: src/scm/report/guile-strings.c:309
 msgid "Calculate the price of this commodity."
-msgstr ""
+msgstr "Den Preis dieser Währung/Aktie berechnen"
 
 #: src/scm/report/guile-strings.c:313
 msgid "Actual Transactions"
@@ -6763,23 +6789,23 @@
 
 #: src/scm/report/guile-strings.c:324
 msgid "All Prices equal"
-msgstr ""
+msgstr "Alle Preise gleich"
 
 #: src/scm/report/guile-strings.c:325
 msgid ""
 "All the prices found are equal. This would result in a plot with one "
 "straight line. Unfortunately, the plotting tool can't handle that."
-msgstr ""
+msgstr "Alle gefundenen Preise sind gleich. Dies würde ein Diagramm mit einer einzigen geraden Linie ergeben. Leider kann die Grafikbibliothek so etwas nicht anzeigen."
 
 #: src/scm/report/guile-strings.c:326
 msgid "All Prices at the same date"
-msgstr ""
+msgstr "Alle Preise mit gleichem Datum"
 
 #: src/scm/report/guile-strings.c:327
 msgid ""
 "All the prices found are from the same date. This would result in a plot "
 "with one straight line. Unfortunately, the plotting tool can't handle that."
-msgstr ""
+msgstr "Alle gefundenen Preise stammen vom selben Datum. Dies würde ein Diagramm mit einer einzigen geraden Linie ergeben. Leider kann die Grafikbibliothek so etwas nicht anzeigen."
 
 #: src/scm/report/guile-strings.c:328
 msgid "Only one price"
@@ -6789,13 +6815,13 @@
 msgid ""
 "There was only one single price found for the selected commodities in the "
 "selected time period. This doesn't give a useful plot."
-msgstr ""
+msgstr "Es wurde nur ein einziger Preis für die gewählte Währung/Aktie im gewählten Zeitraum gefunden. Dies ergibt kein sinnvolles Diagramm."
 
 #: src/scm/report/guile-strings.c:331
 msgid ""
 "There is no price information available for the selected commodities in the "
 "selected time period."
-msgstr ""
+msgstr "Es ist keine Preisinformation für die gewählte Währung/Aktie im gewählten Zeitraum vorhanden."
 
 #: src/scm/report/guile-strings.c:332
 msgid "Identical commodities"
@@ -6805,7 +6831,7 @@
 msgid ""
 "Your selected commodity and the currency of the report are identical. It "
 "doesn't make sense to show prices for identical commodities."
-msgstr ""
+msgstr "Die gewählte Währung/Aktie, deren Preis angezeigt werden soll, und die Währung des Berichts sind identisch. Es ergibt keinen Sinn, einen Preis für identische Währungen/Aktien anzuzeigen."
 
 #: src/scm/report/guile-strings.c:335
 msgid "Price Scatterplot"
@@ -6887,11 +6913,11 @@
 #: src/scm/report/guile-strings.c:385 src/scm/report/guile-strings.c:591
 #: src/scm/report/guile-strings.c:677
 msgid "Running Balance"
-msgstr ""
+msgstr "Laufender Saldo"
 
 #: src/scm/report/guile-strings.c:386 src/scm/report/guile-strings.c:678
 msgid "Display a running balance"
-msgstr ""
+msgstr "Einen laufenden Saldo anzeigen"
 
 #: src/scm/report/guile-strings.c:388 src/scm/report/guile-strings.c:679
 msgid "Totals"
@@ -6963,11 +6989,11 @@
 
 #: src/scm/report/guile-strings.c:416
 msgid "Banner for top of report."
-msgstr ""
+msgstr "Titel für die Titelzeile des Berichts"
 
 #: src/scm/report/guile-strings.c:418 src/scm/report/guile-strings.c:482
 msgid "Logo"
-msgstr ""
+msgstr "Logo"
 
 #: src/scm/report/guile-strings.c:419
 msgid "Company logo image."
@@ -7029,7 +7055,7 @@
 
 #: src/scm/report/guile-strings.c:439 src/scm/report/guile-strings.c:474
 msgid "Sub-subheading/total Cell Color"
-msgstr ""
+msgstr "Farbe für Zwischen-Zwischenüberschriften/-summen"
 
 #: src/scm/report/guile-strings.c:440
 msgid "Color for subsubtotals"
@@ -7041,7 +7067,7 @@
 
 #: src/scm/report/guile-strings.c:443
 msgid "Color for grand totals"
-msgstr ""
+msgstr "Farbe für Gesamtsummen"
 
 #: src/scm/report/guile-strings.c:444 src/scm/report/guile-strings.c:447
 #: src/scm/report/guile-strings.c:450 src/scm/report/guile-strings.c:483
@@ -7071,9 +7097,10 @@
 msgid "Table border width"
 msgstr "Tabellen-Randbreite"
 
+# FIXME: what kind of string is this ?!??
 #: src/scm/report/guile-strings.c:452 src/scm/report/guile-strings.c:511
 msgid "Bevel depth on tables"
-msgstr ""
+msgstr "Breite des Tabellenrands"
 
 #: src/scm/report/guile-strings.c:489
 msgid "Prepared by: "
@@ -7089,7 +7116,7 @@
 
 #: src/scm/report/guile-strings.c:492
 msgid "Fancy"
-msgstr ""
+msgstr "Elegant"
 
 #: src/scm/report/guile-strings.c:493
 msgid "Technicolor"
@@ -7223,7 +7250,7 @@
 msgid ""
 "WARNING: There are duplicate TXF codes assigned to some accounts. Only TXF "
 "codes with payer sources may be repeated."
-msgstr ""
+msgstr "Warnung: Es sind mehrere steuerrelevante Codes für einzelne Konten zugewiesen woden. Normalerweise dürfen sich nur die TXF Codes für Zahlungspflichtige wiederholen."
 
 #: src/scm/report/guile-strings.c:547
 msgid "Sub-"
@@ -7235,7 +7262,7 @@
 
 #: src/scm/report/guile-strings.c:549
 msgid "Choose the export format for this report:"
-msgstr ""
+msgstr "Wählen Sie das Export-Format für diesen Bericht:"
 
 #: src/scm/report/guile-strings.c:550
 msgid "HTML"
@@ -7255,6 +7282,8 @@
 "File: \"%s\" exists.\n"
 "Overwrite?"
 msgstr ""
+"Datei \"%s\" existiert bereist.\n"
+"Überschreiben?"
 
 #: src/scm/report/guile-strings.c:556
 #, c-format
@@ -7263,13 +7292,13 @@
 
 #: src/scm/report/guile-strings.c:557
 msgid "Blue items are exportable to a .TXF file."
-msgstr ""
+msgstr "Blaue Einträge können in eine .TXF-Datei exportiert werden."
 
 #: src/scm/report/guile-strings.c:558
 msgid ""
 "No Tax Related accounts were found.  Go to the Accounts->Tax Information "
 "dialog to set up tax-related accounts."
-msgstr ""
+msgstr "Keine Konten mit steuerrelevanten Informationen gefunden. Sie können steuerrelevante Informationen im Dialog Kontoeigenschaften->Steuerrelevante Informationen angeben."
 
 #: src/scm/report/guile-strings.c:559
 msgid "Tax Report / TXF Export"
@@ -7277,11 +7306,11 @@
 
 #: src/scm/report/guile-strings.c:560
 msgid "Taxable Income / Deductible Expenses / Export to .TXF file"
-msgstr ""
+msgstr "Besteuertes Einkommen / Absetzbare Ausgaben / Exportieren nach .TXF"
 
 #: src/scm/report/guile-strings.c:561 src/scm/report/guile-strings.c:563
 msgid "Taxable Income / Deductible Expenses"
-msgstr ""
+msgstr "Besteuertes Einkommen / Absetzbare Ausgaben"
 
 #: src/scm/report/guile-strings.c:562
 msgid "This report shows your Taxable Income and Deductible Expenses."
@@ -7305,7 +7334,7 @@
 
 #: src/scm/report/guile-strings.c:568
 msgid "Primary Subtotal for Date Key"
-msgstr ""
+msgstr "Primäre Zwischensumme für Datumsschlüssel"
 
 #: src/scm/report/guile-strings.c:569
 msgid "Secondary Key"
@@ -7317,7 +7346,7 @@
 
 #: src/scm/report/guile-strings.c:571
 msgid "Secondary Subtotal for Date Key"
-msgstr ""
+msgstr "Sekundäre Zwischensumme für Datumsschlüssel"
 
 #: src/scm/report/guile-strings.c:572
 msgid "Total For "
@@ -7381,7 +7410,7 @@
 
 #: src/scm/report/guile-strings.c:626
 msgid "Exact Time"
-msgstr ""
+msgstr "Tageszeit"
 
 #: src/scm/report/guile-strings.c:627
 msgid "Sort by exact time"
@@ -7393,7 +7422,7 @@
 
 #: src/scm/report/guile-strings.c:629
 msgid "Sort by account transferred from/to's name"
-msgstr ""
+msgstr "Sortiere nach Namen des Kontos, zu dem gebucht wurde"
 
 #: src/scm/report/guile-strings.c:630
 msgid "Other Account Code"
@@ -7401,7 +7430,7 @@
 
 #: src/scm/report/guile-strings.c:631
 msgid "Sort by account transferred from/to's code"
-msgstr ""
+msgstr "Sortiere nach Nummer des Kontos, zu dem gebucht wurde"
 
 #: src/scm/report/guile-strings.c:633
 msgid "Sort by amount"
@@ -7445,7 +7474,7 @@
 
 #: src/scm/report/guile-strings.c:651
 msgid "Subtotal according to the primary key?"
-msgstr ""
+msgstr "Zwischensummen für Primärschlüssel?"
 
 #: src/scm/report/guile-strings.c:652 src/scm/report/guile-strings.c:657
 msgid "Do a date subtotal"
@@ -7465,7 +7494,7 @@
 
 #: src/scm/report/guile-strings.c:656
 msgid "Subtotal according to the secondary key?"
-msgstr ""
+msgstr "Zwischensummen für Sekundärschlüssel?"
 
 #: src/scm/report/guile-strings.c:658
 msgid "Secondary Sort Order"
@@ -7495,7 +7524,7 @@
 
 #: src/scm/report/guile-strings.c:689 src/scm/report/guile-strings.c:708
 msgid "Sign Reverses?"
-msgstr ""
+msgstr "Vorzeichenumkehr?"
 
 #: src/scm/report/guile-strings.c:691
 msgid "Don't change any displayed amounts"
@@ -7516,11 +7545,11 @@
 
 #: src/scm/report/guile-strings.c:698
 msgid "Primary Subtotals/headings"
-msgstr ""
+msgstr "Primäre Zwischenüberschriften/-summen"
 
 #: src/scm/report/guile-strings.c:700
 msgid "Secondary Subtotals/headings"
-msgstr ""
+msgstr "Sekundäre Zwischenüberschriften/-summen"
 
 #: src/scm/report/guile-strings.c:704
 msgid "Split Odd"
@@ -7538,7 +7567,7 @@
 msgid ""
 "No transactions were found that match the given time interval and account "
 "selection."
-msgstr ""
+msgstr "Keine Buchungen gefunden, die in den gewählten Zeitraum fallen und die gewählten Konten betreffen."
 
 #: src/scm/report/guile-strings.c:712
 msgid "Transaction Report"
@@ -7550,7 +7579,7 @@
 
 #: src/scm/report/guile-strings.c:715
 msgid "Number of columns before wrapping to a new row"
-msgstr ""
+msgstr "Anzahl Spalten, bevor eine neue Zeile begonnen wird"
 
 #: src/scm/report/guile-strings.c:718
 msgid "Multicolumn View"
@@ -7558,7 +7587,7 @@
 
 #: src/scm/report/guile-strings.c:720
 msgid "GnuCash 1.6 has lots of nice features. Here are a few."
-msgstr ""
+msgstr "GnuCash 1.6 hat viele neue Funktionen. Hier werden einige Beispiele gegeben."
 
 #: src/scm/report/guile-strings.c:721
 msgid "Welcome to GnuCash 1.6"
Index: gnucash/po/gnc-glossary.txt
diff -u gnucash/po/gnc-glossary.txt:1.1 gnucash/po/gnc-glossary.txt:1.2
--- gnucash/po/gnc-glossary.txt:1.1	Fri May 25 00:26:38 2001
+++ gnucash/po/gnc-glossary.txt	Sat Jun  2 13:55:56 2001
@@ -1,110 +1,120 @@
 "Glossary of terms for Gnucash"
-"Last edited: 2001-05-24 21:00-0700 by Christian Stimming <stimming@tuhh.de>"
+"Last edited: 2001-06-02 21:00+0200 by Christian Stimming <stimming@tuhh.de>"
 
 "Term"	"Explanation"	"DE currently"	"DE proposed"	"DA"	"FR"	"JA"	"pt_PT"
-"account"	"-"	"Konto"	"-"	"-"	"-"	"-"	"-"
+"account"	"A detailed record of money spent and received"	"Konto"	"-"	"-"	"-"	"-"	"-"
 "account code"	"-"	"Kontonummer (intern)"	"-"	"-"	"-"	"-"	"-"
 "account name"	"-"	"Kontobezeichnung"	"-"	"-"	"-"	"-"	"-"
-"account type: Asset"	"-"	"Anlagevermögen"	"(Aktiva?)"	"-"	"-"	"-"	"-"
-"account type: checking"	"-"	"Girokonto"	"-"	"-"	"-"	"-"	"-"
-"account type: Equity"	"see Equity"	"Eigenkapital"	"-"	"-"	"-"	"-"	"-"
+"account type: Asset"	"A thing, esp. owned by a person or company, that has value and can be used or sold to pay debts"	"Anlagevermögen"	"(Aktiva?)"	"-"	"-"	"-"	"-"
+"account type: checking"	"(esp. US) (Brit = current account) a bank account from which money can be withdrawn without previous notice"	"Girokonto"	"-"	"-"	"-"	"-"	"-"
+"account type: Equity"	"see: Equity"	"Eigenkapital"	"-"	"-"	"-"	"-"	"-"
 "account type: Expense"	"-"	"Ausgabe"	"-"	"-"	"-"	"-"	"-"
 "account type: Income"	"-"	"Einnahme"	"-"	"-"	"-"	"-"	"-"
-"account type: Liability"	"-"	"Verbindlichkeiten"	"(Passiva?)"	"-"	"-"	"-"	"-"
+"account type: Liability"	"A debt, a financial obligation"	"Verbindlichkeiten"	"(Passiva?)"	"-"	"-"	"-"	"-"
 "account type: money-market"	"-"	"Geldmarktfonds"	"-"	"-"	"-"	"-"	"-"
 "account type: Mutual fund"	"-"	"Investmentfonds"	"-"	"-"	"-"	"-"	"-"
-"account type: saving"	"-"	"Sparkonto"	"-"	"-"	"-"	"-"	"-"
+"account type: saving"	"1. (US) any type of account that earns interest 2. (Brit) any type of bank account that earns a higher level of interest than a current account or deposit account"	"Sparkonto"	"-"	"-"	"-"	"-"	"-"
 "account type: Stock"	"-"	"Depot"	"-"	"-"	"-"	"-"	"-"
 "account: parent account"	"-"	"Hauptkonto"	"-"	"-"	"-"	"-"	"-"
 "account: subaccount"	"-"	"Unterkonto"	"-"	"-"	"-"	"-"	"-"
 "account: top level account"	"-"	"Top-Level-Konto"	"(Oberkonto) ??"	"-"	"-"	"-"	"-"
-"Action (register)"	"-"	"Aktion"	"-"	"-"	"-"	"-"	"-"
-"action: ATM"	"automated teller machine"	"Geldautomat"	"-"	"-"	"-"	"-"	"-"
-"action: autoDep"	"transaction was an auto deposit"	"AutoDepot"	"Gutschrift"	"-"	"-"	"-"	"-"
+"Action (register)"	"The process of doing something that caused a transaction to happen"	"Aktion"	"-"	"-"	"-"	"-"	"-"
+"action: ATM"	"Automated teller machine"	"Geldautomat"	"-"	"-"	"-"	"-"	"-"
+"action: autoDep"	"Transaction was an auto deposit"	"AutoDepot"	"Gutschrift"	"-"	"-"	"-"	"-"
 "action: buy"	"-"	"Kauf"	"-"	"-"	"-"	"-"	"-"
-"action: deposit"	"-"	"Gutschrift"	"Einzahlung"	"-"	"-"	"-"	"-"
-"action: direct debit"	"When people can automatically deduct money straight from your account. The reverse of Direct Deposit."	"Soll"	"Lastschrift"	"-"	"-"	"-"	"-"
-"action: dist"	"transaction is a distribution (???)"	"-"	"Ausschüttung?"	"-"	"-"	"-"	"-"
+"action: deposit"	"-"	"(Gutschrift)"	"Einzahlung"	"-"	"-"	"-"	"-"
+"action: direct debit"	"When people can automatically deduct money straight from your account. The reverse of Direct Deposit."	"(Sol)l"	"Lastschrift"	"-"	"-"	"-"	"-"
+"action: dist"	"transaction is a distribution (???)"	"-"	"Ausschüttung"	"-"	"-"	"-"	"-"
 "action: div"	"transaction is a dividend"	"Dividende"	"-"	"-"	"-"	"-"	"-"
 "action: fee"	"-"	"Gebühr"	"-"	"-"	"-"	"-"	"-"
-"action: int"	"transaction comes from interest"	"Beteiligung"	"Zins"	"-"	"-"	"-"	"-"
+"action: int"	"transaction comes from interest"	"(Beteiligung)"	"Zins"	"-"	"-"	"-"	"-"
 "action: loan"	"-"	"Darlehen"	"-"	"-"	"-"	"-"	"-"
-"action: payment"	"-"	"Belastung"	"Rechnung"	"-"	"-"	"-"	"-"
+"action: payment"	"-"	"(Belastung)"	"Rechnung"	"-"	"-"	"-"	"-"
 "action: POS"	"-"	"Karten-Terminal"	"-"	"-"	"-"	"-"	"-"
 "action: rebate"	"-"	"Rabatt"	"-"	"-"	"-"	"-"	"-"
 "action: sell"	"-"	"Verkauf"	"-"	"-"	"-"	"-"	"-"
-"action: Teller"	"-"	"Zähler"	"Bankschalter"	"-"	"-"	"-"	"-"
-"action: wire"	"-"	"Telegrafische Zahlung"	"Überweisung"	"-"	"-"	"-"	"-"
+"action: Teller"	"-"	"(Zähler)"	"Bankschalter"	"-"	"-"	"-"	"-"
+"action: transfer"	"see: credit transfer"	"-"	"-"	"-"	"-"	"-"	"-"
+"action: wire"	"-"	"(Telegrafische Zahlung)"	"Überweisung"	"-"	"-"	"-"	"-"
 "action: withdraw"	"-"	"Abhebung"	"-"	"-"	"-"	"-"	"-"
-"amount"	"-"	"Betrag"	"-"	"-"	"-"	"-"	"-"
-"average"	"-"	"Durchschnitt/Durchschnittlich"	"-"	"-"	"-"	"-"	"-"
-"Balance"	"-"	"Saldo"	"Bestand?"	"-"	"-"	"-"	"-"
-"balance sheet"	"One of the basic business reports."	"Bilanz"	"-"	"-"	"-"	"-"	"-"
-"balance, to (a transaction)"	"-"	"Ausgleichen "	"-"	"-"	"-"	"-"	"-"
+"amount"	"A sum of money"	"Betrag"	"-"	"-"	"-"	"-"	"-"
+"average"	"The result of adding several amounts together and then dividing this total by the number of amounts"	"Durchschnitt/Durchschnittlich"	"-"	"-"	"-"	"-"	"-"
+"balance (noun)"	"The amount of money that is in one's account"	"Saldo"	"(Bestand, Kontostand?)"	"-"	"-"	"-"	"-"
+"balance sheet"	"A written record of money received and paid out, showing the difference between the two total amounts"	"Bilanz"	"-"	"-"	"-"	"-"	"-"
+"balance, to"	"To arrange for income and spending to be equal"	"Ausgleichen "	"-"	"-"	"-"	"-"	"-"
 "bank"	"-"	"Bank"	"-"	"-"	"-"	"-"	"-"
 "Business (adjective)"	"-"	"Geschäftlich"	"Geschäft/Geschäftlich"	"-"	"-"	"-"	"-"
-"capital gains"	"-"	"Kapitalertrag"	"-"	"-"	"-"	"-"	"-"
-"case sensitive"	"Distinguishing the uppercase and lowercase letters."	"Groß-/Kleinschreibung beachten"	"-"	"-"	"-"	"-"	"-"
-"cash"	"-"	"Bargeld"	"-"	"-"	"-"	"-"	"-"
-"check"	"The piece of paper that you sign and use in the US to pay everything. Note that this is not used at all anymore in a number of other countries :)"	"Scheck"	"-"	"-"	"-"	"-"	"-"
+"capital gains"	"Profits made from the sale of investments or property"	"Kapitalertrag"	"-"	"-"	"-"	"-"	"-"
+"case sensitive"	"Distinguishing the uppercase and lowercase letters"	"Groß-/Kleinschreibung beachten"	"-"	"-"	"-"	"-"	"-"
+"cash"	"Money in coins or notes"	"Bargeld"	"-"	"-"	"-"	"-"	"-"
+"check"	"(esp. US) (= cheque) A special printed form on which one writes an order to a bank to pay a sum of money from one's account to another person"	"Scheck"	"-"	"-"	"-"	"-"	"-"
 "close, to"	"To end an application's relationship with an open file so that the application will no longer be able to access the file without opening it again. "	"Schliessen"	"-"	"-"	"-"	"-"	"-"
-"commodity"	"The most general term of what an account keeps track of. Can be e.g. a currency, or a stock."	"Währung/Aktie, Ware, Ware/Währung"	"Währung/Wertpapier"	"-"	"-"	"-"	"-"
-"commodity listing"	"e.g. NASDAQ"	"Börsennotierung"	"Börsenplatzkürzel?"	"-"	"-"	"-"	"-"
+"commodity"	"An article that is bought and sold. The most general term of what an account keeps track of, e.g. a currency or a stock."	"Währung/Aktie, Ware, Ware/Währung"	"Währung/Aktie"	"-"	"-"	"-"	"-"
+"commodity listing"	"e.g. NASDAQ"	"(Börsennotierung)"	"Börsenplatzkürzel"	"-"	"-"	"-"	"-"
 "commodity option: fraction"	"the smallest amount of a commodity that's traded (e.g. 1/100 for USD, 1 for most stocks)"	"Stückelung, Bruchteile"	"Stückelung"	"-"	"-"	"-"	"-"
 "commodity option: Symbol"	"e.g. USD, DEM"	"Symbol"	"-"	"-"	"-"	"-"	"-"
-"Credit (column in register)"	"Money that came into the account."	"Haben "	"Gutschrift, (Eingang?)"	"-"	"-"	"-"	"-"
+"Credit (column in register)"	"(a) A sum of money paid into an account. (b) A record of such a payment. (c) The state of having money in one's bank account."	"Haben "	"Gutschrift, (Haben, Eingang?)"	"-"	"-"	"-"	"-"
 "Credit Card"	"-"	"Kreditkarte"	"-"	"-"	"-"	"-"	"-"
-"currency"	"-"	"Währung"	"-"	"-"	"-"	"-"	"-"
-"Custom"	"Custom print format as opposed to a template choice."	"-"	"Benutzerdefiniert"	"-"	"-"	"-"	"-"
+"credit transfer"	"A transfer of money direct from one bank account to another, without using a cheque"	"-"	"Überweisung"	"-"	"-"	"-"	"-"
+"currency"	"The system of money used in a country"	"Währung"	"-"	"-"	"-"	"-"	"-"
+"Custom"	"Custom print format (i.e. according to the user's wishes) as opposed to a template choice."	"-"	"Benutzerdefiniert"	"-"	"-"	"-"	"-"
 "database"	"The backend where the data is stored."	"Datei "	"-"	"-"	"-"	"-"	"-"
-"Date"	"each transaction happens on a date"	"Datum"	"-"	"-"	"-"	"-"	"-"
+"Date"	"A specific numbered day of the month"	"Datum"	"-"	"-"	"-"	"-"	"-"
 "date format"	"DD/MM/YY or MM/DD/YY or something else"	"Datumsformat"	"-"	"-"	"-"	"-"	"-"
 "date range"	"A range in time that is delimited by two distinct dates."	"Zeitraum"	"-"	"-"	"-"	"-"	"-"
-"Debit (column in register)"	"Money that went out of the account."	"Soll "	"Belastung, (Soll, Ausgang?)"	"-"	"-"	"-"	"-"
+"Debit (column in register)"	"(a) A written note in an account of a sum owed or paid out. (b) A sum withdrawn from an account."	"Soll "	"Belastung, (Soll, Ausgang?)"	"-"	"-"	"-"	"-"
 "default"	"Each option has a default setting that it is shipped with, until the user changes the setting."	"Voreinstellung"	"-"	"-"	"-"	"-"	"-"
-"depreciation"	"-"	"Abschreibung"	"-"	"-"	"-"	"-"	"-"
+"depreciation"	"The process of something becoming less valuable"	"Abschreibung"	"-"	"-"	"-"	"-"	"-"
 "Description (column in register)"	"One textfield per transaction. The text in it should describe what the transaction was about. A short descriptive phrase (up to 40 chars)"	"Beschreibung"	"Verwendungszweck, (Buchungstext, Text?)"	"-"	"-"	"-"	"-"
 "double entry"	"Important Buzzword :)"	"Doppelte Buchführung"	"-"	"-"	"-"	"-"	"-"
-"equity"	"equity isn't debt, it's a representation of long-term capital. so combining it with liability isn't really very meaningful, except in the balance sheet."	"Eigenkapital"	"-"	"-"	"-"	"-"	"-"
-"exchange rate"	"-"	"Wechselkurs"	"-"	"-"	"-"	"-"	"-"
-"field"	"in the account creation dialog"	"Feld"	"-"	"-"	"-"	"-"	"-"
+"equity"	"1. The money value of a property after all charges on it have been paid. Equity isn't debt, it's a representation of long-term capital (So combining it with liability isn't really very meaningful, except in the balance sheet. 2. (a) The value of the shares issued by  a company. (b) Ordinary stocks and shares that carry no fixed interest."	"Eigenkapital"	"-"	"-"	"-"	"-"	"-"
+"exchange rate"	"The relation in value between the money used in different countries"	"Wechselkurs"	"-"	"-"	"-"	"-"	"-"
+"field"	"in the account creation dialog??"	"Feld"	"-"	"-"	"-"	"-"	"-"
 "file"	"Any piece of information (text, graphics, executable) put together and given a name. All the information you have on the hard drive is arranged as a collection of  files."	"Datei"	"-"	"-"	"-"	"-"	"-"
 "file type"	"-"	"Dateityp"	"-"	"-"	"-"	"-"	"-"
 "financial calculator: interest rate"	"-"	"Zinsrate"	"Zinssatz"	"-"	"-"	"-"	"-"
-"financial calculator: payments"	"-"	"Raten"	"-"	"-"	"-"	"-"	"-"
+"financial calculator: payments"	"see: payment"	"Raten"	"-"	"-"	"-"	"-"	"-"
+"gain"	"An increase in wealth; profit; advantage"	"-"	"Wertzuwachs (Gewinn, Zunahme, Profit)"	"-"	"-"	"-"	"-"
 "imbalance"	"name of an automaticly created account to get imbalanced transactions back in balance"	"unausgeglichenes Saldo"	"Ausgleichskonto"	"-"	"-"	"-"	"-"
 "import"	"Process of extracting data from a non-Gnucash format into a Gnucash file. E.g. QIF Import."	"Import"	"-"	"-"	"-"	"-"	"-"
-"interest"	"The cost of borrowing money, or the gain from lending money."	"Zinsen"	"-"	"-"	"-"	"-"	"-"
-"invoice"	"-"	"Rechnung"	"-"	"-"	"-"	"-"	"-"
+"interest"	"Money charged for borrowing money, or paid to somebody who invests money"	"Zinsen"	"-"	"-"	"-"	"-"	"-"
+"invoice"	"A list of goods sold or services provided together with the prices charged; a bill"	"Rechnung"	"-"	"-"	"-"	"-"	"-"
+"ledger"	"A book in which a bank, business firm, etc. records its financial accounts"	"-"	"Hauptbuch"	"-"	"-"	"-"	"-"
 "liabilities/equity"	"The heading for the right side of the balance sheet. See also: Equity."	"Passiva"	"-"	"-"	"-"	"-"	"-"
+"loss"	"The money lost in business activity"	""	"Verlust"	"-"	"-"	"-"	"-"
 "Lost Accounts"	"name of an automatically created account"	"Verlorene Konten"	"?"	"-"	"-"	"-"	"-"
+"marker"	"The thing that the scatter plot uses to mark each data point"	""	"Markierung"	"-"	"-"	"-"	"-"
+"MDI modus"	"The way how more than one window is displayed in GnuCash at the same time. MDI = Multiple Document Interface."	""	"Fenstermodus"	"-"	"-"	"-"	"-"
 "Memo"	"One textfield per split that should help you remember what this split was about."	"Memo"	"Buchungstext, (Verwendungszweck, Text, Erklärung?)"	"-"	"-"	"-"	"-"
-"national currency"	"e.g. USD, DEM, as opposed to stocks"	"Nationale Währung"	"-"	"-"	"-"	"-"	"-"
+"national currency"	"e.g. USD, DEM, see Currency."	"Nationale Währung"	"-"	"-"	"-"	"-"	"-"
+"net"	"(of money) remaining when nothing more is to be taken away"	""	"netto"	"-"	"-"	"-"	"-"
 "net assets"	"net total of all assets"	"Gesamt Anlagevermögen"	"-"	"-"	"-"	"-"	"-"
-"net profit"	"The total income minus the total expenses of a given time period."	"-"	"-"	"-"	"-"	"-"	"-"
-"net worth"	"Your net worth is your assets minus your liabilities. If your accounts are balanced, your net worth should equal your equity plus your net profit."	"-"	"-"	"-"	"-"	"-"	"-"
+"net profit"	"The total income minus the total expenses of a given time period."	"-"	"Überschuß, (Bilanz eines Buchungszeitraumes?)"	"-"	"-"	"-"	"-"
+"net worth"	"Your net worth is your assets minus your liabilities. If your accounts are balanced, your net worth should equal your equity plus your net profit."	"-"	"Bilanz"	"-"	"-"	"-"	"-"
 "notes (register)"	"One textfield per transaction that can hold explanatory text about the transaction."	"Notizen"	"Bemerkung"	"-"	"-"	"-"	"-"
-"Num (column in register)"	"Abbreviation for number; Field in a transaction. If this transaction was done by check, then the check number should be noted in this field."	"Num "	"Nr"	"-"	"-"	"-"	"-"
+"Num (column in register)"	"Abbreviation for: number; Field in a transaction. If this transaction was done by check, then the check number should be noted in this field."	"Num "	"Nr"	"-"	"-"	"-"	"-"
 "open, to"	"to make accessible"	"Öffnen"	"-"	"-"	"-"	"-"	"-"
-"opening balance"	"If an account starts with a non-zero balance, then this is called the opening balance."	"Eröffnungssaldo"	"(Anfangsbestand?)"	"-"	"-"	"-"	"-"
-"options"	"A menu choice in many graphical user interface applications that allows the user to specify how the application will act each time it is used. "	"Berichtsoptionen"	"Optionen"	"-"	"-"	"-"	"-"
-"orphan"	"A split whose account has been scrubbed"	"Waisenkind"	"?"	"-"	"-"	"-"	"-"
-"Payables/Receivables"	"-"	"-"	"Verbindlichkeiten/Forderungen (an Lieferungen und Leistungen)"	"-"	"-"	"-"	"-"
-"payee"	"the guy who gets the money"	"Zahlungsempfänger"	"-"	"-"	"-"	"-"	"-"
-"payer"	"the guy who pays the money"	"-"	"Zahlungspflichtiger"	"-"	"-"	"-"	"-"
-"portfolio"	"-"	"Portfolio"	"-"	"-"	"-"	"-"	"-"
+"opening balance"	"If an account starts with a non-zero balance, then this amount is called the opening balance."	"Eröffnungssaldo"	"-"	"-"	"-"	"-"	"-"
+"options"	"A menu choice in the graphical user interface that allows the user to specify how the application will act each time it is used. "	"Berichtsoptionen"	"Optionen"	"-"	"-"	"-"	"-"
+"orphan"	"A split whose account has been scrubbed"	"Waisenkind"	"Ausbuchungskonto"	"-"	"-"	"-"	"-"
+"passphrase"	"A secret phrase that one needs to know in order to get access to a user account "	"-"	"Mantra"	"-"	"-"	"-"	"-"
+"Payables/Receivables"	"An amount that must be paid / An amount for which money has not yet been received"	"-"	"Verbindlichkeiten/Forderungen (an Lieferungen und Leistungen)"	"-"	"-"	"-"	"-"
+"payee"	"A person to whom sth is paid"	"Zahlungsempfänger"	"-"	"-"	"-"	"-"	"-"
+"payer"	"A person who pays or who has to pay for sth"	"-"	"Zahlungspflichtiger"	"-"	"-"	"-"	"-"
+"payment"	"1. The action of paying sb/sth or of being paid. 2. A sum of money paid."	"-"	"Zahlung"	"-"	"-"	"-"	"-"
+"portfolio"	"A set of investments owned by a person"	"Portfolio"	"-"	"-"	"-"	"-"	"-"
 "preferences"	"A menu choice in many graphical user interface applications that allows the user to specify how the application will act each time it is used. "	"Einstellungen"	"-"	"-"	"-"	"-"	"-"
-"price (in a split)"	"-"	"Preis"	"-"	"-"	"-"	"-"	"-"
+"price (in a split)"	"An amount of money for which sth may be bought or sold"	"Preis"	"-"	"-"	"-"	"-"	"-"
 "price type: ask"	"An ask is an offer to sell, and the price you want to sell at."	"Briefkurs"	"Briefkurs"	"-"	"-"	"-"	"-"
 "price type: bid"	"A bid is an offer to buy, and the price you want to buy at."	"Gebot"	"Geldkurs"	"-"	"-"	"-"	"-"
-"price: quotes"	"online quotes; a snapshot of current prices"	"-"	"-"	"-"	"-"	"-"	"-"
-"profit"	"-"	"Gewinn"	"-"	"-"	"-"	"-"	"-"
-"Profit & Loss"	"One of the basic reports for business accounting. Lists all income and all expense accounts for a given date range."	"Einnahmen-/Ausgabenrechnung"	"Gewinn- und Verlustrechnung (GuV)"	"-"	"-"	"-"	"-"
+"price: quotes"	"online quotes (rather: quotation!?) A statement of the current price of stocks or commodities"	"-"	"Kurs, (Börsennotierung, Marktwert)"	"-"	"-"	"-"	"-"
+"profit"	"Money gained in business, esp. the difference between the amount earned and the amount spent"	"Gewinn"	"-"	"-"	"-"	"-"	"-"
+"Profit & Loss"	"(rather: profit and loss account!?) A list that shows the amount of money spent compared with the amount earned by a business in a particular period"	"Einnahmen-/Ausgabenrechnung"	"Gewinn- und Verlustrechnung (GuV)"	"-"	"-"	"-"	"-"
 "rebalance, to (a transaction)"	"-"	"neu kalkulieren "	"-"	"-"	"-"	"-"	"-"
-"reconcile, to"	"reconcile an account, a reconciled split"	"Ausgleichen, Abstimmen"	"Abgleichen (In Einklang bringen, Abstimmen, Ausgleichen) ?"	"-"	"-"	"-"	"-"
+"reconcile, to"	"reconcile an account, a reconciled split. To find a way to make the bank's account statement agree with the user's recorded transactions in an account."	"Ausgleichen, Abstimmen"	"Abgleichen (In Einklang bringen, Abstimmen, Ausgleichen?)"	"-"	"-"	"-"	"-"
 "record keeping"	"-"	"Buchführung"	"-"	"-"	"-"	"-"	"-"
-"register"	"-"	"Register"	"-"	"-"	"-"	"-"	"-"
-"register entry: split transaction"	"-"	"Split Buchung "	"Mehrteilige Buchung (Teilbuchung?)"	"-"	"-"	"-"	"-"
+"register"	"A list of items; a book containing such a list"	"Register"	"-"	"-"	"-"	"-"	"-"
+"register entry: split transaction"	"A transaction that is divided into two or more parts"	"Split Buchung "	"Mehrteilige Buchung"	"-"	"-"	"-"	"-"
 "register entry: stock split"	"-"	"Aktien Split "	"Aktienteilung"	"-"	"-"	"-"	"-"
 "register: auto-split ledger"	"one form of register"	"-"	"-"	"-"	"-"	"-"	"-"
 "register: basic ledger"	"another form of register"	"Hauptbuch"	"-"	"-"	"-"	"-"	"-"
@@ -113,24 +123,27 @@
 "reload, to"	"reload the current document"	"Erneut laden"	"-"	"-"	"-"	"-"	"-"
 "Retained Earnings"	"name of an equity account (?); to be distinguished from the opening balance."	"Gewinnrücklagen"	"-"	"-"	"-"	"-"	"-"
 "save, to (to a file)"	"To write data (typically a file) to a storage medium, such as a disk or tape."	"speichern"	"-"	"-"	"-"	"-"	"-"
-"scrub, to"	"to scrub an account"	"Ausbuchen"	"-"	"-"	"-"	"-"	"-"
-"security"	"-"	"Wertpapier"	"-"	"-"	"-"	"-"	"-"
+"scrub, to"	"To clean up and delete an account"	"Ausbuchen"	"-"	"-"	"-"	"-"	"-"
+"security"	"A document or certificate showing who owns shares"	"Wertpapier"	"-"	"-"	"-"	"-"	"-"
 "Share Balance (register)"	"-"	"Aktiensaldo"	"(Wertpapierbestand?)"	"-"	"-"	"-"	"-"
-"shares"	"-"	"Anteile "	"-"	"-"	"-"	"-"	"-"
-"source"	"of a price"	"Quelle"	"-"	"-"	"-"	"-"	"-"
-"split"	"A transaction consists of several splits."	"Split "	"Teilbuchung ?"	"-"	"-"	"-"	"-"
-"style sheet"	"This sets the style of a report."	"Stil"	"-"	"-"	"-"	"-"	"-"
-"subtotal"	"-"	"Zwischensumme"	"-"	"-"	"-"	"-"	"-"
+"shares"	"Any of the equal parts into which the money of a business company is divided, giving the holder a right to a portion of the profits"	"Anteile "	"-"	"-"	"-"	"-"	"-"
+"source"	"(of a price) A place wfrom which sth comes or is obtained"	"Quelle"	"-"	"-"	"-"	"-"	"-"
+"split"	"One of the two or several parts a transaction is divided into"	"Split "	"Teilbuchung"	"-"	"-"	"-"	"-"
+"style sheet"	"This sets the particular design or shape of a report."	"Stil"	"-"	"-"	"-"	"-"	"-"
+"subtotal"	"The total of a set of figures that are part of a larger group of figures"	"Zwischensumme"	"-"	"-"	"-"	"-"	"-"
 "tax info"	"field of an account"	"Steuerrelevante Informationen"	"-"	"-"	"-"	"-"	"-"
 "template"	"if you create a new e.g. style sheet, you can start from a template"	"Vorlage"	"-"	"-"	"-"	"-"	"-"
+"time period"	"see: date range"	"-"	"-"	"-"	"-"	"-"	"-"
 "Tot"	"as abbreviation for Total"	"Gesamt"	"-"	"-"	"-"	"-"	"-"
-"total"	"of some balances, of any account's running balance etc."	"Gesamt"	"-"	"-"	"-"	"-"	"-"
-"transaction"	"-"	"Buchung"	"-"	"-"	"-"	"-"	"-"
-"transaction state: cleared"	"-"	"Abgestimmt"	"(Abgeglichen?)"	"-"	"-"	"-"	"-"
-"transaction state: frozen"	"-"	"Eingefroren"	"Fixiert?"	"-"	"-"	"-"	"-"
-"transaction state: reconciled"	"-"	"Ausgeglichen"	"Abgeglichen?"	"-"	"-"	"-"	"-"
-"transfer, to (register toolbar)"	"To move money from one account to another. Will create a transaction."	"Buchen"	"-"	"-"	"-"	"-"	"-"
-"type"	"of an account, of a commodity etc."	"Art"	"-"	"-"	"-"	"-"	"-"
-"units"	"e.g. millimeters, inch; for absolute positioning in the custom check format."	"Einheiten"	"Maßeinheiten"	"-"	"-"	"-"	"-"
+"total"	"The full number or amount: total of some balances, of any account's running balance etc."	"Gesamt"	"-"	"-"	"-"	"-"	"-"
+"transaction"	"A piece of business done"	"Buchung"	"-"	"-"	"-"	"-"	"-"
+"transaction state: cleared"	"-"	"Abgestimmt"	"-"	"-"	"-"	"-"	"-"
+"transaction state: frozen"	"-"	"Eingefroren"	"Fixiert"	"-"	"-"	"-"	"-"
+"transaction state: reconciled"	"A transaction that was reconciled with the bank's statement."	"Ausgeglichen"	"Abgeglichen"	"-"	"-"	"-"	"-"
+"transfer (noun)"	"1. The action of transferring sth. 2. see: credit transfer"	"-"	"Überweisung, (Aktien-) Übertragung"	"-"	"-"	"-"	"-"
+"transfer account"	"The account where an amount is transferred to"	"Gegenkonto"	"Konto, zu dem gebucht wird"	"-"	"-"	"-"	"-"
+"transfer, to (register toolbar)"	"To move money from one account to another. Will create a transaction."	"Buchen"	"umbuchen, überweisen"	"-"	"-"	"-"	"-"
+"type"	"A class or things that have characteristics in common; type of an account, of a commodity etc."	"Art"	"-"	"-"	"-"	"-"	"-"
+"units"	"A fixed amount or number used as a standard of measurement; e.g. millimeters, inch; for absolute positioning in the custom check format."	"Einheiten"	"Maßeinheiten"	"-"	"-"	"-"	"-"
 "URL"	"-"	"URL"	"-"	"-"	"-"	"-"	"-"
-"value (in a split)"	"-"	"Wert "	"-"	"-"	"-"	"-"	"-"
+"value (in a split)"	"The worth of sth in terms of money or other commodities for which it can be exchanged"	"Wert "	"-"	"-"	"-"	"-"	"-"
Index: gnucash/src/SplitLedger.c
diff -u gnucash/src/SplitLedger.c:1.231 gnucash/src/SplitLedger.c:1.232
--- gnucash/src/SplitLedger.c:1.231	Sat Jun  2 04:56:50 2001
+++ gnucash/src/SplitLedger.c	Sat Jun  2 16:15:20 2001
@@ -590,7 +590,7 @@
   denom = xaccAccountGetCurrencySCU (xaccSplitGetAccount (split));
   if (denom == 0)
   {
-    gnc_commodity *commodity = gnc_locale_default_currency ();
+    gnc_commodity *commodity = gnc_default_currency ();
     denom = gnc_commodity_get_fraction (commodity);
     if (denom == 0)
       denom = 100;
@@ -607,7 +607,7 @@
   denom = xaccAccountGetCommoditySCU (xaccSplitGetAccount (split));
   if (denom == 0)
   {
-    gnc_commodity *commodity = gnc_locale_default_currency ();
+    gnc_commodity *commodity = gnc_default_currency ();
     denom = gnc_commodity_get_fraction (commodity);
     if (denom == 0)
       denom = 100;
@@ -644,7 +644,7 @@
 
     xaccSetPriceCellFraction (reg->sharesCell, 10000);
 
-    commodity = gnc_locale_default_currency ();
+    commodity = gnc_default_currency ();
     fraction = gnc_commodity_get_fraction (commodity);
 
     xaccSetPriceCellFraction (reg->debitCell, fraction);
@@ -3681,7 +3681,7 @@
 
         currency = xaccTransGetCurrency (trans);
         if (!currency)
-          currency = gnc_locale_default_currency ();
+          currency = gnc_default_currency ();
 
         imbalance = gnc_numeric_convert (imbalance,
                                          gnc_commodity_get_fraction (currency),
Index: gnucash/src/gnc-ui-util.c
diff -u gnucash/src/gnc-ui-util.c:1.31 gnucash/src/gnc-ui-util.c:1.32
--- gnucash/src/gnc-ui-util.c:1.31	Fri Jun  1 23:40:23 2001
+++ gnucash/src/gnc-ui-util.c	Sat Jun  2 16:15:24 2001
@@ -520,7 +520,7 @@
   }
 
   if (!base_name_exists &&
-      gnc_commodity_equiv (currency, gnc_locale_default_currency ()))
+      gnc_commodity_equiv (currency, gnc_default_currency ()))
   {
     g_free (name);
     name = g_strdup (base_name);
@@ -777,7 +777,7 @@
 
   lc = gnc_localeconv ();
 
-  info.commodity = gnc_locale_default_currency ();
+  info.commodity = gnc_default_currency ();
 
   info.max_decimal_places = lc->frac_digits;
   info.min_decimal_places = lc->frac_digits;
Index: gnucash/src/engine/BackendP.h
diff -u gnucash/src/engine/BackendP.h:1.17 gnucash/src/engine/BackendP.h:1.18
--- gnucash/src/engine/BackendP.h:1.17	Sun May 27 02:35:10 2001
+++ gnucash/src/engine/BackendP.h	Sun Jun  3 02:41:00 2001
@@ -48,6 +48,7 @@
 #include "Query.h"
 #include "Transaction.h"
 #include "gnc-book.h"
+#include "gnc-pricedb.h"
 
 /*
  * The book_begin() routine gives the backend a second initialization
@@ -157,6 +158,7 @@
   int (*price_commit_edit) (Backend *, GNCPrice *);
 
   void (*run_query) (Backend *, Query *);
+  void (*price_lookup) (Backend *, GNCPriceLookup *);
   void (*sync) (Backend *, AccountGroup *);
   void (*sync_price) (Backend *, GNCPriceDB *);
 
Index: gnucash/src/engine/NetIO.c
diff -u gnucash/src/engine/NetIO.c:1.11 gnucash/src/engine/NetIO.c:1.12
--- gnucash/src/engine/NetIO.c:1.11	Sun May 27 02:35:10 2001
+++ gnucash/src/engine/NetIO.c	Sun Jun  3 02:41:00 2001
@@ -305,6 +305,7 @@
   be->be.price_begin_edit = NULL;
   be->be.price_commit_edit = NULL;
   be->be.run_query = xmlbeRunQuery;
+  be->be.price_lookup = NULL;
   be->be.sync = NULL;
   be->be.sync_price = NULL;
   be->be.events_pending = NULL;
Index: gnucash/src/engine/Query.c
diff -u gnucash/src/engine/Query.c:1.81 gnucash/src/engine/Query.c:1.83
--- gnucash/src/engine/Query.c:1.81	Fri Jun  1 23:28:16 2001
+++ gnucash/src/engine/Query.c	Sat Jun  2 21:39:57 2001
@@ -150,13 +150,14 @@
           printf ("\tmatch string=%s \n", qt->data.str.matchstring);
           break;
         case PR_AMOUNT:
-          printf ("amount\n");
+          printf ("amount sense=%d how=%d\n", qt->data.amount.sense, qt->data.amount.how);
+          printf ("\tsign=%d amount=%f\n", qt->data.amount.amt_sgn, qt->data.amount.amount);
           break;
         case PR_BALANCE:
-          printf ("balance\n");
+          printf ("balance sense=%d how=%d\n", qt->data.balance.sense, qt->data.balance.how);
           break;
         case PR_CLEARED:
-          printf ("cleared\n");
+          printf ("cleared sense=%d how=%d\n", qt->data.cleared.sense, qt->data.cleared.how);
           break;
         case PR_DATE: {
           char buff[40];
@@ -179,6 +180,14 @@
           printf ("desc sense=%d case sensitive=%d\n", qt->data.str.sense, qt->data.str.case_sens);
           printf ("\tmatch string=%s \n", qt->data.str.matchstring);
           break;
+
+        case PR_GUID: {
+          char buff[40];
+          printf ("guid sense=%d\n", qt->data.guid.sense);
+          guid_to_string_buff (&qt->data.guid.guid, buff);
+          printf ("\tguid %s\n", buff);
+          break;
+        }
         case PR_MEMO:
           printf ("memo sense=%d case sensitive=%d\n", qt->data.str.sense, qt->data.str.case_sens);
           printf ("\tmatch string=%s \n", qt->data.str.matchstring);
@@ -191,14 +200,16 @@
           printf ("\tmatch string=%s \n", qt->data.str.matchstring);
           break;
         case PR_PRICE:
-          printf ("price\n");
+          printf ("price sense=%d how=%d\n", qt->data.amount.sense, qt->data.amount.how);
+          printf ("\tsign=%d amount=%f\n", qt->data.amount.amt_sgn, qt->data.amount.amount);
           break;
         case PR_SHRS:
-          printf ("shrs\n");
+          printf ("shrs sense=%d how=%d\n", qt->data.amount.sense, qt->data.amount.how);
+          printf ("\tsign=%d amount=%f\n", qt->data.amount.amt_sgn, qt->data.amount.amount);
           break;
 
         default:
-          printf ("unkown\n");
+          printf ("unkown term type=%d \n", qt->data.base.term_type);
       }
     }
     printf("\n");
@@ -1784,7 +1795,7 @@
 /********************************************************************
  * DxaccQueryAddAmountMatch
  * Add a value filter to an existing query. 
- * FIXME 
+ * FIXME ?? fix what ??
  ********************************************************************/
 
 void
@@ -1823,7 +1834,7 @@
 /********************************************************************
  * DxaccQueryAddSharePriceMatch
  * Add a share-price filter to an existing query. 
- * FIXME 
+ * FIXME  ?? fix what ??
  ********************************************************************/
 
 void
@@ -1860,7 +1871,7 @@
 /********************************************************************
  * DxaccQueryAddSharesMatch
  * Add a share-price filter to an existing query. 
- * FIXME 
+ * FIXME ?? fix what ??
  ********************************************************************/
  
 void
Index: gnucash/src/engine/Query.h
diff -u gnucash/src/engine/Query.h:1.46 gnucash/src/engine/Query.h:1.47
--- gnucash/src/engine/Query.h:1.46	Thu May 31 12:44:57 2001
+++ gnucash/src/engine/Query.h	Sat Jun  2 21:39:58 2001
@@ -74,7 +74,7 @@
 typedef enum {
   PR_ACCOUNT=1,
   PR_ACTION,
-  PR_AMOUNT,
+  PR_AMOUNT,   /* FIXME: misnamed, should be PR_VALUE */
   PR_BALANCE,
   PR_CLEARED,
   PR_DATE,
@@ -84,7 +84,7 @@
   PR_MISC,
   PR_NUM,
   PR_PRICE,
-  PR_SHRS
+  PR_SHRS   /* FIXME: misnamed, should be PR_AMT */
 } pr_type_t;
 
 typedef enum {
Index: gnucash/src/engine/Transaction.c
diff -u gnucash/src/engine/Transaction.c:1.176 gnucash/src/engine/Transaction.c:1.177
--- gnucash/src/engine/Transaction.c:1.176	Fri Jun  1 17:45:57 2001
+++ gnucash/src/engine/Transaction.c	Sat Jun  2 12:39:37 2001
@@ -1457,9 +1457,10 @@
           */
         /* XXX hack alert -- finish this */
         PWARN("Another user has modified the transaction\n"
-              "Please refresh your browser and try again.\n"
-              "(This dialog should be a gui dialog and \n"
-              "should check for errors)\n");
+              "\tPlease refresh your browser and try again.\n"
+              "\t(This dialog should be a gui dialog and \n"
+              "\tshould check for errors)\n"
+              "\t rc=%d\n", rc);
         /* hack alert -- we should check for i/o errors from 
          * the backend too ... 
          */
Index: gnucash/src/engine/gnc-book.c
diff -u gnucash/src/engine/gnc-book.c:1.39 gnucash/src/engine/gnc-book.c:1.40
--- gnucash/src/engine/gnc-book.c:1.39	Sun May 27 22:33:05 2001
+++ gnucash/src/engine/gnc-book.c	Sat Jun  2 16:15:26 2001
@@ -463,14 +463,15 @@
         }
         g_free(bin_bkup);
     }
-    
+
     timestamp = xaccDateUtilGetStampNow ();
     backup = g_new (char, strlen (datafile) + strlen (timestamp) + 6);
     strcpy (backup, datafile);
     strcat (backup, ".");
     strcat (backup, timestamp);
     strcat (backup, ".xac");
-    free (timestamp);
+    g_free (timestamp);
+
     if(link(datafile, backup) != 0)
     {
         gnc_book_push_error(
Index: gnucash/src/engine/gnc-pricedb-p.h
diff -u gnucash/src/engine/gnc-pricedb-p.h:1.4 gnucash/src/engine/gnc-pricedb-p.h:1.6
--- gnucash/src/engine/gnc-pricedb-p.h:1.4	Sun May 27 16:42:06 2001
+++ gnucash/src/engine/gnc-pricedb-p.h	Sun Jun  3 02:41:00 2001
@@ -39,6 +39,7 @@
   char *source;
   char *type;
   gnc_numeric value;
+  gint32   version;              /* version number, for syncing with backend */
 
   /* 'private' object management fields */
   guint32  refcount;             /* garbage collection reference count */
@@ -55,6 +56,24 @@
   gboolean dirty;
 };
 
+/* These structs define the kind of price lookup being done
+ * so that it can be passed to the backend.  This is a rather
+ * cheesy, low-brow interface.  It could stand improvement.
+ */
+typedef enum {
+  LOOKUP_LATEST = 1,
+  LOOKUP_ALL,
+  LOOKUP_AT_TIME,
+  LOOKUP_NEAREST_IN_TIME
+} PriceLookupType;
+
+
+struct _GNCPriceLookup {
+  PriceLookupType type;
+  gnc_commodity  *commodity;
+  gnc_commodity  *currency;
+  Timespec        date;
+};
 
 void     gnc_pricedb_mark_clean(GNCPriceDB *db);
 void     gnc_pricedb_substitute_commodity(GNCPriceDB *db,
Index: gnucash/src/engine/gnc-pricedb.c
diff -u gnucash/src/engine/gnc-pricedb.c:1.20 gnucash/src/engine/gnc-pricedb.c:1.22
--- gnucash/src/engine/gnc-pricedb.c:1.20	Mon May 28 15:15:59 2001
+++ gnucash/src/engine/gnc-pricedb.c	Sun Jun  3 02:41:01 2001
@@ -53,6 +53,7 @@
   p->editlevel = 0;
   p->not_saved = FALSE;
   p->do_free = FALSE;
+  p->version = 0;
   xaccGUIDNew (&p->guid);
   xaccStoreEntity(p, &p->guid, GNC_ID_PRICE); 
   gnc_engine_generate_event (&p->guid, GNC_EVENT_CREATE);
@@ -110,6 +111,8 @@
   new_p = gnc_price_create();
   if(!new_p) return NULL;
 
+  new_p->version = p->version;
+
   gnc_price_begin_edit(new_p);
   /* never ever clone guid's */
   gnc_price_set_commodity(new_p, gnc_price_get_commodity(p));
@@ -286,6 +289,13 @@
   gnc_price_commit_edit (p);
 }
 
+void
+gnc_price_set_version(GNCPrice *p, gint32 vers)
+{
+  if(!p) return;
+  p->version = vers;
+}
+
 
 /* ==================================================================== */
 /* getters */
@@ -354,8 +364,15 @@
   return p->currency;
 }
 
+gint32
+gnc_price_get_version(GNCPrice *p)
+{
+  if(!p) return 0;
+  return (p->version);
+}
+
 /* ==================================================================== */
-/* setters */
+/* price list manipulation functions */
 
 static gint
 compare_prices_by_date(gconstpointer a, gconstpointer b)
@@ -607,6 +624,7 @@
 }
 
 /* ==================================================================== */
+/* lookup/query functions */
 
 GNCPrice *
 gnc_pricedb_lookup_latest(GNCPriceDB *db,
@@ -619,12 +637,23 @@
 
   if(!db || !commodity || !currency) return NULL;
 
+  if (db->backend && db->backend->price_lookup)
+  {
+     GNCPriceLookup pl;
+     pl.type = LOOKUP_LATEST;
+     pl.commodity = commodity;
+     pl.currency = currency;
+     (db->backend->price_lookup) (db->backend, &pl);
+  }
+
   currency_hash = g_hash_table_lookup(db->commodity_hash, commodity);
   if(!currency_hash) return NULL;
 
   price_list = g_hash_table_lookup(currency_hash, currency);
   if(!price_list) return NULL;
 
+  /* This works magically because prices are inserted in date-sorted order,
+   * and the latest date always comes first. So return the first in the list.  */
   result = price_list->data;
   gnc_price_ref(result);
   return result;
@@ -642,6 +671,15 @@
 
   if(!db || !commodity || !currency) return NULL;
 
+  if (db->backend && db->backend->price_lookup)
+  {
+     GNCPriceLookup pl;
+     pl.type = LOOKUP_ALL;
+     pl.commodity = commodity;
+     pl.currency = currency;
+     (db->backend->price_lookup) (db->backend, &pl);
+  }
+
   currency_hash = g_hash_table_lookup(db->commodity_hash, commodity);
   if(!currency_hash) return NULL;
 
@@ -668,6 +706,16 @@
 
   if(!db || !c || !currency) return NULL;
 
+  if (db->backend && db->backend->price_lookup)
+  {
+     GNCPriceLookup pl;
+     pl.type = LOOKUP_AT_TIME;
+     pl.commodity = c;
+     pl.currency = currency;
+     pl.date = t;
+     (db->backend->price_lookup) (db->backend, &pl);
+  }
+
   currency_hash = g_hash_table_lookup(db->commodity_hash, c);
   if(!currency_hash) return NULL;
 
@@ -687,6 +735,79 @@
   return result;
 }
 
+
+GNCPrice *
+gnc_pricedb_lookup_nearest_in_time(GNCPriceDB *db,
+                                   gnc_commodity *c,
+                                   gnc_commodity *currency,
+                                   Timespec t)
+{
+  GList *price_list;
+  GNCPrice *current_price = NULL;
+  GNCPrice *next_price = NULL;
+  GNCPrice *result = NULL;
+  GList *item = NULL;
+  GHashTable *currency_hash;
+
+  if(!db || !c || !currency) return NULL;
+
+  if (db->backend && db->backend->price_lookup)
+  {
+     GNCPriceLookup pl;
+     pl.type = LOOKUP_NEAREST_IN_TIME;
+     pl.commodity = c;
+     pl.currency = currency;
+     pl.date = t;
+     (db->backend->price_lookup) (db->backend, &pl);
+  }
+
+  currency_hash = g_hash_table_lookup(db->commodity_hash, c);
+  if(!currency_hash) return NULL;
+
+  price_list = g_hash_table_lookup(currency_hash, currency);
+  if(!price_list) return NULL;
+
+  item = price_list;
+
+  /* default answer */
+  current_price = item->data;
+
+  /* find the first candidate past the one we want.  Remember that
+     prices are in most-recent-first order. */
+  while (!next_price && item) {
+    GNCPrice *p = item->data;
+    Timespec price_time = gnc_price_get_time(p);
+    if (timespec_cmp(&price_time, &t) <= 0) {
+      next_price = item->data;
+      break;
+    }
+    current_price = item->data;
+    item = item->next;
+  }
+
+  if (current_price) {
+    if (!next_price) {
+      result = current_price;
+    } else {
+      Timespec current_t = gnc_price_get_time(current_price);
+      Timespec next_t = gnc_price_get_time(next_price);
+      Timespec diff_current = timespec_diff(&current_t, &t);
+      Timespec diff_next = timespec_diff(&next_t, &t);
+      Timespec abs_current = timespec_abs(&diff_current);
+      Timespec abs_next = timespec_abs(&diff_next);
+      
+      if (timespec_cmp(&abs_current, &abs_next) <= 0) {
+	result = current_price;
+      } else {
+	result = next_price;
+      }
+    }
+  }
+
+  gnc_price_ref(result);
+  return result;
+}
+
 /* ==================================================================== */
 /* gnc_pricedb_foreach_price infrastructure
  */
@@ -825,72 +946,7 @@
 }
 
 /* ==================================================================== */
-
-GNCPrice *
-gnc_pricedb_lookup_nearest_in_time(GNCPriceDB *db,
-                                   gnc_commodity *c,
-                                   gnc_commodity *currency,
-                                   Timespec t)
-{
-  GList *price_list;
-  GNCPrice *current_price = NULL;
-  GNCPrice *next_price = NULL;
-  GNCPrice *result = NULL;
-  GList *item = NULL;
-  GHashTable *currency_hash;
-
-  if(!db || !c || !currency) return NULL;
-
-  currency_hash = g_hash_table_lookup(db->commodity_hash, c);
-  if(!currency_hash) return NULL;
-
-  price_list = g_hash_table_lookup(currency_hash, currency);
-  if(!price_list) return NULL;
-
-  item = price_list;
-
-  /* default answer */
-  current_price = item->data;
-
-  /* find the first candidate past the one we want.  Remember that
-     prices are in most-recent-first order. */
-  while (!next_price && item) {
-    GNCPrice *p = item->data;
-    Timespec price_time = gnc_price_get_time(p);
-    if (timespec_cmp(&price_time, &t) <= 0) {
-      next_price = item->data;
-      break;
-    }
-    current_price = item->data;
-    item = item->next;
-  }
-
-  if (current_price) {
-    if (!next_price) {
-      result = current_price;
-    } else {
-      Timespec current_t = gnc_price_get_time(current_price);
-      Timespec next_t = gnc_price_get_time(next_price);
-      Timespec diff_current = timespec_diff(&current_t, &t);
-      Timespec diff_next = timespec_diff(&next_t, &t);
-      Timespec abs_current = timespec_abs(&diff_current);
-      Timespec abs_next = timespec_abs(&diff_next);
-      
-      if (timespec_cmp(&abs_current, &abs_next) <= 0) {
-	result = current_price;
-      } else {
-	result = next_price;
-      }
-    }
-  }
-
-  gnc_price_ref(result);
-  return result;
-}
-
-/***************************************************************************/
-/* commodity substitution
- */
+/* commodity substitution */
 
 typedef struct {
   gnc_commodity *old_c;
Index: gnucash/src/engine/gnc-pricedb.h
diff -u gnucash/src/engine/gnc-pricedb.h:1.11 gnucash/src/engine/gnc-pricedb.h:1.13
--- gnucash/src/engine/gnc-pricedb.h:1.11	Sun May 27 02:35:13 2001
+++ gnucash/src/engine/gnc-pricedb.h	Sun Jun  3 02:41:01 2001
@@ -108,6 +108,7 @@
  */
 
 typedef struct _GNCPrice GNCPrice;
+typedef struct _GNCPriceLookup GNCPriceLookup;
 
 /****************/
 /* constructors */
@@ -154,6 +155,7 @@
 void gnc_price_set_source(GNCPrice *p, const char *source);
 void gnc_price_set_type(GNCPrice *p, const char* type);
 void gnc_price_set_value(GNCPrice *p, gnc_numeric value);
+void gnc_price_set_version(GNCPrice *p, gint32 versn);
 
 /***********/
 /* getters */
@@ -168,6 +170,7 @@
 const char *    gnc_price_get_source(GNCPrice *p);
 const char *    gnc_price_get_type(GNCPrice *p);
 gnc_numeric     gnc_price_get_value(GNCPrice *p);
+gint32          gnc_price_get_version(GNCPrice *p);
 
 /**********************************************************************
   GNCPrice lists:
Index: gnucash/src/engine/rpc/RpcBackend.c
diff -u gnucash/src/engine/rpc/RpcBackend.c:1.5 gnucash/src/engine/rpc/RpcBackend.c:1.6
--- gnucash/src/engine/rpc/RpcBackend.c:1.5	Sun May 27 02:35:15 2001
+++ gnucash/src/engine/rpc/RpcBackend.c	Sun Jun  3 02:41:04 2001
@@ -101,6 +101,7 @@
    be->be.price_begin_edit    = be->snr.price_begin_edit;
    be->be.price_commit_edit   = be->snr.price_commit_edit;
    be->be.run_query           = be->snr.run_query;
+   be->be.price_lookup        = be->snr.price_lookup;
    be->be.sync                = be->snr.sync;
    be->be.sync_price          = be->snr.sync_price;
 }
@@ -123,6 +124,7 @@
    be->snr.price_begin_edit    = be->be.price_begin_edit;
    be->snr.price_commit_edit   = be->be.price_commit_edit;
    be->snr.run_query           = be->be.run_query;
+   be->snr.price_lookup        = be->be.price_lookup;
    be->snr.sync                = be->be.sync;
    be->snr.sync_price          = be->be.sync_price;
 
@@ -135,6 +137,7 @@
    be->be.price_begin_edit    = NULL;
    be->be.price_commit_edit   = NULL;
    be->be.run_query           = NULL;
+   be->be.price_lookup        = NULL;
    be->be.sync                = NULL;
    be->be.sync_price          = NULL;
 }
@@ -583,6 +586,11 @@
   return 0;
 }
 
+static void rpcend_price_lookup (Backend *bend, GNCPriceLookup *q)
+{
+  PERR ("not implemented");
+}
+
 static void rpcend_run_query (Backend *bend, Query *q)
 {
   RPCBackend *be = (RPCBackend *)bend;
@@ -928,6 +936,7 @@
   be->be.price_begin_edit = rpcend_price_begin_edit;
   be->be.price_commit_edit = rpcend_price_commit_edit;
   be->be.run_query = rpcend_run_query;
+  be->be.price_lookup = rpcend_price_lookup;
   be->be.sync = rpcend_sync;
   be->be.sync_price = rpcend_sync_price;
   be->be.events_pending = rpcend_events_pending;
Index: gnucash/src/engine/sql/.cvsignore
diff -u gnucash/src/engine/sql/.cvsignore:1.5 gnucash/src/engine/sql/.cvsignore:1.6
--- gnucash/src/engine/sql/.cvsignore:1.5	Mon Feb 12 00:59:37 2001
+++ gnucash/src/engine/sql/.cvsignore	Sun Jun  3 05:14:15 2001
@@ -7,7 +7,7 @@
 a.out
 base-autogen.c
 check-autogen.c
+functions.c
 kvp-autogen.c
 table-create.c
 table-drop.c
-
Index: gnucash/src/engine/sql/Makefile.am
diff -u gnucash/src/engine/sql/Makefile.am:1.13 gnucash/src/engine/sql/Makefile.am:1.15
--- gnucash/src/engine/sql/Makefile.am:1.13	Fri Jun  1 23:21:59 2001
+++ gnucash/src/engine/sql/Makefile.am	Sun Jun  3 05:16:40 2001
@@ -22,10 +22,12 @@
   putil.h
 
 EXTRA_DIST = \
+  .cvsignore \
   README \
   base-objects.m4 \
   check-objects.m4 \
   design.txt \
+  functions.sql \
   kvp-objects.m4 \
   table.m4 \
   table-create.sql \
@@ -43,8 +45,8 @@
 # Some of the required C files are built with the m4 pre-processor
 # As a result, we need to manually specify dependencies, clean targets.
 
-PostgresBackend.o: base-autogen.c table-create.c table-drop.c
-PostgresBackend.lo: base-autogen.c table-create.c table-drop.c
+PostgresBackend.o: base-autogen.c table-create.c table-drop.c functions.c
+PostgresBackend.lo: base-autogen.c table-create.c table-drop.c functions.c
 
 checkpoint.o: check-autogen.c
 checkpoint.lo: check-autogen.c
@@ -61,18 +63,26 @@
 kvp-autogen.c:	table.m4 kvp-objects.m4
 	m4 kvp-objects.m4 > kvp-autogen.c
 
+functions.c:	functions.sql
+	echo \" > functions.c
+	echo "-- DO NOT EDIT THIS FILE. IT IS AUTOGENERATED." >> functions.c
+	cat functions.sql >> functions.c
+	echo \" >> functions.c
+
 table-drop.c:	table-drop.sql
 	echo \" > table-drop.c
+	echo "-- DO NOT EDIT THIS FILE. IT IS AUTOGENERATED." >> table-drop.c
 	cat table-drop.sql >> table-drop.c
 	echo \" >> table-drop.c
 
 table-create.c:	table-create.sql
 	echo \" > table-create.c
+	echo "-- DO NOT EDIT THIS FILE. IT IS AUTOGENERATED." >> table-create.c
 	cat table-create.sql >> table-create.c
 	echo \" >> table-create.c
 
 
 clean:
 	-rm -f base-autogen.c check-autogen.c kvp-autogen.c 
-	-rm -f table-drop.c table-create.c
+	-rm -f table-drop.c table-create.c functions.c
 
Index: gnucash/src/engine/sql/PostgresBackend.c
diff -u gnucash/src/engine/sql/PostgresBackend.c:1.53 gnucash/src/engine/sql/PostgresBackend.c:1.55
--- gnucash/src/engine/sql/PostgresBackend.c:1.53	Sat Jun  2 00:40:15 2001
+++ gnucash/src/engine/sql/PostgresBackend.c	Sun Jun  3 02:41:07 2001
@@ -211,6 +211,10 @@
 #include "table-create.c"
 ;
 
+static const char *sql_functions_str = 
+#include "functions.c"
+;
+
 static const char *table_drop_str = 
 #include "table-drop.c"
 ;
@@ -1543,6 +1547,14 @@
 }
 
 /* ============================================================= */
+
+static void
+pgendPriceLookup (Backend *be, GNCPriceLookup *look)
+{
+   PERR ("not implemented, type=%d", look->type);
+}
+
+/* ============================================================= */
 /* ============================================================= */
 /*         HIGHER LEVEL ROUTINES AND BACKEND PROPER              */
 /* ============================================================= */
@@ -2675,9 +2687,14 @@
          return;
       }
 
-      /* finally, create all the tables and indexes */
+      /* Finally, create all the tables and indexes.
+       * We do this in pieces, so as not to exceed the max length
+       * for postgres queries (which is 8192). 
+       */
       SEND_QUERY (be,table_create_str, );
       FINISH_QUERY(be->connection);
+      SEND_QUERY (be,sql_functions_str, );
+      FINISH_QUERY(be->connection);
    }
 #endif
 
@@ -2711,6 +2728,7 @@
             be->be.price_begin_edit = NULL;
             be->be.price_commit_edit = NULL;
             be->be.run_query = NULL;
+            be->be.price_lookup = NULL;
             be->be.sync = pgendSyncSingleFile;
             be->be.sync_price = pgendSyncPriceDBSingleFile;
             PWARN ("MODE_SINGLE_FILE is beta -- \n"
@@ -2730,6 +2748,7 @@
             be->be.price_begin_edit = pgend_price_begin_edit;
             be->be.price_commit_edit = pgend_price_commit_edit;
             be->be.run_query = NULL;
+            be->be.price_lookup = NULL;
             be->be.sync = pgendSync;
             be->be.sync_price = pgendSyncPriceDB;
             PWARN ("MODE_SINGLE_UPDATE is beta -- \n"
@@ -2748,6 +2767,7 @@
             be->be.price_begin_edit = pgend_price_begin_edit;
             be->be.price_commit_edit = pgend_price_commit_edit;
             be->be.run_query = pgendRunQueryToCheckpoint;
+            be->be.price_lookup = pgendPriceLookup;
             be->be.sync = pgendSync;
             be->be.sync_price = pgendSyncPriceDB;
             PWARN ("MODE_POLL is experimental -- you might corrupt your data\n");
@@ -2789,6 +2809,7 @@
    be->snr.price_begin_edit    = be->be.price_begin_edit;
    be->snr.price_commit_edit   = be->be.price_commit_edit;
    be->snr.run_query           = be->be.run_query;
+   be->snr.price_lookup        = be->be.price_lookup;
    be->snr.sync                = be->be.sync;
    be->snr.sync_price          = be->be.sync_price;
 
@@ -2800,6 +2821,7 @@
    be->be.price_begin_edit    = NULL;
    be->be.price_commit_edit   = NULL;
    be->be.run_query           = NULL;
+   be->be.price_lookup        = NULL;
    be->be.sync                = NULL;
    be->be.sync_price          = NULL;
 }
@@ -2826,6 +2848,7 @@
    be->be.price_begin_edit    = be->snr.price_begin_edit;
    be->be.price_commit_edit   = be->snr.price_commit_edit;
    be->be.run_query           = be->snr.run_query;
+   be->be.price_lookup        = be->snr.price_lookup;
    be->be.sync                = be->snr.sync;
    be->be.sync_price          = be->snr.sync_price;
 }
@@ -2861,6 +2884,7 @@
    be->be.price_begin_edit = NULL;
    be->be.price_commit_edit = NULL;
    be->be.run_query = NULL;
+   be->be.price_lookup = NULL;
    be->be.sync = NULL;
    be->be.sync_price = NULL;
    be->be.events_pending = NULL;
Index: gnucash/src/engine/sql/PostgresBackend.h
diff -u gnucash/src/engine/sql/PostgresBackend.h:1.13 gnucash/src/engine/sql/PostgresBackend.h:1.14
--- gnucash/src/engine/sql/PostgresBackend.h:1.13	Thu May 31 15:06:43 2001
+++ gnucash/src/engine/sql/PostgresBackend.h	Sun Jun  3 01:16:50 2001
@@ -1,3 +1,24 @@
+/********************************************************************\
+ * PostgresBackend.h -- implements postgres backend                 *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of the GNU General Public License as   *
+ * published by the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
+ * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
+\********************************************************************/
+
 /* 
  * FILE:
  * PostgresBackend.h
Index: gnucash/src/engine/sql/README
diff -u gnucash/src/engine/sql/README:1.33 gnucash/src/engine/sql/README:1.35
--- gnucash/src/engine/sql/README:1.33	Thu May 31 15:06:43 2001
+++ gnucash/src/engine/sql/README	Sun Jun  3 00:43:04 2001
@@ -219,14 +219,10 @@
 Most of the items on this list are 'critical' in the sense that
 multi-user mode is fundamentally broken unless they are fixed. 
 
--- checkpoint balance is broken for the type of queries used in
-   reports. 
-
 -- checkpoint balance is broken for when register asks for only a small
    number of splits.
 
--- provide support for more query types in gncquery.c
-   (reports are currently broken as a result).
+-- add support for price queries.
 
 -- if another user deletes a transaction, or an account, there is no way
    for us to know.  Thus, any sort of sync will probably (incorrectly)
@@ -243,29 +239,9 @@
    as to what this is about.  For the first pass, this is not a 
    serious issue; its a 'nice to have' thing.
 
--- add support for price queries.
-
 -- add versioning support for price db.  We should add version numbers 
    to the prices, and check version numbers when updating prices.
 
--- multi-user 'save-as' is incorrect:
-   As it currently works, save-as (sync) is a mass-copy of all data 
-   out of the engine into the named storage location.  If the indicated 
-   storage location doesn't exist, its created, and all of the engine 
-   data is copied into it.  If the storage location (i.e. database) 
-   does exist, and contains data, then the engine contents are merged 
-   into it.
-
-   From the engine point of view, the above is the easiest thing to do.
-   However, in the multi-user mode, it may not be what the user is 
-   expecting.  In the multi-user mode, the engine would not contain 
-   a full copy of the database data; instead, it contains only a subset. 
-   A 'save as', if implemented as above, would save only that subset, 
-   instead of all of the data.   If the user thought 'save as'
-   means the same thing as 'copy', they would be sorely disappointed. 
-   I don't currently have an opinion on the 'best' way of dealing with 
-   this situation.
-
 -- implement account rollback (i.e. if other user has modified the
    account, we need to do something to merge their work into ours...)
 
@@ -328,4 +304,36 @@
    updates of commodities are not detected (this seem OK for
    now, since this is a rare occurrence, right ???)
 
+-- multi-user 'save-as' has unexpected results:
+   As it currently works, save-as (sync) is a mass-copy of all data 
+   out of the engine into the named storage location.  If the indicated 
+   storage location doesn't exist, its created, and all of the engine 
+   data is copied into it.  If the storage location (i.e. database) 
+   does exist, and contains data, then the engine contents are merged 
+   into it.
+
+   From the engine point of view, the above is the easiest thing to do.
+   However, in the multi-user mode, it may not be what the user is 
+   expecting.  In the multi-user mode, the engine would not contain 
+   a full copy of the database data; instead, it contains only a subset. 
+   A 'save as', if implemented as above, would save only that subset, 
+   instead of all of the data.   If the user thought 'save as'
+   means the same thing as 'copy', and hoped to copy all of the sql 
+   data to a file, they would be sorely disappointed.  I don't 
+   currently have an opinion on the 'best' way of dealing with this 
+   situation.  A reasonable solution may well be 'don't do that'.
+
+-- Implement PR_BALANCE query type in gncquery.c.  This query is 
+   supposed to return unbalanced transactions from the database.
+   I think it might be better to leave this unbalanced, and just
+   plain force everything in the database to be balanced.  In this
+   case, we should then modify the code to check for unbalanced 
+   transactions before commiting them, or otherwise force the backend
+   to run in balanced mode.  We could set 'force_double_entry=2'
+   but this is currently unimplmented in the engine.  Alternately, 
+   we could call 'Scrub' at appropriate times.
+    
+   
+   
+============================= END OF FILE ========================
 
Index: gnucash/src/engine/sql/functions.sql
diff -u /dev/null gnucash/src/engine/sql/functions.sql:1.1
--- /dev/null	Sun Jun  3 08:02:54 2001
+++ gnucash/src/engine/sql/functions.sql	Sun Jun  3 01:13:18 2001
@@ -0,0 +1,68 @@
+--
+-- FILE:
+-- functions.sql
+--
+-- FUNCTION:
+-- Define assorted utility functions.
+--
+-- HISTORY:
+-- Copyright (C) 2001 Linas Vepstas
+--
+
+
+-- utility functions to compute checkpoint balance subtotals
+
+CREATE FUNCTION gncSubtotalBalance (CHAR(32), DATETIME, DATETIME)
+    RETURNS NUMERIC
+    AS 'SELECT sum(gncEntry.value)
+        FROM gncEntry, gncTransaction
+        WHERE
+        gncEntry.accountGuid = $1 AND
+        gncEntry.transGuid = gncTransaction.transGuid AND
+        gncTransaction.date_posted BETWEEN $2 AND $3'
+    LANGUAGE 'sql';
+
+CREATE FUNCTION gncSubtotalClearedBalance (char(32), DATETIME, DATETIME)
+    RETURNS NUMERIC
+    AS 'SELECT sum(gncEntry.value)
+        FROM gncEntry, gncTransaction
+        WHERE
+        gncEntry.accountGuid = $1 AND
+        gncEntry.transGuid = gncTransaction.transGuid AND
+        gncTransaction.date_posted BETWEEN $2 AND $3 AND
+        gncEntry.reconciled <> \\'n\\''
+    LANGUAGE 'sql';
+
+CREATE FUNCTION gncSubtotalReconedBalance (CHAR(32), DATETIME, DATETIME)
+    RETURNS NUMERIC
+    AS 'SELECT sum(gncEntry.value)
+        FROM gncEntry, gncTransaction
+        WHERE
+        gncEntry.accountGuid = $1 AND
+        gncEntry.transGuid = gncTransaction.transGuid AND
+        gncTransaction.date_posted BETWEEN $2 AND $3 AND
+        gncEntry.reconciled = \\'y\\''
+    LANGUAGE 'sql';
+
+-- helper functions.  These intentionally use the 'wrong' fraction. 
+-- This is because value_frac * amount * price = value * amount_frac
+
+CREATE FUNCTION gncHelperPrVal (gncEntry)
+   RETURNS INT8
+   AS 'SELECT abs($1 . value * gncCommodity.fraction)
+       FROM gncEntry, gncAccount, gncCommodity
+       WHERE
+       $1 . accountGuid = gncAccount.accountGuid AND
+       gncAccount.commodity = gncCommodity.commodity'
+    LANGUAGE 'sql';
+       
+CREATE FUNCTION gncHelperPrAmt (gncEntry)
+   RETURNS INT8
+   AS 'SELECT abs($1 . amount * gncCommodity.fraction)
+       FROM gncEntry, gncTransaction, gncCommodity
+       WHERE
+       $1 . transGuid = gncTransaction.transGuid AND
+       gncTransaction.currency = gncCommodity.commodity'
+    LANGUAGE 'sql';
+       
+-- end of file
Index: gnucash/src/engine/sql/gncquery.c
diff -u gnucash/src/engine/sql/gncquery.c:1.5 gnucash/src/engine/sql/gncquery.c:1.7
--- gnucash/src/engine/sql/gncquery.c:1.5	Sat Jun  2 00:39:39 2001
+++ gnucash/src/engine/sql/gncquery.c	Sun Jun  3 00:43:04 2001
@@ -81,7 +81,8 @@
 }
 
 /* =========================================================== */
-/* Note that postgres supports both case-sensitive and 
+/* Macro for PD_STRING query types
+ * Note that postgres supports both case-sensitive and 
  * case-insensitve string searches, and it also supports 
  * regex!  yahooo! 
  */
@@ -109,7 +110,74 @@
 }
 
 /* =========================================================== */
+/* Macro for PD_AMOUNT type terms.  The logic used here in the
+ * SQL exactly matches that used in the Query.c code.  If
+ * that code is incorrect or has changed, then the code below is 
+ * broken as well. 
+ */
+
+#define AMOUNT_TERM(fieldname)					\
+{								\
+   if (0 == pd->amount.sense)					\
+   {								\
+      sq->pq = stpcpy (sq->pq, "NOT (");			\
+   }								\
+   switch(pd->amount.amt_sgn) 					\
+   {								\
+      case AMT_SGN_MATCH_CREDIT:				\
+         sq->pq = stpcpy(sq->pq, fieldname " <= 0 AND "); 	\
+         break;							\
+      case AMT_SGN_MATCH_DEBIT:					\
+         sq->pq = stpcpy(sq->pq, fieldname " >= 0 AND "); 	\
+         break;							\
+      default:							\
+         break;							\
+   }								\
+   switch(pd->amount.how) 					\
+   {								\
+      case AMT_MATCH_ATLEAST:					\
+         sq->pq = stpcpy(sq->pq, 				\
+            "abs(" fieldname ") >= gncCommodity.fraction * float8"); \
+         sq->pq += sprintf (sq->pq, "(%22.18g)", pd->amount.amount); \
+         break;							\
+      case AMT_MATCH_ATMOST:					\
+         sq->pq = stpcpy(sq->pq, 				\
+            "abs(" fieldname ") <= gncCommodity.fraction * float8"); \
+         sq->pq += sprintf (sq->pq, "(%22.18g)", pd->amount.amount); \
+         break;							\
+      case AMT_MATCH_EXACTLY:					\
+         sq->pq = stpcpy(sq->pq, 				\
+            "abs(abs(" fieldname ") - gncCommodity.fraction * float8"); \
+         sq->pq += sprintf (sq->pq, "(%22.18g)", pd->amount.amount); \
+         sq->pq = stpcpy(sq->pq, ") < 1");			\
+         break;							\
+   }								\
+   if (0 == pd->amount.sense)					\
+   {								\
+      sq->pq = stpcpy (sq->pq, ") ");				\
+   }								\
+}
+
+/* =========================================================== */
+/* Macro for PR_CLEARED term */
+
+#define CLR_TERM(howie,flagchar)				\
+{								\
+   if (pd->cleared.how & howie)					\
+   {								\
+      if (got_one)						\
+      {								\
+         sq->pq = stpcpy(sq->pq, "OR ");			\
+      }								\
+      sq->pq = stpcpy(sq->pq, "gncEntry.reconciled = '");	\
+      *(sq->pq) = flagchar;  (sq->pq) ++;			\
+      sq->pq = stpcpy(sq->pq, "' ");				\
+      got_one = 1;						\
+   }								\
+}
 
+/* =========================================================== */
+
 const char *
 sqlQuery_build (sqlQuery*sq, Query *q)
 {
@@ -125,7 +193,8 @@
    /* reset the buffer pointers */
    sq->pq = sq->q_base;
    sq->pq = stpcpy(sq->pq, 
-               "SELECT gncEntry.transGuid FROM gncEntry, gncTransaction "
+               "SELECT DISTINCT gncEntry.transGuid "
+               "  FROM gncEntry, gncTransaction, gncAccount, gncCommodity "
                "  WHERE gncEntry.transGuid = gncTransaction.transGuid AND ( ");
 
    qterms = xaccQueryGetTerms (q);
@@ -192,23 +261,58 @@
             case PR_AMOUNT:
             {
                PINFO("term is PR_AMOUNT");
-               PERR ("not implemented");
+               sq->pq = stpcpy(sq->pq, 
+                     "gncTransaction.currency = gncCommodity.commodity AND ");
+               AMOUNT_TERM ("gncEntry.value");
                break;
             }
 
             case PR_BALANCE:
+            {
                PINFO("term is PR_BALANCE");
-               PERR ("not implemented");
+               PWARN("PR_BALANCE query term not properly implemented");
+               if (0 == pd->balance.sense)
+               {
+                  sq->pq = stpcpy (sq->pq, "NOT (");
+               }
+               if (pd->balance.how & BALANCE_BALANCED) 
+               {
+                  sq->pq = stpcpy(sq->pq, "TRUE ");
+               }
+               else 
+               {
+                  sq->pq = stpcpy(sq->pq, "FALSE ");
+               }
+               if (0 == pd->balance.sense)
+               {
+                  sq->pq = stpcpy (sq->pq, ") ");
+               }
                break;
+            }
+
             case PR_CLEARED:
+            {
+               int got_one = 0;
                PINFO("term is PR_CLEARED");
-               PERR ("not implemented");
+               if (0 == pd->cleared.sense)
+               {
+                  sq->pq = stpcpy (sq->pq, "NOT ");
+               }
+               sq->pq = stpcpy (sq->pq, "(");
+
+               CLR_TERM (CLEARED_NO, NREC);
+               CLR_TERM (CLEARED_CLEARED, CREC);
+               CLR_TERM (CLEARED_RECONCILED, YREC);
+               CLR_TERM (CLEARED_FROZEN, FREC);
+
+               sq->pq = stpcpy (sq->pq, ") ");
                break;
+            }
 
             case PR_DATE:
             {
                PINFO("term is PR_DATE");
-               if (0 == pd->acct.sense)
+               if (0 == pd->date.sense)
                {
                   sq->pq = stpcpy (sq->pq, "NOT (");
                }
@@ -232,7 +336,7 @@
                {
                   sq->pq = stpcpy(sq->pq, "TRUE ");
                }
-               if (0 == pd->acct.sense)
+               if (0 == pd->date.sense)
                {
                   sq->pq = stpcpy (sq->pq, ") ");
                }
@@ -244,6 +348,47 @@
                STRING_TERM ("gncTransaction.description");
                break;
 
+            case PR_GUID:
+            {
+               PINFO("term is PR_GUID");
+               if (0 == pd->guid.sense)
+               {
+                  sq->pq = stpcpy (sq->pq, "NOT (");
+               }
+               switch (xaccGUIDType (&pd->guid.guid))
+               {
+                  case GNC_ID_NONE:
+                  case GNC_ID_NULL:
+                  default:
+                     sq->pq = stpcpy(sq->pq, "FALSE ");
+                     break;
+              
+                  case GNC_ID_ACCOUNT:
+                     sq->pq = stpcpy(sq->pq, "gncAccount.accountGuid = '");
+                     sq->pq = guid_to_string_buff (&pd->guid.guid, sq->pq);
+                     sq->pq = stpcpy(sq->pq, "' ");
+                     break;
+              
+                  case GNC_ID_TRANS:
+                     sq->pq = stpcpy(sq->pq, "gncTransaction.transGuid = '");
+                     sq->pq = guid_to_string_buff (&pd->guid.guid, sq->pq);
+                     sq->pq = stpcpy(sq->pq, "' ");
+                     break;
+              
+                  case GNC_ID_SPLIT:
+                     sq->pq = stpcpy(sq->pq, "gncEntry.entryGuid = '");
+                     sq->pq = guid_to_string_buff (&pd->guid.guid, sq->pq);
+                     sq->pq = stpcpy(sq->pq, "' ");
+                     break;
+               }
+
+               if (0 == pd->guid.sense)
+               {
+                  sq->pq = stpcpy (sq->pq, ") ");
+               }
+               break;
+            }
+
             case PR_MEMO:
                PINFO("term is PR_MEMO");
                STRING_TERM ("gncEntry.memo");
@@ -251,7 +396,7 @@
 
             case PR_MISC:
                PINFO("term is PR_MISC");
-               PERR ("not implemented");
+               sq->pq = stpcpy(sq->pq, "TRUE ");
                break;
 
             case PR_NUM:
@@ -259,18 +404,61 @@
                STRING_TERM ("gncTransaction.num");
                break;
 
-            case PR_PRICE:
+            case PR_PRICE: {
                PINFO("term is PR_PRICE");
-               PERR ("not implemented");
+
+               if (0 == pd->amount.sense)
+               {
+                  sq->pq = stpcpy (sq->pq, "NOT (");
+               }
+               switch(pd->amount.amt_sgn) 
+               {
+                  case AMT_SGN_MATCH_CREDIT:
+                     sq->pq = stpcpy(sq->pq, "gncEntry.value / gncEntry.amount <= 0 AND "); 
+                     break;
+                  case AMT_SGN_MATCH_DEBIT:
+                     sq->pq = stpcpy(sq->pq, "gncEntry.value / gncEntry.amount >= 0 AND "); 
+                     break;
+                  default:
+                     break;
+               }
+               switch(pd->amount.how) 
+               {
+                  case AMT_MATCH_ATLEAST:
+                     sq->pq = stpcpy(sq->pq, 
+                        "gncHelperPrVal(gncEntry) >= gncHelperPrAmt(gncEntry) * float8"); 
+                     sq->pq += sprintf (sq->pq, "(%22.18g)", pd->amount.amount); 
+                     break;
+                  case AMT_MATCH_ATMOST:
+                     sq->pq = stpcpy(sq->pq, 
+                        "gncHelperPrVal(gncEntry) <= gncHelperPrAmt(gncEntry) * float8"); 
+                     sq->pq += sprintf (sq->pq, "(%22.18g)", pd->amount.amount); 
+                     break;
+                  case AMT_MATCH_EXACTLY:
+                     sq->pq = stpcpy(sq->pq, 
+                        "abs(gncHelperPrVal(gncEntry) -  gncHelperPrAmt(gncEntry) * float8"); 
+                     sq->pq += sprintf (sq->pq, "(%22.18g)", pd->amount.amount); 
+                     sq->pq = stpcpy(sq->pq, ") < 1");
+                     break;
+               }
+               if (0 == pd->amount.sense)
+               {
+                  sq->pq = stpcpy (sq->pq, ") ");
+               }
                break;
+            }
 
-            case PR_SHRS:
+            case PR_SHRS: {
                PINFO("term is PR_SHRS");
-               PERR ("not implemented");
+               sq->pq = stpcpy(sq->pq, 
+                     "gncEntry.accountGuid = gncAccount.accountGuid AND "
+                     "gncAccount.commodity = gncCommodity.commodity AND ");
+               AMOUNT_TERM ("gncEntry.amount");
                break;
+            }
 
             default:
-               PERR ("unkown query term type");
+               PERR ("unkown query term type %d", pd->base.term_type);
          }
       }
 
Index: gnucash/src/engine/sql/putil.h
diff -u gnucash/src/engine/sql/putil.h:1.6 gnucash/src/engine/sql/putil.h:1.7
--- gnucash/src/engine/sql/putil.h:1.6	Thu May 31 13:24:12 2001
+++ gnucash/src/engine/sql/putil.h	Sun Jun  3 01:16:50 2001
@@ -1,3 +1,24 @@
+/********************************************************************\
+ * putil.h -- utility macros for the postgres backend               *
+ *                                                                  *
+ * This program is free software; you can redistribute it and/or    *
+ * modify it under the terms of the GNU General Public License as   *
+ * published by the Free Software Foundation; either version 2 of   *
+ * the License, or (at your option) any later version.              *
+ *                                                                  *
+ * This program is distributed in the hope that it will be useful,  *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of   *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the    *
+ * GNU General Public License for more details.                     *
+ *                                                                  *
+ * You should have received a copy of the GNU General Public License*
+ * along with this program; if not, contact:                        *
+ *                                                                  *
+ * Free Software Foundation           Voice:  +1-617-542-5942       *
+ * 59 Temple Place - Suite 330        Fax:    +1-617-542-2652       *
+ * Boston, MA  02111-1307,  USA       gnu@gnu.org                   *
+\********************************************************************/
+
 /* 
  * FILE:
  * putil.h
Index: gnucash/src/engine/sql/table-create.sql
diff -u gnucash/src/engine/sql/table-create.sql:1.8 gnucash/src/engine/sql/table-create.sql:1.10
--- gnucash/src/engine/sql/table-create.sql:1.8	Tue May 29 00:22:59 2001
+++ gnucash/src/engine/sql/table-create.sql	Sun Jun  3 01:13:18 2001
@@ -115,7 +115,8 @@
 	source		TEXT,
 	type		TEXT,
 	valueNum	INT8 DEFAULT '0',
-	valueDenom	INT4 DEFAULT '100'
+	valueDenom	INT4 DEFAULT '100',
+	version		INT4 NOT NULL
 );
 
 
@@ -187,37 +188,4 @@
 	data		TEXT[]
 ) INHERITS (gncKVPvalue);
 
--- utility functions to compute chackpoint balance subtotals
-
-CREATE FUNCTION gncSubtotalBalance (CHAR(32), DATETIME, DATETIME)
-    RETURNS NUMERIC
-    AS 'SELECT sum(gncentry.value)
-        FROM gncentry, gnctransaction
-        WHERE
-        gncentry.accountguid = $1 AND
-        gncentry.transguid = gnctransaction.transguid AND
-        gnctransaction.date_posted BETWEEN $2 AND $3'
-    LANGUAGE 'sql';
-
-CREATE FUNCTION gncSubtotalClearedBalance (char(32), DATETIME, DATETIME)
-    RETURNS NUMERIC
-    AS 'SELECT sum(gncentry.value)
-        FROM gncentry, gnctransaction
-        WHERE
-        gncentry.accountguid = $1 AND
-        gncentry.transguid = gnctransaction.transguid AND
-        gnctransaction.date_posted BETWEEN $2 AND $3 AND
-        gncentry.reconciled <> \\'n\\''
-    LANGUAGE 'sql';
-
-CREATE FUNCTION gncSubtotalReconedBalance (CHAR(32), DATETIME, DATETIME)
-    RETURNS NUMERIC
-    AS 'SELECT sum(gncentry.value)
-        FROM gncentry, gnctransaction
-        WHERE
-        gncentry.accountguid = $1 AND
-        gncentry.transguid = gnctransaction.transguid AND
-        gnctransaction.date_posted BETWEEN $2 AND $3 AND
-        gncentry.reconciled = \\'y\\''
-    LANGUAGE 'sql';
-
+-- end of file
Index: gnucash/src/engine/sql/table.m4
diff -u gnucash/src/engine/sql/table.m4:1.14 gnucash/src/engine/sql/table.m4:1.16
--- gnucash/src/engine/sql/table.m4:1.14	Tue May 29 00:22:59 2001
+++ gnucash/src/engine/sql/table.m4	Sun Jun  3 01:59:31 2001
@@ -78,6 +78,7 @@
        type,         , char *,   gnc_price_get_type(ptr),
        valueNum,     , int64,    gnc_numeric_num(gnc_price_get_value(ptr)),
        valueDenom,   , int64,    gnc_numeric_denom(gnc_price_get_value(ptr)),
+       version,      , int32,    gnc_price_get_version(ptr),
        priceGUID, KEY, GUID *,   gnc_price_get_guid(ptr),
        ')
        
Index: gnucash/src/gnome/dialog-account.c
diff -u gnucash/src/gnome/dialog-account.c:1.36 gnucash/src/gnome/dialog-account.c:1.37
--- gnucash/src/gnome/dialog-account.c:1.36	Sat May 12 06:50:31 2001
+++ gnucash/src/gnome/dialog-account.c	Sat Jun  2 16:15:28 2001
@@ -1849,9 +1849,7 @@
 
   gnc_resume_gui_refresh ();
 
-  commodity = gnc_lookup_currency_option ("International",
-                                          "Default Currency",
-                                          gnc_locale_default_currency ());
+  commodity = gnc_default_currency ();
 
   gnc_commodity_edit_set_commodity (GNC_COMMODITY_EDIT (aw->currency_edit),
                                     commodity);
Index: gnucash/src/gnome/dialog-fincalc.c
diff -u gnucash/src/gnome/dialog-fincalc.c:1.16 gnucash/src/gnome/dialog-fincalc.c:1.17
--- gnucash/src/gnome/dialog-fincalc.c:1.16	Sat May 26 23:55:38 2001
+++ gnucash/src/gnome/dialog-fincalc.c	Sat Jun  2 16:15:29 2001
@@ -32,6 +32,7 @@
 #include "finvar.h"
 #include "glade-gnc-dialogs.h"
 #include "glade-support.h"
+#include "global-options.h"
 #include "gnc-amount-edit.h"
 #include "gnc-commodity.h"
 #include "gnc-component-manager.h"
@@ -148,7 +149,7 @@
 
   pmt = double_to_gnc_numeric (fcd->financial_info.pmt, 100000, GNC_RND_ROUND);
 
-  commodity = gnc_locale_default_currency ();
+  commodity = gnc_default_currency ();
 
   total = gnc_numeric_mul (npp, pmt, gnc_commodity_get_fraction (commodity),
                            GNC_RND_ROUND);
@@ -501,7 +502,7 @@
   GtkWidget *hbox;
   GtkWidget *edit;
 
-  commodity = gnc_locale_default_currency ();
+  commodity = gnc_default_currency ();
 
   fcd = g_new0(FinCalcDialog, 1);
 
Index: gnucash/src/gnome/dialog-price-editor.c
diff -u gnucash/src/gnome/dialog-price-editor.c:1.10 gnucash/src/gnome/dialog-price-editor.c:1.11
--- gnucash/src/gnome/dialog-price-editor.c:1.10	Sun May 27 02:35:23 2001
+++ gnucash/src/gnome/dialog-price-editor.c	Sat Jun  2 16:15:29 2001
@@ -31,6 +31,7 @@
 #include "dialog-utils.h"
 #include "glade-gnc-dialogs.h"
 #include "glade-support.h"
+#include "global-options.h"
 #include "gnc-amount-edit.h"
 #include "gnc-commodity-edit.h"
 #include "gnc-component-manager.h"
@@ -301,7 +302,7 @@
   else
   {
     commodity = NULL;
-    currency = gnc_locale_default_currency ();
+    currency = gnc_default_currency ();
     date.tv_sec = time (NULL);
     date.tv_nsec = 0;
     source = "";
Index: gnucash/src/gnome/druid-qif-import.c
diff -u gnucash/src/gnome/druid-qif-import.c:1.35 gnucash/src/gnome/druid-qif-import.c:1.36
--- gnucash/src/gnome/druid-qif-import.c:1.35	Tue May 22 02:48:24 2001
+++ gnucash/src/gnome/druid-qif-import.c	Sat Jun  2 16:15:30 2001
@@ -256,7 +256,7 @@
   gnc_ui_update_commodity_picker(retval->currency_picker,
                                  GNC_COMMODITY_NS_ISO, 
                                  gnc_commodity_get_printname
-                                 (gnc_locale_default_currency()));
+                                 (gnc_default_currency()));
   
   if(!retval->show_doc_pages) {
     gnome_druid_set_page(GNOME_DRUID(retval->druid),
Index: gnucash/src/gnome/reconcile-list.c
diff -u gnucash/src/gnome/reconcile-list.c:1.39 gnucash/src/gnome/reconcile-list.c:1.40
--- gnucash/src/gnome/reconcile-list.c:1.39	Wed Feb 28 00:49:16 2001
+++ gnucash/src/gnome/reconcile-list.c	Sat Jun  2 12:36:42 2001
@@ -536,6 +536,7 @@
 void
 gnc_reconcile_list_postpone (GNCReconcileList *list)
 {
+  Transaction *trans;
   GtkCList *clist = GTK_CLIST(list);
   Split *split;
   int i;
@@ -554,7 +555,10 @@
 
     recn = g_hash_table_lookup (list->reconciled, split) ? CREC : NREC;
 
+    trans = xaccSplitGetParent(split);
+    xaccTransBeginEdit(trans);
     xaccSplitSetReconcile (split, recn);
+    xaccTransCommitEdit(trans);
   }
 }
 
Index: gnucash/src/gnome/top-level.c
diff -u gnucash/src/gnome/top-level.c:1.85 gnucash/src/gnome/top-level.c:1.86
--- gnucash/src/gnome/top-level.c:1.85	Sat Jun  2 04:56:54 2001
+++ gnucash/src/gnome/top-level.c	Sat Jun  2 20:43:22 2001
@@ -466,7 +466,7 @@
 
   gnome_is_running = TRUE;
 
-  id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 1, // 0000, /* 10 secs */
+  id = g_timeout_add_full (G_PRIORITY_DEFAULT_IDLE, 10000, /* 10 secs */
                            gnc_ui_check_events, NULL, NULL);
 
   XSetErrorHandler (gnc_x_error);
Index: gnucash/src/gnome/window-main-summarybar.c
diff -u gnucash/src/gnome/window-main-summarybar.c:1.3 gnucash/src/gnome/window-main-summarybar.c:1.4
--- gnucash/src/gnome/window-main-summarybar.c:1.3	Tue Apr 17 04:32:11 2001
+++ gnucash/src/gnome/window-main-summarybar.c	Sat Jun  2 16:15:31 2001
@@ -260,10 +260,7 @@
   GList *list;
   GList *node;
 
-  default_currency =
-    gnc_lookup_currency_option("International",
-                               "Default Currency",
-                               gnc_locale_default_currency ());
+  default_currency = gnc_default_currency ();
 
   if (euro)
   {
@@ -366,10 +363,7 @@
   GList *current;
   gboolean euro;
 
-  default_currency =
-    gnc_lookup_currency_option("International",
-                               "Default Currency",
-                               gnc_locale_default_currency ());
+  default_currency = gnc_default_currency ();
 
   euro = gnc_lookup_boolean_option("International",
                                    "Enable EURO support",
@@ -460,10 +454,7 @@
   GNCMainSummary  * retval = g_new0(GNCMainSummary, 1);
   GtkWidget       * summarybar;
   GNCCurrencyItem * def_item;
-  gnc_commodity   * default_currency =
-    gnc_lookup_currency_option ("International",
-                                "Default Currency",
-                                gnc_locale_default_currency ());
+  gnc_commodity   * default_currency = gnc_default_currency ();
   
   retval->hbox         = gtk_hbox_new (FALSE, 5);  
   retval->totals_combo = gtk_select_new ();
Index: gnucash/src/gnome/window-register.c
diff -u gnucash/src/gnome/window-register.c:1.127 gnucash/src/gnome/window-register.c:1.128
--- gnucash/src/gnome/window-register.c:1.127	Mon May 14 01:12:36 2001
+++ gnucash/src/gnome/window-register.c	Sat Jun  2 19:24:33 2001
@@ -232,6 +232,8 @@
   VirtualCellLocation vcell_loc;
   SplitRegister *reg;
 
+  if (!regData) return;
+
   trans = xaccSplitGetParent(split);
   if (trans != NULL)
     if (gnc_register_include_date(regData, xaccTransGetDate(trans)))
@@ -260,6 +262,8 @@
   Transaction *trans;
   VirtualLocation virt_loc;
   SplitRegister *reg;
+
+  if (!regData) return;
 
   trans = xaccSplitGetParent(split);
   if (trans != NULL)
Index: gnucash/src/guile/global-options.c
diff -u gnucash/src/guile/global-options.c:1.10 gnucash/src/guile/global-options.c:1.11
--- gnucash/src/guile/global-options.c:1.10	Sun Apr 22 06:43:00 2001
+++ gnucash/src/guile/global-options.c	Sat Jun  2 16:15:33 2001
@@ -26,7 +26,9 @@
 #include "option-util.h"
 #include "guile-util.h"
 #include "gnc-engine-util.h"
+#include "gnc-ui-util.h"
 
+
 /* This static indicates the debugging module that this .o belongs to.  */
 static short module = MOD_GUI;
 
@@ -336,6 +338,30 @@
   return gnc_option_db_lookup_currency_option(global_options, section, name,
                                               default_value);
 }
+
+
+/********************************************************************\
+ * gnc_default_currency                                             *
+ *   Return the default currency set by the user.                   *
+ *                                                                  *
+ * Args: section   - section name of option                         *
+ *       name      - name of option                                 *
+ *       default_value - default value to return if problem         *
+ * Return: currency object or NULL                                  *
+\********************************************************************/
+gnc_commodity *
+gnc_default_currency (void)
+{
+  gnc_commodity *currency;
+
+  currency = gnc_lookup_currency_option ("International",
+                                         "Default Currency", NULL);
+  if (currency)
+    return currency;
+
+  return gnc_locale_default_currency ();
+}
+
 
 /********************************************************************\
  * gnc_set_option_default                                           *
Index: gnucash/src/guile/global-options.h
diff -u gnucash/src/guile/global-options.h:1.9 gnucash/src/guile/global-options.h:1.10
--- gnucash/src/guile/global-options.h:1.9	Sun Apr 22 06:43:00 2001
+++ gnucash/src/guile/global-options.h	Sat Jun  2 16:15:33 2001
@@ -77,6 +77,8 @@
                            const char *name,
                            gnc_commodity *default_value);
 
+gnc_commodity * gnc_default_currency (void);
+
 void gnc_set_option_default(const char *section, const char *name);
 
 gboolean gnc_set_option(const char *section, const char *name, SCM value);
Index: gnucash/src/guile/gnc.gwp
diff -u gnucash/src/guile/gnc.gwp:1.96 gnucash/src/guile/gnc.gwp:1.97
--- gnucash/src/guile/gnc.gwp:1.96	Mon May 21 16:27:36 2001
+++ gnucash/src/guile/gnc.gwp	Sat Jun  2 16:15:34 2001
@@ -1947,6 +1947,14 @@
 
   (gw:wrap-function
    mod
+   'gnc:default-currency
+   '(<gnc:commodity*> gw:const)
+   "gnc_default_currency"
+   '()
+   "Return the default currency set by the user.")
+
+  (gw:wrap-function
+   mod
    'gnc:locale-decimal-places
    '<gw:int>
    "gnc_locale_decimal_places"
Index: gnucash/src/scm/html-utilities.scm
diff -u gnucash/src/scm/html-utilities.scm:1.40 gnucash/src/scm/html-utilities.scm:1.41
--- gnucash/src/scm/html-utilities.scm:1.40	Fri May 25 01:33:06 2001
+++ gnucash/src/scm/html-utilities.scm	Sat Jun  2 19:24:36 2001
@@ -79,14 +79,18 @@
 
 ;; returns the account name as html-text and anchor to the register.
 (define (gnc:html-account-anchor acct)
-  (gnc:make-html-text (gnc:html-markup-anchor
-                       (gnc:account-anchor-text acct)
-		       (gnc:account-get-name acct))))
+  (gnc:make-html-text (if acct
+                          (gnc:html-markup-anchor
+                           (gnc:account-anchor-text acct)
+                           (gnc:account-get-name acct))
+                          "")))
 
 (define (gnc:html-split-anchor split text)
-  (gnc:make-html-text (gnc:html-markup-anchor
-                       (gnc:split-anchor-text split)
-                       text)))
+  (gnc:make-html-text (if (gnc:split-get-account split)
+                          (gnc:html-markup-anchor
+                           (gnc:split-anchor-text split)
+                           text)
+                          text)))
 
 (define (gnc:html-transaction-anchor trans text)
   (gnc:make-html-text (gnc:html-markup-anchor
Index: gnucash/src/scm/options-utilities.scm
diff -u gnucash/src/scm/options-utilities.scm:1.14 gnucash/src/scm/options-utilities.scm:1.15
--- gnucash/src/scm/options-utilities.scm:1.14	Thu May 24 15:35:02 2001
+++ gnucash/src/scm/options-utilities.scm	Sat Jun  2 16:15:37 2001
@@ -199,9 +199,7 @@
     pagename name-report-currency
     sort-tag 
     (N_ "Select the currency to display the values of this report in.")
-    (gnc:option-value
-     (gnc:lookup-global-option "International"
-                               "Default Currency")))))
+    (gnc:default-currency))))
 
 ;; These are common options for the selection of the report's
 ;; currency/commodity.
Index: gnucash/src/scm/prefs.scm
diff -u gnucash/src/scm/prefs.scm:1.76 gnucash/src/scm/prefs.scm:1.77
--- gnucash/src/scm/prefs.scm:1.76	Wed May 23 19:43:55 2001
+++ gnucash/src/scm/prefs.scm	Sat Jun  2 16:15:37 2001
@@ -168,8 +168,7 @@
  (gnc:make-simple-boolean-option
   (N_ "International") (N_ "Enable EURO support")
   "d" (N_ "Enables support for the European Union EURO currency") 
-  (gnc:is-euro-currency
-   (gnc:locale-default-currency))))
+  (gnc:is-euro-currency (gnc:default-currency))))
 
 
 ;;; Register options
Index: gnucash/src/scm/report/price-scatter.scm
diff -u gnucash/src/scm/report/price-scatter.scm:1.12 gnucash/src/scm/report/price-scatter.scm:1.13
--- gnucash/src/scm/report/price-scatter.scm:1.12	Sun May 27 23:41:55 2001
+++ gnucash/src/scm/report/price-scatter.scm	Sat Jun  2 16:15:40 2001
@@ -63,14 +63,14 @@
 
       (gnc:options-add-currency! 
        options pagename-price optname-report-currency "d")
-      
+
       (add-option
        (gnc:make-commodity-option 
 	pagename-price optname-price-commodity
 	"e"
 	(N_ "Calculate the price of this commodity.")
-	(gnc:locale-default-currency)))
-      
+	(gnc:default-currency)))
+
       (add-option
        (gnc:make-multichoice-option
 	pagename-price optname-price-source
Index: gnucash/src/scm/report/register.scm
diff -u gnucash/src/scm/report/register.scm:1.20 gnucash/src/scm/report/register.scm:1.21
--- gnucash/src/scm/report/register.scm:1.20	Tue May 15 11:36:29 2001
+++ gnucash/src/scm/report/register.scm	Sat Jun  2 19:24:38 2001
@@ -122,7 +122,9 @@
     (let* ((row-contents '())
 	   (parent (gnc:split-get-parent split))
 	   (account (gnc:split-get-account split))
-	   (currency (gnc:account-get-commodity account))
+	   (currency (if account
+                         (gnc:account-get-commodity account)
+                         (gnc:default-currency)))
 	   (damount (gnc:split-get-share-amount split))
 	   (split-value (gnc:make-gnc-monetary currency damount)))
 
Index: gnucash/src/scm/report/transaction-report.scm
diff -u gnucash/src/scm/report/transaction-report.scm:1.69 gnucash/src/scm/report/transaction-report.scm:1.70
--- gnucash/src/scm/report/transaction-report.scm:1.69	Sat May 26 01:23:34 2001
+++ gnucash/src/scm/report/transaction-report.scm	Sat Jun  2 16:15:40 2001
@@ -36,7 +36,8 @@
 
 (let-syntax ((addto!
               (syntax-rules ()
-                ((_ alist element) (set! alist (cons element alist))))))
+                            ((_ alist element)
+                             (set! alist (cons element alist))))))
 
   (let ((pagename-sorting (N_ "Sorting"))
         (optname-prime-sortkey (N_ "Primary Key"))
@@ -105,10 +106,10 @@
     (define (render-account-full-name-subheading 
              split table width subheading-style)
       (let ((account (gnc:split-get-account split)))
-        (add-subheading-row (gnc:make-html-text (gnc:html-markup-anchor
-                                                 (gnc:account-anchor-text account)
-                                                 (gnc:account-get-full-name 
-                                                  account)))
+        (add-subheading-row (gnc:make-html-text
+                             (gnc:html-markup-anchor
+                              (gnc:account-anchor-text account)
+                              (gnc:account-get-full-name account)))
                             table width subheading-style)))
 
     (define (render-account-code-subheading split table 
@@ -149,11 +150,11 @@
 	(gnc:html-table-append-row/markup!
 	 table
 	 subtotal-style 
-	  (list (gnc:make-html-table-cell/size 1 (- width 1) 
-					       subtotal-string)
-		 (gnc:make-html-table-cell/markup 
-			"total-number-cell"
-			(car currency-totals))))
+         (list (gnc:make-html-table-cell/size 1 (- width 1) 
+                                              subtotal-string)
+               (gnc:make-html-table-cell/markup 
+                "total-number-cell"
+                (car currency-totals))))
         (for-each (lambda (currency)
 		    (gnc:html-table-append-row/markup! 
 		     table
@@ -182,8 +183,9 @@
     
     (define (render-corresponding-account-name-subtotal
              table width split total-collector subtotal-style)
-      (add-subtotal-row table width (total-string 
-                                     (gnc:split-get-corr-account-full-name split))
+      (add-subtotal-row table width
+                        (total-string 
+                         (gnc:split-get-corr-account-full-name split))
                         total-collector subtotal-style))
 
     (define (render-corresponding-account-code-subtotal
@@ -326,7 +328,9 @@
              (account (gnc:split-get-account split))
              (account-type (gw:enum-<gnc:AccountType>-val->sym
                             (gnc:account-get-type account) #f))
-             (currency (gnc:account-get-commodity account))
+             (currency (if account
+                           (gnc:account-get-commodity account)
+                           (gnc:default-currency)))
              (damount (gnc:split-get-share-amount split))
              (split-value (gnc:make-gnc-monetary 
                            currency 
@@ -372,7 +376,8 @@
         (if (used-price column-vector)
             (addto! 
              row-contents 
-             (gnc:make-gnc-monetary currency (gnc:split-get-share-price split))))
+             (gnc:make-gnc-monetary currency
+                                    (gnc:split-get-share-price split))))
         (if (used-amount-single column-vector)
             (addto! row-contents
                     (gnc:make-html-table-cell/markup "number-cell"
@@ -395,7 +400,8 @@
                      "number-cell"
                      (gnc:make-gnc-monetary currency
                                             (gnc:split-get-balance split)))))
-        (gnc:html-table-append-row/markup! table row-style (reverse row-contents))
+        (gnc:html-table-append-row/markup! table row-style
+                                           (reverse row-contents))
         split-value))
     
     (define (trep-options-generator)
@@ -436,7 +442,8 @@
                                (gnc:get-current-group)))
                 (first-account (gnc:group-get-account
                                 (gnc:get-current-group) 0)))
-            (cond ((not (null? current-accounts)) (list (car current-accounts)))
+            (cond ((not (null? current-accounts))
+                   (list (car current-accounts)))
                   ((> num-accounts 0) (list first-account))
                   (else ()))))
         #f #t))
@@ -590,477 +597,482 @@
         (list (N_ "Account") "e" (N_ "Display the account?") #f)
         (list (N_ "Use Full Account Name?") "f" 
               (N_ "Display the full account name") #t)
-        (list (N_ "Other Account")"g" 
-              (N_ "Display the other account? \
-(if this is a split transaction, this parameter is guessed).") #f)
-      (list (N_ "Shares") "h" (N_ "Display the number of shares?") #f)
-      (list (N_ "Price") "i" "Display the shares price?" #f)
-      ;; note the "Amount" multichoice option in between here
-      (list (N_ "Running Balance") "k" (N_ "Display a running balance") #f)
-      (list (N_ "Totals") "l" (N_ "Display the totals?") #t)))
-
-    (gnc:register-trep-option
-     (gnc:make-multichoice-option
-      gnc:pagename-display (N_ "Amount")
-      "j" (N_ "Display the amount?")  
-      'single
-      (list
-       (vector 'none (N_ "None") (N_ "No amount display"))
-       (vector 'single (N_ "Single") (N_ "Single Column Display"))
-       (vector 'double (N_ "Double") (N_ "Two Column Display")))))
-    
-    (gnc:register-trep-option
-     (gnc:make-multichoice-option
-      gnc:pagename-display (N_ "Sign Reverses?")
-      "m" "Reverse amount display for certain account types"
-      'credit-accounts
-      (list 
-       (vector 'none (N_ "None") (N_ "Don't change any displayed amounts"))
-       (vector 'income-expense (N_ "Income and Expense")
-	       (N_ "Reverse amount display for Income and Expense Accounts"))
-       (vector 'credit-accounts (N_ "Credit Accounts")
-	       (N_ "Reverse amount display for Liability, Equity, Credit Card,\
+        (list (N_ "Other Account") "g" 
+              (N_ "Display the other account?\
+ (if this is a split transaction, this parameter is guessed).") #f)
+        (list (N_ "Shares") "h" (N_ "Display the number of shares?") #f)
+        (list (N_ "Price") "i" "Display the shares price?" #f)
+        ;; note the "Amount" multichoice option in between here
+        (list (N_ "Running Balance") "k" (N_ "Display a running balance") #f)
+        (list (N_ "Totals") "l" (N_ "Display the totals?") #t)))
+
+      (gnc:register-trep-option
+       (gnc:make-multichoice-option
+        gnc:pagename-display (N_ "Amount")
+        "j" (N_ "Display the amount?")  
+        'single
+        (list
+         (vector 'none (N_ "None") (N_ "No amount display"))
+         (vector 'single (N_ "Single") (N_ "Single Column Display"))
+         (vector 'double (N_ "Double") (N_ "Two Column Display")))))
+    
+      (gnc:register-trep-option
+       (gnc:make-multichoice-option
+        gnc:pagename-display (N_ "Sign Reverses?")
+        "m" "Reverse amount display for certain account types"
+        'credit-accounts
+        (list 
+         (vector 'none (N_ "None") (N_ "Don't change any displayed amounts"))
+         (vector 'income-expense (N_ "Income and Expense")
+                 (N_ "Reverse amount display for Income and Expense Accounts"))
+         (vector 'credit-accounts (N_ "Credit Accounts")
+                 (N_ "Reverse amount display for Liability, Equity, Credit Card,\
 and Income accounts")))))
 
 
-    (gnc:options-set-default-section gnc:*transaction-report-options*
-                                     gnc:pagename-general)
+      (gnc:options-set-default-section gnc:*transaction-report-options*
+                                       gnc:pagename-general)
 
-    gnc:*transaction-report-options*)
+      gnc:*transaction-report-options*)
 
 
-  (define (display-date-interval begin end)
-    (let ((begin-string (strftime "%x" (localtime (car begin))))
-	  (end-string (strftime "%x" (localtime (car end)))))
-      (sprintf #f (_ "From %s To %s") begin-string end-string)))
-
-  (define (get-primary-subtotal-style options)
-    (let ((bgcolor (gnc:lookup-option options 
-				      (N_ "Colors")
-				      (N_ "Primary Subtotals/headings"))))
-      (list 'attribute (list "bgcolor" (gnc:color-option->html bgcolor)))))
-
-  (define (get-secondary-subtotal-style options)
-    (let ((bgcolor (gnc:lookup-option options
-				      (N_ "Colors")
-				      (N_ "Secondary Subtotals/headings"))))
-      (list 'attribute (list "bgcolor" (gnc:color-option->html bgcolor)))))
-
-  (define (get-grand-total-style options)
-    (let ((bgcolor (gnc:lookup-option options
-				      (N_ "Colors")
-				      (N_ "Grand Total"))))
-      (list 'attribute (list "bgcolor" (gnc:color-option->html bgcolor)))))
-
-  (define (get-odd-row-style options)
-    (let ((bgcolor (gnc:lookup-option options
-				      (N_ "Colors")
-				      (N_ "Split Odd"))))
-      (list 'attribute (list "bgcolor" (gnc:color-option->html bgcolor)))))
-
-  (define (get-even-row-style options)
-    (let ((bgcolor (gnc:lookup-option options
-                                      (N_ "Colors")
-                                      (N_ "Split Even"))))
-      (list 'attribute (list "bgcolor" (gnc:color-option->html bgcolor)))))
-
-
-  ;; ;;;;;;;;;;;;;;;;;;;;
-  ;; Here comes the big function that builds the whole table.
-  (define (make-split-table splits options
-			    primary-subtotal-pred
-			    secondary-subtotal-pred
-			    primary-subheading-renderer
-			    secondary-subheading-renderer
-                            primary-subtotal-renderer
-                            secondary-subtotal-renderer)
+    (define (display-date-interval begin end)
+      (let ((begin-string (strftime "%x" (localtime (car begin))))
+            (end-string (strftime "%x" (localtime (car end)))))
+        (sprintf #f (_ "From %s To %s") begin-string end-string)))
+
+    (define (get-primary-subtotal-style options)
+      (let ((bgcolor (gnc:lookup-option options 
+                                        (N_ "Colors")
+                                        (N_ "Primary Subtotals/headings"))))
+        (list 'attribute (list "bgcolor" (gnc:color-option->html bgcolor)))))
+
+    (define (get-secondary-subtotal-style options)
+      (let ((bgcolor (gnc:lookup-option options
+                                        (N_ "Colors")
+                                        (N_ "Secondary Subtotals/headings"))))
+        (list 'attribute (list "bgcolor" (gnc:color-option->html bgcolor)))))
+
+    (define (get-grand-total-style options)
+      (let ((bgcolor (gnc:lookup-option options
+                                        (N_ "Colors")
+                                        (N_ "Grand Total"))))
+        (list 'attribute (list "bgcolor" (gnc:color-option->html bgcolor)))))
+
+    (define (get-odd-row-style options)
+      (let ((bgcolor (gnc:lookup-option options
+                                        (N_ "Colors")
+                                        (N_ "Split Odd"))))
+        (list 'attribute (list "bgcolor" (gnc:color-option->html bgcolor)))))
+
+    (define (get-even-row-style options)
+      (let ((bgcolor (gnc:lookup-option options
+                                        (N_ "Colors")
+                                        (N_ "Split Even"))))
+        (list 'attribute (list "bgcolor" (gnc:color-option->html bgcolor)))))
+
+
+    ;; ;;;;;;;;;;;;;;;;;;;;
+    ;; Here comes the big function that builds the whole table.
+    (define (make-split-table splits options
+                              primary-subtotal-pred
+                              secondary-subtotal-pred
+                              primary-subheading-renderer
+                              secondary-subheading-renderer
+                              primary-subtotal-renderer
+                              secondary-subtotal-renderer)
  
 
-    (define (get-account-types-to-reverse options)
-      (cdr (assq (gnc:option-value 
-		  (gnc:lookup-option options
-				     (N_ "Display")
-				     (N_ "Sign Reverses?")))
-		 account-types-to-reverse-assoc-list)))
-    
-
-    (define (transaction-report-multi-rows-p options)
-      (eq? (gnc:option-value
-	    (gnc:lookup-option options gnc:pagename-general (N_ "Style")))
-	   'multi-line))
-
-    (define (add-other-split-rows split table used-columns
-				  row-style account-types-to-reverse)
-      (define (other-rows-driver split parent table used-columns i)
-	(let ((current (gnc:transaction-get-split parent i)))
-	  (cond ((not current) #f)
-		((equal? current split)
-		 (other-rows-driver split parent table used-columns (+ i 1)))
-		(else (begin
-			(add-split-row table current used-columns
-				       row-style account-types-to-reverse #f)
-			(other-rows-driver split parent table used-columns
-					   (+ i 1)))))))
-
-      (other-rows-driver split (gnc:split-get-parent split)
-			 table used-columns 0))
-
-    (define (do-rows-with-subtotals splits 
-				    table 
-				    used-columns
-				    width
-				    multi-rows?
-				    odd-row?
-				    account-types-to-reverse
-				    primary-subtotal-pred
-				    secondary-subtotal-pred 
-				    primary-subheading-renderer
-				    secondary-subheading-renderer
-                                    primary-subtotal-renderer
-                                    secondary-subtotal-renderer
-				    primary-subtotal-collector 
-				    secondary-subtotal-collector 
-				    total-collector)
-      (if (null? splits)
-	  (begin
-	    (gnc:html-table-append-row/markup!
-	     table
-	     def:grand-total-style
-	     (list
-	      (gnc:make-html-table-cell/size
-	       1 width (gnc:make-html-text (gnc:html-markup-hr)))))
-
-	    (render-grand-total table width total-collector))
-
-	  (let* ((current (car splits))
-		 (current-row-style (if multi-rows? def:normal-row-style
-					(if odd-row? def:normal-row-style 
-					    def:alternate-row-style)))
-		 (rest (cdr splits))
-		 (next (if (null? rest) #f
-			   (car rest)))
-		 (split-value (add-split-row 
-			       table 
-			       current 
-			       used-columns 
-			       current-row-style
-			       account-types-to-reverse
-			       #t)))
-	    (if multi-rows?
-		(add-other-split-rows
-		 current table used-columns def:alternate-row-style account-types-to-reverse))
-
-	    (primary-subtotal-collector 'add 
-					(gnc:gnc-monetary-commodity
-					 split-value) 
-					(gnc:gnc-monetary-amount split-value))
-	    (secondary-subtotal-collector 'add
-					  (gnc:gnc-monetary-commodity
-					   split-value)
-					  (gnc:gnc-monetary-amount
-					   split-value))
-	    (total-collector 'add
-			     (gnc:gnc-monetary-commodity split-value)
-			     (gnc:gnc-monetary-amount split-value))
-
-	    (if (and primary-subtotal-pred
-		     (or (not next)
-			 (and next
-			      (not (primary-subtotal-pred current next)))))
-                (begin 
-                   (if secondary-subtotal-pred
-
-                    (begin
-                       (secondary-subtotal-renderer table width current
-                                         secondary-subtotal-collector
-                                         def:secondary-subtotal-style)
-                       (secondary-subtotal-collector 'reset #f #f)))
-
-	           (primary-subtotal-renderer table width current
-			             primary-subtotal-collector
-				     def:primary-subtotal-style)
-
-		   (primary-subtotal-collector 'reset #f #f)
-
-		   (if next
-                     (begin 
-		       (primary-subheading-renderer
-		        next table width def:primary-subtotal-style)
-
-                       (if secondary-subtotal-pred
-                           (secondary-subheading-renderer
-                            next 
-                            table 
-                            width def:secondary-subtotal-style)))))
-
-                 (if (and secondary-subtotal-pred
-		     (or (not next)
-			 (and next
-
-			      (not (secondary-subtotal-pred current next)))))
-		     (begin (secondary-subtotal-renderer  table width current
-					 secondary-subtotal-collector
-					 def:secondary-subtotal-style)
-		       (secondary-subtotal-collector 'reset #f #f)
-		       (if next
-			   (secondary-subheading-renderer
-			    next table width def:secondary-subtotal-style)))))
-
-	    (do-rows-with-subtotals rest 
-				    table 
-				    used-columns
-				    width 
-				    multi-rows?
-				    (not odd-row?)
-				    account-types-to-reverse
-				    primary-subtotal-pred 
-				    secondary-subtotal-pred
-				    primary-subheading-renderer 
-				    secondary-subheading-renderer
-                                    primary-subtotal-renderer
-                                    secondary-subtotal-renderer
-				    primary-subtotal-collector 
-				    secondary-subtotal-collector 
-				    total-collector))))
-
-    (let* ((table (gnc:make-html-table))
-	   (used-columns (build-column-used options))
-	   (width (num-columns-required used-columns))
-	   (multi-rows? (transaction-report-multi-rows-p options))
-	   (account-types-to-reverse
-	    (get-account-types-to-reverse options)))
-
-      (gnc:html-table-set-col-headers!
-       table
-       (make-heading-list used-columns))
-      ;;     (gnc:warn "Splits:" splits)
-      (if (not (null? splits))
-	  (begin
-	    (if primary-subheading-renderer 
-	      (primary-subheading-renderer
-	       (car splits) table width def:primary-subtotal-style))
-	    (if secondary-subheading-renderer
-		(secondary-subheading-renderer
-		 (car splits) table width def:secondary-subtotal-style))
-
-	  (do-rows-with-subtotals splits table used-columns width
-				  multi-rows? #t 
-			      account-types-to-reverse
-			      primary-subtotal-pred
-			      secondary-subtotal-pred
-			      primary-subheading-renderer
-			      secondary-subheading-renderer
-                              primary-subtotal-renderer
-                              secondary-subtotal-renderer
-			      (gnc:make-commodity-collector)
-			      (gnc:make-commodity-collector)
-			      (gnc:make-commodity-collector))))
+      (define (get-account-types-to-reverse options)
+        (cdr (assq (gnc:option-value 
+                    (gnc:lookup-option options
+                                       (N_ "Display")
+                                       (N_ "Sign Reverses?")))
+                   account-types-to-reverse-assoc-list)))
+    
+
+      (define (transaction-report-multi-rows-p options)
+        (eq? (gnc:option-value
+              (gnc:lookup-option options gnc:pagename-general (N_ "Style")))
+             'multi-line))
+
+      (define (add-other-split-rows split table used-columns
+                                    row-style account-types-to-reverse)
+        (define (other-rows-driver split parent table used-columns i)
+          (let ((current (gnc:transaction-get-split parent i)))
+            (cond ((not current) #f)
+                  ((equal? current split)
+                   (other-rows-driver split parent table used-columns (+ i 1)))
+                  (else (begin
+                          (add-split-row table current used-columns
+                                         row-style account-types-to-reverse #f)
+                          (other-rows-driver split parent table used-columns
+                                             (+ i 1)))))))
+
+        (other-rows-driver split (gnc:split-get-parent split)
+                           table used-columns 0))
+
+      (define (do-rows-with-subtotals splits 
+                                      table 
+                                      used-columns
+                                      width
+                                      multi-rows?
+                                      odd-row?
+                                      account-types-to-reverse
+                                      primary-subtotal-pred
+                                      secondary-subtotal-pred 
+                                      primary-subheading-renderer
+                                      secondary-subheading-renderer
+                                      primary-subtotal-renderer
+                                      secondary-subtotal-renderer
+                                      primary-subtotal-collector 
+                                      secondary-subtotal-collector 
+                                      total-collector)
+        (if (null? splits)
+            (begin
+              (gnc:html-table-append-row/markup!
+               table
+               def:grand-total-style
+               (list
+                (gnc:make-html-table-cell/size
+                 1 width (gnc:make-html-text (gnc:html-markup-hr)))))
+
+              (render-grand-total table width total-collector))
+
+            (let* ((current (car splits))
+                   (current-row-style (if multi-rows? def:normal-row-style
+                                          (if odd-row? def:normal-row-style 
+                                              def:alternate-row-style)))
+                   (rest (cdr splits))
+                   (next (if (null? rest) #f
+                             (car rest)))
+                   (split-value (add-split-row 
+                                 table 
+                                 current 
+                                 used-columns 
+                                 current-row-style
+                                 account-types-to-reverse
+                                 #t)))
+              (if multi-rows?
+                  (add-other-split-rows
+                   current table used-columns def:alternate-row-style
+                   account-types-to-reverse))
+
+              (primary-subtotal-collector 'add 
+                                          (gnc:gnc-monetary-commodity
+                                           split-value) 
+                                          (gnc:gnc-monetary-amount
+                                           split-value))
+              (secondary-subtotal-collector 'add
+                                            (gnc:gnc-monetary-commodity
+                                             split-value)
+                                            (gnc:gnc-monetary-amount
+                                             split-value))
+              (total-collector 'add
+                               (gnc:gnc-monetary-commodity split-value)
+                               (gnc:gnc-monetary-amount split-value))
+
+              (if (and primary-subtotal-pred
+                       (or (not next)
+                           (and next
+                                (not (primary-subtotal-pred current next)))))
+                  (begin 
+                    (if secondary-subtotal-pred
+
+                        (begin
+                          (secondary-subtotal-renderer
+                           table width current
+                           secondary-subtotal-collector
+                           def:secondary-subtotal-style)
+                          (secondary-subtotal-collector 'reset #f #f)))
+
+                    (primary-subtotal-renderer table width current
+                                               primary-subtotal-collector
+                                               def:primary-subtotal-style)
+
+                    (primary-subtotal-collector 'reset #f #f)
+
+                    (if next
+                        (begin 
+                          (primary-subheading-renderer
+                           next table width def:primary-subtotal-style)
+
+                          (if secondary-subtotal-pred
+                              (secondary-subheading-renderer
+                               next 
+                               table 
+                               width def:secondary-subtotal-style)))))
+
+                  (if (and secondary-subtotal-pred
+                           (or (not next)
+                               (and next
+                                    (not (secondary-subtotal-pred
+                                          current next)))))
+                      (begin (secondary-subtotal-renderer
+                              table width current
+                              secondary-subtotal-collector
+                              def:secondary-subtotal-style)
+                             (secondary-subtotal-collector 'reset #f #f)
+                             (if next
+                                 (secondary-subheading-renderer
+                                  next table width
+                                  def:secondary-subtotal-style)))))
+
+              (do-rows-with-subtotals rest 
+                                      table 
+                                      used-columns
+                                      width 
+                                      multi-rows?
+                                      (not odd-row?)
+                                      account-types-to-reverse
+                                      primary-subtotal-pred 
+                                      secondary-subtotal-pred
+                                      primary-subheading-renderer 
+                                      secondary-subheading-renderer
+                                      primary-subtotal-renderer
+                                      secondary-subtotal-renderer
+                                      primary-subtotal-collector 
+                                      secondary-subtotal-collector 
+                                      total-collector))))
+
+      (let* ((table (gnc:make-html-table))
+             (used-columns (build-column-used options))
+             (width (num-columns-required used-columns))
+             (multi-rows? (transaction-report-multi-rows-p options))
+             (account-types-to-reverse
+              (get-account-types-to-reverse options)))
+
+        (gnc:html-table-set-col-headers!
+         table
+         (make-heading-list used-columns))
+        ;;     (gnc:warn "Splits:" splits)
+        (if (not (null? splits))
+            (begin
+              (if primary-subheading-renderer 
+                  (primary-subheading-renderer
+                   (car splits) table width def:primary-subtotal-style))
+              (if secondary-subheading-renderer
+                  (secondary-subheading-renderer
+                   (car splits) table width def:secondary-subtotal-style))
+
+              (do-rows-with-subtotals splits table used-columns width
+                                      multi-rows? #t 
+                                      account-types-to-reverse
+                                      primary-subtotal-pred
+                                      secondary-subtotal-pred
+                                      primary-subheading-renderer
+                                      secondary-subheading-renderer
+                                      primary-subtotal-renderer
+                                      secondary-subtotal-renderer
+                                      (gnc:make-commodity-collector)
+                                      (gnc:make-commodity-collector)
+                                      (gnc:make-commodity-collector))))
 	  
-      table))
+        table))
+
+    ;; ;;;;;;;;;;;;;;;;;;;;
+    ;; Here comes the renderer function for this report.
+    (define (trep-renderer report-obj)
+
+      (define options (gnc:report-options report-obj))
+
+      (define (opt-val section name)
+        (gnc:option-value
+         (gnc:lookup-option options section name)))
 
-  ;; ;;;;;;;;;;;;;;;;;;;;
-  ;; Here comes the renderer function for this report.
-  (define (trep-renderer report-obj)
-
-    (define options (gnc:report-options report-obj))
-
-    (define (opt-val section name)
-      (gnc:option-value
-       (gnc:lookup-option options section name)))
-
-    (define comp-funcs-assoc-list
-      ;; Defines the different sorting keys, together with the
-      ;; subtotal functions. Each entry: (cons
-      ;; 'sorting-key-option-value (vector 'query-sorting-key
-      ;; subtotal-function subtotal-renderer))
-      (list (cons 'account-name  (vector 
-				  'by-account-full-name 
-				  split-account-full-name-same-p 
-				  render-account-full-name-subheading
-                                  render-account-full-name-subtotal))
-	    (cons 'account-code  (vector 
-				  'by-account-code 
-				  split-account-code-same-p
-				  render-account-code-subheading
-                                  render-account-code-subtotal))
-	    (cons 'exact-time          (vector 'by-date #f #f #f))
-	    (cons 'date          (vector
-				  'by-date-rounded #f #f #f))
-	    (cons 'corresponding-acc-name
-		  (vector 'by-corr-account-full-name 
-			  split-same-corr-account-full-name-p 
-			  render-corresponding-account-name-subheading
-                          render-corresponding-account-name-subtotal))
-	    (cons 'corresponding-acc-code
-		  (vector 'by-corr-account-code 
-			  split-same-corr-account-code-p 
-			  render-corresponding-account-code-subheading
-                          render-corresponding-account-code-subtotal))
-	    (cons 'amount (vector 'by-amount #f #f #f))
-	    (cons 'description (vector 'by-desc #f #f #f))
-	    (cons 'number (vector 'by-num #f #f #f))
-	    (cons 'memo   (vector 'by-memo #f #f #f))
-	    (cons 'none   (vector 'by-none #f #f #f))))
-
-    (define date-comp-funcs-assoc-list
-      ;; Extra list for date option. Each entry: (cons
-      ;; 'date-subtotal-option-value (vector subtotal-function
-      ;; subtotal-renderer))
-      (list
-       (cons 'none (vector #f #f #f))
-       (cons 'monthly (vector split-same-month-p render-month-subheading 
-                              render-month-subtotal))
-       (cons 'yearly (vector split-same-year-p render-year-subheading
-                                               render-year-subtotal))))
-
-    (define (get-subtotalstuff-helper 
-	     name-sortkey name-subtotal name-date-subtotal
-	     comp-index date-index)
-      ;; The value of the sorting-key multichoice option.
-      (let ((sortkey (opt-val pagename-sorting name-sortkey)))
-	(if (member sortkey (list 'date 'exact-time))
-	    ;; If sorting by date, look up the value of the
-	    ;; date-subtotalling multichoice option and return the
-	    ;; corresponding funcs in the assoc-list.
-	    (vector-ref
-	     (cdr (assq (opt-val pagename-sorting name-date-subtotal)
-			date-comp-funcs-assoc-list)) 
-	     date-index)
-	    ;; For everything else: 1. check whether sortkey has
-	    ;; subtotalling enabled at all, 2. check whether the
-	    ;; enable-subtotal boolean option is #t, 3. look up the
-	    ;; appropriate funcs in the assoc-list.
-	    (and (member sortkey subtotal-enabled) 
-		 (and (opt-val pagename-sorting name-subtotal)
-		      (vector-ref 
-		       (cdr (assq sortkey comp-funcs-assoc-list)) 
-		       comp-index))))))
-    
-    (define (get-query-sortkey sort-option-value)
-      (vector-ref 
-       (cdr (assq sort-option-value comp-funcs-assoc-list)) 
-       0))
-
-    (define (get-subtotal-pred 
-	     name-sortkey name-subtotal name-date-subtotal)
-      (get-subtotalstuff-helper 
-       name-sortkey name-subtotal name-date-subtotal
-       1 0))
-
-    (define (get-subheading-renderer
-	     name-sortkey name-subtotal name-date-subtotal)
-      (get-subtotalstuff-helper 
-       name-sortkey name-subtotal name-date-subtotal
-       2 1))
-
-    (define (get-subtotal-renderer
-            name-sortkey name-subtotal name-date-subtotal)
-      (get-subtotalstuff-helper
-       name-sortkey name-subtotal name-date-subtotal
-       3 2))
-
-    (let ((document (gnc:make-html-document))
-	  (c_accounts (opt-val gnc:pagename-accounts "Accounts"))
-	  (begindate (gnc:timepair-start-day-time
-		      (gnc:date-option-absolute-time
-		       (opt-val gnc:pagename-general "From"))))
-	  (enddate (gnc:timepair-end-day-time
-		    (gnc:date-option-absolute-time
-		     (opt-val gnc:pagename-general "To"))))
-	  (report-title (opt-val 
-			 gnc:pagename-general
-			 gnc:optname-reportname))
-	  (primary-key (opt-val pagename-sorting optname-prime-sortkey))
-	  (primary-order (opt-val pagename-sorting "Primary Sort Order"))
-	  (secondary-key (opt-val pagename-sorting optname-sec-sortkey))
-	  (secondary-order (opt-val pagename-sorting "Secondary Sort Order"))
-	  (splits '())
-	  (query (gnc:malloc-query)))
+      (define comp-funcs-assoc-list
+        ;; Defines the different sorting keys, together with the
+        ;; subtotal functions. Each entry: (cons
+        ;; 'sorting-key-option-value (vector 'query-sorting-key
+        ;; subtotal-function subtotal-renderer))
+        (list (cons 'account-name  (vector 
+                                    'by-account-full-name 
+                                    split-account-full-name-same-p 
+                                    render-account-full-name-subheading
+                                    render-account-full-name-subtotal))
+              (cons 'account-code  (vector 
+                                    'by-account-code 
+                                    split-account-code-same-p
+                                    render-account-code-subheading
+                                    render-account-code-subtotal))
+              (cons 'exact-time          (vector 'by-date #f #f #f))
+              (cons 'date          (vector
+                                    'by-date-rounded #f #f #f))
+              (cons 'corresponding-acc-name
+                    (vector 'by-corr-account-full-name 
+                            split-same-corr-account-full-name-p 
+                            render-corresponding-account-name-subheading
+                            render-corresponding-account-name-subtotal))
+              (cons 'corresponding-acc-code
+                    (vector 'by-corr-account-code 
+                            split-same-corr-account-code-p 
+                            render-corresponding-account-code-subheading
+                            render-corresponding-account-code-subtotal))
+              (cons 'amount (vector 'by-amount #f #f #f))
+              (cons 'description (vector 'by-desc #f #f #f))
+              (cons 'number (vector 'by-num #f #f #f))
+              (cons 'memo   (vector 'by-memo #f #f #f))
+              (cons 'none   (vector 'by-none #f #f #f))))
+
+      (define date-comp-funcs-assoc-list
+        ;; Extra list for date option. Each entry: (cons
+        ;; 'date-subtotal-option-value (vector subtotal-function
+        ;; subtotal-renderer))
+        (list
+         (cons 'none (vector #f #f #f))
+         (cons 'monthly (vector split-same-month-p render-month-subheading 
+                                render-month-subtotal))
+         (cons 'yearly (vector split-same-year-p render-year-subheading
+                               render-year-subtotal))))
+
+      (define (get-subtotalstuff-helper 
+               name-sortkey name-subtotal name-date-subtotal
+               comp-index date-index)
+        ;; The value of the sorting-key multichoice option.
+        (let ((sortkey (opt-val pagename-sorting name-sortkey)))
+          (if (member sortkey (list 'date 'exact-time))
+              ;; If sorting by date, look up the value of the
+              ;; date-subtotalling multichoice option and return the
+              ;; corresponding funcs in the assoc-list.
+              (vector-ref
+               (cdr (assq (opt-val pagename-sorting name-date-subtotal)
+                          date-comp-funcs-assoc-list)) 
+               date-index)
+              ;; For everything else: 1. check whether sortkey has
+              ;; subtotalling enabled at all, 2. check whether the
+              ;; enable-subtotal boolean option is #t, 3. look up the
+              ;; appropriate funcs in the assoc-list.
+              (and (member sortkey subtotal-enabled) 
+                   (and (opt-val pagename-sorting name-subtotal)
+                        (vector-ref 
+                         (cdr (assq sortkey comp-funcs-assoc-list)) 
+                         comp-index))))))
+    
+      (define (get-query-sortkey sort-option-value)
+        (vector-ref 
+         (cdr (assq sort-option-value comp-funcs-assoc-list)) 
+         0))
+
+      (define (get-subtotal-pred 
+               name-sortkey name-subtotal name-date-subtotal)
+        (get-subtotalstuff-helper 
+         name-sortkey name-subtotal name-date-subtotal
+         1 0))
+
+      (define (get-subheading-renderer
+               name-sortkey name-subtotal name-date-subtotal)
+        (get-subtotalstuff-helper 
+         name-sortkey name-subtotal name-date-subtotal
+         2 1))
+
+      (define (get-subtotal-renderer
+               name-sortkey name-subtotal name-date-subtotal)
+        (get-subtotalstuff-helper
+         name-sortkey name-subtotal name-date-subtotal
+         3 2))
+
+      (let ((document (gnc:make-html-document))
+            (c_accounts (opt-val gnc:pagename-accounts "Accounts"))
+            (begindate (gnc:timepair-start-day-time
+                        (gnc:date-option-absolute-time
+                         (opt-val gnc:pagename-general "From"))))
+            (enddate (gnc:timepair-end-day-time
+                      (gnc:date-option-absolute-time
+                       (opt-val gnc:pagename-general "To"))))
+            (report-title (opt-val 
+                           gnc:pagename-general
+                           gnc:optname-reportname))
+            (primary-key (opt-val pagename-sorting optname-prime-sortkey))
+            (primary-order (opt-val pagename-sorting "Primary Sort Order"))
+            (secondary-key (opt-val pagename-sorting optname-sec-sortkey))
+            (secondary-order (opt-val pagename-sorting "Secondary Sort Order"))
+            (splits '())
+            (query (gnc:malloc-query)))
 
   
   
-      ;;(warn "accts in trep-renderer:" c_accounts) 
-      (if (not (or (null? c_accounts) (and-map not c_accounts)))
-	  (begin
-	    (gnc:query-set-group query (gnc:get-current-group))
-	    (gnc:query-add-account-match query
-					 (gnc:list->glist c_accounts)
-					 'acct-match-any 'query-and)
-	    (gnc:query-add-date-match-timepair
-	     query #t begindate #t enddate 'query-and)
-	    (gnc:query-set-sort-order query
-				      (get-query-sortkey primary-key)
-				      (get-query-sortkey secondary-key)
-				      'by-none)
-	    (gnc:query-set-sort-increasing query
-					   (eq? primary-order 'ascend)
-					   (eq? secondary-order 'ascend)
-					   #t)
-
-	    (set! splits (gnc:glist->list (gnc:query-get-splits query)
-					  <gnc:Split*>))
-	    ;;(gnc:warn "Splits in trep-renderer:" splits)
-	    (if (not (null? splits))
-		(let ((table 
-		       (make-split-table 
-			splits 
-			options
-			(get-subtotal-pred optname-prime-sortkey 
-					   optname-prime-subtotal
-					   optname-prime-date-subtotal)
-			(get-subtotal-pred optname-sec-sortkey 
-					   optname-sec-subtotal
-					   optname-sec-date-subtotal)
-			(get-subheading-renderer optname-prime-sortkey 
-						 optname-prime-subtotal
-						 optname-prime-date-subtotal)
-			(get-subheading-renderer optname-sec-sortkey 
-						 optname-sec-subtotal
-						 optname-sec-date-subtotal)
-                        (get-subtotal-renderer   optname-prime-sortkey
-                                                 optname-prime-subtotal
-                                                 optname-prime-date-subtotal)
-                        (get-subtotal-renderer   optname-sec-sortkey
-                                                 optname-sec-subtotal
-                                                 optname-sec-date-subtotal))))
-	    
-		  (gnc:html-document-set-title! document
-						report-title)
-		  (gnc:html-document-add-object! 
-		   document
-		   (gnc:make-html-text
-		    (gnc:html-markup-h3 
-		     (display-date-interval begindate enddate))))
-		  (gnc:html-document-add-object!
-		   document 
-		   table)
-		  (gnc:free-query query))
-		;; error condition: no splits found
-		(let ((p (gnc:make-html-text)))
-		  (gnc:html-text-append! 
-		   p 
-		   (gnc:html-markup-h2 
-		    (_ "No matching transactions found"))
-		   (gnc:html-markup-p
-		    (_ "No transactions were found that \
+        ;;(warn "accts in trep-renderer:" c_accounts) 
+        (if (not (or (null? c_accounts) (and-map not c_accounts)))
+            (begin
+              (gnc:query-set-group query (gnc:get-current-group))
+              (gnc:query-add-account-match query
+                                           (gnc:list->glist c_accounts)
+                                           'acct-match-any 'query-and)
+              (gnc:query-add-date-match-timepair
+               query #t begindate #t enddate 'query-and)
+              (gnc:query-set-sort-order query
+                                        (get-query-sortkey primary-key)
+                                        (get-query-sortkey secondary-key)
+                                        'by-none)
+              (gnc:query-set-sort-increasing query
+                                             (eq? primary-order 'ascend)
+                                             (eq? secondary-order 'ascend)
+                                             #t)
+
+              (set! splits (gnc:glist->list (gnc:query-get-splits query)
+                                            <gnc:Split*>))
+              ;;(gnc:warn "Splits in trep-renderer:" splits)
+              (if (not (null? splits))
+                  (let ((table 
+                         (make-split-table 
+                          splits 
+                          options
+                          (get-subtotal-pred optname-prime-sortkey 
+                                             optname-prime-subtotal
+                                             optname-prime-date-subtotal)
+                          (get-subtotal-pred optname-sec-sortkey 
+                                             optname-sec-subtotal
+                                             optname-sec-date-subtotal)
+                          (get-subheading-renderer optname-prime-sortkey 
+                                                   optname-prime-subtotal
+                                                   optname-prime-date-subtotal)
+                          (get-subheading-renderer optname-sec-sortkey 
+                                                   optname-sec-subtotal
+                                                   optname-sec-date-subtotal)
+                          (get-subtotal-renderer   optname-prime-sortkey
+                                                   optname-prime-subtotal
+                                                   optname-prime-date-subtotal)
+                          (get-subtotal-renderer   optname-sec-sortkey
+                                                   optname-sec-subtotal
+                                                   optname-sec-date-subtotal))))
+
+                    (gnc:html-document-set-title! document
+                                                  report-title)
+                    (gnc:html-document-add-object! 
+                     document
+                     (gnc:make-html-text
+                      (gnc:html-markup-h3 
+                       (display-date-interval begindate enddate))))
+                    (gnc:html-document-add-object!
+                     document 
+                     table)
+                    (gnc:free-query query))
+                  ;; error condition: no splits found
+                  (let ((p (gnc:make-html-text)))
+                    (gnc:html-text-append! 
+                     p 
+                     (gnc:html-markup-h2 
+                      (_ "No matching transactions found"))
+                     (gnc:html-markup-p
+                      (_ "No transactions were found that \
 match the given time interval and account selection.")))
-		  (gnc:html-document-add-object! document p))))
+                    (gnc:html-document-add-object! document p))))
 
-	  ;; error condition: no accounts specified
+            ;; error condition: no accounts specified
           
-	  (gnc:html-document-add-object!
-	   document 
-	   (gnc:html-make-no-account-warning report-title)))
+            (gnc:html-document-add-object!
+             document 
+             (gnc:html-make-no-account-warning report-title)))
 
-      document))
+        document))
 
-  ;; Define the report.
-  (gnc:define-report
+    ;; Define the report.
+    (gnc:define-report
 
-   'version 2
+     'version 2
 
-   'name (N_ "Transaction Report")
+     'name (N_ "Transaction Report")
 
-   'options-generator trep-options-generator
+     'options-generator trep-options-generator
 
-   'renderer trep-renderer)))
+     'renderer trep-renderer)))