2023-09-25 GnuCash IRC logs

00:19:51 *** jwhite has quit IRC
00:55:36 *** Luk6655 has joined #gnucash
00:55:36 *** ChanServ sets mode: +v Luk6655
01:30:50 *** gandalf has joined #gnucash
01:34:53 *** gandalf1 has joined #gnucash
01:35:22 *** gandalf has quit IRC
01:35:22 *** gandalf1 is now known as gandalf
01:57:24 *** fell has quit IRC
01:58:43 *** fell has joined #gnucash
01:58:43 *** ChanServ sets mode: +o fell
04:38:09 *** gjanssens has joined #gnucash
04:38:09 *** ChanServ sets mode: +o gjanssens
05:07:41 *** gjanssens has quit IRC
05:19:41 *** FeuerwehrMichael has joined #gnucash
05:19:41 *** ChanServ sets mode: +v FeuerwehrMichael
05:35:29 *** chris has joined #gnucash
05:35:29 *** ChanServ sets mode: +v chris
05:35:29 *** gncbot sets mode: +o chris
05:57:08 *** gandalf1 has joined #gnucash
05:57:35 *** gandalf has quit IRC
05:57:35 *** gandalf1 is now known as gandalf
06:08:27 *** gour has joined #gnucash
06:08:27 *** ChanServ sets mode: +v gour
06:17:29 *** chris has quit IRC
06:53:49 *** FeuerwehrMichael has quit IRC
07:21:20 *** chris has joined #gnucash
07:21:20 *** ChanServ sets mode: +v chris
07:21:21 *** gncbot sets mode: +o chris
07:28:14 *** now_ts has joined #gnucash
07:28:14 *** ChanServ sets mode: +v now_ts
07:29:32 <now_ts> hi there :wave:
07:31:18 *** raghavgururajan has quit IRC
07:31:18 *** milesrout has quit IRC
07:31:23 *** milesrout has joined #gnucash
07:31:24 *** ChanServ sets mode: +v milesrout
07:31:24 *** raghavgururajan has joined #gnucash
07:31:24 *** ChanServ sets mode: +v raghavgururajan
07:38:41 *** chris has quit IRC
08:19:25 *** Aussie_matt has joined #gnucash
08:43:28 *** jwhite has joined #gnucash
08:43:28 *** ChanServ sets mode: +v jwhite
09:50:03 *** Aussie_matt has quit IRC
10:17:02 *** chris has joined #gnucash
10:17:03 *** ChanServ sets mode: +v chris
10:17:03 *** gncbot sets mode: +o chris
10:35:33 <Luk6655> Does anyone have any example how to search for lets say all invoices posted this month using the python bindings? The query interface is very counterintuitive to me.
10:40:45 <chris> warlord is the better guy for qofquery
10:40:56 <chris> i know only how to search transactional data
10:41:17 <chris> from which you can search transaction->invoice
10:41:32 <warlord> No clue about the python api. never used it.
10:41:34 *** gour has quit IRC
10:42:22 <chris> i'm referring using QofQuery to return invoices
10:42:42 <warlord> Luk6655, the query code is just a bunch of "AND" and "OR" query terms to build any kind of query you want, based on the available queriable fields.
10:42:45 <Luk6655> I've found how to search all the invoices by looking for INVOICE_TYPE (from an example), but I have no idea how to use that qof_query_add_term function to search for a given month
10:42:55 <warlord> chris, there is no difference.
10:43:00 <Luk6655> C answers will help too
10:43:07 <Luk6655> as they apply to python too
10:43:43 <Luk6655> for example, one of my questions is what is the param_list in this example:
10:43:44 <Luk6655> * For example:
10:43:44 <Luk6655> *
10:43:44 <Luk6655> * acct_name_pred_data = make_string_pred_data(QOF_STRING_MATCH_CASEINSENSITIVE,
10:43:44 <Luk6655> * account_name);
10:43:44 <Luk6655> * param_list = make_list (SPLIT_ACCOUNT, ACCOUNT_NAME, NULL);
10:43:46 <Luk6655> * qof_query_add_term (query, param_list, QOF_COMPARE_EQUAL,
10:43:50 <Luk6655> * acct_name_pred_data, QOF_QUERY_AND);
10:43:53 <warlord> You would need to add a term like post_date >= august 1 2023 and post_date <= august 31 2023
10:44:21 <warlord> Do you understand SQL queries?
10:44:25 <Luk6655> I get the concept, I still have to figure out how to apply it
10:44:30 <Luk6655> yes, I do
10:45:00 <Luk6655> so are these the parameters we're comparing agains?
10:45:05 <warlord> well, this is exactly like that, except each query predicate is type-specific
10:45:40 <warlord> Yes. so you would want to make a date predicate and add a query term against the post-date
10:46:06 <warlord> Keeping in mind the AND and OR -- so you need to build up the full query programatically
10:46:26 <Luk6655> ok, how about the acct_name_pred_data in the example, there is no such (or similar) functions as make_string_pred_data
10:47:30 <Luk6655> so I'm not sure how to prepare my date to put it in there
10:48:37 <Luk6655> although I might be able to figue it out as I found some C examples of searching for date ranges, we'll see
10:50:34 <Luk6655> It would be nice to have at least one example in python of the add_term
10:50:57 <warlord> There are date predicates
10:51:29 *** gandalf1 has joined #gnucash
10:51:37 <Luk6655> I found this bit: param = g_slist_prepend (NULL, TRANS_DATE_POSTED);
10:51:37 <Luk6655> pred = qof_query_date_predicate (QOF_COMPARE_LTE, QOF_DATE_MATCH_NORMAL, close_date);
10:51:37 <Luk6655> qof_query_add_term (q, param, pred, QOF_QUERY_FIRST_TERM);
10:51:53 <Luk6655> and I wonder what would be python's equivalent of g_slist_prepend ?
10:52:10 <Luk6655> or can it be just a normal list?
10:52:26 <Luk6655> (array)
10:52:46 *** gandalf has quit IRC
10:52:46 *** gandalf1 is now known as gandalf
10:56:49 <Luk6655> I imagine in C I'd put in there INVOICE_POSTED (defined in gncInvoice.h)
10:57:42 <warlord> Yes, you need INVOICE_POSTED.
10:58:47 <warlord> g_slist_prepend creates a list in "reverse order", so for arguments (a,b,c) you get a list [ c, b, a ]. IN this case we want a null-terminated list (so we know when we've hit the end)
11:05:35 <Luk6655> it seems in python gnucash.INVOICE_IS_PAID for example is just a string, so even though INVOICE_POSTED is not defined in python one can just use the string defined in gncinvoice.h
11:08:54 <warlord> It's been 20 years since I really worked in that section of code... So yeah, it's certainly possible that we used strings for the parameter names.
11:50:13 *** gour has joined #gnucash
11:50:13 *** ChanServ sets mode: +v gour
12:11:01 *** gour has quit IRC
12:30:00 *** palerider has joined #gnucash
12:30:14 *** palerider has left #gnucash
13:49:48 *** now_ts has quit IRC
15:19:16 *** Luk6655 has quit IRC
15:30:55 *** now_ts has joined #gnucash
16:16:51 *** jervin has quit IRC
16:22:36 *** gandalf has quit IRC
16:28:40 *** FeuerwehrMichael has joined #gnucash
16:28:40 *** ChanServ sets mode: +v FeuerwehrMichael
16:30:28 *** FeuerwehrMichael has quit IRC
17:20:37 *** now_ts has quit IRC
20:00:02 *** raghukamath has quit IRC
20:05:27 *** raghukamath has joined #gnucash
20:05:28 *** ChanServ sets mode: +v raghukamath
22:12:21 *** snoapest has joined #gnucash
22:12:21 *** ChanServ sets mode: +v snoapest
22:12:37 <snoapest> snoapest raghukamath chris jwhite raghavgururajan milesrout fell bertbob miklcct warlord juliademille CDB-Man chf puck ns12 raeburn phebus starman Unhammer AdrienM csims Simon zoid aj jralls ElonSatoshi[m] reactormonk[m] JokerGermany shukonmatrix[m] sunyibo[m] chrislck[m] Kevin[m]1 Felix[m] antonlada[m] peter-butler[m] Trygve[m] technicus[m] luwum[m] PeterScholtens[m] Julianold[m]
22:12:43 *** snoapest has left #gnucash
22:15:22 *** ciasp has joined #gnucash
22:16:17 *** ciasp is now known as gouzb
22:17:47 *** gouzb has quit IRC
22:22:06 *** jralls has quit IRC
22:23:23 *** jralls has joined #gnucash
22:23:23 *** ChanServ sets mode: +o jralls
22:53:36 *** cproo12 has joined #gnucash
22:53:36 *** ChanServ sets mode: +v cproo12
22:57:31 *** cproo12 has quit IRC
23:05:51 *** fell sets mode: +b snoapest!*@*
23:40:11 <fell> Funny, If i select Chinese Guide in docs.phtml eveithing els gets displayed in zh, too.
23:46:07 *** jwhite has quit IRC