Commit Graph

2377 Commits

Author SHA1 Message Date
John Ralls
5b08f8f35c Merge John Ralls's 'bug798958' into stable. 2025-02-07 15:30:18 -08:00
Alex Aycinena
d0ad95fe92 Correct bug introduced in commit 63deaad. affecting Edit->Tax Report Options and the US Income Tax Report 2025-02-06 15:06:09 -08:00
John Ralls
a475172d8c Bug 798946 - start/end of current/last quarter have off-by-one error 2025-01-20 11:40:44 -08:00
Christopher Lam
f6c73b15fb use gnc_account_get_all_parents and std::mismatch 2025-01-20 08:09:59 +08:00
Christopher Lam
a2d7868dce [Account.hpp] gnc_account_get_all_parents returns reversed path vector 2025-01-20 05:09:29 +08:00
Alex Aycinena
e8049a6491 Update Form/Schedule line references for 2024 for the US Income Tax Report 2025-01-12 14:54:44 -08:00
peter15914
deee65d0d4 Fix incorrect deallocation type
Objects created with dom_tree_to_guid must be destroyed with guid_free.
2025-01-05 23:12:25 +05:00
John Ralls
c549e203cb Bug 799449 - Save As... sequence from SQL to XML format does not...
clear lock on the origin SQL book.

GncDbiSqlConnection::unlock_database function errored out if the last
dbi interaction resulted in an error, even if it was a harmless index
out of range. Ignore index out of range errors.
2024-12-23 12:59:11 -08:00
John Ralls
bda17ff4d8 Bug 799487 - Unable to save gnucash DB file as XML file
Not quite true, it just takes a really long time for a large database.

The underlying problem is gnc_file_do_save_as reloads the data to make
sure that the save-as saves everything. On the SQL backend that
triggers a scrub. The scrub itseld doesn't take long, but every
transaction commit was logged in the transaction log and did a refresh
of the registers. So:
* Suspend logging while doing the scrub.
* Suspend UI refreshes and QOF events while reloading the data.
2024-12-21 18:23:44 -08:00
John Ralls
579eed1fac Bug 799480 - Fails to build with ICU 76
Use CMake find_package instead of pkg-config.
2024-12-21 16:56:00 -08:00
John Ralls
77a95b2d49 Silence compile warning with a cast. 2024-12-12 14:21:29 -08:00
Christopher Lam
996ce3a03e Don't #include mach-only .h file
Amendment to 6c2168772b
2024-12-11 18:33:05 +08:00
John Ralls
6c2168772b Bug 799439 - Duplicate information in description when importing...
CAMT.053.001.02 via aqbanking

Deduplicate the description inputs when joining them by creating a
variant of gnc_g_list_stringjoin named gnc_g_list_stringjoin_nodups
that tests each string against the agregate string and adds it only if
it's not already included. Note that while it uses g_utf8_normalize to
ensure that non-ascii strings are consistently composed it has to do a
bytewise comparison with strstr as glib doesn't provide a UTF-8
equivalent. strnocasestr would work only with ASCII strings so it's
not suitable.
2024-12-10 15:30:03 -08:00
Christopher Lam
5661c45d2a gnc_commodity_table_get_namespaces must be g_list_freed 2024-11-28 08:23:30 +08:00
Landry Breuil
4819f2de21 fix build with recent boost where io_service was removed (deprecated since many releases) 2024-11-25 08:47:24 +01:00
David Seifert
c06bc18dc4 Add missing #include <cstdint>
* GCC 15 has reduced transitive dependencies between headers.

Bug: https://bugs.gentoo.org/939856
2024-11-02 09:55:15 +01:00
John Ralls
274c033bab Merge Przemysław Kryger's 'update-for-fq-1.63' insto stable. 2024-10-31 10:44:02 -07:00
Geert Janssens
831ce065bb Fix invalid home test
If a user has set environment variable GNC_DATA_HOME
to a valid directory (containing real gnucash metadata)
the test would fail. It expects to follow the code path
to set up a gnucash data home directory in the temporary
directory, but the directory pointed to in GNC_DATA_HOME
is used instead.
Fix this by also setting environment variable GNC_DATA_HOME
to something invalid during the test.
2024-10-31 12:42:24 +01:00
Przemysław Kryger
cba868231b Mark quote source strings for translations 2024-10-29 09:30:54 +00:00
Christopher Lam
c02152b34a [Account.hpp] xaccAccountGetSplits returns a reference to vector 2024-10-27 16:14:17 +08:00
Przemysław Kryger
3dd9a70164 Use English names for Italian and Bucharest stock exchanges 2024-10-21 16:06:23 +01:00
Przemysław Kryger
9e4cd9e499 Remove US from alphavantage 2024-10-21 13:12:44 +01:00
Przemysław Kryger
a4b7c9b72c Athens is Greece 2024-10-21 12:53:58 +01:00
Przemysław Kryger
1911bf5ff7 Use UTF8 ellipsys character in mutliple qoute sources lists 2024-10-20 11:58:14 +01:00
Przemysław Kryger
b7b7df5c06 Add regions to S-Investor and OnVista quote sources 2024-10-20 11:58:14 +01:00
Przemysław Kryger
84e6a21d29 Add morningstarau to single and aufunds to multiple _quotes_sources 2024-10-18 15:56:12 +01:00
Przemysław Kryger
700f8ca125 Remove ellipses from multiple_quote_sources where lists are complete 2024-10-18 15:26:01 +01:00
Przemysław Kryger
2e734b3239 Add back cse - Colobmo Stock Exchange to single_quote_sources 2024-10-18 15:25:45 +01:00
Christopher Lam
10857219ab [Account.cpp] refactor acc->balance_limit getters/setters 2024-10-18 08:35:26 +08:00
Christopher Lam
63deaad249 [Account.cpp] use newer qof_instance_get|set_path_kvp
which do not require GValue dance

small modification of xaccAccountSetLastNum behaviour with
empty-string last_num
2024-10-18 08:35:26 +08:00
Christopher Lam
c0b2b761e9 [qofinstance.cpp] GValue on stack instead of heap 2024-10-18 08:35:26 +08:00
Christopher Lam
a26a6c4a6f [qofinstance.cpp] add overloaded qof_instance_set|get_path_kvp
these overloaded functions to kvp slots do not require GValue
2024-10-18 08:35:25 +08:00
Przemysław Kryger
5fc768711b Update gnc-commodity.cpp for finance-quote 1.63 2024-10-17 11:01:57 +01:00
Christopher Lam
ecabcef084 [Account.cpp] small modification xaccAccountSetLastNum
if last-num is empty-string, remove the slot. this makes the behaviour
consistent with other slots.
2024-10-13 08:43:41 +08:00
Christopher Lam
d13f930a8c [Account.cpp] tightening loops, less g_list_free 2024-10-12 09:44:34 -07:00
John Ralls
7f8d5456c7 Bug 798789 - Trading Accounts
Scrubbing during SQL load can't commit the changes from the scrub
because the backend's m_loading member is true so disable scrubbing
during database load and edit/commit all transactions again after
loading is complete.
2024-10-06 14:09:57 -07:00
Yongun Seong
a7804525b0 [gnc-quotes.cpp] fix quote report 2024-10-01 02:35:34 +09:00
Kanstantin K.
d0b210a6df Bugfix 797045 - Correct error message when connection to database failed
This is to fix the defect https://bugs.gnucash.org/show_bug.cgi?id=797045
Error type chaged to ERR_BACKEND_CANT_CONNECT in gnc-backend-dbi.cpp when connection to database failed
2024-09-28 09:36:43 +02:00
John Ralls
6aeca0040e Bug 799419 - Intermittent quote price issue
Track quote source in Finance::Quote return json so that duplicate symbols in
different namespaces can be kept separate.
2024-09-26 17:55:39 -07:00
John Ralls
7b34971c87 Gnc-options-date: Make the accounting period struct tm empty...
If the accounting period start-choice is anything but absolute instead
of matching the accounting period month and day to the present month and
day. The latter is a non-obvious hack that depends on
gnc_accounting_period_fiscal_start() returning the present day if it's
not set.
2024-09-22 16:15:52 -07:00
John Ralls
c584337c3a Bug 799395 - relative date offset quarters occasionally wrong
If the accounting period start month and the present month are the
same the present month would be offset by 3. Don't do that.
2024-09-22 16:12:54 -07:00
John Ralls
9c9ad7c271 Replace GncFQQuoteSource api-key members with a bp::environment one. 2024-09-21 10:04:58 -07:00
John Ralls
a23506c88a Add YH Finance (FINANCEAPI) API Key to Quotes infrastructure.
And add financeapi to known sources.
2024-09-19 13:25:59 -07:00
Christopher Lam
ab641b31f8 [gnc-datetime] improve CSV date parser with ICU and boost
1. Add dateformat "Locale" with ICU; uses current locale for date
   parsing. ICU's locale date parser may parse "3 May 2023" or
   "2024年9月13日" (LC_TIME=zh_TW.utf8) and maybe others.

2. Augment d-m-y m-d-y and y-m-d with boost UK/US/ISO parsers. This allows
   CSV import of dates with months as words as "30 Sep 2023" or
   "May 4, 1978" or "2023-Dec-25". Note boost parser cannot recognise
   2-digit years, therefore "30 Sep 24" is invalid.
2024-09-14 10:13:52 +08:00
Christopher Lam
d935edeea5 [gnc-date.cpp] deprecate gnc_difftime
because it casts time64 to doubles
2024-09-08 21:11:44 +08:00
Christopher Lam
dc84e4d10c [gnc-pricedb.h] remove unused gnc_pricedb_substitute_commodity 2024-08-31 20:46:05 +08:00
Christopher Lam
1718fa0b6e [gnc-pricedb.h] remove unused gnc_pricedb_lookup_at_time64 2024-08-31 20:45:32 +08:00
Christopher Lam
a99491d034 [gnc-commodity.h] callers must free g_list
callers to gnc_commodity_namespace_get_commodity_list and
gnc_commodity_table_get_namespaces_list must free the GList.
2024-08-27 20:00:50 +08:00
John Ralls
514793d7a0 Bug 799389 - Crash when removing an account
Destroying the split vector from front->back crashes halfway through
because the iterators aren't updated as we remove items from the
vector. Iterating in reverse works because the remaining elements
aren't moved as we delete.
2024-08-19 12:59:17 -07:00
Christopher Lam
48f3842eaa [Account.cpp] compare vectors with std::equal in xaccAccountEqual 2024-08-18 19:46:07 +08:00