Commit Graph

14462 Commits

Author SHA1 Message Date
Christian Stimming
801adc765f Set line ending property svn:eol-style to LF for newly added files
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20164 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-24 14:37:49 +00:00
Christian Stimming
c8f1244fff Re-indentation of source code.
This re-indentation was done using astyle-1.24 using the following options:

  astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20163 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-24 14:10:09 +00:00
Christian Stimming
bd17b5fa41 Add missing svn:executable property
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20162 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-24 14:04:37 +00:00
Christian Stimming
04cafacf3f Fix printf conversion specifier of 64 bit integers in message.
(Also, fix compiler warning about && and ||).

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20161 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-24 14:02:39 +00:00
Christian Stimming
d912e8a320 Improve wording of libdbi error message even more.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20160 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-24 09:45:09 +00:00
John Ralls
3c37a45b2d SQL Backend Version Control: The final part.
New error dialog boxes for ERR_SQL_DB_TOO_OLD and ERR_SQL_DB_TOO_NEW
Marks the book read-only if the user doesn't upgrade a too-old db and 
when the user tries to load a too-new db.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20159 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-23 19:33:35 +00:00
John Ralls
5429f5a8cf Add en to the ALL_LINGUAS list in configure.ac; should have been in r20142
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20158 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-23 19:29:47 +00:00
John Ralls
28abf46152 Reverse some extra changes that slipped into 20155
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20157 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-23 19:24:09 +00:00
John Ralls
ce8997dc45 Bug #637770: Fix progress bar on load and full save in sql backend.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20156 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-23 18:58:39 +00:00
John Ralls
d4e3354c47 Provide more detail in commit error when it's caused by a read-only book. Mark error message for translation.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20155 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-23 17:50:43 +00:00
John Ralls
05530a33c3 Throw an error and return if if the book is marked readonly.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20154 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-23 17:35:31 +00:00
John Ralls
978908404a Remove book_is_readonly check from qof_instance_begin_edit; it crashes if it's actually used.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20153 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-23 17:31:28 +00:00
John Ralls
879b1f2c0c Bug #611936: Test DBI backends for a dbi bug which causes 64-bit numbers
to not be stored on 32-bit systems, and prevent saving or loading with 
an informative error dialog box.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20147 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-22 23:04:00 +00:00
John Ralls
79ee7e78ac Prevent a crash if gnc_sx_sxes_reverencing_account called when book has no sxes.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20146 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-22 22:59:42 +00:00
Christian Stimming
dc4ae21d0b Bug #639906: Improve text output methods of python bindings
Patch by Christoph Holtermann:

For the more complex financial objects i chose a different approach.

The printing functions are located in one module. Importing this module adds
these functions as methods to the classes defined in gnucash_core.py.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20145 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-22 14:39:56 +00:00
Christian Stimming
b922f000ec Bug #640233: Don't add "Account unknown Bank Unknown" memo when account and/or bank does not exist
Patch by Jeff Kletsky:

At least for the online OFX sources I use in the US, downloaded
transactions are populated with memos of

"Account unknown Bank unknown"

Past being annoying, this can cause improper "matches" when comparing
transactions.

The root cause is found in src/import-export/aqbanking/gnc-ab-utils.c
in the function gnc_ab_memo_to_gnc where the code seems to check for
the existence of a remote account number from the aqbanking
transaction

if (ab_other_accountid && *ab_other_accountid)

and appears to intend to return the empty string if one is not present.

However, an earlier line in the code sets ab_other_accountid to
"unknown" so that the test always returns true.

This patch should return:

* "Account <account number> Bank <bank number>" if both are present

* "Account <account number>" if only the account is present

* "Bank <bank number>" if only the bank is present

* "" if neither is present

Additionally, ordering of trimming was changed to handle the
possibility that the leading and/or trailing character(s) were stripped
as invalid UTF-8, resulting in an untrimmed string.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20144 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-22 14:36:18 +00:00
John Ralls
75a5d4c0da Rejigger the set_macos_locale function to better handle qualified
languages (e.g., Portugues (Portugal). Add po/en.po so that english 
doesn't have to be special-cased to the C locale.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20142 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-22 00:26:02 +00:00
Geert Janssens
27dcfa1e80 Bug #638762 - Windows 7 64-bit: GnuCash will not start due to existing SCHEME_LIBRARY_PATH env variable
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20141 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-21 22:27:48 +00:00
Geert Janssens
cdaf152cd7 Use last changed revision number instead of last-commited-somewhere-in-repo
svnversion without options returns the most recent revision in the repo
at the time of the last svn update/checkout even if that revision
didn't hold any changes in the current path. Not very useful as a
reference. Better is to ask for the last changed revision with -c.
BUT: -c option for some reason always considers svn working copy
as having mixed sources. We're only interested in the last part so
we strip the beginning revision if it's there.
As a result if your WC really has mixed sources, that will not be
visible in the version number...

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20140 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-21 22:10:40 +00:00
Cristian Marchi
c039773b51 Fix a typo.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20139 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-21 19:54:47 +00:00
Cristian Marchi
73c9e62ad7 Update Italian translation.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20138 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-21 19:09:42 +00:00
Geert Janssens
5802a37dbd Bug #629501 Nonexistent field in error message
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20137 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-21 14:23:20 +00:00
Geert Janssens
6fd224e598 Bug #467311 Print invoice button should be restored to View invoice
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20136 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-21 11:52:28 +00:00
Geert Janssens
3a3308877d Bug #352057 button to create a new invoice when viewing an old one.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20135 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-21 11:52:19 +00:00
Geert Janssens
db2194abc9 Add icons for Duplicate Invoice functionality
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20134 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-21 11:52:09 +00:00
Geert Janssens
86ba21c60e Whitespace cleanups
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20133 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-21 11:51:59 +00:00
Geert Janssens
d757ccc2f3 This patch adds a new option under Edit -> Preferences -> Date/Time
that looks like this:

 Date Completion
 When a date is entered without year, it should be taken:
 (*) In the current calendar year
 ( ) In a sliding 12-month window starting this many months before the
     current month:  [ 6 ]

Patch by Peter Selinger with minor modifications

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20132 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-21 11:51:40 +00:00
Christian Stimming
a90cd5fdf8 Bug #535774: Fix label for employee option on "Employee Report"
Patch by Bert Claesen:

The attached patch (against r20122) tries to solve bug #535774 and:

*Introduces Option naming consistent with report title (e.g. Customer Report
shows Customer in the Option screen)
*Removes the printf() default string in case no arguments where given
*Moves the docname up to a higher level for easy of overview

Cases default to a GNC-OWNER-VENDOR.

Note on the patch:
*As indicated in the comments, two functions are nearly identical, where in the
Vendor report the use of Vendor/Company is mixed. This can easily be moved into
one function as the footprint is the same.

cstim: I've clarified which ones of the functions returns translated vs.
untranslated strings, too.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20131 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-20 20:20:45 +00:00
Christian Stimming
2bab2d6f02 Remove old obsolete unused file from python wrappers.
Apparently this is unused since r17284.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20130 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-20 20:15:02 +00:00
Christian Stimming
f16a4e3a83 639980: Add EntryList and _gncEntry objects to list typemap.
Patch by bstpierre.org

Fix python failing getting invoice entry data.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20129 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-20 20:14:51 +00:00
Christian Stimming
0c425e1914 Bug #639906: Adding __str__ and __unicode__ methods to GncNumeric
Patch by Christoph Holtermann:

1) I decided to let the methods return "Division by Zero" for denom()==0.
2) As proposed in
http://stackoverflow.com/questions/1307014/python-str-versus-unicode i created
both __str__ and __unicode__.
3) I use format to fix the decimal places to 2. It would be nice if the number
would be configurable.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20128 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-20 20:14:40 +00:00
Christian Stimming
f8d09913d0 Bug 637346: A small python doc enhancement, basically mentioning the wiki-page
Patch by Christoph Holtermann.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20127 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-20 20:14:28 +00:00
Mike Alexander
0dee9da11b Fix a bug introduced in 20042 which caused lists of Scheme strings passed to C code to be garbage.
This caused online price quotes to fail for anything other than a currency.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20126 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-19 04:21:14 +00:00
Mike Alexander
6181f334f3 Make sure ENTER is balanced by LEAVE in gnc_commodity_set_quote_tz.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20125 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-19 04:18:00 +00:00
Mike Alexander
2f4e33a86f Make it possible to include trading accounts in the Income Statement and Profit and Loss reports.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20124 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-19 04:17:06 +00:00
John Ralls
8be9b0a9ad Enhanced database version handling.
* Add a macro GNC_RESAVE_VERSION which holds an svn revision number. 
* When fully saving a database put this number in versions with 
  table_name Gnucash-Resave.
* On database load, compare the current GNC_RESAVE_VERSION with the 
  Gnucash revision and Gnucash-Resave revision saved when the database 
  was created. 
* If the current GNC_RESAVE_VERSION > the saved Gnucash 
  version, then emit ERR_SQL_DB_TOO_OLD.
* If GNC_RESAVE_VERSION < the saved Gnucash-Resave, emit ERR_SQL_DB_TOO_NEW.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20123 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-18 23:42:48 +00:00
John Ralls
56f1e28e36 Minor fixes to g_test: Adjust MODULEPATH so that the boundary path delimiters go at invocation; add DEFAULT_INCLUDES to the test_foo_CFLAGS; include the required NULL third arg to g_test_init()
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20121 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-18 18:16:58 +00:00
John Ralls
f8a0864175 Provide for safely overwriting a sql database by moving the existing
tables out of the way, writing new tables, and then dropping the old 
tables once everything has been saved.




git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20119 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-18 00:36:08 +00:00
Christian Stimming
a2cddf7678 Win32: Add missing link libraries to bi_import plugin. Necessary for win32 linking.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20118 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-17 21:27:54 +00:00
John Ralls
a3bf3033b2 Bug #638225: Author Jim Radford. KVP lists are ordered so should not be sorted
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20117 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-17 16:55:39 +00:00
Christian Stimming
c870169c3c Additionally, make the "Duplicate Invoice" feature available as menu item and toolbar button when viewing an invoice.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20116 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-16 21:10:05 +00:00
Christian Stimming
9675bc0ef4 Implement "Duplicate Invoice" feature, where a new invoice is created as a copy of an old one with new date and new ID.
This patch makes this feature available as button "Duplicate" in the search window.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20115 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-16 21:09:53 +00:00
Christian Stimming
2d80ece799 Win32 build: Aqbanking has a patch now, but doesn't need autotools called.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20114 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-16 19:33:20 +00:00
Christian Stimming
b7cf646a2f Remove *.i files from doxygen input again because at least my doxygen-1.6.3 hangs on gnucash_core.i.
This is a follow-up to r19956, bug #637346.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20112 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-15 21:51:43 +00:00
Christian Stimming
c4a65e6e63 Make reconcile+update import action of r20021 bug#373415 enabled by default because it's so useful.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20111 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-15 21:05:26 +00:00
Christian Stimming
34613bc9c9 Bug #639498: Fix aqbanking-4.2.4 issue with "execute online transfer" on WinXP.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20108 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-15 20:33:28 +00:00
John Ralls
886cf5b4e5 Fix qof/test compilation errors, provide guard for glib_testing.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20107 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-15 19:11:42 +00:00
Christian Stimming
dc4ec4a8ea Remove the old "import-export/hbci" module because it is no longer supported.
The newer "import-export/aqbanking" has been in use since aqbanking-3.0.0.
As it turned out, we require aqbanking-4.0.0 now anyway, which was
release 2009-05-30. Consequently, the old module isn't being maintained
by us and so needs to be removed.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20106 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-15 09:52:53 +00:00
Christian Stimming
cdb4014700 Bug #638689: Require libaqbanking >= 4.0.0 because earlier versions are not supported correctly by our code anymore.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20105 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-15 09:52:41 +00:00
Christian Stimming
eae03c2003 Disable usage of qof/test for now because is does not yet compile.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20104 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-01-15 09:52:27 +00:00