Commit Graph

14551 Commits

Author SHA1 Message Date
Christian Stimming
ecdb6f078f Remove the separate "calculation" module and swallow it in app-utils.
Those few source files do not justify an extra loadable module. They are
just compiled-in into app-utils.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22075 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-11 22:05:22 +00:00
Christian Stimming
35ac83374e Replace g_list_append by g_list_prepend to increase performance.
To my surprise, this apparently also fixes a memory leak, but I don't know why.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22074 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-11 21:55:53 +00:00
John Ralls
62cca60116 New Perl program to create a skeleton test file from a C source file.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22073 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-09 00:07:13 +00:00
Christian Stimming
29503a26d7 Fix minor memory leak: Return value of gnc_uri_get_components must get free'd.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22072 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-08 22:48:09 +00:00
Christian Stimming
d90301b2bd Remove obsolete strspn() call that causes valgrind warnings about invalid read().
The strspn() call was added in r8500 but the usage of its return value
was removed in r10315, so it isn't neccesary anyway.

The macro GNC_DEPRECATED is defined nowhere and used nowhere else, so
we can remove that block altogether.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22071 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-08 22:47:59 +00:00
Christian Stimming
af0709b732 Fix memory leak: Missing regfree() after regcomp().
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22070 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-08 21:20:07 +00:00
Christian Stimming
4d871fc9fd Remove potentially abandoned file (that has a GPLv2-only license, too).
The last contributors here, Josh Sled and Chris Lyttle, have put their
code under "GPLv2 and GPLv3" license, see r22063, but I'm too lazy to
look up the copyright holders on the file as a whole so I'd rather remove it.

If someone wants to add a similar packaging file again, feel free to do
so, but please don't use GPLv2-only code to do so.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22067 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-29 20:50:52 +00:00
Christian Stimming
1bb34fbefa Bug #670727: Extend license of 3 files to be GPLv2 and GPLv3.
This has been granted by the gnumeric copyright holders.
See https://bugzilla.gnome.org/show_bug.cgi?id=670727#c7

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22066 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-29 20:50:40 +00:00
Mike Evans
105ab023f4 New plugin to import customers and vendors from a csv type file.
From a patch by Sebastian Held.
Again the CSV file is of fixed number of fields, similar to invoice/bill importer.
Please test this.
Field list:
id,  company,  name,  addr1,  addr2,  addr3,  addr4,  phone,  fax,  email,  notes,  shipname,  shipaddr1,  shipaddr2,  shipaddr3,  shipaddr4,  shipphone  shipfax,  shipemail
Vendors don't have shipping information so even though the fields have to exist, leave them empty.
The id field is optional, if empty a new id will be chosen. If an id is used this will UPDATE
a vendor/customer with the same id.  This may not be what the user wants.  Maybe this should
be optional/selectable behaviour.
To enable the plugin, add the line:
(gnc:module-load "gnucash/plugins/customer_import" 0)
to ~/.gnucash/config.user

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22065 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-28 18:38:26 +00:00
Christian Stimming
7d5443fee5 Bug #670727: Clarify license of a file to be GPLv2 and GPLv3
gnc-dense-cal.h: License remark was forgotten in r19507, but the author
Josh Sled agreed on GPLv2 and GPLv3 licensing in his gnucash-devel
message on 2010-08-28.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22063 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-24 20:15:15 +00:00
Mike Evans
04b4dce118 Fix gtk_entry_set_text error warnings.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22060 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-22 12:34:55 +00:00
Mike Alexander
d486d807c1 Fix r22010 to not crash if the current file has no company name.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22058 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-20 23:02:08 +00:00
Mike Alexander
bbf0f9ef17 Fix a warning due to the wrong declaration for the return value of gzopen.
The return value is off by a level of indirection, it should be a gzFile not
gzFile *.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22057 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-20 22:14:32 +00:00
Christian Stimming
a919d56e50 [cutecash] add gnc-features.[hc] to cmake. Follow-up to r21981.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22056 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-19 20:32:41 +00:00
Christian Stimming
79e82ef1de Bug #668693: aqbanking: Use "focus-out-event" to track amount changes in transaction dialog
"amount-changed" is only emitted on KP_ENTER and thus doesn't help us while "changed" confuses the widget.

Patch by Johannes Schmid.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22054 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-19 11:00:37 +00:00
Cristian Marchi
a350d5206a Fix translatable strings. Patch provided by Aurimas Fišeras.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22053 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-17 21:10:25 +00:00
Geert Janssens
ab5bd505f0 Payment dialog ui tweaks. Make it slightly larger by default and enable sorting on the document list
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22050 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-17 19:13:03 +00:00
Christian Stimming
b70c72fa46 Fix broken value-to-kvp conversion for number range option which doesn't get the kvp type correctly.
This seems to be have been broken all along since r7094.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22049 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-17 09:15:47 +00:00
J. Alex Aycinena
365be68a84 Properly handle Windos end-of-line markers in determining xml file versions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22038 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-15 23:14:58 +00:00
Geert Janssens
f7a1b07c15 Add an additional test that hopefully will shed more light on bug
666855.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22026 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-15 15:23:29 +00:00
Geert Janssens
5c48dc277c Bug #670002 - updates to comments format for gnc-fq-check and
gnc-fq-helper utilities.
Patch by Dmitry Smirnov

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22025 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-15 11:22:43 +00:00
Geert Janssens
c16dcef320 Fix "'txn' may be used uninitialized in this function" warning
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22021 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-13 15:47:43 +00:00
Geert Janssens
93535c9557 Bug 632931: Advanced Portfolio: total gains does not include income
- new column layout as suggested on bugzilla. Total return is now an amount
  (not a percentage), and includes income as well as capital gains. New
  column "Rate of return" gives the percentage.
- changed default value for "Ignore brokerage fees when calculating
  returns", the default is now to NOT ignore the fees.

Patch by Sebastien Alborini <salborini@gmail.com>
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22018 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-13 15:02:24 +00:00
Geert Janssens
7729673280 Bug #669494 - Swedish account plan provided (BAS 2012)
Additionally this commit adds some required changes to get the
Swedish account plans to actually show up in GnuCash (both BAS and the
earlier committed Swedish small business account plan)
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22012 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-12 20:29:01 +00:00
Geert Janssens
06a78707b2 Fix a GtkWarning in the Account Hierarchy Assistant which occurs if the
Example Account file doesn't contain a long description.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22011 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-12 20:28:50 +00:00
Geert Janssens
a63e86c733 Bug #584819 - Company name is not shown by default on some reports
Patch by Chris Dennis

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22010 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-12 18:43:13 +00:00
Cristian Marchi
2d4c0ed2e7 Fix a typo.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22007 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-12 10:20:31 +00:00
Cristian Marchi
d5b014c19d Fix translatable strings code for tax invoice report.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22006 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-12 10:07:27 +00:00
Geert Janssens
5175fce457 Win32: tag builds when a tag is not x.y.z (like 2.4.10-1) fail to upload
due to a typo in the build scripts.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22005 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-12 09:44:40 +00:00
Cristian Marchi
d242a54c58 Fix translatable strings code for some reports. Patch provided by Aurimas Fišeras.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22004 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-12 09:15:05 +00:00
Geert Janssens
b6135110ec Keep the lot list sorted during payment processing to ensure the oldest
open document is processed first.
In the process, I renamed two helper functions (one of which I had to
extend to work with payment lots).

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22002 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:35:15 +00:00
Geert Janssens
6d76a40653 Remove some obsolete (and now malfunctioning) code.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22001 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:35:05 +00:00
Geert Janssens
de91d24722 Rework interaction between payments and invoices part 2.
This commit deals with paying invoices.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22000 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:34:55 +00:00
Geert Janssens
6467765d7b Small fixes in comments
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21999 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:34:45 +00:00
Geert Janssens
37b3e98a83 Improve open lot selection when posting an invoice
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21998 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:34:36 +00:00
Geert Janssens
a96a6da00a Optimization: don't sort lot list if it will only be traversed to calculate a sum
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21997 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:34:28 +00:00
Geert Janssens
1a49332e40 Rework interaction between payments and invoices.
This commit deals with invoice posting and unposting only.
Before invoices and payments shared the same lot (meaning a payment was
added to an existing invoice lot or vice versa).
Now payments and lots have their own separate lots and payments are
linked to invoices via linking transactions. This opens the way to "pay"
invoices with credit notes.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21996 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:34:18 +00:00
Geert Janssens
85731d3678 Refactor code to avoid duplication
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21995 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:34:02 +00:00
Geert Janssens
82e76ff58b Fix credit card charges for credited vouchers ("credit notes for
employees")

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21994 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:33:53 +00:00
Geert Janssens
7d6bc3fac8 Hide some now internal-only functions from the public GncEntry interface
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21993 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:33:43 +00:00
Geert Janssens
6f89b85349 Make invoice totals always document values. These functions are only
used for displaying.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21992 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:33:34 +00:00
Geert Janssens
d8d7e90f13 Modify Tax Invoice report to work properly with credit notes
Note that contrary to the other invoice reports the invoice title is not
automatically set to "Credit Note", because on the tax invoice report
that title is a user settable option.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21991 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:33:25 +00:00
Geert Janssens
45d0b1d19b Introduce two convenience functions to simplify quantity handling for invoice/credit note entries.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21990 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:33:15 +00:00
Geert Janssens
4a9933211a Modify fancy invoice to work with credit notes.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21989 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:33:06 +00:00
Geert Janssens
cd2cecc088 Modify gncInvoice to use the new entry value getters
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21988 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:32:56 +00:00
Geert Janssens
daca5e3e88 Update invoice reports to use the new entry value getters.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21987 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:32:47 +00:00
Geert Janssens
2197c038fd Introduce entry getters that return the balance value as opposed to
internal value and document value.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21986 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:32:38 +00:00
Geert Janssens
3c8ae9506c Rework entry value getters
Make it clear when the values are rounded or not and that the values are
as on the document (opposed to how they impact the balance).

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21985 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:32:27 +00:00
Geert Janssens
a748f123dd Use better variable name to avoid confusion with is_cn
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21984 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:32:16 +00:00
Geert Janssens
3f6629d853 Small cleanups:
- improve comments, fix spelling
- fix some static code analysis warnings
- expand and remove a macro that wasn't adding much other than reduced
code readability

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@21983 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-02-10 15:32:07 +00:00