Merge branch 'maint'

This commit is contained in:
John Ralls 2019-09-08 16:41:39 -07:00
commit 0b3752d9cb
18 changed files with 5265 additions and 4624 deletions

View File

@ -8,7 +8,7 @@ Contributors:
Current -
J. Alex Aycinena
Daveid Cousens
David Cousens
Frank H. Ellenberger
Mike Evans
Chris Good
@ -20,13 +20,13 @@ Mechtilde Stehmann
David T.
Past -
Miek Alexander
Mike Alexander
Yawar Amin
Derek Atkins
Christopher Browne
Tom Bullock
Phil Davis
Carol Champagne
Phil Davis
Glen Ditchfield
Bill Gribble
David Hampton

247
NEWS
View File

@ -1,5 +1,138 @@
Version history:
------- -------
3.7 - 8 September 2019
The eighth release of the 3.x stable series.
Note for German FinTS users: This release in concert with AQBanking
5.8.0 is the first release to support the new product registration
requirement that goes into effect 15 September 2019.
The following bugs have been fixed:
The following bugs have been fixed:
Bug 605602 - precision of Financial Calculator seems to depend on
locale
Bug 746937 - Template transaction splits are loaded in reverse order
and then not sorted before saving. Actually not sorted
after loading because the template accounts weren't being
committed.
Bug 752395 - Start Day of weekly report doesn't respond to change in
locale
Redefines some functions to ensure weekly grouping in
transaction report obeys locale's start-of-week.
Bug 784623 - GNUCash does not work with sql backend, I can open
in read only mode. Upgrade the splits table as well, an
oversight from the original fix.
Bug 793018 - Balance (with >>eguile<<) - Report Title can't be changed
Bug 795251 - googletest detection cannot be overridden
Bug 796819 - bad icon with Spanish localization
Temporary fix for Farsi, which was afffected, too. As it
is maintained by TP, the final fix has to come from them.
Bug 796952 - Report formatting (justify) is broken
Previous patch reverted and replaced with a more correct one.
Bug 797085 - Import Bills & Invoices headers not translated.
Make strings translatable. Translators: This adds 22 new
translatable strings.
Bug 797158 - gnc:make-account-sel-limited-option is not working
Option was being deliberately reset to default_value every
time.
Bug 797171 - Allow multiple credit/debit columns to be selected
Bug 797279 - Reports RTL do not support RTL - fix reports
Bug 797279 - Reports RTL do not support RTL - fix string
fix guile-2.0 string handling to prevent munging unicode
in report-titles etc. while loading/saving reports
Bug 797295 - problems with entering swedish åäö in company address
Bug 797297 - GNUCash is in English even though MacOS is set-up to
French.
Bug 797301 - Register Menu View > Refresh doesn't work in 'with
sub-accounts' window
Bug 797306 - "URL cannot be shown" when one clicks an account line
link in report.
Bug 797316 - New Mauritanian ouguiya MRU not supported
Bug 797319 - Mauritanian ouguiya MRO shows too few decimals
Bug 797339 - Online banking frame to small
Bug 797349 - "A"ssociate header badly translated.
Note to translators: This is about msgids of the form
"Associate:A". The correct msgstr includes the part up to
the ':' verbatim with only the part to the right of it
tranlated, e.g. "Associate:П" from uk.po. Each such msgstr
has a comment explaining this.
Bug 797353 - Add copyright and release info in appdata file
Bug 797355 - General Journal report seems to be off balance
Previously, for general-journal, each split was being
analyzed, and only the source split was counted for
totals. This change will means the source split *and* its
peers are accounted for.
Bug 797377 - cmake fails on debian-8 and ubuntu-14.04 with
gnucash.appdata.xml.in does not exist
Bug 797378 - QIF file import fails: Loading gives wrong type argument
in position 2
Bug 797389 - Random Crashes while attaching a document.
Other repairs or enhancements not marked as bugs:
New feature: Multiselection in the import transaction matcher. Use
control-left-click, shift-left-click, or click-and-drag to select
multiple unmatched transactions to match them with a single account,
then right-click to bring up a single-item context menu sith
"Assign Transfer Account".
Set a FinTS product version key when the installed AQBanking supports it.
Reworking of many translatable strings with context to use the modern
gettext three-parameter function instead of the ':' hack noted in
bug 797349.
Stop duplicate entries for the invoice taxtable cell
Do not log an error when no default tax tables are set.
Fix cmake dependency tree so that make/ninja check works without having
to first run make/ninja.
Remove the accelerator for the Clear buttons on the Loan Calculator
because they were all the same and also the same as the Close button's
accelerator.
Change the transfer account notation for single-split transactions in
basic view from "--Split Transaction--" (they're obviously not) to "None".
Correctly parse decimal values between 0 and -1 (e.g. -0.5) in register
caclulations: The negative sign was being stripped.
Require CMake 3.5 or later for all platforms.
Rework the building of libgtest.a from source when the builder sets
GTEST_ROOT or the distro doesn't provide a pre-build one.
Fix crash when trying to display a tooltip in the register split view
when a split has focus.
Fix repeated requests to create a new account when you click No.
Suppress bogus error when creating a new account from register split view.
Fix price conversion report crashes in Balance Sheet PNL and all
average balance calculations.
Upgrade the Budget reports to support accumulated accounts.
Redefine gnc:debug to use QofLog instead of writing to stdout.
Change the Balance Sheet PNL account depth to mean the deepest *selected*
account rather than the deepest account.
Set the Owner Report date option to default to today.
Much Scheme cleanup and more testing.
Deprecated API:
gnc:html-acct-table-cell - Unused.
gnc:make-general-journal-report - Unused.
gnc:easy-invoice-report-create-internal - Unused.
gnc:fancy-invoice-report-create-internal - Unused.
make-simple-class - Use make-record-type
simple-obj-getter - Use record-accessor
simple-obj-setter - Use record-modifier
simple-obj-print - Use write
simple-obj-to-list - Use record-type->list
simple=obj-from-list-obj - Use list-record-type
make-simple-obj - Use construct
gnc:time64-le-date - Unused
gnc:time64-ge-date - Unused
gnc:make-reldate-hash - Unused
gnc:get-relative-date-strings - Unused
gnc:entry-type-percent-p
gnc:make-customer-option - Unused
gnc:make-vendor-option - Unused
gnc:make-employee-option - Unused
gnc:html-build-acct-table - Unused
gnc:html-acct-table-comm-row-helper - Unused
gnc:sum-collector-stocks - Unreachable
Updated Translations: German, Hebrew, Ukrainian,
New Account Templates: Hebrew-Israel
3.6 - 30 June 2019
The seventh release of the 3.x stable series.
@ -130,7 +263,7 @@ Other repairs or enhancements not marked as bugs:
Much more Scheme cleanup and refactoring.
Python console improvements, including switching to Python3 and not
killing GnuCash when quitting the console.
New API:
The following functions can now be used in scheduled transaction
@ -1637,7 +1770,7 @@ The following bugs are fixed only in unstable/master:
Date field and pressing escape.
Bug 791831 - Add python3 support.
Bug 794242 - Remove keep above setting for assistant hierarchy
Other repairs not marked as bugs in git:
Fix date corruption in SQL load. Four date elements were affected:
GncEntry::date, GncEntry::date_entered, GncInvoice::opened, and
@ -1648,7 +1781,7 @@ Other repairs not marked as bugs in git:
More transient-window fixes and other Gtk3 cleanups.
Add xmlns namespace declarations to all of the accounts templates that
lacked it and remove the emacs mode-setting comments at the end of them.
Updated Translations: Spanish
2.7.6 - 12 March 2018
@ -2098,7 +2231,7 @@ KNOWN PROBLEMS:
Bug 789594 - Unable to overwrite splite3 database file
Bug 791823 - There is no Gtk3 theme-setting tool for Windows.
Bug 791825 - Accounting period dates off-by-1I was
Bug 791825 - Accounting period dates off-by-1I was
2.7.3 - 31 December 2017
The Gnucash Development Team is pleased to release Gnucash 2.7.3,
@ -3911,7 +4044,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
your gnucash build area.
* Updated AqBanking on Win32.</li>
2.3.0 - 14 May 2009
o Welcome to GnuCash 2.3.0 the first of several unstable releases of
the GnuCash Open Source Accounting Software which will eventually lead
@ -4383,8 +4516,8 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Welcome to GnuCash 2.1.5 aka "Release Candidate 2", the fifth of
several unstable 2.1.x releases of the GnuCash Open Source Accounting
Software which will eventually lead to the stable version 2.2.0.
With this new release series, GnuCash is available on Microsoft
Windows for the first time, and it also runs on GNU/Linux, *BSD,
With this new release series, GnuCash is available on Microsoft
Windows for the first time, and it also runs on GNU/Linux, *BSD,
Solaris and Mac OSX.
This release is intended for developers and testers who want to help
tracking down bugs.
@ -4432,8 +4565,8 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Welcome to GnuCash 2.1.4 aka "Release Candidate 1", the fourth of
several unstable 2.1.x releases of the GnuCash Open Source Accounting
Software which will eventually lead to the stable version 2.2.0.
With this new release series, GnuCash is available on Microsoft
Windows for the first time, and it also runs on GNU/Linux, *BSD,
With this new release series, GnuCash is available on Microsoft
Windows for the first time, and it also runs on GNU/Linux, *BSD,
Solaris and Mac OSX.
This release is intended for developers and testers who want to help
tracking down bugs.
@ -4466,14 +4599,14 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Bugfixes with the graphical reports
o Fixing the Online Banking wizard
o Updated translations
o Improvements to Windows packaging
o Improvements to Windows packaging
2.1.3 - 02 June 2007
o Welcome to GnuCash 2.1.3 aka "at last!", the fourth of several
unstable 2.1.x releases of the GnuCash Open Source Accounting
Software which will eventually lead to the stable version 2.2.0.
With this new release series, GnuCash is available on Microsoft
Windows for the first time, and it also runs on GNU/Linux, *BSD,
With this new release series, GnuCash is available on Microsoft
Windows for the first time, and it also runs on GNU/Linux, *BSD,
Solaris and Mac OSX.
This release is intended for developers and testers who want to help
tracking down bugs.
@ -4510,10 +4643,10 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
2.1.2 - 19 May 2007
o Welcome to GnuCash 2.1.2 aka "Financially secure yet?"the third of
several unstable releases of the GnuCash Open Source Accounting
several unstable releases of the GnuCash Open Source Accounting
Software which will eventually lead to the stable version 2.2.0.
With this new release series, GnuCash is available on Microsoft
Windows for the first time, and it also runs on GNU/Linux, *BSD,
With this new release series, GnuCash is available on Microsoft
Windows for the first time, and it also runs on GNU/Linux, *BSD,
Solaris and Mac OSX.
This release is intended for developers and testers who want to help
tracking down bugs.
@ -4650,7 +4783,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
- Updated British English, French, German translation.
2.0.2 - 08 October 2006
o Release of new stable version 2.0.2
o Release of new stable version 2.0.2
o Configure changes;
- Find absolute path of gconftool-2 during configure. Make gconftool
rules to fail if gconftool-2 could not be found.
@ -4708,7 +4841,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Reports changes;
- Change cmdline warning into an actual user's error dialog when user
attempts to save a report with the same name as an existing report.
2.0.0 - 9 July 2006
o Release of new stable version 2.0.0.
o GnuCash 2.0 is based on state-of-the-art gtk2 GUI technology.
@ -4738,7 +4871,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
Accounting Software which will eventually lead to the stable version
2.0.0. This release contains many bugfixes since the second beta
release.
o PLEASE TEST any and all features important to you. Then post any
o PLEASE TEST any and all features important to you. Then post any
bugs you find to bugzilla
https://bugs.gnucash.org/enter_bug.cgi
o We would like to encourage people to test this and any further
@ -4756,9 +4889,9 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
1.9.7 - 04 June 2006
o Welcome to GnuCash 1.9.7 aka "Banking on Gnu Cash!" the second
beta release of the GnuCash Open Source Accounting Software which will
eventually lead to the stable version 2.0.0. This release contains
eventually lead to the stable version 2.0.0. This release contains
many bugfixes since the first beta release.
o PLEASE TEST any and all features important to you. Then post any
o PLEASE TEST any and all features important to you. Then post any
bugs you find to bugzilla
https://bugs.gnucash.org/enter_bug.cgi
o We would like to encourage people to test this and any further
@ -4782,9 +4915,9 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
1.9.6 - 14 May 2006
o Welcome to GnuCash 1.9.6 aka "Time to make a difference" the first
beta release of the GnuCash Open Source Accounting Software which will
eventually lead to the stable version 2.0.0. This release contains
eventually lead to the stable version 2.0.0. This release contains
many bugfixes since the sixth unstable release.
o PLEASE TEST any and all features important to you. Then post any
o PLEASE TEST any and all features important to you. Then post any
bugs you find to bugzilla
https://bugs.gnucash.org/enter_bug.cgi
o We would like to encourage people to test this and any further
@ -4863,7 +4996,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Fix the dialog so that the 'Cancel' button cancels all changes made
since the dialog was opened.
o Fixes for currencies and currency quote retrievals.
1.9.3 - 19 Mar 2006
o Welcome to GnuCash 1.9.3 aka "Mo money, mo problems" the fourth of
several unstable releases of the GnuCash Open Source Accounting
@ -4933,7 +5066,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
decimal point characters when printing numbers.
o Lots of fixes to splits and transaction editing.
o Added new icons.
1.9.1 - 19 Feb 2006
o Welcome to GnuCash 1.9.1 aka "So we meet again" the second of
several unstable releases of the GnuCash Open Source Accounting
@ -4949,7 +5082,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o PLEASE TEST TEST AND TEST SOME MORE any and all features important
to you. Then post any bugs you find to bugzilla
https://bugs.gnucash.org/enter_bug.cgi
o Major bugfixes include -
o Major bugfixes include -
o Register fixes
o Finance::Quote issues
o Correctly open an account and its sub-accounts.
@ -4965,7 +5098,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Report fixes
o Autodetect OFX and use it if we find it.
o Qof fixes
1.9.0 - 08 Feb 2006
o Welcome to GnuCash 1.9.0 aka "We're gonna make it!" the first of
several unstable releases of the GnuCash Open Source Accounting
@ -5020,7 +5153,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Add the transaction guid to some error warning messages.
o Fix HBCI date range for statement download.
o Fix the last-day-of-month computation for leap years.
1.8.10 - 11 Dec 2004
o Don't use C++/C99 declarations. Declare variables at the top of
the function.
@ -5156,7 +5289,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Change Ukrainian "UAG" into "UAH"
o Commented out setting the memo always to "Auto-created split" due
to popular request.
o Fix for part of bug only allow auto-create SXes which have splits
o Fix for part of bug only allow auto-create SXes which have splits
to be created.
o HBCI transfer template management GUI added by Bernd Wagner.
o Added instructions about running under valgrind.
@ -5218,7 +5351,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
split transactions.
o Don't make a timespec with tv_sec == 0. Fixes some tests on the
alpha platform.
1.8.7 - 14 Sept 2003
o Use <libofx/libofx.h> instead of "libofx/libofx.h" as it's not part
of our system. Fixes a dependency problem in 1.8.6 release.
@ -5235,7 +5368,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Fixed extremely stupid bug in the import value setting workaround.
o Fixed problem with SX formula_cell calls
o Merge missing part of 2003-05-28 commit. The log format changes
didn't get commited for some reason, making the log replayer
didn't get commited for some reason, making the log replayer
completely unusable.
o Fixed crash during dialog startup on Solaris.
o Turn off scheme garbage collection during query->scm and scm->query
@ -5369,7 +5502,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Add code to read XML files with real namespace declarations.
o Make sure we define PWD, as not all shells define it properly.
o Workaround for multi-currency importing bug.
1.8.4 - 25 May 2003
o Fix transfer dialog to nothang if OK button is clicked w/o filling
in dialog properly.
@ -5449,7 +5582,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Catch errors when running the child reports so we display the
failed report backtrace but also display an error and continue with
the multicolumn report.
1.8.3 - 03 May 2003
o Updated translations: Italian, Swedish, Danish, British,
Traditional Chinese, French, German, Tamil, Brazilian Portugese.
@ -5537,7 +5670,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Add heuristic for duplicate matching by check number.
o Various bug fixes, remove Finance::Quote requirement for rpms
built on RH 8.0
1.8.0 - 02 February 2003
o Release of new stable version 1.8.0
o Fix problem getting quotes from trustnet.
@ -5565,7 +5698,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Don't add income accounts to bills, or expense accounts to
invoices. This should help further reduce user confusion with what
to do when entering invoices.
1.7.8 - 20 January 2003
o Welcome to Release Canidate 3
o Fixed build issues introduced in last release
@ -5625,7 +5758,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
messages for unknown tags, or mismatched start/end tags.
o When checking for gtkhtml-1.1, make the lack of pkg-config a fatal
error. Also check for pkgconfig
o Updated translations, po/de.po,
o Updated translations, po/de.po,
o Fix HBCI reparent warnings. Make the PIN dialog a bit nicer.
o Fixes to Postgresql backend.
o Changed the "ALTER TABLE table ADD COLUMN..." statements to conform
@ -5661,7 +5794,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
number the same and changing the "other" account.
o Add a set of business accounts to the account setup
o Give a much higher importance to the date heuristics in the OFX
import.
import.
o Disable skipping transactions which already have an online id
during matching, untill a fix for the "transfer between two accounts"
bug is properly fixed.
@ -5714,7 +5847,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
<jimmac@ximian.com>
o Connect up help buttons in dialog's to help files
o Lots more bugfixes
1.7.5 - 02 December 2002
o Fix for a problem with multi-currency that could result in data
corruption. Recommend to use this version over 1.7.4
@ -5740,7 +5873,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o First pass at getting multi-currency transactions to work from the
register.
o Lots more bugfixes
1.7.3 - 17 November 2002
o first beta release
o improved libofx configure support. Add --with-ofx-prefix
@ -5748,18 +5881,18 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o fixed missing ofx files in tarball
o updated gnucash.spec file to work with rh8
o added new cashflow report contributed by Herbert Thoma
o New functions to get/set read-only status on a transaction,
o New functions to get/set read-only status on a transaction,
and to print a warning message if a transaction is read-only.
o Added a bunch of currencies.
o MAJOR improvement to OFX investment support. All transactions
created from an investment account are now already balanced.
Explicitely support Dividend Reinvestment transactions which
will now directly create a income account -> stock account
transaction, and Income transactions which will directly create
a income account -> cash account transaction. Support memorising
the income account association. Several stock account can use the
o MAJOR improvement to OFX investment support. All transactions
created from an investment account are now already balanced.
Explicitely support Dividend Reinvestment transactions which
will now directly create a income account -> stock account
transaction, and Income transactions which will directly create
a income account -> cash account transaction. Support memorising
the income account association. Several stock account can use the
same income account if desired.
o Updated translations (merged from 1.6 branch plus updates from
o Updated translations (merged from 1.6 branch plus updates from
the Translation Project).
o Matthew Vanecek added some bug fixes for the SQL back end.
o Add support for gtkhtml 1.1
@ -5784,7 +5917,7 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o HBCI suport requires OpenHBCI 0.9.3 or current OpenHBCI CVS
o loads of bugfixes, keep those bugs coming!
o NOTE: Report bugs to https://bugs.gnucash.org
1.7.1 - 13 October 2002
o first alpha release
o lots of new features, please test as much as you can
@ -5940,17 +6073,17 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o fixes to QIF import incl MS-Money import
o implement rollback in engine; can now commit or reject (undo) edits.
1.1.17 - 13 Sept 1998
1.1.17 - 13 Sept 1998
o working auto-expand register
o sort by date, num, amount, memo, descr.
o list all transactions between two dates.
1.1.16 - 13 Sept 1998
1.1.16 - 13 Sept 1998
o busted.
1.1.15 - 9 Aug 1998
o Everybody's doin it: make xacc into a web server.
1.1.14 - 8 Aug 1998
o First drop of Qt code
o A split register that finally more or less works
@ -5976,9 +6109,9 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
1.1.1 - 24 Jan 1998
o Alpha level code. Very broken.
All new register design -- modularized.
All new register design -- modularized.
Many versin 1.0 ledger functions missing.
Splits added to engine.
Splits added to engine.
May not compile, will probably core dump.
This is alpha level code, not for general use.
@ -6088,14 +6221,14 @@ Concurrent with the release of Gnucash 2.6.4 we're pleased to also release a new
o Now if the user is in the last transaction (the empty
transaction) in the register window, the "Delete" button
does not do anything.
0.4 - 3 Jun 97
o Added "Balance" and "Reconciled" balance to the bottom
right corner of the register window.
right corner of the register window.
o The main window uses an Xbae-Matrix widget now, instead
of a list, in order to line up the account names, types,
and balances in nice columns.
0.2 - First (mostly) functional release. Most of the buttons,
and menu bar choices actually do something now.

View File

@ -716,10 +716,7 @@ gnc_set_default_gain_loss_account_widget(gnc_commodity *commodity)
col = gnc_tree_view_add_toggle_column(GNC_TREE_VIEW(
book_currency_data->default_gain_loss_account_widget),
_("Placeholder"),
/* Translators: This string has a context prefix; the
translation must only contain the part after
the | character. */
Q_("Column letter for 'Placeholder'|P"),
C_("Column header for 'Placeholder'", "P"),
"placeholder",
GNC_TREE_MODEL_ACCOUNT_COL_PLACEHOLDER,
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,

View File

@ -903,9 +903,7 @@ gnc_tree_view_account_new_with_root (Account *root, gboolean show_root)
NULL);
gnc_tree_view_add_toggle_column(view, _("Placeholder"),
/* Translators: This string has a context prefix; the translation
must only contain the part after the | character. */
Q_("Column letter for 'Placeholder'|P"),
C_("Column header for 'Placeholder'", "P"),
"placeholder",
GNC_TREE_MODEL_ACCOUNT_COL_PLACEHOLDER,
GNC_TREE_VIEW_COLUMN_VISIBLE_ALWAYS,

View File

@ -422,7 +422,7 @@ gnc_reconcile_view_init (GNCReconcileView *view)
param = gnc_search_param_simple_new();
gnc_search_param_set_param_fcn (param, QOF_TYPE_BOOLEAN,
gnc_reconcile_view_is_reconciled, view);
gnc_search_param_set_title ((GNCSearchParam *) param, _("Reconciled:R") + 11);
gnc_search_param_set_title ((GNCSearchParam *) param, C_("Column header for 'Reconciled'", "R"));
gnc_search_param_set_justify ((GNCSearchParam *) param, GTK_JUSTIFY_CENTER);
gnc_search_param_set_passive ((GNCSearchParam *) param, FALSE);
gnc_search_param_set_non_resizeable ((GNCSearchParam *) param, TRUE);

View File

@ -502,6 +502,55 @@ void GncPreSplit::reset (GncTransPropType prop_type)
}
}
void GncPreSplit::add (GncTransPropType prop_type, const std::string& value)
{
try
{
// Drop any existing error for the prop_type we're about to add to
m_errors.erase(prop_type);
Account *acct = nullptr;
auto num_val = GncNumeric();
switch (prop_type)
{
case GncTransPropType::DEPOSIT:
num_val = parse_amount (value, m_currency_format); // Will throw if parsing fails
if (m_deposit)
num_val += *m_deposit;
m_deposit = num_val;
break;
case GncTransPropType::WITHDRAWAL:
num_val = parse_amount (value, m_currency_format); // Will throw if parsing fails
if (m_withdrawal)
num_val += *m_withdrawal;
m_withdrawal = num_val;
break;
default:
/* Issue a warning for all other prop_types. */
PWARN ("%d can't be used to add values in a split", static_cast<int>(prop_type));
break;
}
}
catch (const std::invalid_argument& e)
{
auto err_str = std::string(_(gnc_csv_col_type_strs[prop_type])) +
std::string(_(" could not be understood.\n")) +
e.what();
m_errors.emplace(prop_type, err_str);
throw std::invalid_argument (err_str);
}
catch (const std::out_of_range& e)
{
auto err_str = std::string(_(gnc_csv_col_type_strs[prop_type])) +
std::string(_(" could not be understood.\n")) +
e.what();
m_errors.emplace(prop_type, err_str);
throw std::invalid_argument (err_str);
}
}
std::string GncPreSplit::verify_essentials (void)
{
auto err_msg = std::string();

View File

@ -157,6 +157,7 @@ public:
m_currency_format{currency_format}{};
void set (GncTransPropType prop_type, const std::string& value);
void reset (GncTransPropType prop_type);
void add (GncTransPropType prop_type, const std::string& value);
void set_date_format (int date_format) { m_date_format = date_format ;}
void set_currency_format (int currency_format) { m_currency_format = currency_format; }
std::string verify_essentials (void);

View File

@ -792,24 +792,41 @@ void GncTxImport::update_pre_split_props (uint32_t row, uint32_t col, GncTransPr
auto split_props = std::get<PL_PRESPLIT>(m_parsed_lines[row]);
if (col == std::get<PL_INPUT>(m_parsed_lines[row]).size())
split_props->reset (prop_type);
else
split_props->reset (prop_type);
try
{
try
// Except for Deposit or Withdrawal lines there can only be
// one column with a given property type.
if ((prop_type != GncTransPropType::DEPOSIT) &&
(prop_type != GncTransPropType::WITHDRAWAL))
{
auto value = std::get<PL_INPUT>(m_parsed_lines[row]).at(col);
split_props->set(prop_type, value);
}
catch (const std::exception& e)
else
{
/* Do nothing, just prevent the exception from escalating up
* However log the error if it happens on a row that's not skipped
*/
if (!std::get<PL_SKIP>(m_parsed_lines[row]))
PINFO("User warning: %s", e.what());
// For Deposits and Withdrawal we have to sum all columns with this property
for (auto col_it = m_settings.m_column_types.cbegin();
col_it < m_settings.m_column_types.cend();
col_it++)
{
if (*col_it == prop_type)
{
auto col_num = col_it - m_settings.m_column_types.cbegin();
auto value = std::get<PL_INPUT>(m_parsed_lines[row]).at(col_num);
split_props->add (prop_type, value);
}
}
}
}
catch (const std::exception& e)
{
/* Do nothing, just prevent the exception from escalating up
* However log the error if it happens on a row that's not skipped
*/
if (!std::get<PL_SKIP>(m_parsed_lines[row]))
PINFO("User warning: %s", e.what());
}
}
@ -823,8 +840,11 @@ GncTxImport::set_column_type (uint32_t position, GncTransPropType type, bool for
if ((type == old_type) && !force)
return; /* Nothing to do */
// Column types should be unique, so remove any previous occurrence of the new type
std::replace(m_settings.m_column_types.begin(), m_settings.m_column_types.end(),
// Column types except deposit and withdrawal should be unique,
// so remove any previous occurrence of the new type
if ((type != GncTransPropType::DEPOSIT) &&
(type != GncTransPropType::WITHDRAWAL))
std::replace(m_settings.m_column_types.begin(), m_settings.m_column_types.end(),
type, GncTransPropType::NONE);
m_settings.m_column_types.at (position) = type;

View File

@ -68,85 +68,94 @@ static void gnc_entry_ledger_layout_add_cells (GncEntryLedger *ledger,
gboolean span;
} cells[] =
{
/* Translators: The 'sample:' items are strings which are not
displayed, but only used to estimate widths. Please only
translate the portion after the ':' and leave the rest
("sample:") as is. */
/* Translators: The following strings are used for the layout of the
cells while editing invoices.
Important: The 'sample:' items are strings which are not
displayed, but only used to estimate widths.
This sample is for a checkbox */
{
ENTRY_INV_CELL, CHECKBOX_CELL_TYPE_NAME, N_("sample:X") + 7,
ENTRY_INV_CELL, CHECKBOX_CELL_TYPE_NAME, C_("sample for a checkbox", "X"),
CELL_ALIGN_LEFT, FALSE, FALSE
},
{
ENTRY_DATE_CELL, DATE_CELL_TYPE_NAME, N_("sample:12/12/2000") + 7,
ENTRY_DATE_CELL, DATE_CELL_TYPE_NAME, C_("sample for 'Date'", "12/12/2000"),
CELL_ALIGN_RIGHT, FALSE, FALSE
},
{
ENTRY_DESC_CELL, QUICKFILL_CELL_TYPE_NAME,
N_("sample:Description of an Entry") + 7, CELL_ALIGN_LEFT, TRUE, FALSE
C_("sample for 'Description'", "Description of an Entry"), CELL_ALIGN_LEFT,
TRUE, FALSE
},
{
/* Translators: Enter the longest 'Action' entry */
ENTRY_ACTN_CELL, COMBO_CELL_TYPE_NAME,
N_("sample:Action") + 7, CELL_ALIGN_RIGHT,
C_("sample", "Action"), CELL_ALIGN_RIGHT,
FALSE, FALSE
},
{
ENTRY_QTY_CELL, PRICE_CELL_TYPE_NAME, N_("sample:9,999.00") + 7,
ENTRY_QTY_CELL, PRICE_CELL_TYPE_NAME, C_("sample", "9,999.00"),
CELL_ALIGN_RIGHT, FALSE, FALSE
},
{
ENTRY_PRIC_CELL, PRICE_CELL_TYPE_NAME, N_("sample:999,999.00") + 7,
ENTRY_PRIC_CELL, PRICE_CELL_TYPE_NAME, C_("sample", "999,999.00"),
CELL_ALIGN_RIGHT, FALSE, FALSE
},
{
ENTRY_DISC_CELL, PRICE_CELL_TYPE_NAME, N_("sample:9,999.00") + 7,
ENTRY_DISC_CELL, PRICE_CELL_TYPE_NAME, C_("sample", "9,999.00"),
CELL_ALIGN_RIGHT, FALSE, FALSE
},
/* xgettext:no-c-format */
{
ENTRY_DISTYPE_CELL, RECN_CELL_TYPE_NAME, N_("sample(DT):+%") + 11,
/* xgettext:no-c-format
Translators: Header for Discount Type */
ENTRY_DISTYPE_CELL, RECN_CELL_TYPE_NAME, C_("sample for 'Discount Type'", "+%"),
CELL_ALIGN_LEFT, FALSE, FALSE
},
/* xgettext:no-c-format */
{
ENTRY_DISHOW_CELL, RECN_CELL_TYPE_NAME, N_("sample(DH):+%") + 11,
/* xgettext:no-c-format
Translators: Header for Discount How */
ENTRY_DISHOW_CELL, RECN_CELL_TYPE_NAME, C_("sample for Discount How'", "+%"),
CELL_ALIGN_LEFT, FALSE, FALSE
},
{
ENTRY_IACCT_CELL, COMBO_CELL_TYPE_NAME,
N_("sample:Expenses:Automobile:Gasoline") + 7,
/* Translators: Enter the longest expected path of an Account */
C_("sample", "Expenses:Automobile:Gasoline"),
CELL_ALIGN_RIGHT, FALSE, FALSE
},
{
ENTRY_BACCT_CELL, COMBO_CELL_TYPE_NAME,
N_("sample:Expenses:Automobile:Gasoline") + 7,
C_("sample", "Expenses:Automobile:Gasoline"),
CELL_ALIGN_RIGHT, FALSE, FALSE
},
{
ENTRY_TAXABLE_CELL, CHECKBOX_CELL_TYPE_NAME, N_("sample:T?") + 7,
/* Translators: Abbreviation sample for Taxable? */
ENTRY_TAXABLE_CELL, CHECKBOX_CELL_TYPE_NAME, C_("sample for 'Taxable'", "T?"),
CELL_ALIGN_LEFT, FALSE, FALSE
},
{
ENTRY_TAXINCLUDED_CELL, CHECKBOX_CELL_TYPE_NAME, N_("sample:TI") + 7,
/* Translators: Abbreviation sample for Tax Included */
ENTRY_TAXINCLUDED_CELL, CHECKBOX_CELL_TYPE_NAME, C_("sample for 'Tax Included'", "TI"),
CELL_ALIGN_LEFT, FALSE, FALSE
},
{
ENTRY_TAXTABLE_CELL, COMBO_CELL_TYPE_NAME, N_("sample:Tax Table 1") + 7,
ENTRY_TAXTABLE_CELL, COMBO_CELL_TYPE_NAME, C_("sample for 'Tax Table'", "Tax Table 1"),
CELL_ALIGN_RIGHT, FALSE, FALSE
},
{
ENTRY_VALUE_CELL, PRICE_CELL_TYPE_NAME, N_("sample:999,999.00") + 7,
ENTRY_VALUE_CELL, PRICE_CELL_TYPE_NAME, C_("sample", "999,999.00"),
CELL_ALIGN_RIGHT, FALSE, FALSE
},
{
ENTRY_TAXVAL_CELL, PRICE_CELL_TYPE_NAME, N_("sample:999.00") + 7,
ENTRY_TAXVAL_CELL, PRICE_CELL_TYPE_NAME, C_("sample", "999.00"),
CELL_ALIGN_RIGHT, FALSE, FALSE
},
{
ENTRY_BILLABLE_CELL, CHECKBOX_CELL_TYPE_NAME, N_("sample:BI") + 7,
/* Translators: Abbreviation sample for Billable */
ENTRY_BILLABLE_CELL, CHECKBOX_CELL_TYPE_NAME, C_("sample for 'Billable'", "BI"),
CELL_ALIGN_LEFT, FALSE, FALSE
},
{
ENTRY_PAYMENT_CELL, COMBO_CELL_TYPE_NAME, N_("sample:Payment") + 7,
ENTRY_PAYMENT_CELL, COMBO_CELL_TYPE_NAME, C_("sample", "Payment"),
CELL_ALIGN_LEFT, FALSE, FALSE
}
};

View File

@ -636,10 +636,8 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
DATE_CELL_TYPE_NAME,
/* Translators: The 'sample:' items are
strings which are not displayed, but only
used to estimate widths. Please only
translate the portion after the ':' and
leave the rest ("sample:") as is. */
N_("sample:12/12/2000") + 7,
used to estimate widths. */
C_("sample", "12/12/2000"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -647,7 +645,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
DDUE_CELL,
DATE_CELL_TYPE_NAME,
N_("sample:12/12/2000") + 7,
C_("sample", "12/12/2000"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -655,12 +653,10 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
NUM_CELL,
NUM_CELL_TYPE_NAME,
/* Translators: The 'sample:' items are
/* Translators: The 'sample' items are
strings which are not displayed, but only
used to estimate widths. Please only
translate the portion after the ':' and
leave the rest ("sample:") as is. */
N_("sample:99999") + 7,
used to estimate widths. */
C_("sample", "99999"),
CELL_ALIGN_LEFT,
FALSE,
FALSE);
@ -668,7 +664,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
TNUM_CELL,
BASIC_CELL_TYPE_NAME,
N_("sample:99999") + 7,
C_("sample", "99999"),
CELL_ALIGN_LEFT,
FALSE,
FALSE);
@ -676,7 +672,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
DESC_CELL,
QUICKFILL_CELL_TYPE_NAME,
N_("sample:Description of a transaction") + 7,
C_("sample", "Description of a transaction"),
CELL_ALIGN_LEFT,
TRUE,
FALSE);
@ -692,11 +688,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
RECN_CELL,
RECN_CELL_TYPE_NAME,
/* Translators: The abbreviation for 'Reconciled'
in the header row of the register. Please only
translate the portion after the ':' and
leave the rest ("Reconciled:") as is. */
N_("Reconciled:R") + 11,
C_("Column header for 'Reconciled'", "R"),
CELL_ALIGN_CENTER,
FALSE,
FALSE);
@ -704,11 +696,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
ASSOC_CELL,
RECN_CELL_TYPE_NAME,
/* Translators: The abbreviation for 'Associate'
in the header row of the register. Please only
translate the portion after the ':' and
leave the rest ("Associate:") as is. */
N_("Associate:A") + 10,
C_("Column header for 'Associate'", "A"),
CELL_ALIGN_CENTER,
FALSE,
FALSE);
@ -716,7 +704,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
BALN_CELL,
PRICE_CELL_TYPE_NAME,
N_("sample:999,999.000") + 7,
C_("sample", "999,999.000"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -724,7 +712,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
XFRM_CELL,
COMBO_CELL_TYPE_NAME,
N_("Transfer"),
_("Transfer"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -732,7 +720,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
MXFRM_CELL,
COMBO_CELL_TYPE_NAME,
N_("sample:Expenses:Automobile:Gasoline") + 7,
C_("sample", "Expenses:Automobile:Gasoline"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -740,7 +728,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
ACTN_CELL,
COMBO_CELL_TYPE_NAME,
N_("sample:Expenses:Automobile:Gasoline") + 7,
C_("sample", "Expenses:Automobile:Gasoline"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -748,7 +736,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
MEMO_CELL,
QUICKFILL_CELL_TYPE_NAME,
N_("sample:Memo field sample text string") + 7,
C_("sample", "Memo field sample text string"),
CELL_ALIGN_LEFT,
TRUE,
FALSE);
@ -756,7 +744,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
DEBT_CELL,
PRICE_CELL_TYPE_NAME,
N_("sample:999,999.000") + 7,
C_("sample", "999,999.000"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -764,7 +752,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
CRED_CELL,
PRICE_CELL_TYPE_NAME,
N_("sample:999,999.000") + 7,
C_("sample", "999,999.000"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -772,7 +760,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
SHRS_CELL,
PRICE_CELL_TYPE_NAME,
N_("sample:999,999.000") + 7,
C_("sample", "999,999.000"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -782,7 +770,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
PRIC_CELL,
PRICE_CELL_TYPE_NAME,
N_("sample:999,999.000") + 7,
C_("sample", "999,999.000"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -790,7 +778,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
TDEBT_CELL,
PRICE_CELL_TYPE_NAME,
N_("sample:999,999.000") + 7,
C_("sample", "999,999.000"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -798,7 +786,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
TCRED_CELL,
PRICE_CELL_TYPE_NAME,
N_("sample:999,999.000") + 7,
C_("sample", "999,999.000"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -806,7 +794,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
TSHRS_CELL,
PRICE_CELL_TYPE_NAME,
N_("sample:999,999.000") + 7,
C_("sample", "999,999.000"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -814,7 +802,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
TBALN_CELL,
PRICE_CELL_TYPE_NAME,
N_("sample:999,999.000") + 7,
C_("sample", "999,999.000"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);
@ -822,11 +810,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
TYPE_CELL,
RECN_CELL_TYPE_NAME,
/* Translators: The abbreviation for 'Type'
in the header row of the register. Please only
translate the portion after the ':' and
leave the rest ("Type:") as is. */
N_("Type:T") + 5,
C_("Column header for 'Type'", "T"),
CELL_ALIGN_CENTER,
FALSE,
FALSE);
@ -834,7 +818,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
NOTES_CELL,
QUICKFILL_CELL_TYPE_NAME,
N_("sample:Notes field sample text string") + 7,
C_("sample", "Notes field sample text string"),
CELL_ALIGN_LEFT,
FALSE,
TRUE);
@ -842,7 +826,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
VNOTES_CELL,
BASIC_CELL_TYPE_NAME,
N_("sample:No Particular Reason") + 7,
C_("sample", "No Particular Reason"),
CELL_ALIGN_RIGHT,
FALSE,
TRUE);
@ -850,7 +834,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
FCRED_CELL,
FORMULA_CELL_TYPE_NAME,
N_("sample:(x + 0.33 * y + (x+y) )") + 7,
C_("sample", "(x + 0.33 * y + (x+y) )"),
CELL_ALIGN_LEFT,
FALSE,
FALSE);
@ -858,7 +842,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
FDEBT_CELL,
FORMULA_CELL_TYPE_NAME,
N_("sample:(x + 0.33 * y + (x+y) )") + 7,
C_("sample", "(x + 0.33 * y + (x+y) )"),
CELL_ALIGN_LEFT,
FALSE,
FALSE);
@ -866,7 +850,7 @@ gnc_split_register_layout_add_cells (SplitRegister *reg,
gnc_register_add_cell (layout,
RBALN_CELL,
PRICE_CELL_TYPE_NAME,
N_("sample:999,999.000") + 7,
C_("sample", "999,999.000"),
CELL_ALIGN_RIGHT,
FALSE,
FALSE);

View File

@ -303,7 +303,7 @@ gnc_split_register_get_recn_label (VirtualLocation virt_loc,
return _("Paid");
default:
return _("Reconciled:R") + 11;
return C_("Column header for 'Reconciled'", "R");
}
}
@ -325,7 +325,7 @@ static const char *
gnc_split_register_get_associate_label (VirtualLocation virt_loc,
gpointer user_data)
{
return _("Associate:A") + 10;
return C_("Column header for 'Associate'", "A");
}
static const char *

View File

@ -1166,7 +1166,6 @@
params))
(acct (get-val env 'account))
(children (get-val env 'account-children))
(children-displayed? (get-val env 'children-displayed?))
(label (get-val env 'account-label))
(acct-name (get-val env 'account-name)) ;; for diagnostics...
(report-commodity (get-val env 'report-commodity))
@ -1190,92 +1189,52 @@
(parent-acct-bal-mode
(or (get-val env 'parent-account-balance-mode)
'omit-bal))
(bal-method
;; figure out how to calculate our balance:
;; 'immediate-bal|'recursive-bal ('omit-bal handled below)
(or (and (equal? row-type 'subtotal-row) 'recursive-bal)
(and (equal? (+ display-depth 1) display-tree-depth)
(or (and (equal? limit-behavior 'summarize)
'recursive-bal)
(and (null? children) 'immediate-bal)
;; otherwise, parent account at depth limit,
;; with either 'truncate or 'flatten...
parent-acct-bal-mode
)
)
(if (null? children) #f parent-acct-bal-mode)
'immediate-bal
)
)
(comm-amt
;; this will be the immediate/recursive commodity
;; balance (a commodity collector) or #f.
(get-val env (assq-ref '((immediate-bal . account-bal)
(recursive-bal . recursive-bal)
(omit-bal . #f))
bal-method)))
(zero-mode (let ((mode
(get-val
env 'zero-balance-display-mode)))
(or (if (equal? mode #t) 'show-balance mode)
'show-balance)
))
(reverse-balance (gnc-reverse-balance acct))
(native-comm?
(lambda (amt)
(gnc:uniform-commodity? amt report-commodity)))
;; amount is either a <gnc:monetary> or #f
(amount (and comm-amt
(if (and (equal? zero-mode 'omit-balance)
(gnc-commodity-collector-allzero?
comm-amt)
)
#f
;; else:
;; this let* block evals to a <gnc:monetary>
(let*
((amt (gnc:make-commodity-collector)))
(if reverse-balance
(amt 'minusmerge comm-amt #f)
(set! amt comm-amt))
(or (and (native-comm? amt)
(gnc:sum-collector-commodity
amt
report-commodity
exchange-fn)
)
((if (and (equal?
multicommodity-mode 'table)
(equal?
row-type 'account-row)
)
gnc-commodity-table
gnc:sum-collector-commodity
)
amt
report-commodity
exchange-fn
) ;; factored from below
; (if (and (equal?
; multicommodity-mode 'table)
; (equal?
; row-type 'account-row)
; )
; (gnc-commodity-table
; amt
; report-commodity
; exchange-fn)
; (gnc:sum-collector-commodity
; amt
; report-commodity
; exchange-fn)
; )
)
) ;; end of let*
) ;; end of if
))
(indented-depth (get-val env 'indented-depth))
(bal-method
;; figure out how to calculate our balance:
;; 'immediate-bal|'recursive-bal ('omit-bal handled below)
(cond ((eq? row-type 'subtotal-row) 'recursive-bal)
((eq? (1+ display-depth) display-tree-depth)
(cond ((eq? limit-behavior 'summarize) 'recursive-bal)
((null? children) 'immediate-bal)
(else parent-acct-bal-mode)))
((not (null? children)) parent-acct-bal-mode)
(else 'immediate-bal)))
(comm-amt
(get-val env (assq-ref '((immediate-bal . account-bal)
(recursive-bal . recursive-bal)
(omit-bal . #f))
bal-method)))
(amt (and comm-amt
(if (gnc-reverse-balance acct)
(gnc:commodity-collector-get-negated comm-amt)
comm-amt)))
(zero-mode (let ((mode (get-val env 'zero-balance-display-mode)))
(if (boolean? mode)
'show-balance
mode)))
(native-comm?
(lambda (amt)
(gnc:uniform-commodity? amt report-commodity)))
;; amount is either a <gnc:monetary> or #f
(amount (and amt
(not (and (eq? zero-mode 'omit-balance)
(gnc-commodity-collector-allzero? amt)))
(cond
((and (not (native-comm? amt))
(eq? multicommodity-mode 'table)
(eq? row-type 'account-row))
(gnc-commodity-table
amt report-commodity exchange-fn))
(else
(gnc:sum-collector-commodity
amt report-commodity exchange-fn)))))
(indented-depth (get-val env 'indented-depth))
(account-colspan (get-val env 'account-colspan))
)
@ -1293,18 +1252,6 @@
amount
(+ account-cols (- 0 1)
(- logical-cols display-depth)
;; account for 'immediate-bal parents displaying children
;; NOTE: before you go mucking with this, BE ABSOLUTELY
;; SURE you know what you're doing... i spent A LOT of
;; time trying to make sure this is right. i know, in
;; some reports, the output might look incorrect. but,
;; if you think long and hard about it, i think you'll
;; find the current treatment correct... i think. -DM-
(- 0 (if (if (not children-displayed?)
#f
(equal? bal-method 'immediate-bal))
1 0)
)
(if (equal? subtotal-mode 'canonically-tabbed) 1 0)
) ;; amount-depth
1 ;; amount-colspan

View File

@ -457,23 +457,25 @@
)
(if show-account-bals?
(gnc:html-table-set-cell/tag!
build-table 0 (1+ cur-col) "number-header"
build-table 0 (+ cur-col account-cols) "number-header"
(_ "Balance"))
)
(let ((row 0))
(while (< row table-rows)
(let ((col 1))
(gnc:html-table-set-cell! build-table (1+ row) cur-col
(gnc:html-table-get-cell hold-table row 0))
(if show-account-bals?
(while (< col hold-table-width)
(if (gnc:html-table-get-cell hold-table row col)
(gnc:html-table-set-cell!
build-table (1+ row) (1+ cur-col)
(gnc:html-table-get-cell hold-table row col)))
(set! col (1+ col)))))
(set! row (1+ row))))
(set! cur-col (+ cur-col (if show-account-bals? 2 1)))
(let ((row 0))
(while (< row table-rows)
(gnc:html-table-set-row-markup! build-table (+ row 1)
(gnc:html-table-row-markup hold-table row))
(let ((col 0))
(while (< col hold-table-width)
(gnc:html-table-set-cell!
build-table (+ row 1) (+ cur-col col)
(gnc:html-table-get-cell hold-table row col)
)
(set! col (+ col 1))
)
)
(set! row (+ row 1))
)
)
(set! cur-col (+ cur-col hold-table-width))
(if show-account-notes?
(begin

View File

@ -75,7 +75,6 @@
(define headingpage (N_ "Headings 1"))
(define headingpage2 (N_ "Headings 2"))
(define notespage (N_ "Notes"))
;(define filespage (N_ "Files"))
(define displaypage (N_ "Display"))
(define elementspage (N_ "Elements"))
; option names
@ -323,9 +322,7 @@
(let ((options (options-generator)))
(set-opt options headingpage optname-report-title (_ "Tax Invoice"))
;(gnc:warn "title: " (gnc:option-value title-op))
(set-opt options headingpage optname-unit-price (_ "Unit"))
;(gnc:warn "unitprice: " (gnc:option-value unit-price-op))
(set-opt options headingpage optname-tax-rate (_ "GST Rate"))
(set-opt options headingpage optname-tax-amount (_ "GST Amount"))
(set-opt options headingpage2 optname-amount-due (_ "Amount Due (inc GST)"))

View File

@ -216,13 +216,13 @@
(let ((sxml (options->sxml balance-sheet-uuid balance-sheet-options "balsheet-multilevel")))
(test-equal "multilevel. root = $0.00"
(list "$0.00")
(sxml->table-row-col sxml 1 3 5))
(sxml->table-row-col sxml 1 3 6))
(test-equal "multilevel. assets = $0.00"
(list "$0.00")
(sxml->table-row-col sxml 1 4 4))
(sxml->table-row-col sxml 1 4 5))
(test-equal "multilevel. bank1 = $0.00"
(list "$0.00")
(sxml->table-row-col sxml 1 5 3))
(sxml->table-row-col sxml 1 5 4))
(test-equal "multilevel. bonds = $2,000.00"
(list "$2,000.00")
(sxml->table-row-col sxml 1 6 3))
@ -240,7 +240,7 @@
(sxml->table-row-col sxml 1 10 4))
(test-equal "multilevel. broker = $2,000.00"
(list "$2,000.00")
(sxml->table-row-col sxml 1 11 3))
(sxml->table-row-col sxml 1 11 4))
(test-equal "multilevel. funds = $15,000.00"
(list "30 FUNDS" "$15,000.00" "$15,000.00")
(sxml->table-row-col sxml 1 12 3))
@ -249,7 +249,7 @@
(sxml->table-row-col sxml 1 13 4))
(test-equal "multilevel. foreign = $0.00"
(list "$0.00")
(sxml->table-row-col sxml 1 14 3))
(sxml->table-row-col sxml 1 14 4))
(test-equal "multilevel. foreignsavings = #200.00 = $340"
(list "#200.00" "$340.00" "$340.00")
(sxml->table-row-col sxml 1 15 3))
@ -352,7 +352,7 @@
(let ((sxml (options->sxml balance-sheet-uuid balance-sheet-options "balsheet-incl-zb-accts=#t omit-zb-bals=#f")))
(test-equal "omit-zb-bals=#f"
(list "$0.00")
(sxml->table-row-col sxml 1 3 5))
(sxml->table-row-col sxml 1 3 6))
(test-equal "incl-zb-accts=#t"
'("Empty" "$0.00")
(sxml->table-row-col sxml 1 8 #f)))
@ -362,35 +362,41 @@
(let* ((pnl-options (default-pnl-testing-options))
(sxml (options->sxml pnl-uuid pnl-options "pnl-default")))
(test-equal "total revenue = $1,270.00"
(list "$1,270.00" "$1,270.00")
(sxml->table-row-col sxml 1 5 6))
(list "$1,270.00")
((sxpath '(// table // (tr 1) // table // (tr 5) // (td 6) // *text*))
sxml))
(test-equal "total expenses = $0.00"
(list "$0.00" "$0.00")
(sxml->table-row-col sxml 1 3 6))
(list "$0.00")
((sxpath '(// table // (tr 2) // table // (tr 3) // (td 6) // *text*))
sxml))
(set-option! pnl-options "Commodities" "Price Source" 'weighted-average)
(let ((sxml (options->sxml pnl-uuid pnl-options "pnl-weighted-average")))
(test-equal "weighted average revenue = $1160.36"
(list "$1,160.36" "$1,160.36")
(sxml->table-row-col sxml 1 5 6)))
(list "$1,160.36")
((sxpath '(// table // (tr 1) // table // (tr 5) // (td 6) // *text*))
sxml)))
(set-option! pnl-options "Commodities" "Price Source" 'average-cost)
(let ((sxml (options->sxml pnl-uuid pnl-options "pnl-average-cost")))
(test-equal "average-cost revenue = $976"
(list "$976.00" "$976.00")
(sxml->table-row-col sxml 1 5 6)))
(list "$976.00")
((sxpath '(// table // (tr 1) // table // (tr 5) // (td 6) // *text*))
sxml)))
(set-option! pnl-options "Commodities" "Price Source" 'pricedb-nearest)
(let ((sxml (options->sxml pnl-uuid pnl-options "pnl-pricedb-nearest")))
(test-equal "pricedb-nearest revenue = $1270"
(list "$1,270.00" "$1,270.00")
(sxml->table-row-col sxml 1 5 6)))
(list "$1,270.00")
((sxpath '(// table // (tr 1) // table // (tr 5) // (td 6) // *text*))
sxml)))
(set-option! pnl-options "Commodities" "Price Source" 'pricedb-latest)
(let ((sxml (options->sxml pnl-uuid pnl-options "pnl-pricedb-latest")))
(test-equal "pricedb-latest revenue = $1270"
(list "$1,270.00" "$1,270.00")
(sxml->table-row-col sxml 1 5 6)))
(list "$1,270.00")
((sxpath '(// table // (tr 1) // table // (tr 5) // (td 6) // *text*))
sxml)))
;; set multilevel subtotal style
;; verifies amount in EVERY line of the report.
@ -398,23 +404,29 @@
(set-option! pnl-options "Display" "Parent account subtotals" 't)
(let ((sxml (options->sxml pnl-uuid pnl-options "pnl-multilevel")))
(test-equal "multilevel. income = -$250.00"
(list "-$250.00" "-$250.00")
(sxml->table-row-col sxml 1 3 5))
(test-equal "multilevel. income-GBP = $0.00"
(list "-#600.00" "-$1,020.00" "-#600.00" "-$1,020.00")
(sxml->table-row-col sxml 1 4 5))
(list "-$250.00")
((sxpath '(// table // (tr 1) // table // (tr 3) // (td 6) // *text*))
sxml))
(test-equal "multilevel. income-GBP = -#600"
(list "-#600.00" "-$1,020.00")
((sxpath '(// table // (tr 1) // table // (tr 4) // (td 5) // *text*))
sxml))
(test-equal "multilevel. total income = -$1,270.00"
(list "-$1,270.00" "-$1,270.00")
(sxml->table-row-col sxml 1 5 6))
(list "-$1,270.00")
((sxpath '(// table // (tr 1) // table // (tr 5) // (td 6) // *text*))
sxml))
(test-equal "multilevel. total revenue = $1,270.00"
(list "$1,270.00" "$1,270.00")
(sxml->table-row-col sxml 1 6 6))
(list "$1,270.00")
((sxpath '(// table // (tr 1) // table // (tr 6) // (td 6) // *text*))
sxml))
(test-equal "multilevel. expenses = $0.00"
(list "$0.00" "$0.00")
(sxml->table-row-col sxml 1 3 6))
(list "$0.00")
((sxpath '(// table // (tr 2) // table // (tr 3) // (td 6) // *text*))
sxml))
(test-equal "multilevel. net-income = $1,270"
(list "$1,270.00" "$1,270.00")
(sxml->table-row-col sxml 1 4 6)))
(list "$1,270.00")
((sxpath '(// table // (tr 2) // table // (tr 4) // (td 6) // *text*))
sxml)))
;; set recursive-subtotal subtotal style
(set-option! pnl-options "Display" "Parent account balances" 'recursive-bal)

View File

@ -874,20 +874,6 @@ gnc_ui_account_get_tax_info_sub_acct_string (const Account *account)
return NULL;
}
static const char *
string_after_colon (const char *msgstr)
{
const char *string_at_colon;
g_assert(msgstr);
string_at_colon = strchr(msgstr, ':');
if (string_at_colon)
return string_at_colon + 1;
else
/* No colon found; we assume the translation contains only the
part after the colon, similar to the disambiguation prefixes */
return msgstr;
}
/********************************************************************\
* gnc_get_reconcile_str *
* return the i18n'd string for the given reconciled flag *
@ -901,22 +887,15 @@ gnc_get_reconcile_str (char reconciled_flag)
switch (reconciled_flag)
{
case NREC:
/* Translators: For the following strings, the single letters
after the colon are abbreviations of the word before the
colon. You should only translate the letter *after* the colon. */
return string_after_colon(_("not cleared:n"));
return C_("Reconciled flag 'not cleared'", "n");
case CREC:
/* Translators: Please only translate the letter *after* the colon. */
return string_after_colon(_("cleared:c"));
return C_("Reconciled flag 'cleared'", "c");
case YREC:
/* Translators: Please only translate the letter *after* the colon. */
return string_after_colon(_("reconciled:y"));
return C_("Reconciled flag 'reconciled'", "y");
case FREC:
/* Translators: Please only translate the letter *after* the colon. */
return string_after_colon(_("frozen:f"));
return C_("Reconciled flag 'frozen'", "f");
case VREC:
/* Translators: Please only translate the letter *after* the colon. */
return string_after_colon(_("void:v"));
return C_("Reconciled flag 'void'", "v");
default:
PERR("Bad reconciled flag\n");
return NULL;

View File

@ -21,8 +21,10 @@ execute_process(
--flag=g_scanner_error:2:c-format
--flag=g_scanner_warn:2:c-format
--keyword=_
--keyword=Q_:1g
--keyword=N_
--keyword=Q_
--keyword=C_:1c,2
--keyword=NC_:1c,2
--keyword=translate:1,1t
--keyword=translate:1c,2,2t
--keyword=translate:1,2,3t

9109
po/uk.po

File diff suppressed because it is too large Load Diff