Commit Graph

21363 Commits

Author SHA1 Message Date
Christopher Lam
b9382d2cf2 [commodity-utilities] move gnc:debug to less CPU critical code
pricealist is a long list generated once, yet is dumped via gnc:debug
for every call to gnc:exchange-by-pricealist-nearest. This change
moves gnc:debug to the initial pricealist generation, ensuring that
gnc:exchange-by-pricealist-nearest is much faster.
2019-07-06 23:13:24 +08:00
Christopher Lam
e783335cf2 [commodity-utilities] compact gnc:sum-collector-commodity
This function converted to purely functional approach.

Note that commodity-collectors always round amounts to the currency
SCU therefore we replicate the behaviour here.
2019-07-06 23:13:24 +08:00
Christopher Lam
dd1873eb05 [test-cash-flow] fix test which was badly designed
this test had confused 2 functions:

(exchange-fn monetary currency) --> monetary
  and
(to-report-currency currency amount date) --> amount

this flaw surfaces with the shortened gnc:sum-collector-commodity definition.
2019-07-06 23:13:24 +08:00
Christopher Lam
4214f7eb76 [balsheet-pnl] bugfix prevent crash on missing accts
When asset/liability/income/expense accounts are either missing or
deselected, the report would crash. This commit will ensure the
date-specific balance calculators do not crash.

The reason for crash is the form (apply map gnc:monetaries-add lists)
where lists is usually a list-of-list-of-monetaries, e.g.
(list (list $1.00 $2.00 $3.00)
      (list $2.35 $3.44 $4.45))

and (apply map gnc:monetaries-add lists) will return a list of the
matched sums, i.e. commodity-collectors (list (list <$3.35> <$5.44>
<$7.45>)), whereby each commodity-collector is denoted by <...>

When there are missing account-types (or deselected) the lists are
empty-lists, therefore mapping will fail. This change ensures that
null-lists are handled by returning (list (list <> <> <>)), with null
commodity-collectors.
2019-07-06 23:12:36 +08:00
Christopher Lam
1e66d3b2f6 [balsheet-pnl] cosmetic: improve maxindent calc
75ab45ac3 without 1+ some alignment is incorrect
2019-07-06 14:42:09 +08:00
Christopher Lam
42b6fb993b call strify only if debugging enabled 2019-07-06 11:15:18 +08:00
Christopher Lam
898a9cdb8e wrap qoflog 2019-07-06 11:15:18 +08:00
Christopher Lam
bc1bcc718e [average-balance] show progress reports before chart generation
This change adds progress reports to be more responsive on large
datafiles. It is probably marginally slower.
2019-07-04 18:30:03 +08:00
Christopher Lam
75ab45ac3c [balsheet-pnl] change definition of maxindent
previous would find deepest account; it should really find deepest
selected account.
2019-07-04 18:30:02 +08:00
Christopher Lam
6f217165c4 [owner-report] fix code to set date to 'today'
code sets date-option to today. it fails to set the default-value. the
date will reset when user click 'reset options', and this commit
ensures the 'today' date remains the default date.
2019-07-04 18:30:02 +08:00
Christopher Lam
3a927ce2ac [customer-summary] fix no-owner sorting of entries
Previous 9ed0174cb would place any entry with customername == "No
Customer" last, including genuine customers with this particular
name. This commit modifies to test on presence of owner-report-url to
detect owner/no-owner entries. This is reliable for this report.
2019-07-04 18:30:02 +08:00
Robert Fewell
f82058e026 Merge David Cousens's 'Bug797275' branch into maint 2019-07-02 10:57:23 +01:00
Christian Stimming
a7bdd08291 Update German translation. 2019-07-01 18:20:58 +02:00
Christian Stimming
070e21fb0c aqb: Fix progress window scaling/filling
The widget with the log messages didn't fill the space
in the dialog anymore. Probably a side-effect of 58465432,
but fixed now anyway.

Also, one label whose "translatable" attribute was removed
had to get it again.
2019-07-01 18:17:10 +02:00
Christian Stimming
da7cc037e2 Fix remaining compiler errors in aqbanking5/aqbanking6 dependent code. 2019-06-30 16:43:54 +02:00
Christian Stimming
98959f86d9 Get aqbanking code to compile again with current aqbanking's git master version.
Not yet tested, though, only successfully compile and link.
2019-06-30 16:09:34 +02:00
John Ralls
d42695e75a Release GnuCash 3.6 2019-06-29 16:37:02 -07:00
John Ralls
b4fbec5b12 Use warnings instead of perl -w.
perl -w breaks env on Debian.
2019-06-29 14:25:21 -07:00
John Ralls
e148477c70 Remove build-osx.txt, build-solaris.txt, and misc-notes.txt.
The first two are utterly obsolete and the third copies a mailing
list conversation from 20 years ago about stock splits.
2019-06-29 14:10:23 -07:00
John Ralls
d53649c061 Update Farsi, Romanian, and Ukrainian translations from the translation project. 2019-06-29 13:18:46 -07:00
Frank H. Ellenberger
dd10867195 txt-to-pot.sh: revert CHARSET change from last commit 2019-06-29 12:53:44 +02:00
Frank H. Ellenberger
0f815d9d1d Update txt-to-pot.sh's header to gettext-tools 0.19.8.1
In the last 2 decades a few parameters were added
2019-06-29 12:46:33 +02:00
David Cousens
690e359be0 Fix view_selection_function declaration
For some strange reason the view_selection_function declaration went missing?? reinserted it
2019-06-29 14:12:03 +10:00
David Cousens
98cf760c6e Merge branch 'matcher-help' into Bug797275 2019-06-29 13:53:08 +10:00
David Cousens
377b73d1aa Add multiselection info to help dialogue 2019-06-29 13:42:36 +10:00
David Cousens
caeea74b50 Add view_selection_function
view_selection_function added to only allow adding a row to the selection if GNCImport_Add is set for the transaction.
Explicit selection clearing

try explicitly clearing the row in the add, update and clear toggle callbacks - before refresh row and add debugging info which showed that the selection is called after exiting the above callbacks and as the view_selection_function has no knowledge that the add checkbox has just been toggled it allows the row to be selected. Requires a flag to be set in the add_toggle_cb which prevents selection in the view_selection_function and is cleared there.
Fix row being selected after A(dd)toggled

When the A is toggled on from U+R or R the row is automatically selected and if the row is toggled back to U+R or R selected, it cannot be unselected. Add a global add-toggled flag set in the gnc_gen_trans_add-toggled_cb and used in the treeview  multiple selection function to prevent a row being selected immediately after the A has been toggled.
Fix to Multiple selection to ensure the match dialog comes up on double click on a  reconciled or update row and implement a view_selection_function so that only rows flagged for addition can be added to a selection


Fixes requested by Bob-IT

removed global add_toggled variable and added it to _main_matcher_info structure. modified gnc_gen_trans_add_toggled_cb and view_selection_function to use the _main_matcher_info member.
2019-06-29 07:43:10 +10:00
John Ralls
0543a29012 Merge Dawid Wróbel's uft-8 obfuscation fix into maint. 2019-06-28 11:49:57 -07:00
John Ralls
a3871d9ca1 Warn if can't lock for any reason other than that the file is locked already.
And include the error string in the message.
2019-06-28 11:48:01 -07:00
Christopher Lam
9ed0174cb0 [customer-summary] fix sorting to apply within currency groups
* profit/sales/expense are sorted within currency groups. each group
  is prepended by currency-mnemonic header. header is rendered only
  if num(currencies) > 1.
* markup/customername have no currency grouping.
* customername sorting ensures 'No Customer' entries are last.
2019-06-28 23:10:12 +08:00
Christopher Lam
54c322c2dd [customer-summary] upgrade to handle multiple currencies per owner 2019-06-28 23:10:12 +08:00
Christopher Lam
3785059ae0 [customer-summary] add url to owner-report 2019-06-28 23:10:12 +08:00
Christopher Lam
7e9c9187c2 [customer-summary] remove references to vendor/employee
* there's only customer-summary, no vendor/employee-summary. remove
  dead code and unused hidden options.
2019-06-28 23:09:48 +08:00
Christopher Lam
e19fdf51e3 [customer-summary] refactor report
* handle error cases centrally
* inline numerous single-use functions
* deduplicate common code
* remove reverse? option is always #t, rename income to sales
2019-06-28 23:07:09 +08:00
Christopher Lam
d1a7d37c18 [customer-summary] upgrade to handle multiple currencies 2019-06-28 23:07:09 +08:00
Christopher Lam
5cdd1b072d [customer-summary] eradicate gnc-numeric 2019-06-28 23:07:09 +08:00
Christopher Lam
7f19abaabd [customer-summary] remove unneeded sanity check for owner
and all-accounts which will never be null? because it's made of
income-accounts and expense-accounts, and (null? income-accounts) has
already been handled by previous cond
2019-06-28 23:07:09 +08:00
Christopher Lam
0f5d3e2029 [customer-summary] remove dead code 2019-06-28 23:07:09 +08:00
Christopher Lam
0115dc1a27 [customer-summary] *delete-trailing-whitespace/untabify/reindent* 2019-06-28 23:07:09 +08:00
Christopher Lam
cc4944e536 [html-table] fix never-used function and deprecate 2019-06-28 23:07:09 +08:00
Christopher Lam
a23d72dec2 [owner-report] timepair->time64 2019-06-28 23:07:09 +08:00
Christopher Lam
b4409ed6c8 [owner-report] upgrade find-first-account to seek currency as well
* this is an optional upgrade -- (find-first-account type) will find
  the first account of appropriate type; (find-first-account type
  #:currency curr) will filter to appropriate currency too
2019-06-28 23:07:09 +08:00
Christopher Lam
551a346cb1 [report-utilities] improve commodity-collector documentation 2019-06-28 23:07:09 +08:00
Robert Fewell
cdf348df24 Check for a blank line on the transaction importer
If you have some blank lines, just newlines at the end of file and you
have an account column and do not remove them you will get an error
advising that there is no account column selected or account specified
so this change removes them from being parsed.
2019-06-28 14:06:35 +01:00
Robert Fewell
a4bbaf968f Fix an error in my previous double-click fix
Th gboolean first needs to be setup as a pointer but have left
is_selected as a gboolean.
2019-06-28 14:03:44 +01:00
Robert Fewell
d5c3b4af0c Make the blank split read only
If the transactions are read only or voided and selected for editing a
blank split is added that allows you to change the transaction so in
these cases make the blank split read only.
2019-06-28 10:08:03 +01:00
Robert Fewell
cf3e9239e2 Allow cancelling of a split paste
Currently when you paste a split you can not cancel the changes as they
are already committed. By opening the transaction for editing before
the split paste the cancel option is now available.
2019-06-28 10:08:03 +01:00
Robert Fewell
a7f3f5213f Add a dialogue about pasting on an anchoring split
Present a dialogue advising that you can not paste a split on top of
the anchoring split.
2019-06-28 10:08:02 +01:00
Robert Fewell
4cf92baaa7 Bug 797249 - Cutting home account causes transaction to disappear
Add some test for when cutting splits from transactions that prevent
the cutting of the anchor split and warn when the split is a reconciled
one or when cutting the transaction that it contains reconciled splits.
2019-06-28 10:08:02 +01:00
Robert Fewell
8c6832bcb9 Allow deleting all splits in the General Journal
In the General Journal there is no anchor split so allow all splits to
be deleted.
2019-06-28 10:08:02 +01:00
Robert Fewell
5cb1d0ebb9 Disable menu options that should not be possible when
transactions are marked read only
2019-06-28 10:08:02 +01:00