Commit Graph

19804 Commits

Author SHA1 Message Date
Christopher Lam
44a568bc45 GSTR: sanitize string
Instead of returning raw html string, return an html-object.
2018-05-10 13:19:03 +08:00
Christopher Lam
fd02871678 TR: sanitize string
This will change the HTML slightly, so, requires an update to the test
suite.
2018-05-10 13:19:03 +08:00
Christopher Lam
d68ccc3306 TR: rename some variable names to be more descriptive
The previous names were remnants of old transaction.scm and were not
exactly consistent. Use more descriptive names.

The only user-visible change is elimination of <br/> in the
common-currency account header, because this will be sanitized.  The
table col-headers cannot unfortunately accept a (gnc:make-html-text)
object therefore we cannot add <br/> at all. I vote to display
e.g. "Debit (USD)" instead.
2018-05-10 13:19:03 +08:00
Christopher Lam
ac510d13be TR: (ENH) add Closing-status filter, enable it by default
This commit will add a filter to include/exclude closing
transactions. In conventional reports, they are usually disruptive to
the regular periodic reporting and the default ensures they are not
included.

This commit also changes income-gst-report.scm to use the closing
filter just created, and disable its UI.
2018-05-10 13:19:03 +08:00
Christopher Lam
4b9ec663f7 TR: (ENH) do not add headers if hiding transaction data 2018-05-10 08:43:00 +08:00
Christopher Lam
f82e5a5b4b TR: (ENH) enable subtotal/grouping for Split Memo 2018-05-10 08:43:00 +08:00
Christopher Lam
f89f00f59d TR: (ENH) enable subtotal/grouping for Transaction Description 2018-05-10 08:43:00 +08:00
Christopher Lam
4a7bc0b53d TR: (ENH) enable subtotal/grouping for Transaction Notes 2018-05-10 08:43:00 +08:00
Christopher Lam
2102c55bb7 TR: (centralize) centralize custom-sorter split comparators
This commit will modify the custom sorter to reuse 'split-sortvalue
comparators. The original purpose of these functions was to *compare*
splits *during* table generation to determine whether a subtotal group
was changed. These functions can be easily reused by the custom sorter
to *sort* splits *before* table generation.

Also modify the sortkey renderer logic to catch all non-date,
non-account sortkeys into the generic string renderer.
2018-05-10 08:43:00 +08:00
Christopher Lam
b95fa5ba8c TR: (simplify) dynamically check CUSTOM-SORTING?
Instead of a list needing manual adjustments, this function will check
if sortkey requires custom sorter, depending on sortkey capabilities.
2018-05-10 08:43:00 +08:00
Christopher Lam
6210b80fd0 TR: (simplify) dynamically check SUBTOTAL-ENABLED?
This function checks whether the sortkey can be grouped. Instead of
manually creating list, test it dynamically.

Sortkeys whose 'renderer-fn is defined can be grouped.
2018-05-10 08:43:00 +08:00
Christopher Lam
6e78fa1d99 test-TR: change report out filenames
This will allow easier addition of tests.

Also fix (use-modules) usage. VM is only needed for coverage reporting.
2018-05-10 08:43:00 +08:00
Geert Janssens
2e53d64726 Work around gtk warnings with gcc 8.0 2018-05-09 22:18:29 +02:00
Geert Janssens
1f3cf845c4 Work around a conflict between gcc 8.0 and swig 3.0
The swig 3.0 generated python wrappers trigger a warning converted into an error issued
by gcc 8.0 for using strncpy as follows:
strncpy(buff, "swig_ptr: ", 10);
The reason is this call will truncate the trailing null byte from the string.
This appears to have been fixed in swig master already but that's not released yet
so let disable the warning when compiling the swig wrappers until it is.
2018-05-09 22:18:29 +02:00
Geert Janssens
27c1df30af Handle the common csv double quote escape variation (repeating the double quote) 2018-05-05 13:43:27 +02:00
Geert Janssens
682b5cf581 Bug 795666 - Backslash "\" in Description field spoils CSV Import without helpful error message
We've configure boost::tokenizer to take the backslash as the escape character
However boost::tokenizer will throw if it encounters a sole backslash that's
not an escape (it would expect two if a pure backslash is to be inserted).
Avoid this by replacing lone backslashes (not part of escapes) with double
backslashes before passing control to the tokenizer.
2018-05-05 13:43:24 +02:00
gnucash-dev
8b3a874418 Fix typo 2018-05-04 10:04:52 -07:00
Geert Janssens
85c7f7d1cb Install guile-json on the toplevel scm directory instead of gnucash
It's imported code, not gnucash specific. In addition that's where the json
script expexts to find it's subfiles.
2018-05-04 10:22:57 +02:00
John Ralls
5aacb581d7 Merge PR116 into maint. 2018-05-03 17:36:10 -04:00
Geert Janssens
a9f35ed7ae Lowercase cmake commands
A huge bikeshed fest but it distracted me enough to do it anyway.
2018-05-03 23:18:15 +02:00
Geert Janssens
65c7139072 Merge branch 'import_guile_json' into maint 2018-05-03 21:20:28 +02:00
Geert Janssens
92afea59ae Fix guile-json inclusion 2018-05-03 21:19:55 +02:00
Christopher Lam
50e109a9fa guile-json: attempt cmake 2018-05-03 21:13:52 +02:00
Christopher Lam
02cfd017e9 guile-json: upgrade to 4-byte unicode chars. 2018-05-03 21:13:52 +02:00
Christopher Lam
f2337406a3 Modify CMakeLists to test for presence of guile-json 2018-05-03 21:13:52 +02:00
Christopher Lam
52d5f0ba2d guile-json - initial commit 2018-05-03 21:13:52 +02:00
Geert Janssens
85e0a73739 Merge branch 'patch-1' of https://github.com/fkoester/gnucash into maint 2018-05-03 19:07:36 +02:00
Geert Janssens
075c0c4db3 Make 'Printable report' in invoice search dialog work
The code couldn't find a proper main window to attach
the report(s) to.
2018-05-03 19:00:45 +02:00
Geert Janssens
0c6b92959a Get metadata migration working again when upgrading from 2.6 to 3.1
Due to a typo the old GNC_DOT_DIR path was wrong
($HOME.gnucash instead of $HOME/.gnucash)
2018-04-30 20:59:25 +02:00
John Ralls
02266d72d9 Add GNC_DBD_DIR to etc/gnucash/environment for MacOS builds. 2018-04-29 21:48:51 -07:00
John Ralls
6645d93f9a Release GnuCash 3.1 2018-04-28 14:33:04 -07:00
John Ralls
20c59f7c30 Update translations from the Tranlation Project. 2018-04-28 12:38:14 -07:00
Geert Janssens
b761b5a0dc Bug 795377 - Reads and saves Gnucash 2.6.19 XML file, then can't reread it, due to bad date in old file
This commit contains another round of cleanups in the
timespec to time64 conversion. There were a number of
false assumptions that time64 = 0 would be a bad date
in the xml parser. This commit corrects enough of them to
eliminate the bug. Further cleanup is probably advised but
can be done at a later stage.
2018-04-28 12:19:28 +02:00
John Ralls
9c4469d039 Bug 795405 - All Dates in Price Database Off-By-One After 3.0 Upgrade
Also Bug 791825 - Accounting Period dates off by 1.
The DST start/end dates were reversed *and* the DST offset had the wrong
sign in Windows, resulting in the effective timezone always being one to
the west off (i.e. PDT was -9 and PST was -8).
2018-04-27 15:00:28 -07:00
John Ralls
83e993fb80 Add a TimeZoneProvider::dump().
Because gdb can't always see clearly inside m_zone_vector.
2018-04-27 14:16:49 -07:00
John Ralls
f6855bc0f8 Rename zone_vector to m_zone_vector.
To comply with coding spec.
2018-04-27 14:16:49 -07:00
Geert Janssens
3e41bb011d Merge branch 'maint-string-html-escape' of https://github.com/christopherlam/gnucash into maint 2018-04-27 19:06:23 +02:00
Christopher Lam
ecab580351 Remove regex dependency 2018-04-28 00:37:44 +08:00
Christopher Lam
583c0217c4 line&bar chart subtitles are always sanitized
This obviates bug 726449 for consistency
2018-04-28 00:37:44 +08:00
Christopher Lam
ba2c1f6a05 html-jqplot.scm begone!
Remove unused jqplot-escape-string, and move remaining
(gnc:html-[js|css]-include) functions to html-utilities.scm
2018-04-27 22:26:20 +08:00
Christopher Lam
fcb5f64bd5 jqplot-escape-string -> gnc:html-string-sanitize 2018-04-27 22:26:20 +08:00
Geert Janssens
bc5f86ff92 Bug 794941 - Both print icons export to pdf
This affects only Windows and OS X gnucash users. On linux we use
webkit2 for our report handling which has the opposite issue, namely
that both buttons will open the print dialog and it's no longer possible
to effectively export directly to pdf (though one can choose print to file
in the print dialog as a work around). This inverse issue is tracked separately in
https://bugzilla.gnome.org/show_bug.cgi?id=787018
2018-04-27 16:13:34 +02:00
Christopher Lam
ea71c696c2 New function gnc:html-string-sanitize
Function to sanitize strings prior to adding to html report. This is
functionally similar to jqplot-escape-string, and is not locale sensitive.
2018-04-27 22:08:39 +08:00
Geert Janssens
d0fca7794e Merge branch 'fixes3' of https://github.com/Bob-IT/gnucash into maint 2018-04-27 11:33:57 +02:00
Geert Janssens
d69cdaebf2 Add new test source to distribution list 2018-04-27 09:55:58 +02:00
Geert Janssens
74fd6e046b Add a few unit tests for qofquerycore 2018-04-26 23:06:36 +02:00
Geert Janssens
2498f9393d Update make-testfile for new sourcefile locations 2018-04-26 23:06:36 +02:00
Geert Janssens
c71204628d Bug 795031 - 3.0 Crashes on loading when opening 2.6.19 file 2018-04-26 23:06:36 +02:00
Geert Janssens
4aadfbe636 Bug 795040 - GnuCash crashes when searching for a newly created bill 2018-04-26 23:06:35 +02:00
John Ralls
0106a771d0 Bug 795039 - Crash on startup using Technicolor Style sheet in report
Take 3: Catch encoding exceptions from trying to read a string into
Scheme using scm_from_utf8_string and try again using
scm_from_locale_string. If that throws too, give up and log a
warning.
2018-04-26 13:01:00 -07:00