Mike Alexander
29a92431cb
Fix sigfigs(n) rounding to work when the input is bigger tnan 10**n.
...
For example rounding 1234567/1 to 6 significant figures would fail.
2017-08-22 00:47:08 -04:00
Mike Alexander
57638161f2
Fix numerator overflow constructing GncNumeric from 96.16
2017-08-22 00:35:10 -04:00
Mike Alexander
00c7089ecb
Add tests for converting doubles 96.16 and 9616000000.0 to GncNumeric.
2017-08-22 00:30:28 -04:00
Mike Alexander
f5c864532f
Add a couple of directories containing dependencies of libtest-core-guile.
...
Without this the build fails the dependencies are loaded from the
installed version or the build fails if GnuCash is not installed..
2017-08-21 23:47:19 -04:00
Mike Alexander
ce83251bd0
Fix a minor typo.
2017-04-10 01:53:04 -04:00
Mike Alexander
c7226ddd4f
Delete left over line from previous merge conflict.
2017-04-10 01:37:23 -04:00
Mike Alexander
ce79222f05
Merge branch 'maint'
2017-04-10 01:27:47 -04:00
Mike Alexander
a2687bcbe3
Fix the SWIG Guile wrapping of functions that have a "struct tm" parameter.
...
The biggest problem was that a pointer to an out of scope struct tm was
passed to the wrapped function. With opt level 2, clang doesn't bother
setting the contents of the struct since it goes out of scope without being
used. This caused the transaction report to never report anything since
the start and end times it got were ridiculous.
Also most functions that take a struct tm pointer can change the contents
of the struct (if only to normalize it) so pass the new values back to Scheme.
Finally all calls to gnc_localtime and gnc_gmtime from Scheme leaked a struct tm
and calling gnc_tm_free from Scheme is a really bad idea so don't wrap it.
2017-04-09 16:25:45 -04:00
Mike Alexander
cdc94c7131
Calling sigfigs_denom with a zero crashes due to a divide by zero.
2017-04-08 19:48:23 -04:00
Mike Alexander
6933ab765d
Add an XCode target to run the numeric unit tests and rename the main target to GnuCash.
2017-04-08 19:48:12 -04:00
Mike Alexander
85d2442521
Update XCode file lists and sort them alphabetically.
2017-04-08 19:47:59 -04:00
Mike Alexander
d18fce775f
Fix a crash in scrub_sx_split_numeric introduced in b3eb9d0.
2017-04-08 19:41:21 -04:00
Mike Alexander
bfa5090db9
gnc_numeric_convert should return an invalid number unchanged instead of crashing.
2017-04-08 19:40:08 -04:00
Mike Alexander
2b777b9848
Remove the xxx_with_error functions from Python bindings.
...
They were removed from GnuCash in b199593 In January.
2017-03-26 19:19:11 -04:00
Mike Alexander
d4bbede08f
Set val_imbalance in gnc_transaction_balance_trading.
...
When the code was refactored in 61973a8 the return value from the new
function gnc_transaction_get_commodity_imbalance was ignored. This had
the effect of using an uninitialized variable to set the value in a new
trading account split that is not for the transaction's currency. That
means that multicommodity transactions created with this bug and trading
accounts on will not be balanced.
2015-11-17 19:07:45 -05:00
Mike Alexander
9b3711533f
Remove the code in on_matcher_ok_clicked that builds refs_list.
...
The use and release of refs_list was removed 7358bcc in August 2012 and
since then on_matcher_ok_clicked has been leaking a GSList on every call.
2015-11-17 19:07:37 -05:00
Mike Alexander
104de59519
Avoid assert in gnc_split_register_balance_trans if default_account is null.
2015-11-17 19:07:19 -05:00
Mike Alexander
fc32f66404
Make indirect_balance_conversion work (and faster)
...
extract_common_prices was only looking at the first price on the "to" list
and there's no point in getting a to list if the from list is empty.
2015-11-11 22:49:57 -05:00
Mike Alexander
0637f65fa3
Add debugging function price_list_dump.
2015-11-11 22:49:50 -05:00
Mike Alexander
7c744d644b
Fix the "lookuo ... any_currency" functions to work right.
...
They were broken in 3a0ec89c due to a lack of understanding about how
gnc_pricedb_foreach_price works.
2015-11-11 22:49:42 -05:00
Mike Alexander
ed776a73f0
Improve performance of price editor dialog.
...
Add new functions to get the number of prices and the get a price by
index for a given commodity. Use these instead of building a list of all
prices several times for each price.
2015-11-11 22:49:25 -05:00
Mike Alexander
310be62ed3
Add some better comments.
2015-11-07 19:09:11 -05:00
Mike Alexander
7fcf6a1301
Make sure commodity-tz-quote-triple->price always returns a value.
...
Because of misplaced parens it was not returning a value if no price
for the same day was in the price DB.
2015-11-07 19:09:11 -05:00
Mike Alexander
3a0ec89c06
Optimize pricedb so it works better with really big price lists.
...
Opening my accounts file took over 10 minutes before this change, most of
it spent populating the account balances in account tree, and most of that
spent in g_sort_list. Expanding or collapsing subtrees in the account tree
also took several seconds. This change reduces the use of g_sort_list and
reduces the length of lists sorted when it is used. Opening the file is
now only a few seconds slower than before the PriceDB changes.
2015-11-03 18:09:55 -05:00
Mike Alexander
f2fa80bffb
Update XCode project for C++ file name changes.
2015-11-03 18:09:43 -05:00
Mike Alexander
60ae86d178
Check for a duplicate price in add_price before adding it to the list instead of after.
2015-11-03 18:08:49 -05:00
Mike Alexander
c7f87f253b
Don't leak the list returned by pricedb_get_prices_internal.
2015-11-03 17:46:12 -05:00
Mike Alexander
49cd682665
Merge branch 'maint'
2015-10-21 15:18:34 -04:00
Mike Alexander
38bea1035e
Merge branch 'maint'
2015-08-10 03:29:13 -04:00
Mike Alexander
054e6f7a22
Avoid passing invalid arguments to functions to get rid of some non-fatal asserts.
2015-08-10 03:16:45 -04:00
Mike Alexander
1e16ba6c14
Quote the date returned by get_quote_time so Scheme can read it.
2015-08-07 19:57:17 -04:00
Mike Alexander
655c04bd68
Avoid passing invalid arguments to functions to get rid of some non-fatal asserts.
2015-08-07 19:57:17 -04:00
Mike Alexander
7e95ac28a7
Check for a null pointer for a credit or debit formula in gnc_sxed_check_consistent.
...
This got dropped when qof_instance_get replaced direct KVP access and it makes
it impossible to edit a scheduled transaction since splits can't have both a credit
and debit value.
2015-08-07 19:56:52 -04:00
Mike Alexander
82f0e28685
Make it possible to set variables in SX "since last run" dialog.
...
When gnc-numeric.c was converted to C++, gnc_numeric_equal was changed so
that an invalid number is equal to anything. The SX since last run dialog
initializes unset variables to invalid numbers which means that whatever you
type is equal to what is already there and is ignored.
2015-08-07 19:50:01 -04:00
Mike Alexander
0db17f1094
Bug 752686: Initialize temp GValues in xaccAccountGetReconcileLastInterval.
2015-07-22 17:51:37 -04:00
Mike Alexander
1fa94a7888
Some changes XCode wanted to make in the source control information it keeps
2015-07-22 17:51:30 -04:00
Mike Alexander
bf542713c4
Keep the XCode project up to date with source tree changes
2015-07-22 17:51:18 -04:00
Mike Alexander
0017aa6edc
Support version 3 tzfile format which is almost the same as version 2.
...
See ftp://ftp.iana.org/tz/code/tzfile.5.txt.
2015-05-07 03:15:28 -04:00
Mike Alexander
541c779a13
Use the correct size for time offsets when parsing a tzfile.
...
A version 1 tzfile alwasy has 4 byte offsets and a version 2 has
8 byte offsets in the second half of the file.
2015-05-07 03:15:21 -04:00
Mike Alexander
56441bd8c7
Fix an error in 906ed1fe found by clang:
...
error: logical not is only applied to the left hand side of this comparison
2015-03-03 21:28:24 -05:00
Mike Alexander
f5c15214a3
Merge branch 'maint'
2015-03-03 21:27:14 -05:00
Mike Alexander
8728603926
Bug 745354: Enhance the Find Transactions dialog
...
Make it possible to define search criteria that consist of multiple terms
anded or ored together. Use this to define a new criterion to look for specified
text in any of the Description, Notes, or Memo fields.
2015-03-03 21:22:53 -05:00
Mike Alexander
e9972be932
Fix some bugs found by SWIG version 3.0.5.
...
Prior to version 3.0.3 SWIG silently ignored invalid preprocessor directives.
See <https://github.com/swig/swig/issues/217 >
2015-02-23 18:52:43 -05:00
Mike Alexander
2493cebbb8
Merge branch 'maint'
2015-01-20 00:59:14 -05:00
Mike Alexander
383d16609c
Advanced portfolio should respect report date when looking for other income/expense.
2015-01-20 00:58:54 -05:00
Mike Alexander
da1384e20d
Merge branch 'maint'
2015-01-19 00:29:08 -05:00
Mike Alexander
79ad39095c
book.not_saved should be book.session_not_saved
2015-01-19 00:22:06 -05:00
Mike Alexander
67edea72ca
Bug 739228 - Advanced Portfolio report: wrong calculation of Value
...
Correctly convert the value into the report's currency.
2015-01-18 23:16:09 -05:00
Mike Alexander
13abe849e5
Improve income and expense reporting in advanced portfolio report
...
Look for transactions from the parent account to an income or expense
account whose name matches the name of the stock account.
2015-01-18 23:16:03 -05:00
Mike Alexander
80d65c8efc
Accept prices of the form n.nnne[+-]nn, i.e. with an exponent.
...
An example requiring this is currency conversion from IDR to USD.
2015-01-18 23:13:45 -05:00
Mike Alexander
778f9450c4
Tell Guile (and others) to look in install/lib/gnucash for libraries.
...
Without this Guile can't find libgncmod-engine and GnuCash won't start.
I don't know how this worked before, perhaps because the correct path
was in src/bin/overrides/gnucash-env.in
2014-12-23 10:04:04 -08:00
Mike Alexander
4a7913289c
Tell Guile (and others) to look in install/lib/gnucash for ligraries.
...
Without this Guile can't find libgncmod-engine and GnuCash won't start,
at least sometimes.
2014-12-21 22:54:24 -05:00
Mike Alexander
735ee38b65
Revert "Some type mismatch fixes to make it build with clang in MacOSX Mavericks."
...
This reverts commit 78fea12afc .
2014-12-11 17:24:48 -05:00
Mike Alexander
f4168e108b
Update XCode project for recent C++ related changes
2014-12-11 02:59:37 -05:00
Mike Alexander
09145fe11e
Tell Guile (and others) to look in install/lib/gnucash for ligraries.
...
Without this Guile can't find libgncmod-engine and GnuCash won't start.
I don't know how this worked before, perhaps because the correct path
was in src/bin/overrides/gnucash-env.in
2014-12-11 02:59:31 -05:00
Mike Alexander
78fea12afc
Some type mismatch fixes to make it build with clang in MacOSX Mavericks.
...
These may not be the best fixes, but they make things build again with
XCode 6.1.1 in MacOSX 10.9.5.
2014-12-11 02:59:21 -05:00
Mike Alexander
a61f61406f
Fix line endings in repository to match recent change to .gitattributes
2014-12-11 02:55:06 -05:00
Mike Alexander
bd8ce2f7cf
Fix line endings in repository to match recent change to .gitattributes.
2014-12-11 02:50:59 -05:00
Mike Alexander
48c24d9936
Merge branch 'maint'
2014-09-02 00:21:24 -04:00
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
18666f1ed2
Merge branch 'maint'
2014-08-31 18:49:35 -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
1134d64a35
Merge branch 'maint'
2014-08-14 17:18:51 -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
f4d2cc2863
Remove an AC_MSG_CHECKING/AC_MSG_RESULT that is redundant and confusing.
2014-08-14 17:11:49 -04:00
Mike Alexander
0c41f3bc5e
Merge branch 'maint'
2014-07-13 22:50:30 -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
8b76ff21a2
Use symbols to access lot owner type and owner GUID properties.
2014-07-05 01:12:20 -04:00
Mike Alexander
bacc0b2a65
Fix crash in gncOwnerGetOwnerFromLot due to clobbered stack variable.
...
The "owner-type" lot property is 64 bits, don't store it in a 32 bit variable.
2014-07-05 01:12:12 -04:00
Mike Alexander
d338982828
Properly nest AC_MSG_CHECKING and AC_MSG_RESULT calls to avoid confusing output.
2014-07-02 15:27:59 -04:00
Mike Alexander
97618e00c8
Use guint64 instead of uint64_t with G_GUINT64_FORMAT to avoid warnings.
2014-07-01 23:29:35 -04:00
Mike Alexander
84384ea565
Merge branch 'maint'
2014-07-01 22:51:30 -04:00
Mike Alexander
19737113ad
Merge branch 'maint' into 'master'
2014-07-01 16:29:34 -04:00
Mike Alexander
81fb773856
Merge branch 'maint'
2014-05-25 19:10:03 -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
afe7692293
Merge branch 'maint'
2014-05-13 22:46:40 -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
232f4adc70
Update the XCode project for C++ changes
2014-05-07 16:32:05 -04:00
Mike Alexander
e818c21aa0
Merge branch 'maint'
2014-05-05 16:32:02 -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
c7f4bf7fed
Merge branch 'maint'
...
* Fix price quotes after removal of yahoo-get-historical-quotes
* calculate num-columns-required in transaction report correctly
* Additional changes to column calculations in transaction report
* Fix configure.ac code that customizes parameters for specific gcc versions
* Ignore SIGTTOU while importing Python console class.
2014-04-27 16:42:34 -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
c2c246ccf8
Bug 729001: Fix a minor typo affecting the profile option in the previous commit
2014-04-26 20:20:32 -04:00
Mike Alexander
b32f9d2a59
Bug 729001: fix more build errors related to partial switch to C++.
2014-04-26 19:38:35 -04:00
Mike Alexander
8bbd87fd46
Merge branch 'maint'
...
* Use libsecret if available
* correction in version number in NEWS history re 2.6.3 and 2.6.2
* deletion of duplicate lines in src/engine/gnc-commodity.c
2014-04-25 19:45:28 -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