Commit Graph
58 Commits
Author SHA1 Message Date
Mike Alexander 9369eae6d7 Avoid double free of capital gains transactions when quitting
If an register is open on an account that has capital gains transactions
created by the lot scrubber when you quit Gnucash, a capital gains
transaction may be freed twice since it is freed when the associated
sale is freed and again when it is encountered on the list of
transactions to be freed.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21495 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-10-28 03:22:41 +00:00
Mike Alexander 35ae5e34a8 Don't include core-utils/gnc-gconf-utils.c in the source file list.
It's already part of one of the libraries the tests are linked with.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21303 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-09-22 21:06:51 +00:00
Mike Alexander 8d51acd247 The build fails if python bindings are requested and parallel build is on.
The make file knows how to build libgncmod-app-utils.la but doesn't realize that
${top_builddir}/src/app-utils/libgncmod-app-utils.la is the same file.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21302 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-09-22 21:04:51 +00:00
Mike Alexander 5307ca5ab3 Find the python libraries and includes even if the path to them includes a symlink.
When python is installed using MacPorts there is a symlink in the path.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21301 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-09-22 21:02:44 +00:00
Mike Alexander 5f980c8d1a Use the correct #define for the number of account types instead
of assuming that ACCT_TYPE_CREDITLINE is the last one.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21239 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-09-06 07:21:04 +00:00
Mike Alexander 021044cf31 Fix an unintialized variable warning.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20651 57a11ea4-9604-0410-9ed3-97b8803252fd
2011-05-16 06:09:50 +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
Mike Alexander 75d71c93a3 Make "make check" work when run from "make distcheck".
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19935 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-12-13 17:08:41 +00:00
Mike Alexander 8adaf9d132 Move gnc-version.h and gnc-svninfo.h from gnome-utils to core-utils.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19928 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-12-12 06:48:20 +00:00
Mike Alexander 0288b5f69b If the build directory is not the source directory and the source directory
is read only, the build fails.  Fix by only making guile-strings.c if 
building from SVN.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19927 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-12-12 06:45:37 +00:00
Mike Alexander 6eb32d9d50 Get rid of the rest of the gnc-prices man page, r19921 is incomplete
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19926 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-12-12 06:33:50 +00:00
Mike Alexander 40bcdca2ca If you have a parent account with a subaccount whose commodity allows more
decimal places in the amount field than the parent account does things
don't work right if you open a register for the parent account and all
subaccounts.  This situation can occur if you have a broker account with
subaccounts for the securities held in that broker account. If you open a
register for the top account and all subaccounts, it is impossible to enter
a transaction to buy or sell a fractional share of the security where there
are more digits after the decimal point than the parent account allows.
This change fixes this if the subaccount allows no more than six digits
after the decimal point.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19925 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-12-12 04:26:56 +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
Mike Alexander 670ad9e6a6 Fix bug 573702. When reading an old data file that doesn't have a template root
account for scheduled transactions invent one.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19559 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-09-07 01:14:24 +00:00
Mike Alexander a9a46fcefb Fix crash when run with the --add-price-quotes parameter.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19381 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-07-28 04:13:58 +00:00
Mike Alexander 4bc072690b FIx bug 596124: don't crash if someone adds a split to a capital gains transaction
created by the lot scrubber.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19380 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-07-28 03:48:07 +00:00
Mike Alexander 7120209168 Double clicking on the balance column in a register doesn't resize the
column because there is a zero width column to the right of it.  This may
fix all or part of bugs 563588, 345711, or 506261.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19379 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-07-27 22:46:17 +00:00
Mike Alexander 53c6330c12 Properly check for SWIG version 2.0.0 and later.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19287 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-06-23 07:05:31 +00:00
Mike Alexander 0b87e05c53 Revert part of R19263. DYLD_LIBRARY_PATH must be set on MacOSX (running under X11, not Quartz) in order for GnuCash to find its dynamic libraries.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19286 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-06-23 07:04:09 +00:00
Mike Alexander 3bcf2f9264 Make the keychain interface in MacOSX compile and work.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19182 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-05-19 20:27:12 +00:00
Mike Alexander 33798cd3d3 When printing WebKit based reports respect the Page Setup settings.
If webkit_web_frame_print_full exists in the version of WebKit being used then 
use it with a GtkPrintOperation which has been initialized from the Page
Setup data.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19025 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-04-16 05:26:25 +00:00
Mike Alexander 891c051f83 Make the calculations more nearly the same as the older balance sheet report
Calculate retained earnings or loss from income and expense accounts and
label the amount needed to balance the books as the imbalance amount
instead of retained earnings or loss.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19018 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-04-12 02:38:43 +00:00
Mike Alexander d757673b87 Update eguile based balance sheet report to work with current GnuCash.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19017 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-04-11 19:12:29 +00:00
Mike Alexander f4f35770cb Add the eguile based balance sheet report.
This version is directly from the wiki at
<http://wiki.gnucash.org/wiki/Custom_Reports_Using_Eguile>
and won't work in the current version of GnuCash.  It is included for 
reference purposes.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19016 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-04-11 19:05:44 +00:00
Mike Alexander 6d6a1eac8a Fix MacOSX keyring test in configure to work and make gnc-keyring.c compile if it does.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18999 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-04-06 02:19:25 +00:00
Mike Alexander fe6d35d6bf Initialize new_val in environment_override to avoid a compiler warning.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18998 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-04-06 02:17:21 +00:00
Mike Alexander dff335dd3e Speed up the balance sheet report by a factor of 5 or so by using C functions instead
of Scheme functions to get account commodity balances.  This idea is borrowed 
from the EGuile version of the balance sheet report.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18555 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-01-09 05:52:05 +00:00
Mike Alexander 9d725a6aef Remove a couple of unused local variables left over from a previous iteration of
the trading account changes.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18554 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-01-09 05:48:48 +00:00
Mike Alexander 5f07987bb2 Avoid a bunch of assertion failures when the general ledger is open. The general ledger has no
account so attempts to get the balance of the register's account pass a null account pointer
to functions that won't accept that.  Also stop leaking a GList in the functions that get account
balances.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18553 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-01-09 05:47:54 +00:00
Mike Alexander 6085758a8b Remove the "Compute unrealized gains and losses" option from the balance sheet
report.  Instead compute unrealized gains and losses only if the current book
does not use trading accounts.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18552 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-01-09 04:54:02 +00:00
Mike Alexander 91bdb89a72 Add a Select Children button to the widget used for account selection in
report options dialogs.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18543 57a11ea4-9604-0410-9ed3-97b8803252fd
2010-01-02 22:59:38 +00:00
Mike Alexander ee8a1499e7 Load gnc-build-url from the correct file so the accounts list
option works again.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18542 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-31 23:15:31 +00:00
Mike Alexander 5860ae976c Allow digits in Gtk action names created in gnc_create_extension_info.
This should fix bug 447339 as long as all report names are unique 
considering only alphanumeric characters.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18534 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-29 06:13:26 +00:00
Mike Alexander 003d7209a9 Watch out for a missing pricing transaction when looking for price data.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18524 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 08:04:48 +00:00
Mike Alexander 812a9fa6c5 Add a comment about GNC_COMMODITY_NS_ISO and
GNC_COMMODITY_NS_CURRENCY.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18523 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 08:03:23 +00:00
Mike Alexander 7dd2d8e566 Add new columns for the name of the lot each split is part of and for
the value of the split.  Both are optional and default to off.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18522 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:56:49 +00:00
Mike Alexander 3722706edd Fix some incorrect ENTER() and LEAVE() calls.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18521 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:41:23 +00:00
Mike Alexander 128c5dd195 Fix a couple of initialized variable warnings.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18520 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:40:28 +00:00
Mike Alexander 10cead26b1 Call gnc_{suspend|resume}_gui_refresh while closing accounts and scrubbing lots
to make them go much faster and avoid flicker.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18519 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:39:49 +00:00
Mike Alexander 889f4d19ac Fix up some gnc:debug calls (and one comment).
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18518 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:37:15 +00:00
Mike Alexander 2183451889 Watch out for a null account in render-corresponding-account-subheading, it
happened to me once.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18517 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:35:42 +00:00
Mike Alexander b5aff667de Pass the correct report name to income-statement-renderer-internal when rendering
a profit and loss report.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18516 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:34:30 +00:00
Mike Alexander 3ca3f9e72f Don't leak a file port when saving reports.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18515 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:33:26 +00:00
Mike Alexander fa9f788504 Reset found_trans_split when the transaction being considered in gnc_split_register_find_split
turns out to be the wrong one.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18514 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:28:30 +00:00
Mike Alexander e4dd190ed9 Add missing PORTFOLIO_LEDGER register type to switch statement in
gnc_split_register_get_debcred_entry.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18513 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:26:13 +00:00
Mike Alexander c6d4edd1b9 Fix an off by one error in gnc_ui_sx_loan_druid_create.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18512 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:21:18 +00:00
Mike Alexander 1866ebeaed Increase the size of the Guile stack to avoid stack overflow errors.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18511 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:17:09 +00:00
Mike Alexander 734c5e2f2c Fix a couple of echo commands and set warnings=no-portability when running automake.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18510 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:15:16 +00:00
Mike Alexander 8da75fff34 Make xaccSplitDump and xaccTransDump work for debugging.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18509 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 07:10:49 +00:00
Mike Alexander 9b31a03191 Teach xaccSplitConvertAmount that 0*x = 0. Avoids looking up non-existant exchange rate.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18508 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 06:30:26 +00:00
Mike Alexander 574385f9fd Add some missing Leave() calls.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18507 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-17 06:25:45 +00:00
Mike Alexander daa1c8e23b Symlink the reports to the build directory to make it easier to use them when
running in place after a build without installing GnuCash.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18498 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-14 05:52:22 +00:00
Mike Alexander 287c85ce9d Use resolve-interface instead of resolve-module when loading reports fo only the
exported interface gets imported instead of everything defined in the file.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18497 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-14 05:50:57 +00:00
Mike Alexander e7cd4d4595 Make the dbi backend tests work correctly if dbd is installed in a nonstandard location.
Supply a GNC_DBD_DIR environment variable to the tests so it knows where to find the 
database modules.  This is needed if libdbi is installed via MacPorts on OS X.



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18496 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-14 05:48:45 +00:00
Mike Alexander e150417410 Fix the bug described in comment 19 of bug 537476, balance sheet wrong without trading accounts.
The problems is that xaccQueryAddAccountMatch and xaccQueryAddAccountGUIDMatch
match all accounts rather than no accounts when given a null account list.  This means
that gnc:accountlist-get-comm-balance-at-date returns a balance for all accounts when
given no accounts.  This caused the balance sheet report to fail if there were no trading
accounts.  There is a similar problem with gnc:account-get-trans-type-splits-interval in 
gnc:html-acct-table-add-accounts! in html-acct-table.scm that is also fixed.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18455 57a11ea4-9604-0410-9ed3-97b8803252fd
2009-12-01 05:15:02 +00:00