Commit Graph

19882 Commits

Author SHA1 Message Date
Geert Janssens
61071b9f6d Merge branch 'maint' 2018-05-12 14:10:38 +02:00
Geert Janssens
61fe647828 Use lowercase for account type descriptions 2018-05-12 14:08:08 +02:00
Geert Janssens
7f91cb82d7 Merge branch 'scheme-progress' of https://github.com/christopherlam/gnucash into maint 2018-05-12 14:07:59 +02:00
Robert Fewell
fc963f877c Change the right margin setting for reconcile totals
Change the margin setting from the gtk box to the label so it looks
correct when styled.
2018-05-11 21:35:35 +02:00
Robert Fewell
836705f980 Bug 795101 - Fix the reconcile window sort order
When the reconcile column was moved, the default sort order was not
altered for the change so fixed it. Also added enum so model columns
can be referenced by name which hopefully will make it easier to read.
2018-05-11 21:35:27 +02:00
Christopher Lam
388a4906b0 gnc:options->sxml allow alphanumeric in test filename 2018-05-11 16:41:35 +08:00
Christopher Lam
5e1c8e9132 business-reports/*.scm: close tags to make valid XHTML
This will be important for testing.
2018-05-11 16:00:06 +08:00
Christopher Lam
9eedea71ea test-GSTR: implementation testing for GST Report 2018-05-11 16:00:06 +08:00
Christopher Lam
66fcaa4f91 test-extras.scm: centralize (sxml->table-row-col)
This is used in conjunction with (gnc:options->sxml) to extract
html table cells.

From SXML tree, retrieve, from a <table>, the th/tr/td cells as a list
of string.
2018-05-11 16:00:06 +08:00
Christopher Lam
bb551af948 collectors.scm: rewrite binary-search-lt to be clearer 2018-05-10 23:33:35 +08:00
Christopher Lam
4e85102682 report-system/cmakelists: fix scm_test_report_system_SOURCES
These tests were disabled by mistake in cbd8764780
2018-05-10 23:33:35 +08:00
Christopher Lam
4c55141d96 html-utilities.scm: simplify 2018-05-10 23:33:35 +08:00
Christopher Lam
ded88b01dd list-extras.scm: trim useless utility functions
These functions are either better defined in R5RS (list-min-max),
unused (function-compose), or being defined in the .scm using
them (list-leaves).
2018-05-10 22:21:55 +08:00
Christopher Lam
1df7fb4048 html-text.scm: schemify 2018-05-10 22:21:55 +08:00
Christopher Lam
d4cb87fe3d business-report/test: create test directory
These tests will all be SRFI-64 based.
2018-05-10 22:21:55 +08:00
Christopher Lam
23410ca429 html-table.scm: centralize (gnc:html-table-set-last-row-style!)
This html-table modifier seems common enough to centralize into
html-table.scm.
2018-05-10 22:21:55 +08:00
Christopher Lam
97ab1b19fe test-date-utilities.scm: to SRFI64
Clearer syntax helped find flawed test - while set-tm:mday directly
accepts 1-31, set-tm:mon accepts 0-11 to represent 1-12, therefore
must minus 1. set-tm:year accepts 92 to represent 1992, therefore must
minus 1900.
2018-05-10 22:21:55 +08:00
Christopher Lam
13f31e0691 test-extras.scm: (logging-and) is obsolete
Use the much nicer SRFI-64 forms instead.
2018-05-10 22:21:55 +08:00
Christopher Lam
5e0fc04f7b test-extras.scm: remove dead code
These functions are never used through code.
2018-05-10 22:21:55 +08:00
Christopher Lam
8ddee96463 test-extras.scm: centralize (gnc:options->sxml)
I think this is useful enough to be upgraded.
2018-05-10 22:21:05 +08:00
Christopher Lam
c6032ac6ed srfi64-extras.scm: centralize (gnc:test-runner)
This is good enough to be used widely.
2018-05-10 13:19:03 +08:00
Christopher Lam
dda6730c44 utilities.scm: centralize and modernize addto!
(define-macro) is discouraged in most scheme forms. Change
to (define-syntax), and centralize common macro to utilities.scm
2018-05-10 13:19:03 +08:00
Christopher Lam
4a27285edd html-utilities.scm: new home (gnc:html-render-options-changed)
We want to sanitize render-options-changed, therefore it must return
an html-object. Unfortunately this is not accessible to
app-utils/options.scm. If we move this function to
report-system/html-utilities.scm, it can access html-objects.

Also rename it to gnc:html-render-options-changed
2018-05-10 13:19:03 +08:00
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
435b0ace18 Merge branch 'maint' 2018-05-04 10:13:29 -07:00
gnucash-dev
8b3a874418 Fix typo 2018-05-04 10:04:52 -07:00
Geert Janssens
52ac539d23 Merge branch 'maint' into master
Handle conflict between version number reset and lowercasing all commands
2018-05-04 10:25:38 +02: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