2021-07-08 GnuCash IRC logs

00:07:06 *** celeste has joined #gnucash
00:07:06 *** ChanServ sets mode: +v celeste
00:31:17 *** Mechtilde has joined #gnucash
00:44:43 *** NoobAlice has quit IRC
01:07:39 *** fell has quit IRC
01:08:58 *** fell has joined #gnucash
01:08:58 *** ChanServ sets mode: +o fell
01:23:10 *** sbluhm has joined #gnucash
01:35:16 *** frakturfreak has quit IRC
01:37:36 *** Aussie_matt has joined #gnucash
01:49:36 *** frakturfreak has joined #gnucash
01:49:59 *** Mechtilde has quit IRC
01:50:20 *** tomk_dk has joined #gnucash
02:46:19 *** field^Zzz3 has joined #gnucash
02:48:14 <Simon> jralls: when the cached string is used to set the strings on the new transaction it takes another cached copy
02:50:19 <Simon> It does CACHE_REPLACE(trans->description, desc);
02:50:28 <Simon> I'll reply on the bug report later
03:00:27 *** Mechtilde has joined #gnucash
03:22:38 *** tomk_dk has quit IRC
03:37:47 *** waitman- has quit IRC
04:17:03 *** waitman- has joined #gnucash
04:28:12 *** Aussie_matt has quit IRC
05:17:33 *** User has joined #gnucash
06:07:02 *** field^Zzz3 has quit IRC
06:24:57 *** Aussie_matt has joined #gnucash
06:27:27 *** David has quit IRC
06:27:45 *** David has joined #gnucash
06:34:11 *** Jocito has joined #gnucash
06:35:58 *** Joc has quit IRC
06:54:59 *** storyjesse has joined #gnucash
06:57:59 <chris> @tell gjanssens please stress test my branch bug797596 - moved overpayment and "derived-amount" into a function, which will then be moved to report-utilities.scm
06:57:59 <gncbot> chris: The operation succeeded.
08:12:37 *** Aussie_matt has quit IRC
08:24:06 <chris> @tell gjanssens all should be fixed now - rhs links, summary table, aging report
08:24:06 <gncbot> chris: The operation succeeded.
08:34:47 <chris> @tell gjanssens there's another case that I'm not sure we've considered: the payment-txn has been modified to have >1 split in the APAR account itself.
08:34:47 <gncbot> chris: The operation succeeded.
08:42:38 *** chris has quit IRC
08:42:55 *** Jimraehl1 has joined #gnucash
08:43:40 *** Jimraehl1 has quit IRC
08:44:35 *** chris has joined #gnucash
08:44:35 *** ChanServ sets mode: +v chris
08:44:39 *** gncbot sets mode: +o chris
09:01:38 *** gjanssens has joined #gnucash
09:01:38 *** ChanServ sets mode: +o gjanssens
09:01:42 *** Jocito has quit IRC
09:02:00 *** Joc has joined #gnucash
09:02:00 *** ChanServ sets mode: +v Joc
09:04:15 *** mydogsnameisrudy has joined #gnucash
09:07:00 <chris> gjanssens: time to refresh my branch bug797596 and test test test :)
09:07:06 <chris> all fixed now
09:21:41 <Joc> In a split transaction 2.25+47.75 USD, when I enter the 2.25 with an exchange rate of 5791/4775, I would expect that the 47.75 would be 57.91 as per the exchange rate, when viewed in CAD, instead I get 57.94, why?
09:28:26 *** sbluhm has quit IRC
09:42:40 *** jervin has joined #gnucash
09:45:59 <gjanssens> chris: ok. I'll check it out later today
09:45:59 <gncbot> gjanssens: Sent 2 hours and 48 minutes ago: <chris> please stress test my branch bug797596 - moved overpayment and derived-amount into a function, which will then be moved to report-utilities.scm
09:46:00 <gncbot> gjanssens: Sent 1 hour and 21 minutes ago: <chris> all should be fixed now - rhs links, summary table, aging report
09:46:01 <gncbot> gjanssens: Sent 1 hour and 11 minutes ago: <chris> there's another case that I'm not sure we've considered: the payment-txn has been modified to have >1 split in the APAR account itself.
09:55:11 <chris> Joc: what you mean by 2.25+47.75
09:55:47 <Joc> the split has two entries, one is 2.25, the other 47.75
09:56:08 <chris> maybe a screenshot would help.
09:56:14 <chris> imgur.com to paste
09:56:21 <Joc> ok, one sec
09:56:31 <warlord> Joc, a split is a single line entry, if you enter "2.25+47.75" it will evaluate to 50.
09:57:06 <warlord> If you're talking about different transaction splits, ... there needs to be a third to balance credits and debits.
09:57:11 <Joc> no, that´s two lines
09:57:38 <Joc> I´m making the screenshot
10:00:12 *** AstronautSurfer has joined #gnucash
10:00:12 *** ChanServ sets mode: +v AstronautSurfer
10:01:28 <Joc> https://imgur.com/9MaWDNn
10:02:14 <Joc> the first box is in USD, the second is in CAD
10:02:22 *** jervin has quit IRC
10:02:30 <Joc> same transaction
10:02:42 *** David has quit IRC
10:03:00 *** David has joined #gnucash
10:03:57 <Joc> the 47.75 is a USD account and does not have an exchange rate, but the 2.25 is a CAD account, so when I enter that amount, gnucash asks for an exchange rate
10:10:22 <warlord> So that top view seems to imply it is US$2.25 + US$47.75 = US$50.00. When you apply the exchange rate and view of CA$, everything should change over.
10:11:36 <warlord> Although the exchange rates are "off" by CA$0.03
10:11:47 <warlord> ... which is probably due to rounding errors.
10:12:45 <Joc> I entered the transaction from the USD account, then viewed it from the CAD account, but some reason the 47.75 didn´t get converted with the same exchange rate
10:13:43 <Joc> when I entered the exchange rate I used that fraction 5791/4775
10:18:51 <Joc> I can see this transaction in 3 ways, 1) PayPal-USD 2) Bank fees-CAD 3) customer-CAD
10:19:14 <Joc> The screen shows 1) and 2)
10:22:47 <warlord> In which account did you create the transaction? that will decide what the "transaction currency" is. My guess is that it's a USD-based txn. When you enter the split to the CAD account, it'll ask the exchange rate -- which it apparently did. As for why the display is weird on the other side -- I don't recall what rates are used on display.
10:23:22 <warlord> Did you enter it from Paypal-USD?
10:23:40 <warlord> Which currency matters more to you?
10:25:44 <Joc> if I remember correctly, I entered the transaction from the PayPal-USD account
10:25:58 <Joc> most of the accounts are done in CAD
10:26:41 <Joc> there should not be a rounding error, the fraction 5791/4775 I used for the exchange rate should give an exact 57.91.
10:26:53 *** jervin has joined #gnucash
10:27:26 *** jervin has joined #gnucash
10:31:34 <Joc> given that the 47.75 is in USD, GnuCash does not ask for the exchange rate when I enter that amount, so I can´t set the exchange rate for that part of the split
10:31:39 <warlord> ... except you're applying it to 2.25.. And the exchange rate isn't stored, it is computed. So you're getting an exchange rate of 2.25/2.73
10:31:46 *** Mechtilde has quit IRC
10:32:15 <warlord> ... hence the rounding error.
10:32:25 <warlord> Delete the transaction and create it from a CAD account.
10:32:40 <warlord> Enter the numbers from CAD.
10:33:14 <Joc> interesting... thinking...
10:35:18 <Joc> trying...
10:39:25 <Joc> got an imbalance of 0.02... https://imgur.com/Y0s1CQe
10:41:28 <warlord> Did you completely delete the transaction, go to one of the CAD accounts, and enter it from scratch there? The fact you have "Imbalance-USD" seems to imply not.
10:42:28 <Joc> you´re right, I did not delete the transaction, trying again...
10:43:58 *** David has quit IRC
10:44:16 *** David has joined #gnucash
10:50:22 <Joc> that worked, I got the expected numbers on both side!
10:51:41 <Joc> but I think you might be right, GnuCash rounded the 2.73 and then use that as the exchange rate, instead of using the fraction I entered
10:52:35 <warlord> Like I said, gnucash does not store the exchange rate -- stores the exact amounts (2.73 and 2.25 in this case) and then (re)computes the exchange rate from there.
10:52:46 <warlord> IT stores...
10:53:46 <Joc> I have to think about that, Thanks for your help!!!
10:56:38 <warlord> you;re welcoe.
10:56:41 <warlord> you're welcome.
10:58:32 <chris> gjanssens: the other conditions we haven't tested is when split->amount is zero, with splits in various accounts
11:02:12 <warlord> chris, we definitely need to handle that case. It's used a lot in stock sales.
11:02:21 <warlord> (for capturing gains/losses)
11:05:15 <chris> warlord: we're debugging the owner-reports... don't think capgains nor forex are involved there!
11:06:04 <chris> if forex are involved then the owner reports may not handle them correctly
11:06:53 <warlord> splits are also potentially involved in pre-payment handling.. But not sure why there would be a zero-amount.
11:07:26 <chris> ... because the UI allows it (!)
11:09:17 <warlord> lol
11:15:49 * chris think new-owner-report does a decent job of a report when non-APAR splits have a different currency than the APAR account
11:16:58 *** Pegasus_RPG has joined #gnucash
11:34:58 *** Pegasus_RPG has quit IRC
11:36:28 *** ArtGravity has joined #gnucash
11:36:28 *** ChanServ sets mode: +v ArtGravity
11:36:30 *** MatrixTravelerbot[m] has quit IRC
11:36:31 *** luwum[m] has quit IRC
11:36:31 *** Julianold[m] has quit IRC
11:36:32 *** peter-butler[m] has quit IRC
11:36:32 *** ErikSchillingAblu[m] has quit IRC
11:36:32 *** NewNick has quit IRC
11:36:32 *** technicus[m] has quit IRC
11:36:33 *** ElonSatoshi[m] has quit IRC
11:36:39 *** cybertani[m] has quit IRC
11:36:39 *** jojo[m] has quit IRC
11:36:39 *** antonlada[m] has quit IRC
11:36:39 *** dtux[m] has quit IRC
11:36:39 *** PeterScholtens[m] has quit IRC
11:40:24 *** ElonSatoshi[m] has joined #gnucash
11:53:05 *** Pegasus_RPG has joined #gnucash
11:55:28 *** sbluhm has joined #gnucash
11:55:35 *** David has quit IRC
11:55:53 *** David has joined #gnucash
12:10:12 <fell> chris, is there a mechanism to update bindings/guile/commodity-table.scm or have I to do it manuually?
12:11:55 <gjanssens> fell: what do you mean with updating it ?
12:12:31 <fell> I am on https://github.com/Gnucash/gnucash/pull/1073 and replaced NASDAC etc
12:13:20 <gjanssens> Ok. No there's no automated way. ATM we have to keep these files synchronized manually.
12:13:28 *** sbluhm has quit IRC
12:14:42 <fell> OK, other question: how do I find details of the failed python-bindings test?
12:14:55 *** storyjesse has quit IRC
12:15:54 <gjanssens> We may be able to automate it by exposing gnc-commodity in engine.i. The names in guile would then become as in C, but with '_' replaced with '-'
12:16:10 *** storyjesse has joined #gnucash
12:18:13 <gjanssens> As for t he error, atm I don't see a way to get those from github's actions. In our travis tests we enabled --output-on-failure by default. We should probably install that on the github actions as well.
12:21:46 *** MatrixTravelerbot[m] has joined #gnucash
12:21:46 *** Julianold[m] has joined #gnucash
12:21:47 *** luwum[m] has joined #gnucash
12:21:48 *** peter-butler[m] has joined #gnucash
12:21:49 *** cybertani[m] has joined #gnucash
12:21:50 *** ErikSchillingAblu[m] has joined #gnucash
12:21:50 *** PeterScholtens[m] has joined #gnucash
12:21:51 *** jojo[m] has joined #gnucash
12:21:52 *** dtux[m] has joined #gnucash
12:21:53 *** NewNick has joined #gnucash
12:21:54 *** technicus[m] has joined #gnucash
12:21:54 *** antonlada[m] has joined #gnucash
12:26:12 *** storyjesse has quit IRC
12:34:16 <fell> gjanssens, there is a line '#include "gnc-commodity.h"' in engine.i
12:34:44 <gjanssens> fell: I have pushed a commit that hopefully will make the ci output print the error logs for all failed tests.
12:34:59 <fell> Thanks!
12:35:19 <warlord> fell, that just passes-through to the .c file
12:35:48 <gjanssens> fell: right, but we probably also need an '%include "gnc-commodity.h"'. The one you found is just to ensure the resulting code can find the variables, but it's not generating a wrapper for the header file.
12:35:56 <gjanssens> That's what the %include rule does.
12:36:25 <fell> I never looked in swig
12:36:27 *** David has quit IRC
12:37:02 *** David has joined #gnucash
12:37:07 <gjanssens> NP, that's why we guide you :)
12:42:43 <gjanssens> But even for me adapting the swig interface files is still a bit tryal and error. There are many subtleties that play a role.
12:47:47 *** sbluhm has joined #gnucash
12:54:33 *** sbluhm has quit IRC
13:03:23 <fell> engine.i:258: Warning 509: Overloaded method gnc_quote_source_set_fq_installed(char const *,GList *) effectively ignored, as it is shadowed by gnc_quote_source_set_fq_installed(char const *,GList const *).
13:12:15 <fell> Adjusting the declaration slents it. Or should I remove it after %including hthe header, gjanssens?
13:12:36 <fell> silents
13:15:46 *** kcin has joined #gnucash
13:20:03 *** sbluhm has joined #gnucash
13:21:17 *** Pegasus_RPG1 has joined #gnucash
13:22:08 *** Pegasus_RPG has quit IRC
13:22:09 *** Pegasus_RPG1 is now known as Pegasus_RPG
13:28:06 <gjanssens> fell: that message means the header file is already included in some other form or the swig interface file has an explicit declaration of this function.
13:28:19 <gjanssens> Removing it after including the header is probably a good way.
13:29:04 <fell> In between I found the Namespace list in python test. :-)
13:30:36 <gjanssens> good
13:30:59 <gjanssens> By the way, it looks like gnc-commodty.h is already wrapped.
13:31:47 <gjanssens> If I look at the generated C file swig-engine.c it has definitions for GNC-COMMODITY-NS-NASDAQ and friends.
13:31:53 <gjanssens> So you don't have to do that explicitly.
13:32:34 <gjanssens> Is there scheme code that explicitly uses the GNC_COMMODITY_NS_NASDAQ variants ?
13:33:03 <gjanssens> Those locations have to be updated to use your new GNC-COMMODITY-NS-BONDS etc variants then
13:33:28 <gjanssens> The old names should be deprecated in 4.x and dropped in gnucash 5.x
13:35:44 *** kcin1 has joined #gnucash
13:35:48 <gjanssens> Looks like the qif importer uses those to suggest namespaces depending on the format of the imported ticker symbol
13:36:17 <gjanssens> In gnucash/import-export/qif-imp/qif-dialog-utils.scm
13:36:35 <gjanssens> Perhaps you can map those to your new names ?
13:36:51 <gjanssens> Anyway, time for a meeting over skype...
13:37:47 *** kcin has quit IRC
13:38:12 *** kcin1 is now known as kcin
13:38:41 <fell> The only usage is in qif-import
13:40:26 <fell> TBD
13:42:38 *** celeste has quit IRC
13:52:53 *** Pegasus_RPG1 has joined #gnucash
13:53:43 *** Pegasus_RPG has quit IRC
13:53:46 *** Pegasus_RPG1 is now known as Pegasus_RPG
14:02:37 *** celeste has joined #gnucash
14:02:37 *** ChanServ sets mode: +v celeste
14:08:52 *** AstronautSurfer has quit IRC
14:11:42 *** jervin has quit IRC
14:40:44 <Simon> qof_string_cache_insert() and qof_string_cache_replace() should really return const values because it's not safe to modify them
15:19:57 *** Pegasus_RPG has quit IRC
15:36:30 *** jervin has joined #gnucash
15:39:51 *** jervin has quit IRC
15:52:36 <Simon> https://github.com/nomis/gnucash/commit/08f96a43b69d3e120e08d6e591b0369606782434 there aren't too many places that need to be changed to const char * for that to happen
15:56:52 <Simon> I think there may be a leak of references to "" in Account because the values are initialised to "" and then overwritten in xaccCloneAccount without using the replace function
15:59:13 * Simon has 979 strings still referenced at exit... many of them are account names but that's not all of them
16:01:07 *** NoobAlice has joined #gnucash
16:11:16 *** gjanssens has quit IRC
16:15:41 *** jervin has joined #gnucash
16:16:35 *** jervin has quit IRC
16:16:42 *** jervin has joined #gnucash
16:19:18 *** sbluhm has quit IRC
16:55:23 <Simon> ppriv->children = g_list_append(ppriv->children, child); in gnc_account_append_child is leaking according to valgrind
16:57:16 <warlord> Is ppriv->children ever g_list_free()d?
16:57:48 <Simon> yes
16:58:06 <Simon> the strange is that it's not *all* accounts
16:58:11 <Simon> but it is most of them
16:58:19 <Simon> and none of the splits are remaining
17:00:13 <warlord> Odd
17:07:34 <Simon> utest-Transaction.cpp has some invalid tests because it's using g_strdup() where it should be using CACHE_INSERT()
17:08:18 <Simon> when I fix that (because I've made the values const so they can't be freed), xaccTransEqual() then behaves differently because it's doing pointer comparison on cached strings
17:09:17 <Simon> although it looks like it's intential
17:09:21 *** ArtGravity has quit IRC
17:09:29 <Simon> intentional* because it expects "123" != "123"
17:09:56 <warlord> The TESTS are intentional, yes.
17:10:31 *** kcin1 has joined #gnucash
17:11:27 <Simon> but not entirely consistent because in one place it's comparing what are two different strings but not using the string cache
17:11:46 *** kcin has quit IRC
17:13:31 *** kcin1 has quit IRC
17:18:40 *** bertbob has quit IRC
17:19:09 *** Bambuzel has joined #gnucash
17:19:09 *** ChanServ sets mode: +v Bambuzel
17:21:05 *** Bambuzel has quit IRC
17:23:23 *** User has quit IRC
17:23:55 <warlord> some "strings" are constants.
17:24:06 <warlord> so comparing pointers works.
17:26:40 <Simon> https://github.com/nomis/gnucash/commit/e3d23984d05b1a4ca4192f52dbde2e8a52411fd0#diff-580d5313211e09b617cdb45cdbaa45b0c8a6a331ff8d822f0dfa216eaf8d771bL862 is making a copy
17:27:19 <Simon> I'm getting 49 calls to xaccFreeAccountChildren(), the first one for "" and the rest are guids...
17:28:25 <Simon> but for some reason it's not calling xaccFreeOneChildAccount() for anything
17:31:37 <Simon> gnc_collection_set_template_root is destroying the accounts but somehow nothing else is
17:47:21 <Simon> it's very strange because the splits are definitely being freed
17:59:34 <Simon> xaccAccountDestroy() for the root account is failing immediately in xaccAccountCommitEdit() because qof_commit_edit() fails
18:03:52 <Simon> the editlevel is 2, which is then changed to 1 and returns false
18:08:26 <Simon> if I force the edit level to become 0 it then frees all the account strings and I'm left with "Account", "Price", "Template Root" and several guids
18:09:03 <Simon> I'm running "gnucash-cli $filename --namespace BLAH -Q get"
18:09:35 <Simon> at the point where qof_book_destroy() happens, the editlevel prevents it destroying the accounts
18:10:39 <Simon> which presumably means something is incorrectly still editing?
18:13:09 *** David has quit IRC
18:13:28 *** David has joined #gnucash
18:22:17 <Simon> qof_instance_dispose() is returning too early, which is why "Account" and "Price" are still there
18:23:11 <Simon> https://github.com/Gnucash/gnucash/blob/maint/libgnucash/engine/qofinstance.cpp#L322-L323
18:24:27 <Simon> at least that's what I'm assuming...
18:25:27 <Simon> if I move the CACHE_REMOVE up then I no longer have "Price" in the cache on exit
18:28:25 <Simon> collection can be set to NULL by qof_collection_remove_entity()
19:50:40 *** Aussie_matt has joined #gnucash
20:27:38 *** bertbob has joined #gnucash
20:27:39 *** ChanServ sets mode: +v bertbob
20:52:59 *** AstronautSurfer has joined #gnucash
20:52:59 *** ChanServ sets mode: +v AstronautSurfer
21:35:27 *** jervin has quit IRC
21:37:57 *** David has quit IRC
21:38:15 *** David has joined #gnucash
21:39:02 *** Jeff72 has joined #gnucash
21:46:18 *** AstronautSurfer has quit IRC
22:13:10 *** jervin has joined #gnucash
23:55:27 *** jervin has joined #gnucash