Commit Graph

1816 Commits

Author SHA1 Message Date
John Ralls
8cb8f5067d Remove non-ISO4217 currency codes from gnc-euro table.
They're not reachable because they don't have commodities associated with them.
2022-09-30 15:12:19 -07:00
John Ralls
d8417c3cfa Move gnc-euro.[ch] to engine and unit test it. 2022-09-30 15:12:12 -07:00
John Ralls
2774f8f88c Bug 798614 - Croatia to join the Euro
Add HRK to the conversion array.
2022-09-30 13:51:28 -07:00
John Ralls
3949821da6 Merge branch 'maint' 2022-09-25 11:50:10 -07:00
John Ralls
2505955ab9 Fix test failure from Bug 798616 fix. 2022-09-20 09:09:34 -07:00
John Ralls
7c350c3ae5 Bug 798616 - Can't register amount greater than 9,000,000,000
Because when loading the value the split in the xml backend doesn't yet
have a parent so the code tried to convert to GNC_COMMODITY_MAX_FRACTION
and if the numerator was larger than 10^10 that would overflow.

To fix it this changes the "don't know" response to get_currency_denom
and get_commodity_denom to GNC_DENOM_AUTO which will normally leave
the denominator alone.
2022-09-19 18:17:58 -07:00
Christopher Lam
161b07b241 Merge branch 'maint' 2022-09-09 21:23:40 +08:00
Frank H. Ellenberger
47fa8b281e Merge PR #1425 into maint 2022-09-07 03:16:05 +02:00
John Ralls
a807d3e6b7 Create function gnc_tm_get_today_neutral.
To complement gnc_tm_get_today_begin and gnc_tm_get_today_end.
2022-09-06 14:35:11 -07:00
luz paz
ba94730a23 Fix various typos
Found via `codespell`
2022-09-06 10:44:29 -04:00
Christopher Lam
ecd2cdf425 [gnc-glib-utils] gnc_g_list_stringjoin skips NULL data 2022-09-06 18:14:15 +08:00
John Ralls
95361ad060 [options] Move gnc-options test to engine/test/CMakeLists.txt. 2022-08-29 17:05:33 -07:00
John Ralls
4ae17d12c7 [options] Move options from app-utils to engine.
Options is required for book options that are stored as part of the data
 file and so belongs in engine.
2022-08-25 22:09:56 -07:00
John Ralls
f24f29830b [options] Change std::cerr stream output to PWARN.
Remove temporary diagnostic.
2022-08-25 22:09:56 -07:00
Christopher Lam
3e02859277 Merge branch 'maint' 2022-08-25 23:47:18 +08:00
Christopher Lam
b7a3652de7 [date-utilities] avoid report crash if start>end date 2022-08-21 17:27:05 +08:00
John Ralls
087501d316 Bug 798262 - Scheduled transactions with blank amounts do not get created.
Handle template transactions that don't have any splits with empty credit
and debit strings and those having no set transaction account.

Set the concrete transaction commodity to the first found of:
The template transaction's commodity
The commodity of the first split with a credit or debit string
The commodity of the first split.
2022-08-14 15:31:46 -07:00
John Ralls
410db42df0 Test case where the template txn doesn't have a set currency. 2022-08-14 15:28:14 -07:00
John Ralls
229f6f5e85 Fix gdate adjustments. 2022-08-12 12:58:58 -07:00
Simon Arlott
4c1fc1d555 Bug 798262 - Add test case for basic scheduled transactions
Test these scheduled transactions:
* 2 splits with fixed amounts "123"
* 2 splits with fixed amounts "0"
* 2 splits with empty amounts ""

Verify that automatically created scheduled transactions exist.
2022-08-11 11:01:03 -07:00
Christopher Lam
6ba912ee0d Merge branch 'maint' 2022-08-09 18:15:23 +08:00
Christopher Lam
de7a63082b [gnc-sx-instance-model] leaks: free temporal_state
it's a simple struct containing GDate and int
2022-08-08 13:58:53 +08:00
Christopher Lam
ad27be333e [gnc-sx-instance-model] prepend GList loops instead of append 2022-08-08 13:58:53 +08:00
John Ralls
8b07ac88cd [options] Add "key" to the register-option documentation blocks. 2022-08-06 17:17:32 -07:00
John Ralls
e29ab5336f [options] Remove key and doc_string from gnc_register_query_option.
It's always used as an internal option with no UI component so it doesn't
use them.
2022-08-06 17:17:32 -07:00
John Ralls
6faaf3b427 [options] Provide a const char* value flavor for register_commodity
And register_currency_option
2022-08-06 17:17:32 -07:00
John Ralls
1ff844c195 [options] Fix implementation of gnc_register_owner_option
To take an owner-type parameter and to set the UIType accordingly.
2022-08-06 17:17:32 -07:00
John Ralls
aa0b0921f4 [options] Add a function to check if an option is internal.
Instead of relying on the legacy underscore-section-name hack.
2022-08-06 17:17:32 -07:00
John Ralls
da0eff2cac [options] Implement widget-changed callbacks.
Enables full functionality for complex-boolean and multichoice-callback
options.

Note that setter-function callback isn't used in any GnuCash code so it
is not implemented and is not present in the register-callback functions.
2022-08-06 17:17:26 -07:00
John Ralls
552aa438ff [options] Implement gnc_register_internal_option. 2022-08-06 17:13:28 -07:00
John Ralls
0e9ed8cf0a [options] Provide float variants to gnc_register_plot_size_option. 2022-08-06 17:13:28 -07:00
John Ralls
0213787a2f [options] Enable registering an absolute date option. 2022-08-06 16:25:42 -07:00
John Ralls
cf2870b71a [options] Change RelativeDate and Multichoice index type to uint16_t.
From size_t because clang thinks that std::is_same_v<size_t, time64> is
true and we need to differentiate the handling of the two.
2022-08-06 16:25:42 -07:00
John Ralls
0b2d14ee72 Fix distribution for expressions target. 2022-08-06 16:25:42 -07:00
Christopher Lam
b94440b16a Bug 798588 - sx scrubbing was using incorrect free function
the GHashTable values are gnc_numeric*.
2022-08-06 16:25:42 -07:00
Christopher Lam
ea56d67797 [gnc-sx-instance-model.c] indent attributes properly 2022-08-06 16:25:42 -07:00
Christopher Lam
bfa0fd1819 Bug 798588 - sx scrubbing was using incorrect free function
the GHashTable values are gnc_numeric*.
2022-08-06 14:39:57 +08:00
Christopher Lam
f0ac8d69b2 [gnc-sx-instance-model.c] indent attributes properly 2022-08-06 14:39:55 +08:00
Christopher Lam
0b5a4cd298 Merge branch 'maint' 2022-08-03 20:38:08 +08:00
Christopher Lam
d1aefc851d [sx-book] free sx_list before g_object_unreffing sxes 2022-08-01 23:43:08 +08:00
John Ralls
688832b5f8 Bug 798585 - segfault running sample script
The root cause of which is that on recent releases of GLib (recent
meaning 2.66 in the current Debian stable!) g_type_instance_get_private
looks in the wrong place for the private data. When running the script
in question it returned NULL and since the code didn't check for a valid
pointer, it crashed.

So this change replaces all calls to g_type_instance_get_private with
the function [type_prefix]_get_instance_private() added in glib-2.36
except for two register2 files that have been removed from master; those
are ignored to avoid unnecessary merge conflicts.
2022-07-30 16:50:51 -07:00
Christopher Lam
67a1b7a873 [gnc-sx-instance-model] free GHashTable keys when destroying 2022-07-30 13:43:06 +08:00
Christopher Lam
ebf3439558 [gnc-sx-instance-model] free some GHashTable keys & Values 2022-07-29 12:56:02 +08:00
Christopher Lam
7c2a249511 [gnc-sx-instance-model.c] refactor Scrub function
This scrubbing function calls xaccTransRollbackEdit which is
leaky. Instead of trying to fix xaccTransRollbackEdit which requires
superhuman skills, it's easiest to track the changes separately in a
GList, and use xaccTransBeginEdit/xaccTransCommitEdit only if
necessary.
2022-07-29 12:47:10 +08:00
Christopher Lam
7880f9b16f [SchedXaction.c] free list of recurrences 2022-07-29 12:23:09 +08:00
Christopher Lam
c16840b840 more leaks because qof_instance_get returns a new char* 2022-07-21 07:46:40 +08:00
Christopher Lam
f1adb5da34 Merge branch 'TXN_TYPE-is-dynamic' xaccTransGetTxnType into maint #1201 2022-07-18 09:24:32 +08:00
Christopher Lam
ec3e996f92 tests xaccTransGetTxnType heuristics
tests TXN_TYPE_NONE in utest-Transaction.c

testing TXN_TYPE_INVOICE, TXN_TYPE_PAYMENT, and TXN_TYPE_LINK will
require valid posted invoices, so, are best tested in utest-Invoice.c
2022-07-18 09:24:05 +08:00
Christopher Lam
fd12d3900c [Transaction.c] use heuristics to determine txn->txn_type 2022-07-18 09:24:05 +08:00
John Ralls
f4c27d4494 Move gnc_ui_account_get_tax_info_string to gnc-locale-tax.c
To prevent a circular dependency between libgnc-app-utils and
libgnucash-guile.
2022-07-17 10:00:23 -07:00
Robert Fewell
ce4768c357 Bug 798565 - Import map editor entry deletion
When a top level bayesian entry is deleted, the book is not marked
dirty and so the save button is not highlighted. Deleting individual
entries did mark book dirty.

Fixed in gnc_account_delete_all_bayes_maps by wrapping the deletion
with xaccAccountBeginEdit/CommitEdit block.
2022-07-17 12:51:38 +01:00
Robert Fewell
d688a17ef6 Merge 'luzpaz' branch 'source-typos' into maint PR #1364 2022-07-17 11:31:54 +01:00
John Ralls
3e2f7bc66a Create separate shared library for expression parser and SX instance model.
These functions depend on both libgnc-app-utils and libgnucash-guile,
creating a circular dependency when the app-utils bindings are added to
libgnucash-guile.
2022-07-16 18:20:17 -07:00
John Ralls
47904a858e Fix distcheck in master.
Several gnc-optiondb dependencies left out of tarball.
2022-07-16 18:15:57 -07:00
John Ralls
3fd8bd9ddf Merge branch 'maint' 2022-07-16 17:15:20 -07:00
Christopher Lam
263f007d5c [gnc-filepath-utils] new: gnc_list_all_paths 2022-07-10 23:44:13 +08:00
Christopher Lam
aa43c198c6 [Transaction.c] don't set TxnType kvp if it is the same as before
will avoid dirtying the transaction.
2022-07-08 18:15:09 +08:00
John Ralls
9f6d495ca1 Fix use-after-free crash in utest-Invoice. 2022-07-08 18:12:26 +08:00
luz paz
cfc6e9d7e0 Fix source typo begining->beginning 2022-06-27 07:16:54 -04:00
John Ralls
1e6c679e71 Merge branch 'maint' 2022-06-14 12:53:16 -07:00
John Ralls
903cbdcad3 Bug 798547 - Calculated Due Date is short 1 day when posting on...
day of fall change from Daylight Time to Standard Time.

Really any day where the period crosses the dst->std change, and
since the date dialog returns local midnight for the time that includes
the day of the change.

Convert both the parameter time and the return time to neutral time
to ensure that the interval is handled correctly.
2022-06-02 15:46:59 -07:00
John Ralls
564d73a553 Bug 798531 - Selecting "Print" from the file menu on a report...
crashes gnucash

Ensure that every call to gnc_prefs_get_string correctly handles both
a NULL or empty string return value without crashing or leaking.
2022-05-20 14:33:29 -07:00
Christopher Lam
670902d5a8 Bug 798535 - Crash when increasing the number of periods in a budget
because in the SQL backend, gnc_budget_commit_edit will update the sql
by reading from vectors with an increased priv->num_periods.
2022-05-18 17:37:05 +08:00
Robert Fewell
27cab58bf2 Correct some text describing some date functions. 2022-05-08 10:09:50 +01:00
Robert Fewell
c000a890ad Bug 798501 - Balance wrong date end of account period
With the accounting period preference settings set to 'Start/End of
previous quarter' and balance sheet report using 'End of accounting
period' the date is wrong, currently is 30/03/2022 when it should be
31/03/2022.

Simplify gnc_gdate_set_quarter_end to get correct last day and
subtract the 3 months befor calling said function.
2022-05-08 10:09:50 +01:00
Christopher Lam
a5cae6c5eb Don't export undefined functions 2022-05-05 09:46:49 +08:00
Christopher Lam
fcc3b27f92 Merge branch 'maint' 2022-05-05 09:46:44 +08:00
Robert Fewell
ee7ed89b68 This partly fixes the currency and commodity combos
With these changes the currency works but the commodity allows you to
set the commodity but will crash if you save config or leave report
open, this was tested on the 'Price scatter plot' report. Fixed with
John's commit a8e6a59
2022-05-03 16:55:55 +01:00
Robert Fewell
db6a8f809b Tax Tables combo does not set the active one
Fixed by correcting spelling of tax table qof type, should
'gncTaxTable'. Also fixed setting tax table combo to 'none' when page
reset button used.
2022-05-03 16:55:55 +01:00
Robert Fewell
0b67a91217 Fix the option GncOptionRangeValue
The GncOptionRangeValue can be used with integers or doubles, the
default being doubles. When used for setting the plot width/height,
integers are used so all ValueTypes need to be integers other wise
the when create_range_spinner is used you end up with the upper_bound
value being G_MAXDOUBLE, a 309 character wide spin button. To
differentiate the two, use 'set_alternate(true)' for integers.
2022-05-03 16:55:48 +01:00
Robert Fewell
506eb38493 Update Chart Width/Height Plot setting
The new plot setting does both settings, values above 100 are treated
as pixels and ones below are treated as a percentage. This means the
maximum valid setting must be higher and also the tooltip needs to be
changed.
2022-05-03 15:44:24 +01:00
John Ralls
1a186b953e [C++options] Correct handling of multichoice scheme option types.
Includes tests for save-to-scheme for each type.
2022-05-02 11:28:28 -07:00
John Ralls
a8e6a59bf8 [C++options] Fix Guile crash when restoring some reports.
In particular those with commodity options or those using a stylesheet
whose name has spaces like "Head or Tail".
2022-04-29 11:16:25 -07:00
Alex Aycinena
e381e70638 reverse commit d48937c. See discussion in Bug #79769. 2022-04-22 19:26:09 -07:00
Christopher Lam
dc620d4b24 Merge branch 'maint' 2022-04-22 13:43:47 +08:00
Alex Aycinena
d48937cf9c Bug #79769 - Allow US Income Tax txf code 296 (Returns and allowances) to be shown and assignable for both income and expense type accounts. 2022-04-21 18:51:05 -07:00
Christopher Lam
394e0a4b71 [gnc-sx-instance-model.c] leak: don't strdup char* for xaccTransSetNotes
For a while now, xaccTransSetNotes would strdup the notes. Don't need
to strdup it beforehand.
2022-04-19 22:59:51 +08:00
Christopher Lam
e1d52963ed [account.cpp] restore breadth-first search for 2 functions
gnc_account_lookup_by_name and gnc_account_lookup_by_code were
searching breadth-first and accidentally changed to depth-first in
4.7.

as reported in https://github.com/Gnucash/gnucash/pull/1101#issuecomment-1098146573
2022-04-15 23:35:38 +08:00
John Ralls
95487eb4a0 Merge branch 'maint'
# Conflicts:
#	gnucash/gnome/window-reconcile2.c
#	libgnucash/app-utils/options.scm
#	libgnucash/engine/gnc-numeric.cpp
2022-04-14 18:02:17 -07:00
Christopher Lam
fae7ea02cd [account.cpp] gnc_accounts_and_all_descendants converted from scm
much more efficient than guile algorithm, avoids numerous repeated
GList<->SCM conversions, and traversals of account descendants.
2022-04-14 21:51:14 +08:00
Frank H. Ellenberger
2298590316 Merge PR #1309 into maint 2022-04-12 00:20:11 +02:00
Christopher Lam
736d223198 Merge branch 'maint-progress3' into maint #1312 2022-04-10 12:05:08 +08:00
Christopher Lam
0c4d438a0e [kvp-frame.cpp] expose iterator, skip inexistent frame 2022-04-09 17:45:44 +08:00
Christopher Lam
aab33954e7 [gnc-numeric.cpp] Reduce logging level of gnc_numeric exception message
Exceptions are expected in some use cases.
2022-04-09 07:21:15 +08:00
luz paz
8adedc2248 Fix various typos
Found via `codespell -q 3 -S *.po,./po,*.min.js,./ChangeLog*,./NEWS,./borrowed,./doc/README*,./AUTHORS,./libgnucash/tax/us/txf-de*,./data/accounts -L ans,ba,cas,dragable,gae,iff,iif,mut,nd,numer,parm,parms,startd,stoll`
2022-04-08 14:12:50 -04:00
Christopher Lam
6a668df168 [qofutil.h] don't recurse includes 2022-04-08 19:20:40 +08:00
Robert Fewell
ae220b86a4 [C++options] Fix Ubuntu test failure. 2022-04-07 14:28:02 +01:00
Robert Fewell
83373563c3 Counter formats stored in wrong place.
The Book Options, counter formats were being stored under the 'options'
tree but need to be stored in the 'counter_format' tree similar to the
'counters' tree.
2022-04-07 10:33:11 +01:00
John Ralls
26b009c0f4 Bug 798500 - FTBFS (tests failure) on armhf
Ensure the transition_times are correctly aligned for their sizes
before attempting to copy them into the transitions vector.
2022-04-05 11:45:22 -07:00
Christopher Lam
ee8729dfb6 [account.cpp] char* must be freed 2022-04-02 14:14:50 +08:00
John Ralls
29bdd9b526 [C++options] Fix Ubuntu test failure. 2022-03-31 13:12:45 -07:00
John Ralls
1fddf70e21 [C++options] Fix previous month and previous quarter at the end of March
.

Because March has more days than February the previous month offset was
getting normalized back to the current month--th 29 February this
year is really 1 March, so normalizing before setting the day caused
begin/end previous month to return the begin/end of the current month.
That probably happened on the 31st of May, July, October, and December
as well, I just hadn't managed to test on those days. Switching the
normalization to after calculating the day of the month broke the
previous quarter calculation because now the month was out of range, so
normalize month & year first.
2022-03-31 12:27:58 -07:00
John Ralls
abd1a0b3f1 Merge branch 'c++options' 2022-03-29 15:58:22 -07:00
John Ralls
03cbbd1cd1 Merge branch 'maint' 2022-03-27 06:46:09 -07:00
John Ralls
109efe62b8 Rework default non-currency commodity namespace.
Separate the "All noncurrency" convenience category in the commodity
selector and the default non-commodity namespace proposed by the QIF
importer because they have different functions.

Also remove the namespace guessing code from qif-dialog because with
only one default non-currency namespace there's nothing to guess.
2022-03-24 18:10:32 -07:00
John Ralls
4fe83c3b32 [C++options] Remove GncOptionValue<SCM>.
No longer needed.
2022-03-21 14:08:06 -07:00
John Ralls
278aa484d7 [C++options] Implement new GncOptionValue type GncOptionReportPlacement.
For multicolumn reports so that we don't have to pass Scheme values.
2022-03-21 13:58:50 -07:00
Christopher Lam
4a75baa4c6 [gnc-xml-backend.cpp] gchar* must be freed after use.
It is used as a constructor for std::string which makes a copy but
doesn't take ownership.
2022-03-21 07:26:45 +08:00
Christopher Lam
cf1282501e Use original guile variable names changed in #1073
The changes 09296dfb96, 1373233cd0 and 189db58e6 had caused
inconsistencies. Best restore original guile variable names using
underscore, bound to strings instead of functions returning strings.
2022-03-20 12:38:09 +08:00
Christopher Lam
5993ebf4d4 Merge branch 'maint' 2022-03-18 20:37:07 +08:00
Christopher Lam
5388cc8e2c [kvp-frame.cpp] minor speedups
reserve vector, cache iterator from m_valuemap.find for reuse
immediately afterwards.
2022-03-18 16:29:13 +08:00
John Ralls
30e6c8ab11 [gnc-optiondb.i]Explicitly include array.
Xcode-13.3 errors without it.
2022-03-15 16:16:50 -07:00
John Ralls
572cb6b1d1 Banish gnc_get_optiondb_from_dispatcher to gnc-report.cpp.
Puts it closer to its points of use and removes it with its Scheme
dependency from libgnucash.
2022-03-14 10:32:08 -07:00
John Ralls
e63baa6270 Merge Bob Fewell's 'rtl' into maint. 2022-03-14 09:25:42 -07:00
Robert Fewell
f8fc796c95 Bug797501 - Currency symbols in Hebrew (RTL) language
When Gnucash is run in Hebrew which is a RTL language, on the accounts
page the tree view is displaying the required number as the following...

TreeView entry is   '1,500.00 ₪' or '-1,500.00 ₪'
TreeModel string is '₪ 1,500.00‬' or '₪ 1,500.00-‬'

This seems to be down to the GTK 'Unicode Bidirectional Text Algorithm'
which is changing the representation of the model string based on the
first strongly typed character, in this case the Israeli shekel sign.

To fix this, when creating the displayed monetary amount insert a BiDi
ltr isolate uni-character at the start of the string.
2022-03-14 10:05:46 +00:00
John Ralls
d4c3c30b1a Use GUIDs to represent QofInstances instead of pointers.
Converting them to pointers for Scheme to use. Prevents
dangling pointers when the user deletes a QofInstance as long as the
Scheme report code re-fetches its pointers from the options when it's
regenerated.
2022-03-12 17:58:23 -08:00
Christopher Lam
193a7aae5d Merge branch 'maint' 2022-03-12 15:18:43 +08:00
Christopher Lam
0052e3e483 [gnc-pricedb] add user:stock-transaction price source 2022-03-11 14:31:02 +08:00
John Ralls
c1001e6641 Better wording for tax table changed info message. 2022-03-10 13:44:47 -08:00
John Ralls
d841b322d0 Merge Frank Ellenberger's 'Bug684507' into maint. 2022-03-08 12:39:47 -08:00
John Ralls
ce2b89fd8c [business]Add diagnostic messages to GncEntry and GncInvoice. 2022-03-05 18:18:13 -08:00
John Ralls
916caa25f2 Integrate Windows gzopen differences so that only one ifdef is needed.
Clarifies code.
2022-03-05 16:20:08 -08:00
John Ralls
250b4ed733 Remove stray line left from earlier refactoring. 2022-03-04 14:53:02 -08:00
Robert Fewell
7e299cb2b0 Remove print statement left in commit c3f8daa 2022-03-04 10:16:14 +00:00
John Ralls
8ef8d3807c Silence spurious conditional uninitialized warning in gnc-owner-sql.cpp. 2022-03-03 13:21:51 -08:00
John Ralls
93f5e23cf5 Open gzfile if thread creation fails. 2022-03-03 13:20:41 -08:00
John Ralls
9ad24321b4 Remove investment-type namespaces.
Leave it to users to categorize their non-currency commodities. In the
QIF importer default non-classifiable commodities to
GNC_COMMODITY_NS_NONCURRENCY.
2022-03-01 19:58:23 -08:00
Frank H. Ellenberger
09296dfb96 Drop commodity-table.scm, no longer required after adjusting qif-dialog-utils 2022-03-01 19:58:11 -08:00
Frank H. Ellenberger
c7f842c081 Bug 684507 - commodity namespace should be localized 2022-03-01 19:58:11 -08:00
Christopher Lam
bd4a457040 Merge branch 'maint-lightning-budget' into maint #1248 2022-03-02 07:37:17 +08:00
Christopher Lam
a47413860a Factor out GValue access for setters and getters 2022-03-02 07:36:59 +08:00
Christopher Lam
8f845df934 Factor out make_period_[data|note]_path 2022-03-02 07:36:59 +08:00
Christopher Lam
919f392c7a Use kvp C++ interface rather than GValue 2022-03-02 07:36:59 +08:00
Christopher Lam
6c4c2512db Use C++ STL instead of GLib 2022-03-02 07:36:59 +08:00
Christopher Lam
9088acabd8 [gnc-budget.cpp] convert to c++ 2022-03-02 07:13:24 +08:00
John Ralls
81b9a02235 Bug 798458 - Build failure with gcc 12
Refactor try_gz_open to return a std::pair<FILE*, thread>. That removes
the need for the threads hash-table and wait_for_gzip().

The cause of the gcc12 error was that we were using the thread's pipe's
FILE* as the key to the hash-table and had to close it before calling
wait_for_gzip(file) to remove the thread from the hash-table. gcc12
considers that a use-after-free. It happens to be wrong, but removing the
need for it results in a cleaner implementation as well as silencing the
warning.
2022-03-01 12:49:12 -08:00
John Ralls
67e8c317da [xml backend] Extract functions to make gz_trhead_func more readable. 2022-03-01 12:49:12 -08:00
Christopher Lam
56cc021d33 Merge branch 'maint' 2022-02-12 22:24:24 +08:00
Alex Aycinena
a2825d33a1 Update Form/Schedule line references for 2021 for the US Income Tax Report 2022-01-27 12:00:31 -08:00
Christopher Lam
c1c198c9ff Merge branch 'maint' 2022-01-19 19:21:32 +08:00
Christopher Lam
f0de54ac7a Merge branch 'maint-798406' into maint #1240 2022-01-19 19:16:14 +08:00
Christopher Lam
8bc080b96d [gnc-budget] store budget kvp data onto memory upon first call.
then each getter will retrieve from memory rather than backend's kvp.
2022-01-17 09:34:46 +08:00
Christopher Lam
ef8d812d3f [utest-Budget] test data retention when modifying budget num_periods 2022-01-17 09:31:28 +08:00
Christopher Lam
87b0a41e9b [Split.c] return price==0 instead of 1, if !split, or amt==0 2022-01-10 19:19:25 +08:00
John Ralls
c1c75e8f81 Revert "Revert "Merge Stefan Bayer's 'SepaInternalTransfer' into maint.""
The original merge was of a PR based on master into maint, bringing
along all of the development changes in master along with it. We don't
want that so the merge was reverted and the PR's two changes
cherry-picked in. That fixed maint, but then the next regular merge of
maint into master naturally included that revert commit undoing the
changes in master. Not so good. Reverting the revert, this commit,
restores the changes, albeit with messed up history.
2022-01-08 15:10:53 -08:00
Christopher Lam
5603acba31 Merge branch 'maint' 2022-01-06 21:32:41 +08:00
Christopher Lam
f7ee644695 Amendment to 73822f97a [1/2] use heuristics to scrub budget signs
Testing income<0 to conclude "none reversal" is likely a more sound
strategy than testing liability>0.
2022-01-04 08:25:02 +08:00
John Ralls
a7a643f7f2 Store option commodities and namespace and mnemonic instead of pointer.
Protects against crashes caused by the user deleting the commodity and
allows the option to work if a deleted commodity is recreated.
2022-01-03 14:47:18 -08:00
John Ralls
65bd860249 Fix relative_date_to_time64 calculations.
Where the date requested extends beyond the start or end of the year.
2022-01-01 16:05:06 -08:00
John Ralls
6841e5b5c8 Replace GncOptionValue<const QofInstance*> with GncOptionQofInstanceValue.
That stores its values as a pair of <QofIdType, gncGUID> so that it
won't have dangling ptrs if the instance gets deleted.
2021-12-30 12:21:56 -08:00
John Ralls
11225d9741 c++options: Remove gnc:options-data 2021-12-15 14:54:41 -08:00
John Ralls
16dc15964c c++options: Remove the callback registration functions. 2021-12-15 14:32:39 -08:00
John Ralls
759376eb13 c++options: Fix multicolumn report 2021-12-15 14:13:47 -08:00
John Ralls
18edc17541 c++options remove stray debugging comment. 2021-12-14 14:20:20 -08:00
John Ralls
b5d0c42505 c++options: Put copyright and FSF header comment on gnc-optiondb.i. 2021-12-14 12:06:39 -08:00
John Ralls
a700701cd3 c++options: Remove three unused test functions.
Scheme serialization is now tested in test-option-gnc-scheme-output.scm.
2021-12-14 11:52:15 -08:00
John Ralls
eb0bd4f998 c++options: Remove unneeded C++20 header and resolve ambiguous call. 2021-12-14 11:51:37 -08:00
John Ralls
a3f50586df c++options: More thorough testing of scheme serialization. 2021-12-14 11:03:37 -08:00
John Ralls
6cd88c230c c++options: Create bool or string internal options when possible.
There's no need to save internal options as SCM when we support the
underlying type in C++.
2021-12-14 11:03:01 -08:00
John Ralls
e9b850cca5 c++options: Correct Scheme serialization of type bool. 2021-12-14 10:58:48 -08:00