2009-07-09 GnuCash IRC logs

00:23:09 <jsled> rockfx02: please don't meta-ask; just ask!
00:25:20 <rockfx02> i'm not usually on for that long :P
00:25:44 <jsled> even more reason to reduce the turn-around time for anyone who can possibly answer.
00:26:18 <rockfx02> anyhow, I have a function (almost) working for a new "rbaln" cell type which calculates the register balance at a particular split at runtime
00:27:27 <rockfx02> basically I run through the existing rows in the register "while (virt_loc_temp.vcell_loc.virt_row > 0)"
00:27:34 <rockfx02> get the split for the row
00:27:54 <rockfx02> add it to a balance variable
00:28:02 <rockfx02> but then it gets tricky
00:28:25 <rockfx02> of course there is the issue that I have to make sure the split I'm adding from is actually from the subaccounts
00:28:47 <rockfx02> but also I have to look at the transaction the split belongs to and get other splits from that transaction that exist in the subaccounts
00:29:55 <rockfx02> the reason for this is that I found that if I just go through the virtual rows, I don't actually get all of the splits being displayed - i just get one split per transaction (and it seems to pick an arbitrary split from that transaction to add to the balance if it is a multiple split transaction)
00:31:16 <rockfx02> (maybe there is something else to the VirtualLocation var that I could use to do this more efficiently?)
00:31:55 <rockfx02> so I try to run through the split list, which seems to work ok...
00:31:57 <rockfx02> for (node = xaccTransGetSplitList (trans); node; node = node->next) {
00:31:58 <rockfx02> Split *secondary = node->data;
00:31:58 <rockfx02> if (xaccSplitGetAccount (secondary) == gnc_split_register_get_default_account(reg)) {
00:31:58 <rockfx02> balance = gnc_numeric_add(balance, xaccSplitGetValue(secondary),
00:31:58 <rockfx02> GNC_DENOM_AUTO, GNC_HOW_DENOM_LCD);
00:31:58 <rockfx02> }
00:33:01 <rockfx02> well, unless that's the version I compiled that gives a seg fault... lemme check :-!
00:34:01 <rockfx02> obviously the if() to verify the account of the secondary (transaction) split doesn't check for all the subaccounts, but I'll get to that
00:41:10 <rockfx02> ok, so that doesn't give a seg fault, BUT well, it doesn't work right. I could go into the details but it will be difficult on here
00:41:52 <rockfx02> basically I need an easy way to get the split list from the transaction I'm currently processing, then get the value from each split in that transaction.
00:42:06 <rockfx02> it seems like I'm most of the way there, but not completely.
00:43:18 <rockfx02> It seems like the line "Split *secondary = node->data;" doesn't actually populate the secondary variable with the next split in the transaction
00:44:11 <rockfx02> because when the balance is totaled, the first split in the transaction is multiplied by the number of splits in the transaction + 1 (for the split that represents the transaction itself?)
00:44:43 <jsled> there is no split for the transaction.
00:45:01 <jsled> a Transaction is simply a list of Split-s
00:45:09 <jsled> Only the Splits have numeric data.
00:45:13 <jsled> (and accounts)
00:45:39 <jsled> All Transactions are "multiple split" transactions
00:45:48 <rockfx02> hrm maybe the code I copied wasn't intended to be used this way.... :)
00:45:51 <jsled> That is, all Transactions have at least 2 splits.
00:45:54 <rockfx02> right of course
00:46:44 <rockfx02> but when I run through the split list, I end up with the value of the first split in the transaction being adding x number of times where x=(TransactionSplitCount)+1
00:47:05 <rockfx02> either way, it's not actually getting the numerical data from the other splits in the transaction so thats another problem
00:47:38 <rockfx02> so if I get this Split-s list, how do I actually get the split data?
00:47:55 <rockfx02> since "secondary = node->data" obviously doesn't work
00:50:19 <jsled> it totally should work.
00:50:52 <rockfx02> then i must be doing something wrong
00:50:55 <jsled> xaccTransGetSplitList returns a SplitList*, which is typedef'ed as a GList*, presumably of Split*'s.
00:51:27 <rockfx02> right that's what I thought, it just doesn't seem to be working how I was expecting (sigh)
00:51:44 <rockfx02> then again, this is my first dabble in C so I'd say I'm doing pretty well so far, I've almost got it working!
00:51:52 <jsled> :)
00:52:30 <rockfx02> ok so if node->data should work
00:52:49 <rockfx02> then why do I get the same value added three times
00:53:28 <rockfx02> wait actually
00:53:39 <rockfx02> let me check something
00:55:46 <rockfx02> ok yeah it's always +1
00:56:00 <rockfx02> i thought i was seeing a different behavior when there was more than 2 splits but i'm not
00:57:16 <rockfx02> also, if node->data should work, and assuming the way my for loop is constructed is correct, why does it add the same value three times rather than getting the values from the other splits in the transaction?
00:59:00 <rockfx02> btw to do the balance i'm using: "balance = gnc_numeric_add(balance, xaccSplitGetValue(secondary), GNC_DENOM_AUTO, GNC_HOW_DENOM_LCD);"
00:59:42 <rockfx02> ok so here is the even more odd thing
01:01:08 <rockfx02> if I then get rid of the if() that checks if the secondary split account == the register default account, then the balances all 0 out (which is expected because it would add both sides of the split, cancelling each other out)
01:05:44 <jsled> rockfx02: can you pastebin a bit more around the loop you posted eariler?
01:06:00 <jsled> like, the initialization of 'balance' and such?
01:11:06 <rockfx02> http://pastebin.com/m1c776a0e
01:11:36 <rockfx02> there's some extra stuff in there commented out that i've also tried to no avail
01:11:57 <rockfx02> (well, just a couple things - most of it i've ripped out that definitely doesnt work)
01:12:28 <rockfx02> it may not be pretty/efficient right now but I will have to clean it up later
01:14:59 <rockfx02> i've also tried it completely without the TransGetSplitList for() loop and simply adding up the balance of the splits from the register (the top while() loop), but that only adds the value of one split per transaction.
01:15:24 <jsled> in what register view mode?
01:15:39 <rockfx02> Open Subaccounts
01:15:59 <rockfx02> I had to add the RBALN cell type and some other minor stuff
01:16:01 <jsled> Er... Basic Ledger, Auto-Split Journal or Transaction Journal?
01:16:03 <rockfx02> to get it to display
01:17:06 <rockfx02> Transaction Journal
01:17:39 <jsled> huh. there goes my shitty theory.
01:17:40 <rockfx02> it looks like it forces that view mode because I can't select a different mode with the Subaccounts+ register open
01:17:59 <jsled> anyways, time for bed here. g'night, and g'luck.
01:18:08 <rockfx02> hehe thanks
01:18:34 <rockfx02> I think I will have to leave this one for tomorrow. Maybe I'll make a post on the mailing list when I have time
01:31:21 *** MechtiIde has quit IRC
02:01:06 *** nimrod has joined #gnucash
02:01:14 *** nimrod has left #gnucash
02:20:02 *** donfede has joined #gnucash
02:45:03 *** rockfx02 has left #gnucash
02:46:26 *** k-man has left #gnucash
03:04:44 *** bentob0x has joined #gnucash
03:05:04 *** MechtiIde has joined #gnucash
03:35:14 *** puck has quit IRC
03:45:02 *** puck has joined #gnucash
04:31:20 *** ErKa has joined #gnucash
05:15:53 *** RobotCow has joined #gnucash
06:11:00 *** bentob0x has quit IRC
06:52:21 *** rockfx02 has joined #gnucash
07:09:47 <rockfx02> man this is annoying... why is it that "virt_loc_temp.vcell_loc.virt_row--;" works fine at the end of a while() loop to decrement the virtual row, while if I try to decrement it's value by an integer variable, or by running through a for() loop with a count, or any number of methods, gnucash hangs
07:09:50 <rockfx02> (arg)
07:10:53 <rockfx02> So if I do the above, everything seems to work fine, except that I need to decrement virt_loc_temp.vcell_loc.virt_row by more than one each pass
07:11:37 <rockfx02> if I do "virt_loc_temp.vcell_loc.virt_row-=i;" gnucash hangs
07:11:54 <rockfx02> (when trying to calculate the rbaln total)
07:12:29 <rockfx02> if I try to use a for loop, "for (i; i > 0; i--) virt_loc_temp.vcell_loc.virt_row--;" it hangs
07:14:29 <rockfx02> btw, i is an int that contains a count from an earlier for() loop of the number of splits in a transaction
07:15:09 *** skyfaller has quit IRC
07:17:48 <rockfx02> wtf now it's working...
07:18:36 <rockfx02> i should not be writing code at 6 in the morning, it is not pretty!
07:25:04 *** bentob0x has joined #gnucash
07:30:18 *** rockfx02 has left #gnucash
07:34:03 *** kfo_ has joined #gnucash
07:42:23 *** kfo has quit IRC
08:07:25 *** Jimraehl has left #gnucash
08:17:35 *** JimRaehl2 has joined #gnucash
08:21:26 *** JimRaehl2 has left #gnucash
08:21:39 *** JimRaehl2 has joined #gnucash
08:29:51 *** mech has joined #gnucash
08:29:52 <mech> # Appears as MIKE
08:30:03 <mech> hi!
08:30:55 <mech> hihihihihi
08:30:57 *** mech has left #gnucash
09:05:09 *** nimrod has joined #gnucash
09:06:22 *** nimrod has left #gnucash
09:25:01 *** ErKa has quit IRC
09:27:08 *** MechtiIde has quit IRC
09:30:59 <JimRaehl2> My fix for bug 587853 "Gnucash 2.3.1 transaction log open fails" is working nicely. The fix was in src/engine/gnc-filepath-utils.c, routine xaccResolveFilePath. The routine inputs a filename of the form xml://path/filename or file://path/filename. I added a check for the extra two // characters in those code fragments, and delete two more byes if the // is found. Now, XML transaction log files are generated again, as in version 2.2.9. In
09:31:00 <JimRaehl2> addition, opening XML data files doesn't fail with an error message.
09:32:45 <JimRaehl2> I sent Phil an Email with the explanation and a code fragment to illustrate the fix. I was going to send the same to gnucash-devel at gnucash.org, but it looks like my Email's are being spam-filtered.
09:57:59 *** warlord-afk is now known as warlord
09:58:30 <warlord> JimRaehl2: how are they being spam filtered? Are you getting a bounce back? What's the bounce say? Also, could you just attach the fix to that bug?
10:19:46 <jsled> JimRaehl2: I just moderated the message through.
10:20:02 <jsled> The one to gnucash-devel; and rejected the copy to gnucash-user.
10:21:01 <jsled> JimRaehl2: They were only in the moderation queue since last night, and I just deal with moderation requests today, as I had an oil change and was just talking to my neighbor. You should have gotten a "your message is awaiting moderation" message … no?
10:22:27 *** nomeata has joined #gnucash
10:22:59 *** ErKa has joined #gnucash
10:54:37 *** MechtiIde has joined #gnucash
11:01:22 *** RobotCow has quit IRC
11:02:20 *** wzk has joined #gnucash
11:15:18 *** wzk has quit IRC
11:46:43 *** nomeata has quit IRC
12:03:28 *** MechtiIde has quit IRC
12:08:10 *** Gun_Smoke has joined #gnucash
12:10:00 *** ErKa has quit IRC
12:10:17 <Gun_Smoke> I can't seem to find the documentation on how to add a separate checking account. I need to add a student checking. But I would also like to have all expenses separate as well. And still be able to shuffle funds in between the two. Is that possible?
12:11:46 <Gun_Smoke> ie. separate liabilities, expenses, and income.
12:11:48 <jsled> you can just create another account … but if you want Expenses separate, you might want ot create a different datafile.
12:12:06 <jsled> Yeah, if you want a different set of books, then create a different datafile.
12:12:11 <jsled> Why do you want to do that, though?
12:12:42 <Gun_Smoke> just to keep things separate. I have funds for school from an outside source.
12:13:45 <Gun_Smoke> GI Bill. And I'd like to track that income/expense separate. But wanted to be able to track/transfer between the two.
12:13:49 <Gun_Smoke> bad practice?
12:14:11 <jsled> you should see if you can get what you need via filtering reports.
12:14:42 <warlord> Gun_Smoke: Is there any reason you couldn't use a Cash Flow report to determine how much you paid from your GI Account vs. your Regular Account?
12:14:54 <jsled> Otherwise, it's going to be hard to get a picture of your overall net worth if you're separated between two datafiles.
12:15:31 <Gun_Smoke> I'll look into that.. I've been a very simple user so far.
12:29:57 *** ErKa has joined #gnucash
12:46:18 *** Gun_Smoke has quit IRC
13:10:08 *** MechtiIde has joined #gnucash
13:23:57 *** bentob0x has quit IRC
13:52:55 *** goodger__ has quit IRC
14:06:53 *** XiXaQ has joined #gnucash
14:12:50 *** ErKa has quit IRC
15:00:56 *** XiXaQ has quit IRC
15:06:42 *** sjc has joined #gnucash
16:38:15 *** sjc has quit IRC
16:46:31 *** sjc has joined #gnucash
16:51:14 *** MechtiIde has quit IRC
17:30:43 *** BlueAidan has quit IRC
17:33:10 *** sjc has quit IRC
17:36:25 *** puck has quit IRC
17:40:23 *** BlueAidan has joined #gnucash
17:41:27 *** sjc has joined #gnucash
17:50:01 *** puck has joined #gnucash
18:05:02 *** Gun_Smoke has joined #gnucash
18:06:48 <lenscape> I asked this question a couple of days ago but didn't see an answer:
18:06:51 <lenscape> 2008-06-06 11:00 2008-06-06 11:30 Roy - Kennet Security Consulting at Moat House Hotel 20 Moat House
18:06:51 <lenscape> Hotel
18:06:52 *** lenscape has quit IRC
18:06:59 *** lenscape has joined #gnucash
18:07:24 <lenscape> shit! Sorry
18:07:57 *** lenscape has left #gnucash
18:08:06 *** lenscape has joined #gnucash
18:08:25 <lenscape> Sorry. Serious pasting error
18:08:58 <lenscape> can I export the current ledger view as CSV or some other format that I can load into a spreadsheet?
18:14:45 *** RobotCow has joined #gnucash
18:16:45 <warlord> lenscape: Run an Account Register Report off the ledger view, then export that as HTML, and then load that HTML into your spreadsheet
18:31:18 <lenscape> warlord: Thanks. I'll try that
19:10:02 *** RobotCow has quit IRC
19:14:07 *** jpschewe has joined #gnucash
19:14:27 *** sjc has quit IRC
19:14:36 <jpschewe> Question: Does anyone know if it's possible to save filter settings in gnucash so I see them when I open it again?
19:18:00 <warlord> Unfortunately no.
19:20:36 *** rockfx02 has joined #gnucash
19:21:01 <jpschewe> Any plans to add it?
19:21:38 <jpschewe> It would make the shift for users used to other systems like Microsoft Money much easier.
19:22:24 *** sjc has joined #gnucash
19:24:00 <warlord> When someone dontates the code for it?
19:36:04 *** nomeata has joined #gnucash
19:46:32 <jpschewe> ok, that's fair.
19:51:32 *** goodger has joined #gnucash
19:58:17 <rockfx02> lol
19:58:26 <rockfx02> warlord, i gtg but I got the reg run balance working :)
19:58:58 <warlord> rockfx02: sweet!!
19:59:58 <rockfx02> should i put a patch on the mailing list or on the bug tracker or elsewhere...?
20:01:20 <rockfx02> gotta run
20:14:05 *** jpschewe has quit IRC
20:18:24 <warlord> list or bug tracker.
20:18:27 <warlord> (or both)
20:18:27 *** sjc has quit IRC
20:18:36 <warlord> make sure it's against trunk, not 2.2
20:26:48 *** sjc has joined #gnucash
20:27:51 *** warlord is now known as warlord-afk
20:35:49 *** Schorscherl has joined #gnucash
20:37:21 <Schorscherl> Hello everybody. I have a question regarding the small business features (Process Payment).
20:39:03 <JimRaehl2> I'm back from work. I can attach my fix to bug 587853, BUT I've never built a patch and don't know how. Is there somewhere I can read about that process?
20:40:05 <JimRaehl2> Also, I didn't know the lists were moderated. Now I know.
20:44:59 <jsled> Schorscherl: just go ahead and ask.
20:45:20 <jsled> JimRaehl2: the key thing is a unified-format diff of your changes against the relevant sources.
20:48:41 <Schorscherl> Assume an invoice from vendor. I can set up the bill (edit bill), and also assign and expense account as part of the invoice entries. Then, when processing the bill (Vendor|Process Payment) it is only possible to select the Accounts Payable account as "destination" and e.g. the checking account as "source". After doing that, nothing happened to the expense account, and when editing the bill again the invoice entries will be empty again
20:49:07 <Schorscherl> Thanks, jsled, as you see, took some time to write that... :-)
20:58:06 *** sjc has quit IRC
20:58:16 <Schorscherl> To illustrate may be some numbers. Before Transaction: Checking Account $1000, Accounts Payable $0, Expenses:Bank Service Charge: $0
21:00:37 <Schorscherl> Now assume $200 bill from vendor "bank", which is to be categorized as Expenses:Bank Service Charge. In fact, that one already reduced the Checking Account value in real live.
21:01:56 <Schorscherl> Desired Result: Checking Account: $800, Accounts Payable: $0, Expenses: Bank Service Charge: $200
21:03:15 <Schorscherl> Using the Process Payment mechanism, however, all I can achieve without an additional manual transaction would be: Checking Account: $800, Accounts Payable: -$200, Expenses: Bank Service Charge: $0
21:14:28 *** nomeata has quit IRC
21:38:43 *** RobotCow has joined #gnucash
21:49:20 *** RobotCow has quit IRC
22:03:58 *** JimRaehl2 has left #gnucash
22:04:42 *** Jimraehl has joined #gnucash
22:20:50 *** warlord-afk is now known as warlord
22:20:56 <warlord> Schorscherl: Did you POST the bill?
22:23:51 <warlord> Jimraehl: IMHO the best way is "svn diff"
22:25:40 <Schorscherl> warlord: where is that done?
22:25:56 <warlord> Schorscherl: when you entered the bill... There's a button labeled "POST"
22:26:03 <warlord> You need to post it into the Chart of Accounts.
22:29:18 <Schorscherl> Well, I am just doing that, but it it asks: Do you really want to post the invoice? Target account is Acconts Payable, not the Expenses. Is that correct to proceed like that?
22:30:04 <warlord> Yes, because you chose your expense account in the bill itself on your line items.
22:32:00 <Schorscherl> ok, that was it. Not everything looks reasonable in the three accounts. Thank you very much.
22:32:44 <warlord> :)
22:34:47 <Schorscherl> Good night! Bye!
22:34:54 <Schorscherl> :-)
22:34:57 <warlord> 'night.
22:35:03 *** Schorscherl has left #gnucash
23:13:00 *** warlord is now known as warlord-afk
23:53:32 <rockfx02> just gonna throw this out there for anyone who can answer it. I added the RBALN_CELL to the GENERAL_LEDGER in split-register-layout.c
23:53:33 <rockfx02> "gnc_table_layout_set_cell (layout, curs, RBALN_CELL, 0, 7);"
23:53:51 <rockfx02> under " curs = gnc_table_layout_get_cursor (layout,
23:53:51 <rockfx02> CURSOR_SINGLE_JOURNAL);"
23:54:46 <rockfx02> everything is working properly, except that in the Balance (RBALN) column of the register, on the split rows, it displays a 1 and in the blank transaction it displays a zero.
23:54:51 <rockfx02> it should display nothing
23:55:33 <rockfx02> but it seems to be displaying the return value of the gnc_split_register_get_rbaln_entry() function for the RBALN cell
23:56:26 <rockfx02> because when we hit the blank transaction, we return NULL (and in the blank trans split row it displays 0) and for a regular transaction it displays 1 because we return a value "return xaccPrintAmount (balance, gnc_split_register_print_info (reg));"
23:56:37 <rockfx02> anyone know how to fix it so the split rows don't display anything/
23:56:38 <rockfx02> ?