Commit Graph

18913 Commits

Author SHA1 Message Date
Christopher Lam
b6c6906bb1 REFACTOR: initialize accounts/filter by to null list 2017-12-24 00:13:39 +08:00
Christopher Lam
8e4d72b544 REFACTOR: rewrite renderers to lookup 'renderer-key from sortlists 2017-12-24 00:13:39 +08:00
Christopher Lam
afc6ca078c ENH: Show account description in subheadings 2017-12-24 00:13:39 +08:00
Christopher Lam
c4089ebcc3 REFACTOR: move add-split-row into make-split-table 2017-12-24 00:13:39 +08:00
Christopher Lam
dd22216845 REFACTOR: move *-choice-list into options-generator 2017-12-24 00:13:39 +08:00
Christopher Lam
d88d503b38 REFACTOR: simplify functions, reduce arguments 2017-12-24 00:13:39 +08:00
Christopher Lam
a5306d0454 REFACTOR: improve heading-list to handle dual headings 2017-12-24 00:13:39 +08:00
Christopher Lam
e1ba5f3248 REFACTOR: centralize BOOK-SPLIT-ACTION
Centralize BOOK-SPLIT-ACTION
2017-12-24 00:13:39 +08:00
Christopher Lam
070c99c1c2 REFACTOR: centralize DATE-SORTING-TYPES and SUBTOTAL-ENABLED
Also minor whitespace changes
2017-12-24 00:13:39 +08:00
Christopher Lam
d0c435e73d REFACTOR: centralize key-choice-list 2017-12-24 00:13:39 +08:00
Christopher Lam
a2008c492d REFACTOR: centralize date-subtotal-list 2017-12-24 00:13:39 +08:00
Christopher Lam
b9390cead1 REFACTOR: centralize sortkey-list 2017-12-24 00:13:39 +08:00
Christopher Lam
ff0d7cc2c4 REFACTOR: centralize numerous used-* into column-uses? helper function 2017-12-24 00:13:39 +08:00
Christopher Lam
02905fe38f REFACTOR: combine 2 key-choice-list into 1
Previously key-choice-list was selected from 2 lists depending
on use-split-action setting. This commit combines to 1 list
with suitable (if) clause in the middle.
2017-12-24 00:13:39 +08:00
Christopher Lam
ee01038ee5 REFACTOR: move some funcs to refactor later 2017-12-24 00:13:39 +08:00
Christopher Lam
7127df58da REFACTOR: always run qof-query-destroyer
Formerly the qof-query-destroyer is only called upon completion
of a successful report. This commit moves this destroyer to be
nearer the query call, thereby the destroyer is always called.
2017-12-24 00:13:39 +08:00
Christopher Lam
fe757dbe6a ENH: Optimise Transaction Matcher filter
This commit will trigger the transaction matcher only if the search string is not empty. Will speed up filtering.
2017-12-24 00:13:39 +08:00
Christopher Lam
e5a7660ac0 ENH: add reconciled status filtering 2017-12-24 00:13:39 +08:00
Christopher Lam
8990553e2e ENH: Move Account matcher to Filter tab
This commit moves the Account matcher into the Filtering tab in preparation for further options
2017-12-24 00:13:39 +08:00
Christopher Lam
4187cc1cd2 REFACTOR: Delete unused functions
These functions were probably deprecated from prior work
2017-12-24 00:13:39 +08:00
Christopher Lam
3f03cce164 REFACTOR: rename funcs, centralize strings 2017-12-24 00:13:39 +08:00
Christopher Lam
082811b909 ***reindent and remove trailing whitespace*** 2017-12-24 00:13:39 +08:00
Christopher Lam
809d277097 ENH: Move Transaction Matcher to new Filter tab 2017-12-24 00:13:39 +08:00
Christopher Lam
7e8ac532bf BUGFIX: change date-sorting-types
This commit changes date sorting types.

'date is posted-date and belongs to this list.
'reconciled-date is also date and may benefit from periodic subtotals.
'register-order is register default and may not be date.
2017-12-24 00:13:39 +08:00
Christopher Lam
ba2e0c5ff6 OBSOLETE: 'exact-time removed
This sortkey is handled identically to 'date and must be removed.
2017-12-24 00:13:39 +08:00
Christopher Lam
d93d4f68b0 options.scm: upgrade lookup-value to learn section changes 2017-12-24 00:13:39 +08:00
Geert Janssens
2f96b19c77 Merge branch 'fix_bayes' of https://github.com/limitedAtonement/gnucash into unstable 2017-12-23 15:10:48 +01:00
Geert Janssens
ddfd38d8c3 Remove cmake hoop to change file permissions
As we are using cmake's own configure_file command, it will just copy
the permissions of the input file, which is what we want here.
2017-12-23 14:07:25 +01:00
Geert Janssens
f11eab36d9 Replace GNC_CONFIGURE(2) with configure_file 2017-12-23 14:07:25 +01:00
John Ralls
19412de221 Fix use of guile function introduced in 2.0.10, not available in Ubuntu14.04.
Also generalize KVP type detection so that signed and unsigned values\nare appropriately converted.
2017-12-22 11:25:19 -08:00
John Ralls
6e9025d2f9 Don't build borrowed/gwengui-gtk3 if its provided by gwenhywfar. 2017-12-22 10:26:31 -08:00
John Ralls
e0300d3a62 Replace the gnc:numeric pair with normal Scheme rationals.
This allows direct conversion between Scheme numbers and gnc_numeric
without the performance or accuracy penalties arising from using doubles
as an intermediary.
2017-12-21 15:33:15 -08:00
John Ralls
7061803596 Remove SIGFIG rounding from price calculation.
Prices shouldn't be rounded except for display.
2017-12-21 15:33:15 -08:00
lmat
a80318ec5f Adding to version info to feature string 2017-12-21 13:19:01 -05:00
lmat
a23438d5fb Correct string cache code
string cache replace was incorrect and covered by gpointer casting.
2017-12-21 07:39:33 -05:00
lmat
805549ba24 Rename qofinstance function
This function was supposed to be renamed a while back. I had named it
this way for debugging purposes.
2017-12-21 07:39:33 -05:00
lmat
fbf4843f31 Changed bayes import map design
This commit introduces a new feature flag:
GNC_FEATURE_GUID_FLAT_BAYESIAN. It signifies that the bayes import map
data are stored flat and by guid. Any time bayes import map data are
accessed, they are converted if necessary.
2017-12-21 07:39:33 -05:00
lmat
f782be1a51 Code review responses
Using Aliases to represent cmplicated types
Corrected variable-sized array on stack
Using PascalCase for type names and aliases
2017-12-21 07:39:33 -05:00
lmat
3312fe2dcd Changed some constants to constexpr 2017-12-21 07:39:33 -05:00
lmat
29ad8ff9b0 Remove unused kvp function 2017-12-21 07:39:33 -05:00
lmat
4a88f05d11 kvp string: allocate enough space
We need to allocate enough space for the terminating null character.
Also, I double-checked the documents for std::basic_string::c_str () and
verified that it does guarantee the terminating null, so I put a comment
in the code that depends on that.
2017-12-21 07:39:33 -05:00
lmat
5b03182963 Correct kvp to_string typo 2017-12-21 07:39:33 -05:00
lmat
f260a01bfd Keep tokens as they are, don't translate them
Before, it was necessary to remove '/' from tokens so that they won't be
divided up within kvp. Now that kvp doesn't parse tokens, it's okay to
pass '/', and it's better not to translate user-provided tokens if at all
possible.
2017-12-21 07:39:33 -05:00
lmat
551549598a Corrected memory management issue 2017-12-21 07:39:33 -05:00
lmat
d9eebd332b Renaming functions to get rid of temporary name
_var_ was used to make sure I caught all references, but isn't intended
as a permanent name.
2017-12-21 07:39:33 -05:00
lmat
5636afc4a2 Kvp no longer parses entries looking for delimiters 2017-12-21 07:39:32 -05:00
lmat
2cda65e012 Added test for and corrected get_bayes_info 2017-12-21 07:39:32 -05:00
lmat
9d7ec35ce5 Removed qof_instance_set_kvp, qof_instance_get_kvp
And replaced them with versions that take lists of key path elements.
This is in an effort to eliminate the parsing of kvp keys.
2017-12-21 07:39:32 -05:00
lmat
eb6dad86e3 Fixed conversion problem
The conversion assumed there were only three levels to bayes import
map kvp: IMAP token, user-supplied token, GUID/account name. In
actuality, since user-supplied tokens could have the delimiter in them,
there could be several. This fix takes that into account like so:
IMAP token, potentially several user-supplied tokens, GUID/account name.

The import map is undergoing two conversions at the same time: account names
to guids and an hierarchical representation to a flat representation in KVP.
2017-12-21 07:39:32 -05:00
lmat
b3667c76fc Implement flat bayes kvp
The bayes data are stored in the KVP store. Before this commit, they are
stored under /import-map-bayes/<token>/<account guid>/count (where count
is the datum that "matters" in bayes matching).

The problem with this is that any token including the kvp delimiter
(currently '/') gets divided, and is not found correctly during bayes
kvp searching. The quickest solution to this is to replace all "/"
characters with some other character. That has been done, along with a
re-structuring of the bayes matching code to take advantage of c++
features to make the code more concise and readable.

Also modified some test functions to fix leaks and double-frees: the
same kvp value can't be in the kvp tree twice.

Also, when I added code to clean up after the tests, some things started
breaking due to double-delete. Apparently const_cast was hiding some
programming errors. Really? You don't say? When giving a GUID* to KvpValue,
the latter takes ownership of the former.
2017-12-21 07:39:32 -05:00