Commit Graph

14713 Commits

Author SHA1 Message Date
Geert Janssens
4d81214bf2 Fix credit note duplication. It was not possible to duplicate a credit
note as an invoice (aka voiding a credit note).

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22211 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-06-06 13:52:45 +00:00
Geert Janssens
ed6cdb175c Cosmetic: move include to source file. It's not used in the header file.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22210 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-06-06 13:52:34 +00:00
John Ralls
9ba8d832ff Adjust test_gnc_sql_convert_timespec_to_string() for 64-bit time_t
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22209 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-06-06 13:23:31 +00:00
John Ralls
c58e86eff7 64-bit adjustments to test-gnc-date
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22208 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-06-06 13:23:13 +00:00
John Ralls
0cd7032a59 Consolidate some little-used convenience functions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22207 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-06-06 13:22:51 +00:00
John Ralls
c3d85783f0 Test gnc_sql_convert_timespec_to_string()
Note overridden failures on the second 3 values.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22206 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-06-06 13:22:33 +00:00
John Ralls
3c58ada1f1 Test of all major gnc-date functions, highlighting 2038 bug failures from using time_t on a 32-bit system.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22205 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-06-06 13:22:15 +00:00
J. Alex Aycinena
9fa5035107 Remove g_free of msg two lines before it is returned from function.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22204 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-06-01 22:59:48 +00:00
John Ralls
b391754ff6 Correct -Wunused warnings
The actual change to configure.ac (at line 1106) to enable -Wunused -- or rather to un-disable it -- is not included in order to not break the build for folks with buggy versions of swig.
(For example, https://sourceforge.net/tracker/?func=detail&aid=3530021&group_id=1645&atid=101645)

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22203 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-26 23:47:34 +00:00
John Ralls
894f0ed126 Set PYTHON_LINK_FILES to useful values.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22202 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-26 23:46:58 +00:00
John Ralls
fff094f98a Delete remaining swig-foo.c files with maintainer-clean
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22201 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-22 17:57:37 +00:00
John Ralls
8ff333ccaa Fix compilation on OSX
One can't link a library created with -module on OSX, but one can dload
a library compiled with -shared on both OSX and Linux.

Also cleaned out the old "make check" files from test/Makefile.am

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22200 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-22 17:57:22 +00:00
Phil Longstaff
f284ba731b Fix memory leaks found by unit tests/valgrind
Return value of g_build_filename() needs to be freed.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22199 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-21 22:36:15 +00:00
John Ralls
7423741ea3 Add EXTRA_CFLAGS for compiling on Win7
Configure gets confused by some gcc builtins on Win7: Disable them so that configure finds the right settings.

[BP]

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22197 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-21 22:10:00 +00:00
Phil Longstaff
0809170098 Fix some small problems (including a memory leak) found by running qof unit test with valgrind.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22193 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-21 18:35:59 +00:00
Phil Longstaff
140799c028 Add test-qof to svn:ignore
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22192 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-21 18:35:04 +00:00
Phil Longstaff
d58490b8e4 Update some svn:ignore properties
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22191 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-21 17:38:49 +00:00
Phil Longstaff
9267e80726 Since 2.32, GCache is deprecated and should be replaced by GHashTable.
In the new string cache (split out from qofutil.c/.h), the GHashTable has the
string as key and a small heap-allocated guint refcount as data.  The value is
allocated rather than being used by value because there is no way to just
modify the data field of an existing key.  The key would need to be changed at
the same time, which would free the old key value and invalidate all gchar
pointers of objects which have refs to the key.

Unit tests added as well.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22190 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-21 17:28:30 +00:00
John Ralls
43e1a7df34 [Bug #674862] Gnucash crashes after creating a new SX using the Mortgage Wizard and SQL Backend
Special-cases dbi_result_get_datetime returning -1 to work around a bug in MinGW's implementation of gmtime().

[BP]


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22188 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-21 15:48:41 +00:00
John Ralls
aa905346cb Revert gnc-backend-dbi.c from 22186, should be a separate commit.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22187 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-21 15:43:52 +00:00
John Ralls
5b602c3a93 Fix double definition of DEBUG_MEMORY
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22186 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-21 15:32:52 +00:00
Phil Longstaff
aeef9d36d0 Replace deprecated g_basename() by recommend g_path_get_basename()
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22185 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-20 21:24:14 +00:00
Phil Longstaff
18d6031f2a Remove invalid routine arg check
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22184 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-20 21:23:07 +00:00
Phil Longstaff
0a3c14ed4b Use new GncTaxTable g-object parameters
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22183 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-20 21:22:30 +00:00
Phil Longstaff
7ea5a2bf98 Convert DBI test to utest
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22182 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-20 21:21:09 +00:00
Phil Longstaff
d1fcb82ad0 Fix some g-object parameter types
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22181 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-20 21:18:45 +00:00
Phil Longstaff
083861e225 Add some more g-object parameters for GncTaxTable
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22180 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-20 21:18:08 +00:00
Phil Longstaff
5fba6638e3 Replace deprecated g_mapped_file_free() with recommended g_mapped_file_unref()
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22179 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-20 21:12:50 +00:00
Geert Janssens
e1956c80c7 Allow to change document type when duplicating an invoice.
This allows to quickly create a canceling credit note for an invoice.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22176 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-08 21:37:27 +00:00
Geert Janssens
f098ae2e39 Bug #674273 - fixes and enhancements to example simple_business_create.py
Patch by Jamie Campbell, with minimal correction to match the new ApplyPayment functions.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22175 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-08 11:39:25 +00:00
Geert Janssens
e7a2a8fbcb Add gnc{Owner,Invoice}ApplyPayment functions.
Most payment use cases don't need to know the internal lot juggling mechanism behind it.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22174 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-08 11:39:09 +00:00
Geert Janssens
dbcd08db01 Add getter/setter for fake Employee name propery.
This is done to get a more consistent owner interface and simplifies the python bindings

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22173 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-08 11:38:57 +00:00
Geert Janssens
572a4fb52c Remove some unused function declarations
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22172 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-08 11:38:39 +00:00
John Ralls
da6980afc2 [Bug 674862] Gnucash crashes after creating a new SX using the Mortgage
Wizard and SQL Backend

This addresses the crash reported on Ubuntu with Postgres by Krzysiek.
The stack trace he posted showed the crash was the result of
dereferencing a NULL GDate*, and this change protects against that. It
still doesn't address the more basic problem of why on Win32 and with
mysql and pgsql (but not SQLite3) the mortgage wizard is writing corrupt
dates.

[BP]

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22171 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-07 22:54:56 +00:00
Geert Janssens
26fd475dd2 Rearrange install-fq-mods.cmd to avoid duplicate code and make it easier to understand
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22170 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-06 21:19:34 +00:00
Geert Janssens
d2357b256a Bug #670355 - Automated install of Perl with Finance-Quote
With these changes install-fq-mods.cmd will automatically download and install
Strawberry perl if now perl version if found on the system.
Patches by Dave Roberts

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22169 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-06 21:19:24 +00:00
Geert Janssens
7dfb8145dd Remove empty lines from AC_CONFIG_SOURCES as this will cause the Windows build to fail
when using a git repo as source

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22168 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-05-06 18:03:41 +00:00
Geert Janssens
fa7bd291c7 Further tweaks to enable git on the windows build
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22167 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-28 16:18:29 +00:00
Geert Janssens
4faec91f26 Bug #674276 - fixes and enhancements to example test_imbalance_transaction.py
a) added usage information
b) put most everything into exception handling to prevent lock linger when a
problem occurs
Patch by Jamie Campbell

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22166 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-28 13:37:17 +00:00
Geert Janssens
f18688e2da Bug #673877 - fixes and enhancements to example script account_analysis.py
a) added usage information when not enough arguments added
b) put the majority of code into an exception handling block so that if
something goes wrong the session is closed.  Prior to this change a problem
would result in a lingering lock.
Patch by Jamie Campbell

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22165 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-28 13:37:07 +00:00
Geert Janssens
b5a56207ba Bug #673855 - fixes and enhancements to example script new_book_with_opening_balances.py
1) Fixed typo for "new book" session creation in_new=True -> is_new=True
2) Added usage information echo when script is invoked without correct number
of parameters
3) Put most of the operations into an exception handling block.  When an
exception occurs, sessions which were opened are closed.  Prior to this, any
error would result in a lingering lock.
Patch by Jamie Campbell

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22164 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-28 13:36:55 +00:00
Christian Stimming
08465a594a Bug #674494: Fix version and method of downloading isocodes in win32 packaging
Patch by Mark Jenkins

BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22157 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-22 20:51:16 +00:00
Christian Stimming
9d8fbe538e Bug #674495: Fix libbonoboui build for win32 packaging insists on availability of glade
Patch alters packaging/win32/libbonoboui-2.24.2.patch to not look for glade and not
build libbonoboui-2.24.2/glade

Patch by Mark Jenkins.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22156 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-22 20:49:01 +00:00
John Ralls
9c0e71c2e2 [Bug 674283] With mysql crash after deleting accounts included into a
budget

Never assume a pointer is NULL unless you set it to NULL!

BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22154 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-21 17:38:40 +00:00
John Ralls
3b058e0dcb [Testing] Fix potential leaks in Split teardown.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22153 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-19 20:11:53 +00:00
John Ralls
ae15ff46df Fix some scheme test program linkage failures on Wheezy.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22152 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-19 20:00:33 +00:00
John Ralls
3929c80288 Remove test obsoleted by r22001
Which rearranged the ApplyPayments code so that it's done from the
GncInvoice object instead of explicitly by the owner (or in this case,
GncCustomer).

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22151 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-19 20:00:18 +00:00
Christian Stimming
c725033cea Finally clean up linker flags so that windows build builds again as well.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22150 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-17 19:55:33 +00:00
John Ralls
88c384b7c3 Testing: Make libutest-Split.la "noinst-LTLIBRARY" instead of
test-engine-LTLIBRARY

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22149 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-17 00:45:58 +00:00
Christian Stimming
a77ee1bc6f Increase trunk requirements to gtk-2.24, glib-2.28.
This means SVN trunk does no longer support a stock RHEL6 distribution.
See http://lists.gnucash.org/pipermail/gnucash-devel/2012-April/033877.html
and http://lists.gnucash.org/pipermail/gnucash-devel/2011-November/032931.html
for the discussion.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22148 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-15 18:57:05 +00:00