Commit Graph

14562 Commits

Author SHA1 Message Date
Christian Stimming
df611e433d Add some more gitignores.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22088 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-16 20:26:50 +00:00
Christian Stimming
59aba947d7 Bug #672161: Fix double-free error when importer dialog is canceled
Patch by Robert Fewell:

There is an existing problem with the main matcher which can causes the
following errors if you have the relevant account register open:

CRIT <qof> qof_instance_get_editlevel: assertion `QOF_IS_INSTANCE(ptr)' failed

This is caused when you decide to not add all the transactions displayed on the
matcher dialog and then the system trying to delete the temporary transaction
twice. I think this patch comments out the offending lines, if correct I will
provide a patch to remove them.

The error below is only seen when the relevant account register is open and in
the preferences you have double line mode enabled. Not sure how it gets fired,
probably part of the register update process but it is because we do not have a
valid transaction any more.

CRIT <gnc.engine> xaccTransGetVoidReason: assertion `trans' failed

The function concerned is gnc_split_register_get_vnotes_entry and could be
solved by adding the following but not sure if this is a valid fix.

    if(trans == NULL)
        return g_strdup('\0');
    else
        return xaccTransGetVoidReason(trans);

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22087 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-16 20:26:36 +00:00
Christian Stimming
c6141acc5a Bug #672161: New CSV account and transaction importer
Patch by Robert Fewell:

Firstly, this patch allows for the creating and updating accounts based on the CSV file
being imported. New accounts are created if the commodity required exists and
existing accounts are updated for the four fields: code, description, notes and
colour. This can be used for doing bulk updates of these fields and also for
importing the account structure from another file.

The second part is the change of the existing CSV importer to use an assistant
to guide you through the import. Additional features added is the ability to
specify the start and end row to be imported allowing you to jump over a header
or footer or just import a few rows. A currency format option was added which
was requested in another bug to overcome a problem they were having with the
downloaded format from there bank. You can also associate the account name to a
GnuCash account using the 'online_id' kvp, not sure if this is Ok or whether it
should be a different one.

To achieve the above, I split the dialogs used in import_account_matcher and
import_main_matcher into the dialog and the content so I could load the content
into the assistant saving on duplication, hope this makes sense.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22086 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-16 20:26:22 +00:00
Christian Stimming
725f25fb8a Bug #672157: New CSV account and transaction exporter
Patch by Robert Fewell:

I have put together a new feature to export the account tree and transactions
to a deliminated file. Both options allow you to select the deliminator and the
use of quotes. Every thing seems to work on the testing I have done but may be
some of the text and the headings in the output might need changing.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22085 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-16 20:26:04 +00:00
Christian Stimming
e86177c2c1 Adapt German account templates to updated tax rate.
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22083 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-16 19:33:23 +00:00
Christian Stimming
09461590af Add some unittest for GncInvoice and posting/unposting an invoice.
I thought this would reproduce the crash when unposting a real invoice
with G_SLICE=always-malloc set. However, apparently this test case isn't
complete enough and does not crash. Maybe one needs to add further GncEntries?

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22082 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-14 22:26:54 +00:00
Christian Stimming
c743bf4631 Update POTFILES.in after recent file move.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22081 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-14 22:26:42 +00:00
Geert Janssens
44fa792a7e Fix make dist for Swedish accounts files
Reported by Robert Fewell

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22080 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-14 17:24:20 +00:00
Geert Janssens
c2a557604a Use correct list iterator instead of list pointer.
(Bug pointed out by Christian Stimming)

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22079 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-13 21:22:58 +00:00
Christian Stimming
e74d46a2ab [Cutecash] Follow-up for r22075: Removal of "calculation" module in CMake.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22078 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-13 13:18:51 +00:00
Mike Evans
8ca749ac4f Prevent wrapping in date column.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22076 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-12 13:23:50 +00:00
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