Commit Graph

17005 Commits

Author SHA1 Message Date
Robert Fewell
0e7c7c3b42 Bug 706021 Add Other Account to CSV Transaction Import
This patch adds the option to specify the other account and memo
when doing a CSV import.
2015-12-02 14:23:24 +01:00
Rob Gowin
4ee5763075 Fix build issues
src/backend/sql/gnc-transaction-sql.cpp:
   Move inclusion of escape.h out of extern "C" block since
   escape.h is now C++ code.

src/backend/xml/gnc-backend-xml.cpp:
   Move inclusion of gnc-pref.s out of extern "C" block since
   gnc-pref.c is still plain C code.
2015-12-02 14:23:17 +01:00
John Ralls
b3cfef7084 Cast around unsigned-signed comparison warning.
From glibc when comparing snprintf() return value to a size_t.
2015-12-01 16:41:50 -08:00
John Ralls
29138bc793 Silence deprecation warnings.
Required because libdbi-0.9 emits them when using libdbi-0.8 API.
2015-12-01 16:40:31 -08: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
039a4336e2 Convert XML Backend to compile as C++. 2015-11-29 17:23:43 -08:00
John Ralls
0178492663 Convert SQL & DBI backends to compile as C++. 2015-11-29 17:23:43 -08:00
RobGowin
1c57e9c61d link gnc-gnome into gncmod-csv-exp 2015-11-23 15:25:43 -06: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
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
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
Robert Fewell
601abdf47d Bug 757532 [PATCH] Make start and end rows editable by keyboard 2015-11-10 21:29:58 +01: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
John Ralls
fdc9a6a199 Replace Math128 with GncInt128, add GncRational to Doxygen docs. 2015-11-07 13:10:01 -08:00
John Ralls
089817a9f6 Templatize the GncInt128 constructors.
Allows single or pair of arbitrary integral types to construct, without
explicitly creating all of the possibilities.
2015-11-07 13:10:01 -08:00
Rob.Gowin
05f08f330d Clean up bitrot to get CuteCash building again.
1. Use guile-2.0 instead of guile-1.8.
2. Set GNC_PLATFORM_POSIX on Unix (for gnc_timezone.cpp).
3. Pass guile include files when compiling cutecash.
4. Link Boost libraries.
5. Add -std=gnu99 to CMAKE_C_FLAGS.
6. Temporarily put -O2 in CMAKE_C_FLAGS since Fedora requires
    optimization for FORTIFY_SOURCE.  (Eventually with CMake
    we will have separate Debug and Release builds.)

Tested that cutecash builds and launches on OS X, Fedora 23 and Ubuntu 14.04.3.
2015-11-07 15:01:05 -06:00
Robert Fewell
d711b64f10 Bug 754533 Change finish page text for Search and General Journal register exports
Additionally, correct an error with add_account_name function.
2015-11-04 20:50:02 +01: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
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
Robert Fewell
d0fee72900 Bug 706021 New CSV Import Account Mappings.
This patch allows the saving of account name mappings
so these can be reused in later imports.
2015-11-03 11:16:18 +01:00
Robert Fewell
1ef201c7d1 Bug 706021 Rename and Move Imap functions.
This patch renames the Imap functions in Account.c and
adds them to the .h file to make accessible. Also added
a delete function to the non Baysian functions along with
a test.
2015-11-03 11:16:17 +01:00
Geert Janssens
ad2c36e545 Fix compiler warning 2015-11-03 11:16:16 +01:00
Geert Janssens
e0ca934438 Set num_accounts upfront for ordinary register exports 2015-11-02 12:30:19 +01:00
Geert Janssens
f41a214956 Avoid code duplication 2015-11-02 12:29:35 +01:00