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
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
5661c45d2a
gnc_commodity_table_get_namespaces must be g_list_freed
2024-11-28 08:23:30 +08: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
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
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
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
Christopher Lam
f65f877098
[Scrub.cpp] don't create intermediate GHashTable and GList
...
use unordered_set instead
2024-07-17 23:53:02 +08:00
John Ralls
5fe7a09e7d
Bug 799370 - Transaction Journal view cursor placement after commit to...
...
transaction change.
This also reverts commit 60ccca017 and fixes Bug 799347 in a different
way that avoids the problems found during the investigation of 799370
and reported on gnucash-user.
2024-07-15 12:23:40 -07:00
Christopher Lam
88d8f63853
[Account.cpp] overload gnc_account_foreach_descendant takes std::function
...
and separate account_foreach_descendant_sorted
2024-07-12 17:54:17 +08:00
Christopher Lam
5f17334395
[transaction.cpp] use std::swap instead of SWAP macro
2024-07-09 20:09:24 +08:00
John Ralls
60ccca017f
Bug 799347 - Edit account to make it sub account under other account
...
Send QOF_EVENT_REMOVE on the child before actually removing it from
the children vector so that the stored indexes are valid long enough
to clear them.
2024-07-01 21:31:55 -07:00
John Ralls
ad7a51a6ef
Merge Chris Lam's 'acc-children-vector' into stable.
2024-06-27 13:21:49 -07:00
Robert Fewell
8bd7deb3dc
Reapply filter when number of sub-accounts change
...
When viewing a register that displays sub-accounts, if the number of
sub-accounts is changed, the query is rebuilt from the remaining
sub-accounts but when a filter is being used it is not applied after.
Fixed by checking the original query for a filter and if so applying
that after query rebuilt.
2024-06-27 10:03:22 +01:00
Christopher Lam
a6463f9814
[utest-Account] add more balance limit tests
2024-06-24 11:09:47 +08:00
Christopher Lam
b7fde90411
[Account.cpp] xaccAccountStagedTransactionTraversal copies SplitsVec
...
because create_transactions_for_instance which calls
xaccAccountStagedTransactionTraversal will modify the splits
2024-06-18 20:29:14 +08:00
Christopher Lam
cd097d19ec
[Account.cpp] don't copy SplitsVec
2024-06-18 08:24:17 +08:00
Christopher Lam
119e257146
[Transaction|Split.cpp] Remove Reg2 unused functions
2024-06-17 21:53:26 +08:00
Christopher Lam
47791734bb
[SX-ttinfo.cpp] tidier, using c++ stl and algo
2024-06-12 23:17:32 +08:00
Christopher Lam
ddc7958801
[~qofchoice.cpp] remove, not useful
...
because the options GLists are populated, but are never actually
queried. The QOF_TYPE_CHOICE definition is moved to qofclass.h
2024-06-10 01:33:06 +08:00
Christopher Lam
d1807b6c15
[engine.i] move gnc_accounts_and_all_descendants to engine.i
2024-06-07 18:10:40 +08:00
Christopher Lam
6cac9d0ebb
[Account.cpp] priv->children is a vector<Account*>
2024-06-07 18:10:40 +08:00
Daniel Harding
c4d44ea024
Bug 799324 - Invalid free in gvalue_from_kvp_value()
...
As of ddc3f28899 , gvalue_from_kvp_value()
takes a GValue pointer from the caller, which in some cases points to
memory on the stack. If that is the case and the code also hits the
default case in the switch statement, the unconditional g_slice_free()
call will attempt to free stack memory, causing the program to abort.
Fix by requiring the caller to always pass in a valid GValue pointer,
making the caller responsible for freeing it if necessary. This also
means that it is no longer necessary for gvalue_from_kvp_value() to
return a value, so make it a void function.
2024-06-02 14:39:11 -07:00