Commit Graph

249 Commits

Author SHA1 Message Date
John Ralls
90b8fce59f Fix build after merge. 2021-07-31 17:54:29 -07:00
John Ralls
6c7f976a65 Make second arg to gnc_glist_to_scm_list const char*
So that C++ won't complain when passed a static string.
2021-07-10 17:29:15 -07:00
John Ralls
81c5ac6689 Remove the incomplete book-currency code.
Not everything from the 6 Book-Currency commits is removed: Switching
the Num and split-action fields and restricting edits of transactions
older than n days were included and those changes are left in place.

Some other partly-implemented features were also part of these commits
and were removed: Options for setting a default capital gains account
and currency, completion of the LIFO cap-gains policy, and creation of
a list of cap-gains policies.

If any of these are to be revived they should each be done in a separate
feature branch and submitted via Github pull request for a code review
before merging; a design discussion on gnucash-devel before restarting
work is also advisable.
2021-07-10 17:29:11 -07:00
Christopher Lam
1b4d30b3b1 Merge branch 'maint' 2021-06-22 23:30:20 +08:00
John Ralls
da3bd8ec0e [bindings/guile/test] add SRFI64 test sources to the dist. 2021-06-13 15:25:23 -07:00
Hong Xu
79d5270c9d Fix a variable name typo in Python binding gnc_pricedb_lookup_latest_before_t64
commodit -> commodity
2021-06-13 01:12:59 -07:00
Christopher Lam
b25a444140 Merge branch 'maint' 2021-05-14 21:16:48 +08:00
Christopher Lam
14c523e4f1 [test-engine-extras] augment book data generators
* txn-currency can be specified explicitly instead of currency of
first split
* split memos can be specified

Note test-register.scm gets some changes because the Trans Num field
was erroneously saved into Split Action fields. Now the num field is
only copied into the TransNum field.
2021-04-30 08:55:26 +08:00
Christopher Lam
e6355be755 [test-scm-engine] remove support for functions deprecated in 4.x 2021-04-24 23:34:58 +08:00
Christopher Lam
5ce8f78f77 Merge branch 'maint' 2021-04-24 23:16:22 +08:00
Christopher Lam
5957b3c256 Add scheme backward compatibility functions renamed in #979 2021-04-23 21:20:42 +08:00
John Ralls
49102c7ac2 Python Bindings: Provide a deprecated GncPriceDB.lookup_latest_before_t64.
To avoid breaking user scripts.
2021-04-23 11:56:15 +01:00
Robert Fewell
87285f945e Update gnucash_core.py with gnc-pricedb function name change 2021-04-23 11:56:15 +01:00
John Ralls
490f9a8035 Change the g_log macro calls to QofLog ones so that they don't go to /dev/null. 2021-04-13 16:58:11 -07:00
koldavi
506fd57989
Fix to_string_with_decimal_point_placed
>>> nominator='123456'
A digit is missing in the string returned from to_string_with_decimal_point_placed. The -1 error.
>>> point_place=2
>>> nominator[:-point_place - 1], nominator[-point_place:]
('123', '56')
2021-04-01 13:26:15 +02:00
Christopher Lam
d28ff20ff7 Merge branch 'maint' 2021-03-29 17:29:19 +08:00
Christopher Lam
df457622b5 Merge branch 'python-silent-conversion' of git://github.com/c-holtermann/gnucash into maint 2021-03-27 21:20:37 +08:00
c-holtermann
d3b8a59d7e remove debug information for time conversion 2021-03-27 14:05:21 +01:00
Geert Janssens
1dd426e314 Potentially fix CI test on Arch related to glib and c++ 2021-03-22 12:37:24 +01:00
Christopher Lam
2a2f080813 Merge branch 'maint' 2021-03-18 07:36:40 +08:00
John Ralls
a11065b823 Fix fencepost error in calculating the week_num for POSIX timezone rules.
Fixes CI failure caused by US starting DST in 2021, a year in which
March began on a Monday.
2021-03-15 17:07:16 -07:00
John Ralls
66eca8aab7 Update python/gnucash_business.py to reflect rename of gncOwnerApplyPayment.
Made 3 years ago.
2021-03-14 10:48:30 -07:00
Christopher Lam
87473ed5f9 Merge branch 'maint' 2021-03-12 23:14:51 +08:00
Dong Lin
75209c024f Update price database for imported transactions
When a transaction is added from the ledger, price database is updated properly.
But if the transaction is imported, there is no price db update.

This change adds the proper pricedb update in the import path (qfx/ofx/qif).
Tested with make check
2021-03-09 10:39:56 -08:00
Christopher Lam
165ca498ad Add explanatory note for gnc_add_scheme_deprecated_module test code
The immediate parent commit removes old deprecated scheme
modules. Link to the old modules for example code.
2021-01-30 00:42:42 +08:00
Christopher Lam
bbcffa3eca Remove deprecated scheme modules 2021-01-30 00:42:20 +08:00
Christopher Lam
a9ec496ba9 [utilities] Remove deprecated functions 2021-01-25 22:25:54 +08:00
Christopher Lam
2fa5cba250 Merge branch 'maint' 2021-01-25 22:25:20 +08:00
Christopher Lam
a754289daa [test-scm-utilities] test-end properly
otherwise test failures do not set exit code correctly
2021-01-25 22:24:51 +08:00
Christopher Lam
df30b6da37 [utilities.scm] deprecate unused functions
these functions were never used.
2021-01-24 21:56:34 +08:00
Christopher Lam
ebcb0bc478 [master] remove deprecated scheme functions 2021-01-04 08:46:09 +08:00
Christopher Lam
6df74eb94f [core-utils.scm] typo in guile: use-modules 2021-01-03 16:03:14 +08:00
Christopher Lam
6f9517845a [core-utils] use custom unbound-variable exception printer
When a guile coder uses a variable but omits use-modules, this code
will scan *all* available modules and offer the appropriate module
name.

Before:
Unbound variable: gnc-build-url

After:
Unbound variable: gnc-build-url. Did you forget (use-module (sw_gnc_html))?
2020-12-14 21:54:52 +08:00
Christopher Lam
6927c12292 Bug 798039 - Using 'Consolidate Transactions' option on Consolidate Transaction Report returns Error
because (gnc:module-load "gnucash/html" 0) was meant to load the html
module and was incorrectly assumed to be present in (gnucash report)
module.
2020-12-12 07:44:14 +08:00
Christopher Lam
4910b532e0 [modularise] (gnucash engine) 2020-12-09 06:39:51 +08:00
Christopher Lam
c17ce5251c [modularise] (gnucash core-utils) 2020-12-09 06:39:51 +08:00
Christopher Lam
096be60860 [modularise] (gnucash utilities) 2020-12-09 06:39:51 +08:00
Christopher Lam
da32fb0dae [utilities] simplify addto! 2020-12-04 21:33:31 +08:00
Christopher Lam
82d3bcd394 [core-utils] N_ is identity function
N_ is mapped to the identity function. Previously N_ was defined as a
macro, which is more tricky to export.
2020-12-04 21:33:01 +08:00
Christopher Lam
a1c517b4ba [gnc_scm_to_numeric] create NaN gnc_numeric instead of runtime error
If guile calls a C function which expects gnc_numeric but sends a
non-number, it will create a gnc_numeric_error object. This will allow
error gnc_numeric to be handled elsewhere.

Also the overflow gnc_numeric was incorrectly created.
2020-11-23 21:50:05 +08:00
Christopher Lam
8f32992100 [gnc-engine-guile.c] return #f when gnc_numeric has error
otherwise it'd throw guile div/0 exception
2020-11-23 08:08:27 +08:00
Christopher Lam
6d6eff6b70 Expose ngettext as gnc:ngettext 2020-11-02 22:24:05 +08:00
Christopher Lam
8628ffa957 3/3 [engine.scm] deprecate scheme utility functions 2020-11-01 08:30:56 +08:00
Christopher Lam
25e4efc2b7 [core-utils.scm][API] gnc:string-locale<? gnc:string-locale>?
locale-sensitive string-sorting functions -- currently mirrors guile's
(ice-9 i18n) functions -- may be modified to call C code if guile code
is not reliable.
2020-11-01 08:30:56 +08:00
Geert Janssens
dae2ea8356 Expose C_ function (gettext with context string) to guile code
First use is for the document link short code (L)
2020-09-17 22:20:02 +02:00
Christopher Lam
0d10d1e234 [engine.i] swigify CLEARED-ALL
to be used by trep-engine.scm
2020-09-15 18:30:24 +08:00
Christopher Lam
cbbca47013 [test-engine-extras] Use more efficient gnc:list-flatten 2020-08-19 07:19:38 +08: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
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