2023-02-11 GnuCash IRC logs

00:37:02 *** Aussie_matt has quit IRC
01:25:46 *** fell has quit IRC
01:27:06 *** fell has joined #gnucash
01:27:06 *** ChanServ sets mode: +o fell
02:24:09 *** gjanssens has joined #gnucash
02:24:09 *** ChanServ sets mode: +o gjanssens
03:22:09 *** gjanssens has quit IRC
03:51:16 *** gjanssens has joined #gnucash
03:51:16 *** ChanServ sets mode: +o gjanssens
04:01:06 *** bertbob has quit IRC
04:04:37 *** bertbob has joined #gnucash
04:04:37 *** ChanServ sets mode: +v bertbob
05:09:59 *** bertbob has quit IRC
05:22:06 *** bertbob has joined #gnucash
05:22:06 *** ChanServ sets mode: +v bertbob
05:58:53 *** Aussie_matt has joined #gnucash
07:00:19 *** paul has joined #gnucash
07:52:16 *** gjanssens has quit IRC
07:59:12 *** gjanssens has joined #gnucash
07:59:12 *** ChanServ sets mode: +o gjanssens
09:43:26 *** jervin has joined #gnucash
09:44:24 *** palerider has joined #gnucash
09:46:53 *** palerider has left #gnucash
10:00:20 *** jervin has quit IRC
10:17:32 *** gour has joined #gnucash
10:17:32 *** ChanServ sets mode: +v gour
11:11:03 *** Aussie_matt has quit IRC
12:00:54 <gjanssens> Is it safe in code to assume that every account that is denominated in a non-currency has a parent account that's denominated in a currency ?
12:01:35 <gjanssens> In other words are users prevented from creating a child account in a non-currency if the parent is also in a non-currency ? Can a stock account be a child of another stock account ?
12:02:23 <gjanssens> I seem to remember there are some guidelines about broker accounts and how they define the transaction currency for stock transactions.
12:02:32 <gjanssens> But I want to be sure not to make false assumptions.
12:04:13 <gjanssens> Hmm, the gnucash gui certainly doesn't enforce this.
12:05:36 <gjanssens> So when creating new transactions in csv import, what rule should I follow if the csv data didn't explicitly set a transaction currency ? Parent up from the stock account until the first parent in a currency ?
12:28:29 <fell> gjanssens: Perhaps an enhancement, which should be documented. Assume your investment in security A partly follows tax rule X and the other part tax rule Y …
12:30:21 <gjanssens> What do tax rules have to do with generating transactions from code in the importer ?
12:31:15 <fell> I had them usually both below Broker (Currency) as "sec A - rule X" … but grupung them would also give the total of sec A.
12:32:36 <fell> Not on the import, but on profit and tax calculatio.
12:34:45 <gjanssens> Ok. Did your separate security Accounts have transactions using anything else than broker currency ?
12:36:07 <fell> No
12:37:23 <fell> But I had no splits or mergers.
12:39:00 <fell> For their implementation you should talk with chris or CDB-Man.
12:57:25 <jralls> gjanssens, no, nothing prevents creating a non-commodity account with a non-commodity parent. The currency code walks up the tree until it finds a currency account. At some point you get to the root account, which always has a currency, though if the user canceled out the hierarchy assistant it might not be the one they want or thought they had.
12:58:53 <gjanssens> Ok, so the importer should use the same code. Is there a function to get the proper currency starting from an account denominated in a non-currency ?
12:59:48 <jralls> Yes. gnc_account_get_currency_or_parent().
13:01:51 <gjanssens> Oh, missed that one. Thanks.
14:36:59 <warlord> gjanssens, there is nothing in the code to PREVENT it, but we do, in some cases, depend on a non-currency account having a current parent.
14:37:43 <warlord> .. but I see I'm late to this conversation.
14:56:08 *** NoobAlice has joined #gnucash
14:56:08 *** ChanServ sets mode: +v NoobAlice
15:12:08 <gjanssens> warlord: np, glad to hear your opinion as well :)
15:15:30 *** gjanssens has quit IRC
17:36:23 *** iamr00t has joined #gnucash
17:51:09 *** iamr00t_ has joined #gnucash
17:51:22 *** iamr00t has quit IRC
17:51:37 *** iamr00t_ is now known as iamr00t
18:20:17 *** jervin has joined #gnucash
18:21:27 *** jervin has quit IRC
19:20:56 *** iamr00t has quit IRC
20:09:06 *** Aussie_matt has joined #gnucash
22:51:04 *** palerider has joined #gnucash
23:08:09 *** Aussie_matt has quit IRC
23:14:07 *** palerider has left #gnucash