Commit Graph

21440 Commits

Author SHA1 Message Date
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
Dawid Wróbel
38a3d62f00
Check and UTF8-encode the names if needed
Fixes the "Wide character in subroutine entry" error for some UTF8 entries
2019-06-23 19:51:21 -04: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
9c96ee2f8f Merge branch 'maint' 2019-06-19 22:11:13 +08: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
Geert Janssens
8fd4be3bb1 Merge branch 'maint' 2019-06-19 08:38:00 +02: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
Geert Janssens
ccd9ca8a87 Fix silly typo 2019-06-18 15:32:02 +02:00
Geert Janssens
06fae12265 RptCleanup - Add compat interface for all module interfaces that were deprecated so far
These can be permanently removed for the gnucash 5.x series. A comment has been added to that effect.
2019-06-18 15:18:46 +02:00
Geert Janssens
f39275be32 RptCleanup - Add cmake command to generated compat modules for deprecated guile modules
The function accepts the name of a deprecated module and optionally a
replacement module.
With that info it will generate a stub guile module that
- will be installed in the gnucash guile load path
- emits a deprecation warning when the old module is used
- if a replacement module is given, will automatically load that module instead

This allows us to gently deprecate complete guile modules without
the burden of manually maintaining their module files.
2019-06-18 14:25:04 +02:00
Geert Janssens
528bbff8da RptCleanup - use generic report loader for locale-specific reports
This requires a bit glue code to determine which locale we're interested in.
Advantage: another gnc-module dropped (gncmod-locale-specific).
2019-06-18 14:25:04 +02:00
Geert Janssens
0a8e0d2928 RptCleanup - install eguile report support files in subdirectories relative to the reports module 2019-06-18 14:25:04 +02:00
Geert Janssens
70393bc08a RptCleanup - install reports into their own toplevel module (gnucash reports) 2019-06-18 14:25:04 +02:00
Geert Janssens
707f9a4029 RptCleanup - restructure eguile code into a single (gnucash eguile) module 2019-06-18 14:25:04 +02:00
Geert Janssens
3f8f32ab25 RptCleanup - Consolidate report system gui initialization
For this gnc-plugin-stylesheets has gotten a wider scope to become
gnc-plugin-report-system. The new plugin does all the report system
initialization bits wrt to the gui.
2019-06-18 14:25:04 +02:00
Geert Janssens
6b5dcc3877 RptCleanup - reorganize stylesheets
- store them in a subdirectory
- reuse the report module loader
- eliminate gncmod-stylesheet, gui bits are now in gnome
2019-06-18 14:25:04 +02:00
Geert Janssens
93489d4ffc RptCleanup - Generalize report loading function to allow use for modules other than the reports 2019-06-18 14:25:04 +02:00
Geert Janssens
f2de292cd6 RptCleanup - Move locale-specific reports to reports directory 2019-06-18 14:25:04 +02:00
Geert Janssens
0d426fcfe7 RptCleanup - remove obsolete locale-specific scm modules and re-enable the locale-specific load test 2019-06-18 14:25:04 +02:00
Geert Janssens
32a83678c9 RptCleanup - Install our guile api as a guile site module
This is similar to how our python code is installed as a python site module
2019-06-18 14:25:04 +02:00
Geert Janssens
8d24252860 RptCleanup - Internalize guile-json module
This is in preparation of the final guile restructuring step:
install gnucash scm files directly in guile's default site module directory.
Internalizing json is done to prevent an install clash with a potentially
system installed guile-json module.
2019-06-18 14:25:04 +02:00
Geert Janssens
53f59f7794 RptCleanup - Restructure installation of gnucash scm files
These files were installed fairly ad-hoc into the share/gnucash/scm directory making
it hard to get an idea of where each file comes from.
The files are now structured as follows:
- any scm file authored by gnucash should go in share/gnucash/scm/gnucash or below
- most scm modules will be directly in that directory
- each module that comes with support files will get a subdirectory named after the
  module's base name. For example next to engine.scm there will be directory
  named engine for all support files of the engine module
- scm files that are not modules, but are loaded by modules go into
  <module-dir>. For example gnc-utils.scm loads gnc-menu-extensions.scm
  so that file will be installed in gnc-utils/gnc-menu-extensions.scm
- the report system is our largest module and only part of the restructuring
  is done at this point. It will be refined further in future commits.

The same restructuring is also done for the compiled files.
2019-06-18 14:25:04 +02:00
Geert Janssens
cb50f7aaa0 RptCleanup - fold report/report-system into report
This moves a lot of files and all scm modules that get moved need to have their definition updated.
Aside of that, it also tweaks the install location of the report scm files that are not modules
(but instead included in report.scm).
Lastly, report-system.scm has been renamed to report.scm to match the gnc-module name.
This required a rename of the original report.scm (which is not a module). I chose to rename
that to report-core.scm as it's implementing the guts of the report system.

Still missing in this commit: some compatibility code to give users a warning when they try to
use the old scm module names.
2019-06-18 14:25:04 +02:00
Christopher Lam
7102b1d2f0 [html-chart] use gnc:html-js-include to import js
This fix url to file:/// for windows to render charts properly.
2019-06-18 18:40:56 +08:00
Christopher Lam
d90f843a1a [html-chart] use guid generator instead of random
guid is *guaranteed* to be unique, unlike random...
2019-06-18 18:30:14 +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
Christopher Lam
4b21244da8 [report] remove top-level flag no longer needed after 30ac2cf26 2019-06-16 10:46:01 +08:00
Christopher Lam
1ac6262a06 [net-charts] ensure grid is enabled in barchart
previously barcharts did not have grid, an odd omission
2019-06-16 10:45:47 +08:00
Christopher Lam
3b9233de3a [test-stress-options] ensure max is not called with empty list
some reports e.g. sample-graphs.scm may have no options; this commit
causes max to be called with at least 1 parameter (max 0) --> 0.
2019-06-16 10:45:34 +08:00