Commit Graph

21919 Commits

Author SHA1 Message Date
Geert Janssens
633f2e3001 Merge branch 'splitreg_copyops' 2019-12-07 09:15:39 +01:00
Geert Janssens
9b803428ef split register - add tests for copy operations 2019-12-06 19:59:11 +01:00
Geert Janssens
f5e28c3d0f split register - drop scm copy interface 2019-12-06 19:41:50 +01:00
Geert Janssens
cb273b13a1 split register - use C copy interface instead of scm copy interface 2019-12-06 19:29:47 +01:00
Geert Janssens
543fab2513 split-register - port copy operations from scm to c
This is done with minimal interpretation, to be able to easily
compare with the original scheme code.
It will most likely be optimized in future commits
2019-12-06 19:29:11 +01:00
Geert Janssens
9f5cbb3a82 app-utils - move register's copy operations to ledger-core
They are only used by split-register.c in that directory
2019-12-04 19:23:14 +01:00
Geert Janssens
02afa33e54 app-utils - reduce guile-util api-surface
Make internal-use only function static and drop two unused functions.
2019-12-04 19:23:14 +01:00
Geert Janssens
efefac3e1e Dead code removal 2019-12-04 19:23:14 +01:00
Robert Fewell
6989864723 Enable setting the hexpand property for GNCAccountSel
Add a function to allow setting of the hexpand property of widget
GNCAccountSel and the combobox it is comprised off along with using
the function in various source files to set the hexpand property.
2019-12-03 20:01:37 +00:00
Robert Fewell
fbb2ffb728 Change alignment of dialogue text to pack end
Change packing of text to the end to match other dialogues.
2019-12-03 20:01:37 +00:00
Robert Fewell
202a7e40d8 Remove label column for gnc_date_format_new_without_label
Currently the label is destroyed if not required but the grid column is
still present and as such uses the grid column spacing setting which
causes the date format to be offset, this can be seen in the print
cheque dialogue so instead remove the first column which has the label.
2019-12-03 20:01:37 +00:00
Robert Fewell
d122fa397f Remove GtkAlignment and use GtkGrids in glade files - Part4 2019-12-03 20:01:37 +00:00
Robert Fewell
2e311da1cc Remove GtkAlignment and use GtkGrids in glade files - Part3 2019-12-03 20:01:37 +00:00
Robert Fewell
dee3c47489 Remove GtkAlignment and use GtkGrids in glade files - Part2
A couple of source files were also altered to set hexpand
2019-12-03 20:01:37 +00:00
Robert Fewell
87b9725573 Remove GtkAlignment and use GtkGrids in glade files - Part1 2019-12-03 20:01:37 +00:00
Robert Fewell
8f02f43be0 Rearrange some help buttons
Some help buttons were in the wrong order so rearrange them and enable
the secondary packing option for the button.
2019-12-03 20:01:37 +00:00
Robert Fewell
65948137b2 Change dialog-options to use a two column GtkGrid
Change the dialog options to use a two column grid and setup to be the
same as other dialogs. In the first column there is the 'name' of the
option and the right column the 'option widget'. Also add the radio
button option to the examples report for testing.
2019-12-03 19:31:00 +00:00
Christopher Lam
ce32117f70 [budget] use gnc:html-markup-ol 2019-12-02 23:38:21 +08:00
Christopher Lam
948a5f4588 Merge branch 'maint' 2019-12-02 23:38:15 +08:00
Christopher Lam
7833c59896 Bug 724219 - Customer Summary includes Closing Entries when reporting across the end of year 2019-12-02 22:20:17 +08:00
Christopher Lam
7ad4c4afbd [html-acct-table] compact gnc:html-acct-table-get-cell 2019-12-02 22:20:17 +08:00
Christopher Lam
8bf54ebfc1 [html-acct-table] compact traverse-accounts!
* convert for-each to named-let
* allows reduction of set! calls
2019-12-02 22:20:17 +08:00
Christopher Lam
ab20071d82 [report-utilities] strify hash-table to Hash(kvp-list)
Hash tables are strified to "Hash()" "Hash(key=value,...)"
2019-12-02 18:20:02 +08:00
Christopher Lam
2333b6db27 [reports] avoid "<br/>" literal: use gnc:multiline-to-html-text 2019-12-02 16:48:05 +08:00
Christopher Lam
3ee434edf6 [new-aging] use gnc:html-markup-ol 2019-12-02 00:32:02 +08:00
Christopher Lam
4aa17ef65b [html-text][API] gnc:html-markup-ol, gnc:multiline-to-html-text
* (gnc:html-markup-ol lst)

  creates an ordered list

* gnc:multiline-to-html-text: creates html-text with <br/> elements

  "line1\nline2\nline3" ->
  (gnc:make-html-text "line1" (gnc:html-markup-br)
                      "line2" (gnc:html-markup-br)
                      "line3")
2019-12-02 00:32:02 +08:00
Christopher Lam
a52d60f48e [business-reports] compact gnc:owner-report-text 2019-12-02 00:32:02 +08:00
Geert Janssens
df1f033f41 bindings-python - drop references to gnucash-env
We no longer ship a gnucash-env script, directly use python(3) instead
2019-11-30 13:20:08 +01:00
Christopher Lam
0b11a073f0 Merge branch 'maint' of git://github.com/andrey-legayev/gnucash into maint 2019-11-30 16:34:48 +08:00
Christopher Lam
c21bb66d68 [balsheet-pnl] refactor common account-balance-list adder
* use fold, more efficient, removes the need for intermediate list

  (map cdr (filter filter-fn accounts-balances)): filter will create 1
  intermediate list, which is passed as an argument to map which
  creates the final list. using fold will remove the need for
  intermediate list.

* list->vector for O(1) access
2019-11-30 16:34:28 +08:00
Christopher Lam
def0caa011 [balsheet-pnl] use and-let*, reindent 2019-11-30 16:34:17 +08:00
Christopher Lam
e97b78df80 [balsheet-pnl] fix: single-date balsheet missed printing date 2019-11-30 16:34:17 +08:00
Christopher Lam
54c4575f27 [balsheet-pnl] fix: hide Equity sections when not needed
* If currencies are not converted, Unrealized Gains are
meaningless. Hide them.

* If there are no income/expense accounts, retained earnings will be
nil. Remove row.
2019-11-30 16:34:06 +08:00
Andrey Legayev
34c14b44a9
Remove not needed semicolons in Python bindings 2019-11-29 18:32:50 +02:00
John Ralls
7853f5a24a Ignore trailing noise on imported transaction account numbers.
AQBanking6 uses a separate method for retrieving account numbers
for account info and transactions, where the transactions method can
have additional characters, most often the ISO4217 currency code. That
results in match failures when importing.

As a work-around, compare only the length of the account-info-generated
online id when comparing it to the transaction-generated one.

Note that this is only a partial solution: At least one German bank
also appends characters to the transaction-generated bank id and that
will still cause the match to fail.
2019-11-28 09:17:59 -08:00
Geert Janssens
f039cc80e9 Fix ninja-build check without running ninja-build first
The (gnucash reports) guile module should be built before the reports
depending on it.
2019-11-27 17:28:53 +01:00
Christopher Lam
1af8e272c7 [balsheet-pnl] unrealized-gain calculator is now much faster.
Previous code would call gnc:account-get-comm-value-at-date for each
report-date; this function generates qof-query, retrieves account
splits, scans them to accumulate split->transaction->currency and
split->value into a commodity collector.

This commit will hook into the existing gnc:account-accumulate
function, accumulating the same split->transaction->currency and
split->value into a collector.

Note we must make a copy of the accumulator at each report-date
via (gnc:collector+ val-coll) otherwise the same val-coll will be
mutated through subsequent splits.

For a multicolumn balsheet, for every account with N old splits, and
reporting on M report dates, it would run in O(N*M) time. This
algorithm will hook into existing accumulator, i.e. I think O(1).

The majority speed-up however comes from avoiding M qof-queries per
report.
2019-11-26 21:52:10 +08:00
Christopher Lam
ff298b365f [test-balsheet-pnl] add multicol-balsheet and multicol-pnl tests
This commit adds tests for multicolumn balance-sheet and
income-statement. It mainly tests:

* multiple periods
* unrealized gains calculators
* amounts/balances are predictable
2019-11-26 20:51:35 +08:00
Christopher Lam
88644451ef [test-balsheet-pnl] separate balance-sheet and pnl tests
This is in preparation for balsheet-pnl tests. Note all tests use same
data -- there's no (teardown).
2019-11-26 20:51:20 +08:00
Christopher Lam
119fdc368b [report-utilities] can strify records
srfi-9 records can contain complex objects eg lists/vectors also
gnc:monetary or gnc:html-table objects. previously gnc:strify would
use the default printer; this commit modifies so that they are
prettified.

example output; a :col-datum record from balsheet-pnl. the record's
split-balance contains a $0 monetary object.

Rec::col-datum{last-split=#f, split-balance=[$0.00]}

this last pretty-printer must be the last one before object->string,
because we want previous printers which may be records too
eg. monetary->str etc to use their own printer.
2019-11-26 20:51:02 +08:00
Robert Fewell
cbc8cc8d8c Remove file committed by mistake 2019-11-25 20:43:39 +00:00
Robert Fewell
574d1a99f2 Add warning label in Import Account Matcher for Commodity
When an account is selected for matching the incoming source, at the
moment any account can be selected apart from a place holder account.
If the required commodity is passed in, display a warning if the
selected account is a different commodity and disable the OK button.
2019-11-25 16:18:27 +00:00
Robert Fewell
8afbe89772 Change image from a stock to an icon name 2019-11-25 16:18:27 +00:00
Robert Fewell
789339c4b7 Set ellipsis on Memo column of import matcher
On first load the Description and Memo columns are set to the width of
the longest piece of text which can force the Info column out of site
so add the 'ellipsize end' to the memo column which will help keep the
info column in view.
2019-11-25 16:18:27 +00:00
Robert Fewell
3ac440121d Info column in matcher looks odd if other columns are resized
The Info column has a cell_render_pixbuf and a cell_render_text aligned
to the left. If the info column is made larger, the text does not keep
to the left so split them into there own columns.
2019-11-25 16:18:27 +00:00
Robert Fewell
d50d3de8b5 Remove a vertical black line from import matcher
When change a row to skipping it, a pixbuf is created with just a
vertical black line and looks odd. There is no reason to create a
pixbuf so change the value in the store to NULL. Do the same when
the 'match missing' is displayed.
2019-11-25 16:18:27 +00:00
Robert Fewell
161bb5f65d Change import-main-matcher to display matched information
Change the import-main-matcher tree view to use a tree store and add
the matched information as a child row.
2019-11-25 16:18:21 +00:00
Christopher Lam
6c3b24a9b6 [html-style-info] remove font-face/size/color from style-info
These were unused in real code.
2019-11-25 20:38:16 +08:00
Christopher Lam
ea9d5fb197 Merge branch 'maint' 2019-11-25 19:45:26 +08:00
Christopher Lam
0973d54d6c [report-utilities] make gnc:owner-splits->aging-list less noisy
invoice processing messages dumped in debug mode. use gnc:msg
2019-11-25 18:35:26 +08:00