Commit Graph

676 Commits

Author SHA1 Message Date
Christopher Lam
24393b6f5c [utilities] fix comment use official gnu mail archive 2019-09-21 19:33:21 +08:00
Christopher Lam
0511ce723e [API] gnc:list-flatten flattens lists recursively
and is a schemey algorithm rather than a report algorithm, so, belongs
centrally.
2019-09-21 11:18:26 +08:00
Christopher Lam
3208879e64 [app-utils] upgrade Tax/Tax Number option to all locales
Previously de_DE locale will add a *global* 'Tax/Tax Number'
option. This is immediately translated.

This change will upgrade it to be present in all locales, and can be
queried by any report.
2019-09-20 14:57:57 +08:00
John Ralls
c23f3f05e3 Fix deprecated G_TYPE_INSTANCE_GET_PRIVATE and G_INLINE_FUNC
with the function/declaration that they substituted.
Note that this doesn't use the recommended new GObject creation macros
because the class names in libgnucash/engine don't follow the gnome
naming convention.
2019-09-12 15:25:42 -07:00
Christopher Lam
70cb3a0b97 [utilities] compact sort-and-delete-duplicates
This is still readable IMHO. kons is the result constructor, and adds
item to result iff different from previous add.
2019-09-11 20:30:13 +08:00
Frank H. Ellenberger
fa4fc551af Remove obsolete "disambiguation prefix" translator comments
https://lists.gnucash.org/pipermail/gnucash-devel/2019-September/044199.html

Continuation of commit d30fe7a
2019-09-10 00:13:01 +02:00
John Ralls
e6e2258a74 Bug 797356 - ninja check fails with GCC-9 2019-09-09 14:44:10 -07:00
Frank H. Ellenberger
bbcf19ae6a [I18N] use msgctxt for Reconciled flags
Final step for [Bug 797349] "A"ssociate header badly translated
2019-09-06 05:59:55 +02:00
Robert Fewell
2bcb9bb1a5 Test for Invoices XML dates not being INT64_MAX
To prevent errors being logged to the trace file when invoices are
saved test for the date values not being INT64_MAX which is an unset
date.
2019-08-29 11:28:18 +01:00
Robert Fewell
d677e3c5df Do not log an error when no default tax tables set 2019-08-29 11:27:10 +01:00
John Ralls
f00777ca07 Add scm-srfi64-extras and scm-qif-import as check dependencies
Fixes make check when make all hasn't been run.
2019-08-27 11:50:25 -07:00
Craig
04aab7cea3 Correctly parse decimals between 0 and -1.
The negative sign was being lost because stoll("-0") is 0.
Also permits parsing decimals between -1 and 1 without the leading 0.
2019-08-25 15:50:29 -07:00
Geert Janssens
7dc59950a5 Bug 797353 - Add copyright and release info in appdata file
This also means the appdata file now requires preprocessing to set this info
automatically.
2019-08-24 17:32:16 +02:00
Geert Janssens
c4a21bc9d4 Extract a few cmake commands to dedicated files rather than generating them on the fly
This simplifies a number of escape sequences.

The generated file to configure the man page was split up a bit further:
- code that extracted the GNC_VCS_REV_Y_M from gnc-vcs-info.h was spun out
  into its own function that now sets all parameters in gnc-vcs-info.h
  as environment variables.
- this function is now invoked by configure-manpage.cmake to extract
  the date to insert into the manpage.
- the manpage in addition now shows the full date rather than only
  yyyy-mm. This is how man itself does it as well.
2019-08-24 17:05:03 +02:00
Geert Janssens
0e9e3c107d Drop code path for cmake 3.1 and older
We require cmake 3.5
2019-08-24 17:01:50 +02:00
Christopher Lam
3d608efc22 [test-options] add to CMakeLists.txt
forgto to add to dist_list.
2019-08-23 19:51:13 +08:00
Christopher Lam
67751665b3 [taxtxf(-de_DE)] compact functions, use srfi-2
srfi-2 and-let* allows concise code and returns #f if any intermediate
var is #f.
2019-08-23 19:34:14 +08:00
John Ralls
fcc1653822 Replace overly indirect gnc_business_get_default_tax_table.
With gncTaxTableGetDefault.

qof_book_get_default_tax_table would have been even better but it
would have created a circular dependency between QofBook and
GncTaxTable.
2019-08-22 12:30:33 -07:00
Christopher Lam
bd9edbbbf6 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
2019-08-19 08:06:27 +08:00
John Ralls
8eb3819a3c Merge Christian Gruber's 'rework_gtest_src' into maint. 2019-08-15 15:18:07 -07:00
John Ralls
24d4576617 Include libicu-i18n in libgncmod-engine linkage for new ICU API usage. 2019-08-15 15:17:16 -07:00
Christian Gruber
1b4e481296 Add gtest_main.cc to libgtest.a
Currently when compiling GoogleTest from source code, source file
gtest_main.cc from GoogleTest repository is not compiled into any
library as in GoogleTest repository, where it is compiled into
libgtest_main.a. Instead gtest_main.cc is added to source file list
GTEST_SRC, which is then added to the list of source files of every
single GoogleTest based test application.

To simplify this gtest_main.cc is added to the source file list of
target gtest now. Additionally GTEST_SRC is merged into
lib_gtest_SOURCES, since both variables defined source files for
GoogleTest libraries.

Now target gtest generates library libgtest.a, which already contains
the main function from source file gtest_main.cc. This is different to
GoogleTest build system, where both are separated into two independent
libraries libgtest.a and libgtest_main.a.
2019-08-15 23:20:45 +02:00
Christopher Lam
f64dd0860f 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.
2019-08-15 13:18:46 +08:00
Geert Janssens
ec6602adf9 [gnc-date][API] find locale's start of week using ICU.
gnc_start_of_week

* ICU has a mature C++ api, so prefer that one in our C++ code
* Use PERR instead of fprintf for consistent reporting
* Add the ICU specific linker flags to the test case
2019-08-15 13:18:43 +08:00
Christopher Lam
bdbb06b722 [price-quotes] remove no F::Q message 2019-08-15 13:18:16 +08:00
Christopher Lam
2a6a4e34d6 [price-quotes] compact commodity-tz-quote-triple->price 2019-08-13 18:50:59 +08:00
Christopher Lam
e15f2610ba [price-quotes] compact gnc:book-add-quotes 2019-08-13 18:50:57 +08:00
Christopher Lam
4a4f81b320 [price-quotes] compact book->commodity->fq-call-data
make function more readable.
2019-08-13 18:50:55 +08:00
Christopher Lam
5e8663772a [price-quotes] compact gnc:fq-get-quotes 2019-08-13 18:50:53 +08:00
Christopher Lam
d5122c97ea [price-quotes] compact gnc:fq-check-sources
improve locality of vars.
2019-08-13 18:50:51 +08:00
Christopher Lam
fab1c8db3e [price-quotes] show if F::Q not installed, remove dead code 2019-08-13 18:50:48 +08:00
Christopher Lam
fbb6a95600 [simple-obj] deprecate this module
* it's only a wrapper for make-record-type
* use record-types directly in modules
2019-07-30 18:17:52 +08:00
Christopher Lam
e8a41bbf54 [options] compact lookup-option 2019-07-28 12:16:58 +08:00
Christopher Lam
bd0cbbf931 [test-options] initial commit
* test lookup option changed section/name
2019-07-28 12:16:58 +08:00
Christopher Lam
66511f17bb [c-interface] compact functions
fix whitespace. this module has good coverage in test-c-interface.scm.
2019-07-28 12:16:58 +08:00
John Ralls
887f7fac32 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.
2019-07-27 15:15:55 -07:00
John Ralls
456ab2241f Remove unused ifdefs for IMPLEMENT_BOOK_DOM_TREES_LATER.
Apparently stub code for a different way of generating the DOM tree, never implemented.
2019-07-26 16:17:09 -07:00
Frank H. Ellenberger
a0a0ffbb77 Bug 797319 - Mauritanian ouguiya MRO shows too few decimals
Add info about cash vs. banking
2019-07-25 23:51:50 +02:00
Frank H. Ellenberger
c77607c8c0 Bug 797316 - New Mauritanian ouguiya MRU not supported
Add info, which Mauritanian ouguiya is recent
2019-07-25 23:33:42 +02:00
Christopher Lam
681e023cd5 [date-utilities][API] deprecate unused exports, add comments
* deprecated:
  gnc:make-reldate-hash
  gnc:reldate-string-db
  gnc:relative-date-values
  gnc:get-relative-date-strings

* remove gnc:reldate-list, unused

* comment sections
2019-07-25 20:22:12 +08:00
Christopher Lam
7e9ec00906 [date-utilities] tidy up gnc:make-date-interval-list 2019-07-24 23:44:56 +08:00
Christopher Lam
a4811b3b46 [test-extras] add (create-test-invoice-data) for tests
this function creates some business data. moved from test-invoice.scm
without the invoice-specific tests. verified all invoices/bills are
created correctly.

it returns a vector-list of the 8 invoices generated.
2019-07-24 20:01:02 +08:00
John Ralls
ca87572a2c Bug 797319 - Mauritanian ouguiya MRO shows too few decimals
Changed MRO smallest-fraction to 100 based on information provided
by the reporter. ISO4217 has moved the MRO to the "Historical Currencies"
list that doesn't include CcyMnrUnits.
2019-07-23 09:42:43 -07:00
John Ralls
b02f7ac409 Bug 797316 - New Mauritanian ouguiya MRU not supported
Add new MRU with info from
https://www.currency-iso.org/dam/downloads/lists/list_one.xml
2019-07-23 09:42:28 -07:00
Christopher Lam
273ae720cc [scm-utilities][API] add sort-and-delete-duplicates
this can be used instead of delete-duplicates when the list must also
be sorted.

the main reason for this function will be for the upcoming aging.scm
report which will use it heavily to slice APAR splits into owner list.
2019-07-20 21:10:08 +08:00
Christopher Lam
fdeff65f06 [business-core] refactor & document gnc:owner-from-split
This function helps to establish UI link from register split to an
owner's split. It should not be used anywhere else. Its use in reports
will be removed.

It is also unnecessarily complex -- it is called from an AP/AR account
register split, it should have all necessary information via split
metadata. e.g. this function *can* return a split owner if originating
from an Asset/Liability account which settles an invoice, but this
functionality is not used because there is no asset/liability register
hook to call it.
2019-07-20 21:10:08 +08:00
Christopher Lam
d0bf4ad8ae [test-business-core] add to dist_list 2019-07-20 21:10:08 +08:00
John Ralls
e88f31e05c 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.
2019-07-19 21:20:43 -07:00
Christopher Lam
0c433e02f7 [business-core] deprecate gnc:entry-type-percent-p
This function is only used once. deprecate it.
2019-07-19 22:22:28 +08:00
Christopher Lam
e654bd34af [business-core] simplify functions 2019-07-19 22:22:28 +08:00