Commit Graph

13543 Commits

Author SHA1 Message Date
John Ralls
37808d5d82 Updated test files complying with the xml schema as of 2011-11-02
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19745 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-11-02 23:06:37 +00:00
John Ralls
1a9984eff5 Bugs 632346 & 632166: Fixup transaction currency scrubbing.
Biggest problem was that almost well-formed transactions missing a currency 
element wouldn't import correctly because the FindCommonCurrencies function 
only used the old currency values, ignoring the commodity values in the 
splits' accounts. A new function, xaccFindCommonCurrencies(), looks at those 
first and then calls xaccFindOldCommonCurrencies only if it fails. That 
addresses the cause of the import failure reported in 632166 and a big chunk 
of the warning messages complained about in 632346.

A secondary problem, also addressed in this change, was that the last block 
in xaccTransScrubCurrencyFromSplits always replaced the "amount" with the 
"value". This is the right thing to do if the commodity for the split account 
is a currency, but if it isn't, the replacement should be reversed. 



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19744 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-11-02 21:14:38 +00:00
John Ralls
81cc53b59b Revised handling of obsolete security elements, made log messages better.
Accounts with security elements would only use the security to update the 
commodity if there wasn't a commodity; however, the files in the tests had 
accounts which had a security and a commodity, where the commodity was a 
currency. That's wrong. so now if the commodity is a currency, the security 
will overwrite it.

Added the account name and element name to the log message to assist in 
troubleshooting, should that be needed.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19743 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-11-02 18:21:50 +00:00
John Ralls
ff67038cde Minor fixups to dbi backend:
* dbi_conn_error_flag is deprecated, replace with dbi_conn_error
  (Thanks, Christian).

* Switch from OS-determined HOST_NAME_MAX to locally defined
  GNC_HOSTNAME_MAX so that the field is always 255 regardless of what
  OS creates it.

* Use G_OS_WIN32 instead of naked WIN32


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19740 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-11-01 16:43:51 +00:00
John Ralls
a7c83bc43f Bug 629238: Part 2: Extend locking table to SQLite3.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19739 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-31 20:51:57 +00:00
John Ralls
48a997d370 Bug 629238: Part 1: Create a lock table for postgresql and mysql backends.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19738 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-31 20:31:27 +00:00
Christian Stimming
3cb14e1eb9 Win32 build: Update ktoblzcheck version number.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19734 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-30 19:01:22 +00:00
Geert Janssens
31315b7f5c Preferences window improvements:
* Accounting Period: reorder options so the dates are on top
* Business: reorder options to clarify which options are general and which apply to invoices or bills only
* Business: remove obscure "Number of lines" option
* Register defaults: remove obscure "Number of lines" option
* General: remove "Show splash screen" option

While removing the "Number of lines" options, I have also removed most of the code that used this option. The number of lines was used to calculate the default window size in various places in the code. The code now simply uses sensible defaults for that.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19733 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-30 14:55:23 +00:00
John Ralls
56fe48ec52 Bug 627831: Implements recursion into storing and retrieving nested slot frames and lists.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19729 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-29 22:20:00 +00:00
Geert Janssens
d1b496e9f6 Bug #630770 - Crash when connection lost using db
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19728 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-29 08:39:29 +00:00
Geert Janssens
74e2713c19 Some whitespace cleanups
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19727 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-29 08:32:07 +00:00
Cristian Marchi
e9ca0afd83 Updated British English translation by Mike Evans.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19710 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-28 18:54:28 +00:00
Christian Stimming
986061d8f9 Fix gtk warnings when erroneously setting the fixed-width property to zero.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19708 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-25 18:50:11 +00:00
Christian Stimming
22bd33afd2 Bug #629524: Fix redundant string.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19707 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-25 18:16:14 +00:00
Phil Longstaff
dd81726d6d INFO message to trace log if a table is automatically upgraded to newer version.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19699 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-24 15:29:08 +00:00
Christian Stimming
feba4d6907 Update POTFILES.in with recent file addition.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19698 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-24 09:36:23 +00:00
Christian Stimming
50d5551266 Fix cmake declaration of BINDIR variable, needed because of r19651.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19697 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-24 09:17:23 +00:00
John Ralls
a4d1592788 Bug 611077: Removed warnings, webkit handles jumps to anchors internally
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19696 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-23 22:17:48 +00:00
Geert Janssens
a0c19b4c71 Bug #502853 - Incorrent tax rounding in invoice (rounding of .5)
This patch changes the default rounding behaviour in GnuCash from
"Round to nearest even" to "Round away to infinity". See the bugreport
for more details on these different rounding methods.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19695 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-23 10:38:48 +00:00
Geert Janssens
4a97361d38 Bug #593479 - Account file being deleted because of erroneous checking for lock file.
Replaces the pointer arithmetics with string functions and regexes where possible
to avoid typical pointer pitfalls.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19694 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-23 10:00:58 +00:00
Mike Alexander
60ba32c6a6 Suspend GUI refresh while replaying a log file to avoid flicker and speed it up dramatically.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19690 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-20 22:19:33 +00:00
Mike Alexander
11cf9d417b Bug 3786338. Change r19243 deleted a call to xaccTransBeginEdit which causes a crash replaying a log that
deletes an existing transaction.  Log replay should now do exactly one xaccTransBeginEdit/xaccTransCommitEdit
call per logged transaction.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19689 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-20 21:31:39 +00:00
John Ralls
c630a2c7d5 Remove gnc_book_mark_saved from gnc_sql_save_book. It's a bit premature to mark the book as saved when we haven't yet saved its contents.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19688 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-20 03:40:07 +00:00
John Ralls
c215ae417f Bug 632166: Restore the old session if "save as" fails.
Save as would make a new session the "current session" and attempt to
save it.  If it failed, the new session (with an invalid database)
would remain the current session -- and would be marked clean. An
XML-only file-save-as dialog would be presented with no instructions
about what was going on.

With this change, if the "save as" fails, the old session is restored,
still marked unsaved. This should be much less confusing to users and
more likely to avoid data loss.  

Yes, there's some duplicated code now, because do_save_as doesn't call
save. That's because save did some extra things that do_save_as
doesn't need and it didn't allow do_save_as to properly correct the
session. This could be refactored into some tiny functions, but that
seems a bit excessive to me.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19687 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-20 03:35:02 +00:00
John Ralls
917b516ead Bug 632166: gnc_backend_sql_sync_all: Commit only if all operations were successful; otherwise roll back.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19682 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-19 22:42:43 +00:00
John Ralls
5ce7dc5383 Fix minor typo in error message.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19681 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-19 21:22:42 +00:00
John Ralls
73d53afef3 Bug 632166: A Better fix that doesn't break string freeze or introduce a Gtk GUI dependency into the backend.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19680 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-19 18:32:50 +00:00
Cristian Marchi
2b9a9d48d6 Updated Bulgarian glossary by Rosi Dimova.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19675 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-19 11:51:46 +00:00
Cristian Marchi
af1be2413e Updated Bulgarian translation by Rosi Dimova.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19674 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-19 11:51:05 +00:00
John Ralls
e536180587 Bug 632166: Notify user when something goes wrong with a transaction save.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19673 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-18 21:56:05 +00:00
John Ralls
657a435f38 qoflog.h: No such macro as G_LOG_LEVEL_FATAL
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19672 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-18 21:54:19 +00:00
Cristian Marchi
e10a508092 Updated Latvian translation by Valdis Vītoliņš.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19671 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-18 19:16:01 +00:00
Phil Longstaff
5c5cc3f059 Fix include files. Include files now only include other include files if symbols from the other files are needed by this one.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19670 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-17 21:17:14 +00:00
John Ralls
a899e3149c Bug 611077: Warn instead of assert about gtk_html_jump_to_anchor not being implemented in webkit. Note, however, that Webkit seems to take care of this on its own, so even the warning may be unnecessary.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19669 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-17 20:21:41 +00:00
John Ralls
decd290b5f Remove lbgncmod-backend-xml as an additional library in business/business-core/test/Makefile.am. libgncmod-backend-xml.so is a loadable module, not a shared library, and it shouldn't be dynamically linked. While this will do no harm on Linux, it fails on OSX/Darwin.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19668 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-17 19:48:13 +00:00
John Ralls
1d4e1ef051 Fix misplaced quote in backend/dbi/test/Makefile.am, broke dbi testing.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19667 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-17 17:24:57 +00:00
Geert Janssens
6ad9f9f74f Rename old gnc_book_get_commodity_table into the newer gnc_commodity_table_get_table.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19666 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-16 14:05:29 +00:00
Geert Janssens
62407f1b99 Spelling fixes in comments.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19665 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-16 12:08:29 +00:00
Geert Janssens
e1f224493e Replace all occurrences of the old gnc_book_get_pricedb with the newer gnc_pricedb_get_db
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19664 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-16 10:23:37 +00:00
Christian Stimming
83322e1ab1 Partly revert r19550, "Bug #370331: Store the numeric values of SX..."
This caused the numbers in the "SX from txn" to appear as "220/100" ratios,
which we do not want.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19659 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-15 20:25:22 +00:00
Geert Janssens
e7dfb3308a File dialog - make enter activate the default action for mysql/pgsql selection.
This was already the case in the standard file selector. This change makes the 
two selection methods more consistent.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19658 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-15 11:58:25 +00:00
Geert Janssens
072ee537ab Rework two nearly identical fuctions into a common function with parameters.
Keep the old function names as convenience wrappers around the new function.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19657 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-14 21:00:46 +00:00
Geert Janssens
ccb89d5d52 Remove obsolete example files: also remove them from the makefile.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19656 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-14 20:41:00 +00:00
Geert Janssens
da08ea90ef Remove incompatible example files (X-Account) and update the README file
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19655 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-14 13:20:28 +00:00
Geert Janssens
ec76f3731f Commit missed file for gnc-fq-* location fix.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19654 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-13 16:38:07 +00:00
Christian Stimming
66692aea57 Make qof_query_run_subquery() available to scheme as well, and also the gnc_numeric options.
Needed to remove an unimplemented function from <gnc-numeric.h>
header.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19653 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-13 16:16:17 +00:00
Christian Stimming
67c6a3d0cf Replace some renamed functions by their real new names, removing the annoying #defines.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19652 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-13 16:16:04 +00:00
Geert Janssens
de7b16533e Make sure the right gnc-fq-* scripts are used.
With the original configuration, whatever script was found first on the path was used.
When testing development versions, this caused the also installed stable version to 
be used as it happened to appear first on the path.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19651 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-13 16:11:44 +00:00
Geert Janssens
f58788f91c Separate load paths for shared libraries and gnucash loadable modules.
The former should be found on (DY)LD_LIBRARY_PATH, the latter on
GNC_MODULE_PATH. These paths shouldn't overlap as that needlessly
confuses things.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19648 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-11 20:46:36 +00:00
Phil Longstaff
b762dfa3ae Fix #630286 - Please add handling code for GDate kvp values in SQL, too
If slots table does not include gdate field, it will be added and all current slots will have a NULL value.

Tested on sqlite3 and mysql.  Tested using the example gnucash file referenced from the bug report.  When saved from XML -> sqlite3 -> XML, some timestamps changed their timezone because of a change of timezone (I'm in North America).  I guess this is OK.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19647 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-10-10 22:21:43 +00:00