Commit Graph

16450 Commits

Author SHA1 Message Date
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
Geert Janssens
219a06b5f7 Merge branch 'maint'
* Revert one patch for bug 740471 - it caused a different segmentation fault
* Bug 738749 - Broken account template en_GB/uk-vat.gnucash-xea
* Bug 721196 - Fixed for locales where decimal point is a comma
* Bug 672760 - Postponed transaction applied invalid date
* Added Lithuanian language business accounts
* Bug 742332 - German tax report uses US tax quarters and not real quarters
2015-01-18 16:07:14 +01:00
Geert Janssens
d9900a7b4f Use the enum name instead of a number for GDateMonth
This is needed for c++, not really for c.
2015-01-18 16:05:15 +01:00
John Ralls
46a3c5fb89 More dithering with Clang error messages.
This reverts the bits in qof that were originally changed in 02acf2b
because those changes applied to the C version of the messages but
not to the C++ version.
2015-01-17 17:22:07 -08:00
John Ralls
60b86ce80f Adjust gtest config & make for shared library use.
Because that's how Fedora packages it.
Also make it a default-if-found so there's no extra config required
on Debian and Fedora work-alikes.
Note that it won't work on Fedora18 because they provide a library for
gmock and it's a different version from gtest.
2015-01-17 17:07:57 -08:00
Geert Janssens
128bfb6bda One more nodist_ fix in qof
The source file in the nodist definition shouldn't
be included in the normal source definition
2015-01-17 22:27:03 +01:00
John Ralls
3d9258216e Restore nodist_test_kvp_value_SOURCES inadvertently removed in 97a689a. 2015-01-17 13:19:11 -08:00
John Ralls
f20140b774 Fix __func__ workaround for Clang 3.5.
So that make check works correctly; also affects Xcode 6, as Apple
Clang 6 is based on normal Clang 3.5.
2015-01-17 13:04:46 -08:00
John Ralls
7b5ae715e6 Make string lengths equal in test print of time zone name.
Windows uses a long time zone name which over-runs the buffer in
gnc_timespec_to_iso8601_buff(). Truncate the test string so that
it compares correctly.
2015-01-16 11:43:38 -08:00
John Ralls
1d3f486751 Minor fixups for tests in Windows. 2015-01-16 11:43:37 -08:00
John Ralls
97a689a83f Consolidate gtest tests in libqof/qof/test/Makefile.am. 2015-01-16 11:41:07 -08:00
Geert Janssens
98fe336430 Fix make distcheck
- make the Google Test Suite really optional (for now)
- add some missing scm files to POTFILES.skip
- add missing c++ header files in qof
2015-01-16 20:13:19 +01:00
Markus Blatt
a3cf7f2868 [Bug 742332] - German tax report uses US tax quarters and not real quarters.
Due a copy and paste the German tax report was still using the
US quarters. This wrong as the latter are not real quarters as in
Germany. To fix this we simply set  tax-qtr-real-qtr-year to 0 to
force real quarters. Thus changes to taxtxf.scm can be easily ported
to taxtxf-de_DE.scm
2015-01-16 17:49:54 +01:00
Romas
1b227b1abc Added Lithuanian language business accounts 2015-01-16 15:51:07 +01:00
John Ralls
1348d5b92a Remove deleted file qofmath128.c from EXTRA_DIST. 2015-01-16 06:48:56 -08:00
John Ralls
afaec37037 Bug 672760 - Postponed transaction applied invalid date
Part 2: GDate can represent a wider range that GDateTime, so make
sure that GDates outside of the range are clamped. The GDateTime
range is 1 - 9999 CE, more than wide enough for most purposes. GDate
can represent out to 65535CE, but the significant difference is that
a freshly-cleared GDate is 0CE, which GDateTime won't accept. That we
set to the Unix Epoch 0, 1970-Jan-1.

gnc_sx_incr_temporal_state can invalidate the gdate, so make sure that a
valid date is stored.

Adding the inst->temporal_state ptr to the sx->deferredList is wrong, it's
freed shortly after adding, causing later access to the freed ptr.
Add a clone instead.
2015-01-13 11:26:05 -08:00
John Ralls
7963421dd2 Bug 672760 - Postponed transaction applied invalid date
Part 2: GDate can represent a wider range that GDateTime, so make
sure that GDates outside of the range are clamped. The GDateTime
range is 1 - 9999 CE, more than wide enough for most purposes. GDate
can represent out to 65535CE, but the significant difference is that
a freshly-cleared GDate is 0CE, which GDateTime won't accept. That we
set to the Unix Epoch 0, 1970-Jan-1.
2015-01-11 13:57:32 -08:00
John Ralls
609ca72553 Bug 672760 - Postponed transaction applied invalid date, causing segfault
upon opening data file.
Part 1: Prevent the crash by skipping instances with invalid dates.
2015-01-11 10:27:16 -08:00
Mike Evans
403fdd30f0 Bug 721196 - Fixed for locales where decimal point is a comma. 2015-01-11 15:47:39 +00:00
Tom Lofts
c27bea6031 - REST API Example for Python Bindings #2
Enhancements include:
- manipulation of transactions, splits, vendors and bills
- add and edit functionality customers and invoices

Author: Tom Lofts <dev@loftx.co.uk>
2015-01-05 19:13:08 -08:00
Christian Stimming
39b4034e83 Update cmake build system with recent file additions. 2015-01-04 09:34:14 +01:00
Ralf Habacker
16a8ff5332 Bug 738749 - Broken account template en_GB/uk-vat.gnucash-xea.
Fix missing parent of first level accounts by comparing to the last correct kmymoney template import.
2015-01-03 16:40:10 +00:00
John Ralls
ca75bd9a17 Change comment to reflect kvp->properties. 2015-01-02 13:12:39 -08:00
John Ralls
94fbf97f90 Clean out a couple of unused variables left over from direct KVP. 2015-01-02 13:12:08 -08:00
John Ralls
09e8e245c4 Fix a couple of string leaks. 2014-12-30 16:50:18 -08:00
Geert Janssens
ad09bcfd4a Revert "Bug 740471 - Applying payment to invoice Segmentation fault"
This reverts commit a6d7184d83.
The patch had no effect on the bug at all and needlessly clutters the code.
2014-12-29 16:30:51 +01:00
John Ralls
9b1d8d150f Merge branch 'maint' 2014-12-26 13:32:57 -08:00
John Ralls
d5ade4cbc0 Fix typo in Transaction.c.
Thanks to Christoph Holterman for catching this.
2014-12-26 13:28:22 -08:00
Geert Janssens
24dff85985 Revisit "Bug 741810 - Compilation fails because of creating .gnucash"
Use the temp dir as base dir for .gnucash
in all cases where the home dir fails. This
is more than just if the home directory doesn't exist.

Also don't attempt to create the home directory.
2014-12-24 12:50:21 +01:00
John Ralls
cac896005c Merge branch 'maint'
With a change to xaccTransIsSXTemplate to work with the private kvp
change in master.
2014-12-23 18:39:56 -08:00
John Ralls
7e288d0446 Fix failure to load SX formulas, probably among other things.
Removing KVP_TYPE_BINARY from the enum shifted the values of KVP_TYPE_GLIST
and KVP_TYPE_FRAME, which made previously-stored values inaccessible.

Insert a placeholder to restore them to their original values.
2014-12-23 18:37:27 -08:00
John Ralls
3ae0c780b7 Extract function to clarify intent. 2014-12-23 10:04:16 -08:00
John Ralls
e2a85c417f Bug 741228 - "Red line" threshold applies to Template scheduled transactions
Check for a GNC_SX_ID kvp on the split to exclude SX transactions from being blocked.
2014-12-23 10:04:16 -08: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
Francisco
c52ada5121 Update Spanish translation 2014-12-23 18:36:11 +01:00
Geert Janssens
c569822897 Periodic merge of branch 'maint'
* Bug 740471 -  Applying payment to invoice Segmentation fault
* Fix Guile compiled path in environment.in
* Bug 739584 - gnucash-2.6.4 segfaults regularly on transfer
* Adjust #ifdef __clang__ to exclude clang versions > 6
* Replace GNC_HOME/bin with gnc_path_get_bindir().
* Tell Guile (and others) to look in install/lib/gnucash for ligraries.

Conflicts:
	src/bin/environment.in
	src/engine/test/utest-Account.c
	src/engine/test/utest-Split.cpp
	src/engine/test/utest-Transaction.c
	src/libqof/qof/test/test-gnc-date.c
	src/libqof/qof/test/test-qofbook.c
2014-12-23 17:48:50 +01:00
Geert Janssens
ca1d5a7382 Cherry-pick "Bug 741810 - Compilation fails because of creating .gnucash"
This was meant to go on maint first...
2014-12-23 17:28:27 +01:00
Geert Janssens
69355c0548 Bug 741810 - Compilation fails because of creating .gnucash 2014-12-23 17:19:00 +01:00
Geert Janssens
a5d77e4430 Move code to open report options dialog from guile to C
This code was switching a lot between the guile and C context.
This move at least reduces some of them. The switches can only
be eliminated completely when the options code itself gets
rewritten in C(++).
2014-12-23 12:03:38 +01:00
Geert Janssens
0820090e75 New business report for printing receipts
This report was originally developped by Manfred Usselman
Some small tweaks were needed to make it work on current master.

It is designed for and tested with a StarMedia TSP100
receipt printer using a 72mm  wide print roll.
However using a different css file the same report
can be adapted to any printer that can be directly
used via your OS' print system
2014-12-22 15:50:36 +01: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
John Ralls
2ceadfa3a0 Replace GNC_HOME/bin with gnc_path_get_bindir().
For consistency with the rest of the function.
2014-12-21 15:47:20 -08:00
John Ralls
02acf2b6f4 Adjust #ifdef __clang__ to exclude clang versions > 6
This works only with Apple clang; the regular clang is at version 3, but
hasn't been tested for what versions emit what sort of function signatures
to logs.
2014-12-21 12:55:07 -08:00
John Ralls
745ff9e519 Bug 739584 - gnucash-2.6.4 segfaults regularly on transfer .
Ensure that xferData is nulled after free and that client functions check
for the NULL.
2014-12-21 12:34:32 -08:00
John Ralls
a537ff052b Fix Guile compiled path in environment.in
Compiled files go to prefix/lib/guile/2.0/ccache, which isn't the same as
where the source files are stored (prefix/share/guile/2.0), so provide a
separate variable for it. Also don't throw away the user's value of
GUILE_LOAD_COMPILED_PATH in favor of GUILE_LOAD_PATH.
2014-12-21 11:13:27 -08:00
John Ralls
e55e7db9fd Remove note from the top of environment.in. It's obsolete. 2014-12-21 11:09:21 -08:00
lmat
7d5f0a66a0 Kvp-Frame test cases
Adding google tests for many of Kvp Frame's member functions. One
function in KvpFrameImpl, for_each_slot, should probably be something
like

template <typename T> void
for_each_slot (T & t, void * data) const
{
    std::for_each(......
    [&t, data] (... a)
    {
        t(a, data);
    }
}

This way, we could create a functor mock object for testing purposes,
but of course, pointers would still behave correctly.
2014-12-20 14:27:49 -08:00