Commit Graph
100 Commits
Author SHA1 Message Date
Mike Alexander 8d9b3c7c5d Bug 735769: Enable price and shares cells in a split if it is not in the trans currency.
The label for the cells are changed to "Exch. Rate" and "Oth. Curr." in this case.
2014-09-02 00:18:10 -04:00
Mike Alexander 668aab4a2b If the cursor moves from one register cell to another, refresh the register headers.
If trading accounts are on and the transaction is expanded then the headers
depend on the type of split the cursor is in.
2014-09-02 00:16:06 -04:00
Mike Alexander 483302aba0 Use guint64 instead of uint64_t with G_GUINT64_FORMAT to avoid warnings. 2014-08-31 18:34:24 -04:00
Mike Alexander 67f84774e9 Change gncOwnerGetBalanceInCurrency to only cosider lots that contain an invoice.
This function is currently only used in the owner tree code and this change
will cause payments not properly linked to invoices to be ignored when computing
owner balances.
2014-08-31 18:20:52 -04:00
Mike Alexander a028ae0f98 Finish implementing the "Show zero balance owners" filter option.
It always showed nothing before.
2014-08-31 18:20:42 -04:00
Mike Alexander 95816477e4 The sense of the "Only show active customers" checkbox was inverted. 2014-08-31 18:20:26 -04:00
Mike Alexander 5db0cb98d4 Bug 722140: Add option to control inclusion of trading accounts in cash flow report. 2014-08-14 17:17:18 -04:00
Mike Alexander 359327e942 Bug 733107: Search for reconcile status doesn't work right. 2014-07-13 22:50:12 -04:00
Mike Alexander f8139efad1 Always use the price we display to calculate the current value of an account. 2014-05-25 19:09:32 -04:00
Mike Alexander 15e9bde7c3 The cash flow report should ignore splits in trading accounts. 2014-05-13 22:45:25 -04:00
Mike Alexander 7f746724fe Don't nest AC_MSG_CHECKING calls, it produces confuing output. 2014-05-05 16:30:30 -04:00
Mike Alexander 8c21aff5e1 Better test for conflict between optimization and FORTIFY_SOURCE 2014-05-02 18:07:43 -04:00
Mike Alexander 2c4463e77f Ignore SIGTTOU while importing Python console class.
Importing it causes this signal to be sent and if GnuCash is running
in the background it hangs.
2014-04-27 16:26:13 -04:00
Mike Alexander 4ec1f6b724 Fix code that customizes parameters for specific gcc versions
to agree with the comments.
2014-04-27 16:25:51 -04:00
Mike Alexander b1eb45ef28 Fix basis calculation for FIFO or LIFO when less than one lot is sold. 2014-03-24 19:03:26 -04:00
Mike Alexander 2763a6bb21 Fix compilation errors. 2014-02-23 00:47:34 -05:00
Mike Alexander d0766a6bb4 Fix still more overflow problems. 2014-02-22 17:45:01 -05:00
Mike Alexander a224f2bf96 Minor optimization. 2014-02-20 02:57:49 -05:00
Mike Alexander d07f1dbacd Add XCode project for debugging. 2014-02-20 01:52:11 -05:00
Mike Alexander b032a33b03 Count money used in a spin-off as money out of the stock account. 2014-02-19 17:16:05 -05:00
Mike Alexander b2f2f25202 Exclude income transfered to an asset account and back again from money in. 2014-02-19 17:16:05 -05:00
Mike Alexander 3aacd3a1f7 Remove the "ignore parent or sibling" option entirely.
It is unlikely to come back and interferes with other changes I want to make.
2014-02-19 17:16:04 -05:00
Mike Alexander 6390beb59f Fix an uninitialized variable error. 2014-02-19 01:38:05 -05:00
Mike Alexander 2c2d0efe0f Got some parens in the wrong place. 2014-02-16 02:13:39 -05:00
Mike Alexander bfc02b6c2b Improve calculations of income and money in to the share account.
Remove the "ignore siblings and parent" option since it isn't needed now.
2014-02-15 23:59:43 -05:00
Mike Alexander e842f0e751 Fix reported problems in the Advanced Portfolio report.
- Main loop rewritten to be more robust and accurate.
 - Added option to include broker fees in basis calculations.
 - Added option to ignore money transfered to or from parent
   or sibling accounts.
2014-02-13 01:20:06 -05:00
Mike Alexander 035959a250 Fix some comments. 2014-02-11 22:56:32 -05:00
Mike Alexander 9d9a878c55 Remove src/engine/GNCId.h, it isn't needed anymore.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23779 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-29 06:07:14 +00:00
Mike Alexander 7a576912cb Handle stocks that become worthless in the Advanced Portfolio report
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23762 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-25 03:42:12 +00:00
Mike Alexander 9337a9be66 Fix unitialized variable error in r23740.
Thanks to Herbert Thoma for the patch.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23746 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-22 23:36:48 +00:00
Mike Alexander 6c62a2da98 Fix r23732. By the time we get to inner_main it's too late to call gnc_prefs_init.
By then the main window has been created so it doesn't get hooked into the prefs system.
One symptom of this is that the "tab position" pref doesn't affect that window.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23734 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-21 05:04:18 +00:00
Mike Alexander 7c4a52da20 Advanced Portfolio: Tweak the rounding a bit more for bug #553020.
Also fixed some debugging messages.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23728 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-20 06:36:01 +00:00
Mike Alexander 0eda749c3c Fix rounding problems in conversions. Fixes bug #454827.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23727 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-20 05:08:47 +00:00
Mike Alexander bcd5543195 Advanced Portfolio: Use the correct function to get today's date.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23724 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 23:30:58 +00:00
Mike Alexander 9c9a5b8847 Advanced Portfolio: Don't leak prices.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23723 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 22:40:17 +00:00
Mike Alexander 1f5b959f3d Advanced Portfolio: Don't print footnotes if the account that needs them isn't included.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23722 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 22:40:11 +00:00
Mike Alexander dd1dde78a4 Advanced Portfolio: Remove the "latest before" price source.
It's not implemented and could easily be added back if it ever is implemented.
This will break any saved report using this price source, but they are
broken already.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23718 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 07:10:31 +00:00
Mike Alexander e4a3232e3e Advanced Portfolio: Try harder to find a price and use the one it claims to be using.
Sometimes it would display one price but use another one to compute the value.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23717 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 07:10:21 +00:00
Mike Alexander 9d2687645a Advanced Portfolio: Fix realized gain calculation and handling of brockerage fees.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23716 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 07:10:14 +00:00
Mike Alexander ae96f2bffd Advanced Portfolio: Fix the basis calculations.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23715 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 07:10:04 +00:00
Mike Alexander 916ad28fc8 Advanced Portfolio: Use the more common LIFO name for the basis method.
Don't change the internal code to avoid invalidating saved reports.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23714 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 07:09:44 +00:00
Mike Alexander c7c68508c8 Advanced Portfolio: Fix a bug in the code that detects a spin-off.
It was using an unset variable that was always zero.
Also do a better job of finding a pricing transaction and a couple of other
minor changes.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23713 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 07:09:21 +00:00
Mike Alexander be931f7673 Advanced Portfolio: Eliminate all overflow problems.
Share and price calculations are done to 5 decimal places and currency
calculations are done using the precision defined for the currency.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23712 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 07:09:13 +00:00
Mike Alexander 7e13c7d73e Advanced Portfolio: Add some more debugging output.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23711 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 07:09:06 +00:00
Mike Alexander 018bc23602 Make various reports work with the "average cost" price source.
THe Portfolio report crashed and several othsrs used "nearest" instead.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23710 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 07:08:59 +00:00
Mike Alexander e32ba766b6 Don't leak prices in the (non-advanced) portfolio report.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23709 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 07:08:52 +00:00
Mike Alexander 96957db600 Remove the max_count test in gnc_plugin_page_report_name_changed.
This limits the total number of times it can be called per invocation
of GnuCash for no obvious reason.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23708 57a11ea4-9604-0410-9ed3-97b8803252fd
2014-01-19 07:08:45 +00:00
Mike Alexander d9c33eb571 Update .gitignore to include recently added config macros.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23597 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-22 22:13:42 +00:00
Mike Alexander b21713b1ba Load old version 1 XML files without crashing.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23596 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-22 22:13:36 +00:00
Mike Alexander 85c7631406 Ignore missing accounts in gnc:filter-accountlist-type to avoid an assert.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23549 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-12 05:18:09 +00:00
Mike Alexander 894630e1d4 Ignore XCode projects
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23548 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-12 05:17:43 +00:00
Mike Alexander b3a433d7b8 Check for null account pointers in gnc_tree_view_account_set_selected_accounts.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23547 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-12 05:17:30 +00:00
Mike Alexander 2a1f9f7547 Fix r23536: got the 'closing keyword wrong in a couple of places
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23538 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-10 23:38:58 +00:00
Mike Alexander 2182d04dad Change various reports to find book closing transactions without pattern matching
Several reports need to find book closing transactions and let you specify a pattern
to match against the description of the transaction to detect them.  The Close Book tool
marks the transactions it creates so they can be found without pattern matching.  This
changes makes those reports use that mark to find them even if the pattern match doesn't.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23536 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-10 22:17:50 +00:00
Mike Alexander 9f5f1320be Add the ability to search for transactions that are, or are not, book closing entries.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23535 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-10 22:17:00 +00:00
Mike Alexander 5c3f0d3c81 Don't add a \n to the beginning of the split memo, account, or amount lists.
Pango seems to ignore it, but it really shouldn't be there.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23498 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-07 07:33:39 +00:00
Mike Alexander 0d3d2c33b8 Fix bug 653594 related to check printing.
This bug has two parts.  The original bug was that the wrong split is sometimes
used to print the check.  In the comments a second problem was mentioned:
sometimes the wrong split is omitted from the split list in formats that print
all the splits.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23497 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-07 07:33:33 +00:00
Mike Alexander 80b51ad5dd Protect against null account pointers in a couple of place to avoid asserts.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23496 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-07 07:33:24 +00:00
Mike Alexander bf1c6d3278 Protect gnc_mktime against bad dates.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23495 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-07 07:33:14 +00:00
Mike Alexander 1787ffb01c Fix bug 719521. The two radio buttons were both there, but one on top of the other.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23482 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-04 00:58:51 +00:00
Mike Alexander b50ca70f50 Update progress bar while writing price DB as well as while reading it.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23472 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-12-01 04:53:05 +00:00
Mike Alexander b3efabed2a Try to make the python bindings tests work with an out of source tree build.
This is almost ok, but it uses the schemas from the install tree.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23457 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-11-29 06:24:20 +00:00
Mike Alexander 27424d0e1c Make the test-dynload test work in the X11 version on MacOSX.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23456 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-11-29 06:24:13 +00:00
Mike Alexander 5cff297872 Work around WebKit bug 119003 by flushing events when removing a page from a window.
See <https://bugs.webkit.org/show_bug.cgi?id=119003>

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23440 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-11-26 05:36:49 +00:00
Mike Alexander 71a50a8bb4 Update the progress bar while loading the price DB from an XML file.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23429 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-11-22 21:07:51 +00:00
Mike Alexander 716497934c Don't write the default currency symbol to the output file.
Patch by Frédéric Perrin.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23419 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-11-21 04:57:30 +00:00
Mike Alexander 390c14aec2 Decompress zipped XML files ourself instead of letting libxml2 do it.
As of version 2.9.1 it has a bug that causes it to fail to decompress certain files.
See https://bugzilla.gnome.org/show_bug.cgi?id=712528 for more info.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23412 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-11-19 03:47:07 +00:00
Mike Alexander d6a8f9c0ea Add missing semicolon and only dump transaction when debugging.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23407 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-11-17 06:32:08 +00:00
Mike Alexander 679e78e45c Turn off the scheme compiler's "possibly unbound variable" warnings.
In guile 2.0 we get nearly 7500 of them loading the scheme files.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23402 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-11-16 22:59:00 +00:00
Mike Alexander 7942b9c11e Collapse the two transaction currency scrubbing functions into one and fix some bugs.
The most serious bug was that it would, in some cases, set the transaction's currency
to a non-currency commodity.  It also sometimes set the currency directly without calling
xaccTransSetCurrency which skipped a number of side effects.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23387 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-11-11 03:09:57 +00:00
Mike Alexander b205a7713d Handle multi-currency transactions in registers without a default currency.
Editing a multi-currency transaction in a serach results register sometimes
sets the exchange rate to 1 instead of the value you want.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23384 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-11-08 04:53:10 +00:00
Mike Alexander 1cfa86695a Guard against bad parameter to gnc_plugin_page_invoice_summarybar_position_changed.
This avoids the crash in bug #710979 but doesn't fix the underlying problem.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23346 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-28 19:17:00 +00:00
Mike Alexander 45f18a7eff Add --with-xdg-data-dirs to specify default search path for XDG data directories.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23343 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-27 21:57:42 +00:00
Mike Alexander 0c5c0c7e19 Fix a typo in --with-qt3-wizard-package.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23342 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-27 21:57:32 +00:00
Mike Alexander d1668d5f39 Use ";" as seperator characer since that's what g_key_file_get_keys wants.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23305 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-20 03:41:17 +00:00
Mike Alexander 0efd34e4ff Eliminate null entries in path lists in environment_override.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23304 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-20 03:37:43 +00:00
Mike Alexander 6591be1005 Use the compile time value of XDG_DATA_DIRS to set the default run time value.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23303 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-10-20 03:34:20 +00:00
Mike Alexander 86434e10e5 Add back, and bring up to date, the debugging function qof_book_print_dirty.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23072 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-29 05:57:52 +00:00
Mike Alexander d81cb73e0c Make it possible to post multiple invoices from the find dialog.
GnuCash was crashing if you searched for all unposted invoices, selected two or
more of them, and posted them.  This was because the list of invoices to be posted
changed while it was being processed.  As part of fixing this the prompt for post date,
due date, etc. will only be given once, not once per invoice.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23071 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-29 05:57:44 +00:00
Mike Alexander e7d58f756a Fix the crash that occurs when duplicating multiple invoices from Find results.
The biggest problem was that it was adding an invoice's entries to both the old
and the new invoice when duplicating the invoice.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23070 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-06-29 05:57:35 +00:00
Mike Alexander d339141394 Round properly when computing fraction of the transaction's value due to a given split.
Also use GNC-DENOM-AUTO instead of a constant zero when appropriate.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22976 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-05-12 03:41:41 +00:00
Mike Alexander d9d56620f5 Quote the python path in case it has blanks in it.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22953 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-05-05 21:57:35 +00:00
Mike Alexander f655797fac Fix test for Python to avoid error message
Getting error like
../../gnucash/configure: line 23573: x/opt/local/bin/python: No such file or directory

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22946 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-05-04 18:38:41 +00:00
Mike Alexander 01e0693a23 Compile md5.c with "-fno-strict-aliasing".
The function md5_finish_ctx dereferences type-punned pointers which
breaks strict aliasing rules.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22832 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-03-24 00:03:54 +00:00
Mike Alexander 28749fb1c3 One more try to get initialization right.
This doesn't change things unless --add-price-quotes is given.  If it is then it must be
handled before gtk is initialized since DISPLAY might not be set which will cause gtk
initialization to fail.  This happens when running the X version of GnuCash from launchd
on a Mac to get price quotes updated.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22831 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-03-23 06:41:09 +00:00
Mike Alexander 9ba6e69d5e Avoid a crash when entering invalid dates (e.g., enter "111" for a transaction date).
gnc_parse_date is ignoring the return code from qof_scan_date which causes it to
send uninitialized values to gnc_mktime which crashes if the date is too ridiculous.
Presumably this worked before because mktime took anything without crashing.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22755 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-02-06 04:24:38 +00:00
Mike Alexander 9133c9cfe3 Use gnc-commodity-equiv to compare commodites, not equal?
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22752 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-02-04 03:15:44 +00:00
Mike Alexander e4dced2d99 Allow the price quotes perl script to return multiple quotes on a single call.
This makes it easier to add historical prices using a different perl script.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22751 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-02-04 02:32:50 +00:00
Mike Alexander 8e67373b03 Improve HTML account table generator
Make it possible to add to an existing row and do a better job of
keeping track of whether any values were display for child accounts.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22750 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-02-04 00:50:13 +00:00
Mike Alexander 5c5b6ed77c Do a better job of calculating debit and credit fractions.
Make gnc_split_register_set_cell_fractions agree with
gnc_split_register_get_debcred_entry.
If the account for a split changes recalculate the fractions.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22736 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-01-30 05:22:46 +00:00
Mike Alexander 31d6c41f5e Do a better job of prompting for an exchange rate only when needed.
If the debit or credit value of a split changes, prompt for an exchange rate.
Don't prompt for an exchange rate in a register that doesn't have a rate cell
(and fix a bug so that it knows that portfolio registers don't have one).
If the transaction has been autofilled and edited start with a nearby rate
from the prices DB.  If it is an existing transaction start with the exchange
rate it already has.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22735 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-01-30 05:22:38 +00:00
Mike Alexander e48fb17a13 Don't store a negative reconcile interval.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22723 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-01-22 22:25:31 +00:00
Mike Alexander 18bb5e843d Fix gnc_difftime so it is the same as difftime, which it replaces.
It was computing the negative of the expected value.  The most obvious
effect of this was that the reconcile interval became negative when you
reconciled an account so each reconciliation was earlier than the previous.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22688 57a11ea4-9604-0410-9ed3-97b8803252fd
2013-01-01 00:10:07 +00:00
Mike Alexander ba9b85a260 Use the correct fraction when editing expanded multiple currency transactions.
When a transaction is expanded and trading accounts are in use, the debit
and credit cells contain values in the split's commodity not the transaction's
currency.  For example if you have a transaction involving JPY and USD
currencies and the transaction's currency is JPY, you can only enter whole
dollar amounts in the USD splits.  This fixes this problem.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22673 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-19 05:34:48 +00:00
Mike Alexander adfc01fa2a Another but in r22646, still getting the existing price check wrong.
It's a long-standing rule that I don't do numbers well.  Third time's
a charm, I hope.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22664 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-18 06:07:46 +00:00
Mike Alexander a8ca64a2f0 Fix r22656 so it compiles: delete duplicate def of scm_to_int64.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22661 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-17 05:35:41 +00:00
Mike Alexander 060492194e Fix a bug in r22646: incorrect test for equivalent price already in price DB
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22660 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-17 05:35:34 +00:00
Mike Alexander 4af03554c6 Call gnc_split_register_current_trans_expanded instead of duplicating it.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22659 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-17 05:35:27 +00:00
Mike Alexander 8d32361ede Improvements to exchange rate dialog.
Use a price on the same day as the transaction as default if there is one.
Don't add a new price to the price DB if the nearest one on the same day
is equivalent to the one being added.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22646 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-13 05:13:49 +00:00
Mike Alexander 6ed3bfa6a3 Better detection of unbalanced transactions with trading accounts.
A transaction's value should be balanced independently in trading and
non-trading splits to be considered balanced.  Incorrect adjustment
of exchange rates on existing splits can cause this to be an issue.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22645 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-12-13 05:13:42 +00:00