Commit Graph

14605 Commits

Author SHA1 Message Date
Mike Evans
3195649664 Fix reversed "Job Name", "Job Number" in options dialog, Headings 2 tab.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22139 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-09 11:33:44 +00:00
Mike Evans
731f17da50 Expose InvoiceNextID to python bindings.
Accessed as book.InvoiceNextID(customer)

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22138 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-04 08:35:27 +00:00
John Ralls
96b9031d6b [Testing] Fix up utest-Account to use checked error messages in all tests.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22137 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-03 21:36:07 +00:00
John Ralls
57b82171dc [Testing] Fix a missed execution path detected with error message counting.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22136 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-03 21:35:58 +00:00
John Ralls
12387c1c02 [Testing] Add hits field to TestErrorStruct
Allows asserting on the number of times error messages are encountered.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22135 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-03 21:35:47 +00:00
John Ralls
ebee14d833 Add test files to .gitignore
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22134 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-03 21:35:38 +00:00
John Ralls
4e4f857376 [Translation] Update POTFILES.in with some new filenames
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22133 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-03 21:35:29 +00:00
John Ralls
6d32b6f693 [Testing] Separate unit test functions from make check functions.
I'd originally put the functions supporting log detection, qof event handling, and mock-counting in test-stuff along with the functions that support the older "make check" integration tests. There are now more unit test support functions than there are of the older functions, so it's time for them to move out on their own.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22132 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-03 21:35:19 +00:00
John Ralls
dd5e532cdf Testing: Some very minor formatting changes in utest-Split.c comments.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22130 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-01 22:07:10 +00:00
Christian Stimming
3af935d7d2 Fix minor compiler errors of r22127.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22129 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-04-01 19:51:06 +00:00
John Ralls
ec7b02ab5b Fix error discovered in testing: xaccSplitCompareAccountCodes actually compared the account names.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22128 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-31 22:12:47 +00:00
John Ralls
0fe6e907de Testing: Unit tests for Split.c
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22127 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-31 22:12:36 +00:00
Mike Evans
54faec5520 Bug 670008 - taxinvoice lacks flexibility necessary to produce legally valid Australian Tax Invoice
Patches supplied by Dmitry Smirnov, many thanks.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22126 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-31 12:07:07 +00:00
Christian Stimming
78cbc3d097 Take read-only date setting of QofBook into account (no pun intended) when entering transaction into accounts.
The code will silently revert the entered date to the threshold and just
not allow any older date to be entered. I wonder whether we can display
some useful error message additionally, but unfortunately I didn't find
the place in the code where one single error message would have resulted,
only places where multiply (annoying) error messages would have resulted.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22124 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-26 20:15:04 +00:00
Christian Stimming
5aa445ef95 Take read-only setting of QofBook into account for the transaction duplication.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22123 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-25 20:18:42 +00:00
Christian Stimming
b208b06b00 Fix segfault after behaviour change of qof_book_get_autoreadonly_gdate() in r22118.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22122 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-25 19:13:16 +00:00
John Ralls
663c9f9d5b Testing: fix search_local() for detecting callbacks and references.mv
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22121 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-25 16:52:31 +00:00
John Ralls
2066c1d991 Fix omitted "setup" argument to GNC_TEST_ADD insertion.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22120 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-25 16:52:22 +00:00
Mike Evans
2d5eaa61c2 Bug 670008 - taxinvoice lacks flexibility necessary to produce legally valid Australian Tax Invoice
Fix typo.  Fix column misalignment when no taxes are present in the invoice.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22119 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-25 14:51:36 +00:00
Christian Stimming
176fba9b9f Rename internal function names for read-only option of r22107 also to "auto-read-only".
(Initially I thought there were a relation to the "freeze" state of a
transaction, but this turned out to be not the case.)

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22118 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-24 22:34:59 +00:00
Christian Stimming
ed581152b9 Take read-only setting of QofBook into account for the transaction deletion as well.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22117 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-24 22:34:44 +00:00
Christian Stimming
af3cec54df Make read-only lines in account register window (r22109) somewhat more visible by changing the background color slightly.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22116 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-24 22:34:32 +00:00
Christian Stimming
84379bac27 Fix threshold treatment in r22108, r22109 to make visualization and behaviour match.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22115 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-24 22:34:21 +00:00
John Ralls
0ecb61dd13 Testing: Provide a test_destroy function/macro combination.
Works on GObjects. Asserts if the object isn't a GObject (which may be the case if it has already been finalized) or if the object's finalize method isn't called (indicating a leak).

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22114 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-24 22:20:19 +00:00
John Ralls
777074f482 Testing: Rewrite test_signal_assert_hits as a function/macro combination
Now the assert reports the location in the test program where it fails instead of inside test-stuff.c.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22113 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-24 22:20:08 +00:00
John Ralls
b5c62a1385 Testing: Add a basic print-to-stdout log handler as a test debugging aid.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22112 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-24 22:19:58 +00:00
Christian Stimming
e6c0795652 Fix r22105 that was missing some dependency of the "optional" directory on other parts.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22111 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-23 20:52:13 +00:00
Mike Evans
dc6e29618c Some systems fail to compile with:
dialog-customer-import.c:399:36: error: 'shipaddr' may be used uninitialized in this function [-Werror=uninitialized]

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22110 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-22 09:11:47 +00:00
Christian Stimming
8cc8ffe374 Add auto-read-only feature for old transactions after N days, denoted by the new red line in the register.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22109 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-21 22:18:53 +00:00
Christian Stimming
298eab78f5 Add a second "red" divider line to the register to denote the read-only section for older transactions.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22108 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-21 22:18:41 +00:00
Christian Stimming
bfbe9b87c4 Add option for automatically setting old transactions to read-only.
The number of days for this read-only threshold can be chosen.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22107 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-21 22:18:29 +00:00
Christian Stimming
e058cf0352 Fix typo in r22026 (uh oh, broken all the way since then!)
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22106 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-21 20:19:28 +00:00
Christian Stimming
00511d25ea Bug #671737: Let configure --disable-gui only build gui code
Patch by Kuang-che Wu.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22105 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-21 20:15:17 +00:00
Geert Janssens
4f603c718d Fix crash/invalid memory access when unposting an invoice.
This is triggered when glib is configured with G_SLICE=always-malloc

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22104 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-20 10:08:37 +00:00
Christian Stimming
ec8fc423ba Bug #670008: Improve taxinvoice flexibility necessary to produce legally valid Australian Tax Invoice
Patch by Dmitry Smirnov:

 Original taxinvoice template lacks flexibility necessary to make
 legaly valid Australian Tax Invoices.
 This patch introduces customisation options
 useful to comply with Australian requirements, but not limited to.
 * Functional changes
   + Reference number moved to the right side from under the invoice
     owner address (improves visibility and makes invoice layout
     more compact)
   + added option to show Job Name
   + added option to show Job Number
   + added options to enable/disable columns with dynamic adjustments
     to the table layout.
   + added options to enable/disable display of some invoice elements
   + some spaces in Headings1 defaults replaced with non-breaking space
   + added "Thank you for your patronage" text as default value for
     footnote to match other invoices' defaults
 * Hardcoded messages in English are replaced with options and
   default values to match original report.
   This makes possible report localization, like changing
   "Invoice" to "Tax Invoice" where required by law etc.
 * New dialog element in [Report Options]:[General]
   + [Report Currency]
     (Because dollar sign '$' is used by many countries for their national
     currency, invoicing between Australia and New Zealand often
     causing confusion unless invoice currency is stated in the
     invoice.)
 * New dialog elements in [Report Options]:[Headings2]
   + Invoice number text (string)
   + To text (string)
   + Ref text (string)
   + Job Name text (string)
   + Job Number text (string)
 * New dialog elements page [Report Options]:[Elements]
   + column: Date (boolean)
   + column: Tax Rate (boolean)
   + column: Units (boolean)
   + row: Contact (boolean)
   + row: Address (boolean)
   + row: Invoice Number (boolean)
   + row: Company Name (boolean)
   + Invoice number next to title (boolean)
   + Show Job name (boolean)
   + Show Job number (boolean)
 * Fixed bug when customer name is listed twice above invoice owner address.
   (this change is hard to separate into standalone patch because fix
    involving changes affected by new customisation options)
 * Added modification date and copyright comments
 * spancols* variables renamed to have more readable names

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22103 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-19 21:01:19 +00:00
Christian Stimming
2e97104e94 Bug #670008: Add taxinvoice flexibility necessary to produce legally valid Australian Tax Invoice
Patch by Dmitry Smirnov:

Due to invoice limitations, Gnucash is not yet ready for small business use in
Australia. Lack of customisation options in taxinvoice do not allow to change
its presentation for compliance with legal requirements.

Those patches make taxinvoice practically useful for invoicing.
First patch introducing few changes to allow easy adjustments to report
presentation.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22102 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-19 20:49:15 +00:00
Christian Stimming
bdb0786dc2 Bug #486658: [win32] Cannot use period on decimal keypad in my locale
Patch by Sebastien Alborini:

On win32, gdk never sends GDK_KP_Decimal, so this key cannot be detected.
Work around this by watching the underlying virtual keycode VK_DECIMAL.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22101 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-19 20:49:03 +00:00
Christian Stimming
cf63a1664f Bug #671444: Remove the warning message about binreloc
Forwarded from debian http://bugs.debian.org/443774

Every time gnucash is started it prints the following message to the console:

 "main: binreloc relocation support was disabled at configure time."

 This unnecessarily worries people who usually take it as warning rather than
 normal informational message.

 It has been reported as especially annoying if gnucash is running
 as cron job because it requires special workaround against sending
 this message over email on each invocation.

 The attached patch suppresses printing the worthless message.

Given the current status of binreloc we're unlikely to use it so there is no
need to remind that it was disabled (which is default).

Thanks.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22100 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-19 20:48:48 +00:00
Christian Stimming
b9212056de Bug #671737: Fix for configure --enable-python --enable-dbi --disable-gui
Patch by Kuang-che Wu.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22099 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-19 20:48:37 +00:00
Christian Stimming
a92745a8ae [Win32 build] Update gwenhywfar/aqbanking versions.
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22097 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-19 20:31:50 +00:00
Christian Stimming
72c516d61b Bug #672161: Remove old CSV importer, now replaced by new one.
Patch by Robert Fewell.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22092 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-18 12:59:21 +00:00
Christian Stimming
6b5f4b7658 Revert r22083, "Adapt German account templates to updated tax rate."
A pure renaming is not the correct solution, I've been told.
BP

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22090 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-18 11:43:22 +00:00
Christian Stimming
43b51df596 Re-indentation of source code.
As usual, re-indentation was done using astyle-1.24 using the following options:

  astyle --indent=spaces=4 --brackets=break --pad-oper --pad-header --suffix=none

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22089 57a11ea4-9604-0410-9ed3-97b8803252fd
2012-03-16 20:27:09 +00:00
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