Commit Graph

23122 Commits

Author SHA1 Message Date
Christopher Lam
3eaeda39fa [gnc-plugin-page-report] handle invalid renderer output
- renderer doesn't return an html-document object
- or, the html-document has no export-string nor export-error
2020-08-16 08:26:48 +08:00
Christopher Lam
21925c18be [gnucash-commands] handle invalid renderer return
- renderer doesn't return an html-document object
- or, the html-document has no export-string nor export-error
2020-08-16 08:25:50 +08:00
Christopher Lam
6d217a7bcf [gnc-plugin-page-report] remove compatibility path 2020-08-15 18:37:38 +08:00
Christopher Lam
469ef58026 [gnucash-commands] remove compatibility path 2020-08-15 18:37:38 +08:00
Christopher Lam
4de646b1c7 [report-core] remove output-file in gnc:cmdline-* fns 2020-08-15 18:37:38 +08:00
Christopher Lam
e84b404b74 [income-gst-statement] deprecate file-name argument in renderer 2020-08-15 18:25:22 +08:00
Christopher Lam
fee142b27a [trep-engine] deprecate #:filename argument in renderer 2020-08-15 18:24:57 +08:00
Christopher Lam
aa9602f0ed [gnucash-commands] use export-string/error 2020-08-15 10:54:53 +08:00
Christopher Lam
37c1bd47de [gnc-plugin-page-report] use export-string/error 2020-08-15 10:54:42 +08:00
Christopher Lam
31185c963a [taxtxf_de] set export-string for export-type='csv 2020-08-15 10:54:38 +08:00
Christopher Lam
b0ab79bed7 [taxtxf] set export-string for export-type='csv 2020-08-15 10:54:29 +08:00
Christopher Lam
0891e117c9 [trep-engine] set export-string or export-error for export-type 'csv 2020-08-15 10:53:42 +08:00
Christopher Lam
f645095242 [report-core] don't barf when output-file is #false 2020-08-15 10:53:40 +08:00
Christopher Lam
8b2707254f [html-document] add export-string|error fields in html-document 2020-08-15 10:53:24 +08:00
Christopher Lam
d1976fc7fe [gnc-plugin-page-report.c] set dialog parent properly 2020-08-14 22:23:00 +08:00
Christopher Lam
79476ba6dc don't crash if objects are built with invalid fieldnames
(gnc:define-report
 'version 3
 'name "Test Report Template4"
 'invalid-field-name 'x
 'report-guid "xxx")

gnc:define-report and other constructors will not crash when fieldname
is invalid.
2020-08-14 20:12:56 +08:00
Geert Janssens
237626f0db Dutch translation update
4721 translated messages, 562 fuzzy translations, 268 untranslated messages.
2020-08-12 18:22:30 +02:00
Geert Janssens
d843405df5 Apply most recent pot file to nl.po 2020-08-12 18:17:48 +02:00
Geert Janssens
00eba91a3b Tweak a few strings to reuse translations 2020-08-12 18:16:45 +02:00
Christopher Lam
9d28edb332 [gnucash-commands.cpp] fix guile error handling
* id is an SCM object which is never NULL, but may be #f to signal error.
2020-08-09 13:56:50 +08:00
Christopher Lam
be96f3bf68 [report-core] better documentation and handle ambiguous reportnames
* add comments describing args and return val
* rename vars to better describe them
* exported gnc:cmdline-template-export and gnc:cmdline-get-report-id
  handle ambiguous reportnames by returning #f
2020-08-09 13:54:15 +08:00
John Ralls
59f3376e75 gnc:cmdline-check-report should return #t if everything passes. 2020-08-08 16:15:31 -07:00
John Ralls
e8da10ba2e Use scm_from_locale_string for converting command-line input.
Because Windows generally can't enter UTF8 on the command line.
2020-08-08 15:01:33 -07:00
John Ralls
ff318255ad Bug 797880 - [gnucash-cli] encoding and font differing from...
manually exported reports (Win10, German locale).

Don't use Guile for output.
2020-08-08 13:44:26 -07:00
Frank H. Ellenberger
986908ea4a I18N: Fix a typo in the glossary 2020-08-08 18:20:50 +02:00
Christopher Lam
02e59cc977 [price-quotes.scm] ensure missing-alphavantage message can show on console 2020-08-08 12:19:27 +08:00
Christopher Lam
883705fdf8 [report-core] handle export properly
export code was tested using a custom saved-report, needing to call
the parent template export code. this could not work when a parent
template export code was called. enable path to call parent or custom
export-code.
2020-08-08 11:40:42 +08:00
Christopher Lam
0a64081b98 [taxtxf.scm] compact, allow error to console
taxtxf error handling is designed for gui. add code to call
gnc:gui-error which can also dump error to console if gui is not available.
2020-08-08 11:39:55 +08:00
Christopher Lam
f9286ac8f4 [budget.scm] fix report crash on books with unreversed budgets
there was bug in budget.scm whereby budget report would crash with
unreversed-budget featured book. the 'note' argument was missing when
calling disp-cols.
2020-08-05 23:30:11 +08:00
Christopher Lam
7df7e383c2 Merge branch 'maint-show-report-with-datafile' into maint #755 2020-08-05 18:41:05 +08:00
Christopher Lam
e75150c5c6 [gnucash-cli] -R show should accept & try load datafile
* file_to_load argument, if present, would be a candidate for loading.
* if loading fails, show report details anyway.
2020-08-05 18:40:48 +08:00
John Ralls
24e288ae47 Refactor gnc_gen_trans_list_create_matches
Extracting functions query_imported_transaction_accounts and perform_matching
and eliminating the early creation and passing of several local
variables.
2020-08-04 09:50:15 -07:00
John Ralls
67fb257641 Bug 797839 - Auto-complete prevents entering non-ASCII transaction descriptions
Try #2. Passing the wrong kind of string length to table_modify_update.
2020-08-03 13:15:19 -07:00
Christopher Lam
f35a26882d Addendnum to ad20f859c -- _ must be exported 2020-08-03 23:26:29 +08:00
Christopher Lam
ad20f859cc [core-utils] define _ for guile-2.2 2020-08-03 07:11:27 +08:00
John Ralls
2054e2022e Restore call to resolve_conflicts().
Lost in merging Bug 797730 PR.
2020-08-02 14:16:50 -07:00
John Ralls
1015c6aafd Add new python example file to POTFILES.in. 2020-08-02 14:15:20 -07:00
John Ralls
0f9a9e3c5e Merge Hong Xu's 'potential_matches' into maint. 2020-08-02 13:56:31 -07:00
Hong Xu
161a5d60c0 Variable name correction: "import_trans_account" --> split_account
I'm getting this error:

    /home/user/src/gnucash/gnucash/import-export/import-main-matcher.c: In
    function ‘gnc_gen_trans_list_show_all’:
    /home/user/src/gnucash/gnucash/import-export/import-main-matcher.c:1716:28:
    error: ‘import_trans_account’ may be used uninitialized in this
    function [-Werror=maybe-uninitialized]
             per_account_list = g_hash_table_lookup (lists_per_accounts,
    import_trans_account);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/user/src/gnucash/gnucash/import-export/import-main-matcher.c:1676:14:
    note: ‘import_trans_account’ was declared here
         Account *import_trans_account;

Looks like the variable name was incorrect.
2020-08-02 12:21:32 -07:00
John Ralls
103a053e89 Merge Jean Laroche's '797730_matcher_match_many_to_one' into maint. 2020-08-02 11:58:50 -07:00
John Ralls
efc34b247f Merge Jean Laroche's 'improve_ofx_import_speed' into maint. 2020-08-02 11:20:50 -07:00
John Ralls
ea2d89fac2 Merge Hong Xu's 'export-account' into maint. 2020-08-02 11:07:15 -07:00
Christopher Lam
0c2e17daf1 [job-report] clarify deprecation warning. 2020-08-02 20:08:12 +08:00
jean
a9f79cf79c Add a flag to the account structure to defer balance computation 2020-08-01 21:10:19 -07:00
jean
1f592ce191 Fix FOO and move deletion where it should be 2020-08-01 21:10:19 -07:00
jean
2be2ff8af4 To further increase the import speed, it's necessary to prevent any account commit to happen
until the very end of the import (OK or Cancel), because account commits trigger very lengthy balance
computations. For this, I call xaccAccountBeginEdit on all the accounts involved in the import,
keeping a list of them so BeginEdit is called only once. At the end of the import, commit is called
on all the accounts in the list. Note that when the user selects a target account for an imported
transaction, xaccAccountBeginEdit is called on the target account, and it is added to the list.

Another area of improvement is avoiding re-checking all register transactions to verify whether
a given imported transaction has already been matched. Instead, a hash table of split online IDs
is computed once (per account), and verified for each incoming transactions.

Finally, the list of register transactions that are potential matches for the imported ones is
further pruned ahead of time to only keep transactions that do not have an online ID. This avoid
the repeated checks that were previously happening in the match-score loop.

With this, importing 6000 transactions into a 6000 split account becomes fairly fast (a few seconds
on my slowish machine).

There are still slow areas: If you select all 6000 imported transactions and assign a destination
account to all of them, the process is impossibly sluggish because of repeated path operations
(selections, freeing) in the tree view.
If you do not specify a target account for any of the 6000 imported transactions, an "imbalance"
account is used, but the xaccAccountBeginEdit mechanism isn't applied to it by the new code, so
each imported transaction will trigger a commit, and therefore a slow balance recomputation.

Remove use of xaccTransGetSplit
2020-08-01 21:10:19 -07:00
jean
0da826f311 Instead of saving the imported transaction into the treeview, which takes more time
I now save them into a temporary list. A single query is done for all imported transactions
and the resulting register splits are put into a hash table of lists with accounts
as key, which will speed things up when multiple accounts are found.
My tests of large imports on large accounts seems to ate that most of the time is spent
verifying whether the imported transactions has already been imported, then computing
the balance repeatedly for each imported transaction (!)  when the user clicks OK to
add all the transactions to the account. So there's still room for improvement here!
2020-08-01 21:10:19 -07:00
jean
8551521476 Speeds up the import of ofx files by only doing one query at the end.
The previous ofx import code performed one query for each imported transactions, which
was quite slow. The change consists of gathering all ofx transactions before doing the
query. The query must be wider to search for all matching accounts (in case the imported
transactions come from different accounts) and an enlarge date range (according to the
earliest and latest imported transaction). The rest of the code is identical to what was
done before. The final query is performed just before the matching dialog is displayed.
2020-08-01 21:10:18 -07:00
Hong Xu
e0e77ca39d Add Python example export_account_totals.py
This example exports acount totals of all accounts into a CSV file.

This has been asked before: https://money.stackexchange.com/questions/111786/exporting-account-totals-in-gnucash
2020-08-01 14:47:33 -07:00
Christopher Lam
12ab85fa6c [advanced-portfolio] use G_ for guile-3.0 2020-08-01 13:55:29 +08:00