Commit Graph

21180 Commits

Author SHA1 Message Date
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
John Ralls
580696681a Replace gitlog2ul.sh with git-release-notes.pl.
git-release-notes.pl finds the last release on its own and formats
the log output separately as text for NEWS and HTML for the announcements.
2019-06-27 16:43:43 -07:00
Christopher Lam
72bdaeefcd [register] eradicate gnc-default-currency from .scm code
The conditional (null? (xaccSplitGetAccount split)) can never be true
because it was already handled previously in code via the
"(null? (xaccSplitGetAccount (car splits))" cond clause to handle bug
639082
2019-06-24 20:29:01 +08:00
Christopher Lam
0c5f79a58f [job-report] bugfix display amounts with owner currency
* eradicate gnc-default-currency from .scm code

This parallels aec61497 whereby customer & vendor total amounts were
rendered with default_currency instead of owner currency
2019-06-24 19:46:15 +08:00
Christopher Lam
2d06d703f2 Fix for import-match-picker "Balanced" amount currency
Import match picker showed amount in default_currency. Fix to show in
the transaction's currency.
2019-06-23 18:42:03 +08:00
Robert Fewell
262a1fac5d Fix double-click for import-main-matcher.c
The New multiselect feature used two boolean values that was set up as
pointers but there was a error with one if statement that stopped the
double-click to run the match dialogue. Changed all occurrences to just
use boolean values.
2019-06-23 10:43:57 +01:00
Robert Fewell
b50ed47556 Make similar correction to gnc-imp-props-tx.cpp for incorrect find use. 2019-06-22 10:20:57 +01:00
Robert Fewell
8c387c1c97 Bug797244 - Remove the invert prices for less than 1
Previously where prices were less than 1, the commodities involved were
swapped and the price inverted, this is no longer required so removed
in the price importer and the transfer dialogue.
2019-06-22 10:20:57 +01:00
Robert Fewell
90b2d8f1f5 Change the Commodity/Currency combo's on Price Import
Change the way the sorting is done for the Commodity and Currency
combo's for the Price Import. For the Commodity combo group all non
currencies together at the start and add a separator row.
2019-06-22 10:20:57 +01:00
Robert Fewell
5213a91b0f Bug797278 - Create an option for type of commodity for Price import
Currently when you use the 'Commodity From' column for Price imports it
can match against the wrong commodity like COP (Conoco Philips) would
match against the currency COP (Columbian Peso). To fix this add a new
column type 'From Namespace' and rename 'Commodity From' to
'From Symbol' so they match the Security Editor.
2019-06-22 10:20:57 +01:00
Christopher Lam
03d9bf902a [html-acct-table] compact gnc:html-make-nbsps
avoid repeatedly string-append
2019-06-21 23:40:52 +08:00
Christopher Lam
7b5ff8d894 [html-acct-table] compact gnc-commodity-table 2019-06-21 23:40:52 +08:00
Christopher Lam
7c9145a711 Set the summarybar currency to default_currency 2019-06-21 23:24:57 +08:00
John Ralls
3731c84f0c Fix copy-paste error. 2019-06-20 14:25:01 -07:00
John Ralls
77564b1e43 Bug 797281 - Gnucash crashes when attempting to match online accounts
Don't create a static string and then try to free it.
2019-06-20 07:44:28 -07:00
Christopher Lam
58be8f6baf Bug 797262 - Change "Today date format"
Mark strftime format string translatable
2019-06-19 22:10:23 +08:00
Christopher Lam
039b84871e [utilities] warn against using guile's strftime
strftime has been banished from code; warning for custom-reports

https://www.mail-archive.com/bug-guile@gnu.org/msg09778.html
2019-06-19 22:10:23 +08:00
Christopher Lam
72974d7a13 [html-utilities] fix logic error in gnc:assign-colors
Unfortunately 3b187a128 was written with logic error and should have
been tested better.
2019-06-19 22:10:23 +08:00
John Ralls
8ed150896d Merge Milotype's 'hr-readme' into maint. 2019-06-18 19:49:51 -07:00
milotype
8f6a7690fd
Update README-hr.win32-bin.txt
Minor corrections, https, BOM
2019-06-19 01:18:47 +02:00
milotype
2ea23979c8 Update hr.po 2019-06-19 00:20:50 +02:00
milotype
0ec394f191 Update README-hr.win32-bin.txt
Minor corrections
2019-06-19 00:20:50 +02:00
Christopher Lam
c3cf5e2808 Deprecate unused code related to gnc:colspans-are-working-right
colspans code has never been fixed. remove unused code.
2019-06-18 23:30:01 +08:00
Christopher Lam
a44a1a4c23 Deprecate unused function gnc:second-html-build-acct-table
and ensure gnc:html-build-acct-table is redefined to the former
gnc:first-html-build-acct-table, and gnc:first-html-build-acct-table
redirects to gnc:html-build-acct-table.

It would seem gnc:second-html-build-acct-table has never been used.
2019-06-18 23:30:01 +08:00
Christopher Lam
d16b1380c5 [html-acct-table] Further deprecate unused functions 2019-06-18 23:30:01 +08:00
Christopher Lam
a1ad9da03f Bug 797277 - Assets over time ignores nested liabilities
This is caused by the omission of selected accounts' descendant
accounts during generation of accounts-balances-alist.

The subsequent function account->balance-list was querying the
accounts-balances-alist for subaccounts' (of any account-type)
balances but these were missing.

This commit ensures all selected accounts (whose types depended on the
chart-type), and all their descendant accounts (of any account-type)
were scanned to generate the account-balances-list.
2019-06-18 23:30:01 +08:00
Christopher Lam
3b187a1282 [html-utilities] tighten code
using list-ref and length repeatedly is usually less efficient than
testing against null?
2019-06-18 23:13:22 +08:00
Christopher Lam
a33302f1e6 [trep-engine] addendum forgot to close file-port in 497e18c36
we can use call-with-input-file which automatically closes file port
when lambda is completed.
2019-06-18 18:07:19 +08:00
milotype
410ae95759
Update hr.po
Some translation corrections and file clean-up.
2019-06-15 22:27:30 +02:00
Christopher Lam
2c04ae310b [trep-engine] allow #:custom-source-accounts kwarg
specifying #:custom-source-accounts will override the (opt-val
"Accounts" "Accounts") option to specify source accounts

This is useful for custom-reports which may need multiple source
accounts. eg. VAT/GST report (still in development).
2019-06-13 22:16:02 +08:00
Christopher Lam
f6bfdabd3e [trep-engine] allow #f for friendly-fn
During defition of custom-calculated-cells, we should allow #f as
friendly-fn which will disable it.
2019-06-13 22:16:01 +08:00
Christopher Lam
241f1f9274 [test-transaction] add csv test
runs report with csv output
test csv output matches expectation
2019-06-13 22:16:01 +08:00
Christopher Lam
497e18c36e [trep-engine] allow csv export of grand-totals
This commit enables CSV export of split monetary columns and
grand-totals.

Sample CSV output:
"from","2018-01-01"
"to","2018-03-31"
"Debit",4270.88
"Credit",8314.44

* Note dates are iso-format strings.

* If a grand-total has multiple currencies, all will be listed
  e.g. grand-total 100GBP + 50USD will show as: "Amount",100.0,50.0

* Dual subtotals (debit/credit) will not be exportable as CSVs because
  they are not merged
2019-06-13 22:16:01 +08:00