Commit Graph

16363 Commits

Author SHA1 Message Date
Bob-IT
7e7b02af6d Correct Spelling Mistake
On line 217 ASSET is spelt as ASSSET
2015-12-06 21:50:08 +01:00
Geert Janssens
e410e05da7 Followup on bug 682800 to fix row balances in register reports
Due to the changes done for bug 682800 the row balances for the account report
no longer matched the row balances of the original register. This commit
should fix that for a consistent experience.
2015-12-04 18:50:49 +01:00
Peter Broadbery
5a381125ae Some fixes to the previous commit so that it works on both guile-1.8 and 2.0 2015-12-01 14:52:03 +01:00
John Ralls
7cf84db859 Revert the Language-Team in ar.po.
Submitter incorrectly set it to the Translation Project.
2015-11-19 09:44:57 -08: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
Peter Broadbery
3e7c8fa45a Move test-account and test-split into engine/test directory 2015-11-13 21:12:48 +00:00
Peter Broadbery
13c7abc978 Moved test-extras.scm to engine directory. 2015-11-13 20:33:20 +00:00
Peter Broadbery
c26b81bff8 cash-flow.scm: Use hashtables for accounts as well 2015-11-12 20:46:14 +00:00
Peter Broadbery
eb600c79a4 engine-utilities.scm: Add a couple of hashtable functions. 2015-11-12 20:43:58 +00:00
Peter Broadbery
cca9cc7c22 cash-flow.scm: Use a hashtable instead of a list.
This removes O(n^2) behaviour in the number of splits.
2015-11-12 20:39:02 +00:00
Peter Broadbery
5ff205d41f engine-utilities.scm: Add a specialised hashtable. 2015-11-12 20:38:49 +00:00
Peter Broadbery
526fd82ca8 cashflow: use the much faster gnc:account-get-trans-type-splits-interval
This retrieves all the splits we need, and much faster.
2015-11-12 20:29:27 +00:00
Peter Broadbery
8d12338244 Add cashflow test 2015-11-12 20:29:27 +00:00
Peter Broadbery
516b3025b1 report-utilities: Add a very small test to show that splits are unique
for account-get-trans-type-splits-interval
2015-11-12 20:29:26 +00:00
Peter Broadbery
6a8e97600f cashflow: Further separate work into a per-split section. 2015-11-12 20:29:26 +00:00
Peter Broadbery
5d98d4af9d standard-reports/cash-flow.scm: break out main calculation part
This adds a function cash-flow-calc which does most of the donkey work and
can be tested independently of report generation.
2015-11-12 20:29:23 +00:00
Peter Broadbery
b47f04539e Move account & split.scm to engine-utilities 2015-11-12 20:26:18 +00:00
Peter Broadbery
8dfea02da7 reports: Add account and split module, plus tests.
Remove common functions from the budget and cashflow reports.
Add into separate modules, plus some tests for these newly exposed
functions.
2015-11-12 18:17:32 +00:00
Peter Broadbery
f9ab945cad Add and use a macro for loading modules. 2015-11-12 18:17:32 +00:00
John Ralls
fa4532b603 Updated Arabic Translation by Abdulsalam Alshilash. 2015-11-11 08:44:35 -08:00
Bill Nottingam
1a92dad9d0 Bug 742321 - Reset temporary prefs on application startup 2015-11-10 21:54:38 +01:00
Geert Janssens
68f1db9ed6 Bug 756720 - configure fails to find libgoffice 0.10-10 (0.10.18-1)
While we can't support libgoffice 0.10 because that would require gtk3
we can improve the error message if no libgoffice 0.8.x version is found.
2015-11-03 12:19:52 +01:00
Mark Haanen
16bc91d6c9 Add new account chart for Duch small businesses.
In the Netherlands, several parties have created an account structure for standardized information exchange. This file provides a GnuCash translation of this (public domain) structure.
2015-11-03 12:00:22 +01:00
root
4c0dbb1748 disable recursion for balance and balance (usd)
https://bugzilla.gnome.org/show_bug.cgi?id=647952
2015-11-01 13:14:48 +01:00
Geert Janssens
21525713a3 Reduce code duplication 2015-11-01 11:18:26 +01:00
yomlogs
f7781681bb Bug 757378: display the user-defined display symbol for non-currency commodities. 2015-11-01 11:18:25 +01:00
Mechtilde
b047467e3b some more German translation 2015-10-31 19:53:36 +01:00
Mechtilde
e7378e876d more corr in German translation 2015-10-31 19:53:36 +01:00
Mechtilde
a7248b24d4 corr translation in German 2015-10-31 19:53:36 +01:00
John Ralls
d061f6e962 Don't require prices in Scheduled Transactions with marker commodity splits.
Bug 754192 - Since Last Run Dialog asks for security price even if not needed
Bug 662126 - Cannot create scheduled transaction for dividend reinvestment

If a split in an SX has a 0 amount, don't make its commodity the transaction
commodity, set the multi-commodity flag, or create a variable for it.

Make the warning about not being able to auto-create SXes with variables
or multiple commodities more explicit about the latter.
2015-10-30 14:07:24 -07:00
John Ralls
ce838d3cfc Rename GNOME_COMPILE_WARNINGS to just COMPILE_WARNINGS.
Poaching someone else's macro name is a really dumb idea, because aclocal
looks in our macros directory only if it can't find the macro in the system
directories. Our config code doesn't work with Gnome's macro, it exports
WARN_CFLAGS rather than modifying CFLAGS directly the way ours does.
2015-10-27 17:25:48 -07:00
John Ralls
f3de156e65 Revert "Use gnc_pricedb_has_prices instead of testing the return value of get_prices."
This reverts commit ae35dbb464.
because the return value was actually used later on.
2015-10-27 14:08:59 -07:00
John Ralls
f5cf2ba542 Merge branch 'single-price' into maint 2015-10-24 14:52:49 -07:00
John Ralls
362b9e3d7c Fix leaking QofBook in most of the engine unit tests.
The problem is that QofBook is not a well-formed GObject and doesn't clean
itself up properly when its ref count goes to zero. qof_book_destroy() must
be explicitly called on it. An interesting side effect is that QofObject
keeps a list of all of the books ever opened and not properly destroyed and
registering a class (in this case GNCPriceDB) tries to create that class's
instance in all of those leaked books. Since they already have one, the
instantiation code raises a critical error and the test program fails.
2015-10-24 14:15:23 -07:00
John Ralls
ae35dbb464 Use gnc_pricedb_has_prices instead of testing the return value of get_prices. 2015-10-24 13:24:13 -07:00
John Ralls
dfc0b28bed Remove be->price_lookup conditional clauses.
No backend implements price_lookup, and the struct member is removed from
master. Even if it had existed these clauses wouldn't actually do anything.
2015-10-24 13:24:13 -07:00
John Ralls
4bfe29aca3 Prevent F::Q from updating PRICE_SOURCE_EDIT_DLG prices. 2015-10-24 13:24:12 -07:00
John Ralls
9a53cc8f58 Remove unnecessary and harmful price rounding. 2015-10-24 13:24:10 -07:00
John Ralls
7298a46999 Implement user-entered-price preference.
Add user:price as a source and prefer values with lower PriceSource enum
values over higher ones: In other words a price with a lower PriceSource
value (e.g. user:price-editor) will overwrite one with a higher value (e.g.
user:split-register) and not the other way around.
2015-10-24 13:22:51 -07:00
John Ralls
811a30db4a Fold separate call of gnc_pricedb_lookup_latest() into lookup_price.
Requires a 3-state enum instead of a boolean for the second arg to lookup_price.
2015-10-24 13:22:46 -07:00
John Ralls
70493537e9 Use an enum for internal representation of Price Sources.
Strings are still used for storage and display.
Purpose is to make multiple comparisons and conditional setting more
convenient.
2015-10-24 13:20:29 -07:00
John Ralls
ab15ca8f84 Extract function lookup_price in dialog_transfer.c 2015-10-24 13:20:28 -07:00
John Ralls
76c1259f1b Adjust split_register to match transfer dialog checking inverted prices. 2015-10-24 13:20:28 -07:00
John Ralls
348fe45b76 Fix missing initialization of price_value. 2015-10-24 13:20:28 -07:00
John Ralls
a40bc92d34 Change CURRENCY_DENOM to 10000, matching what F::Q returns. 2015-10-24 13:20:27 -07:00
John Ralls
6e14137710 Extract function round_price(), consistently apply it. 2015-10-24 13:20:23 -07:00
John Ralls
f30b38b5c3 Create a rounding policy for prices in the pricedb.
Currency-currency prices will be priced in the smaller currency so that
the price > 1 and will be rounded to 3 digits after the decimal.
Commodity-currency prices will be priced in the currency and rounded to
the currency's scu * 10000.
This affects only prices stored in the pricedb. Prices in splits will
continue to be computed from value/amount.
2015-10-24 13:19:05 -07:00
John Ralls
a8d4eaae5e Rename _gnc_xfer_dialog_set_exchange_rate and use it consistently.
gnc_xfer_dialog_set_price_edit says what we're actually setting.
2015-10-24 13:18:39 -07:00