LEDGER -*- mode: org; fill-column: 78 -*-
- State “DONE” [2008-07-17 Thu 18:14]
This has been fixed, and represents a very major set of fixes to date handling in general. Thanks to Nathan for hitting the nail on the head. - State “TODO” [2008-04-05 Sat 18:57]
Nathan Jones <[email protected]> writes: > The patch fixes a command that I have aliased to show my last two months > of posts: `ledger -d ‘d>=[last month]’ reg checking` > > The problem is that the ‘last month’ would get parsed as 1970/1/1, so it > would show every xact.
- State “DONE” [2008-07-19 Sat 16:52]
When I specify `–sort -d`, I get:
~/src/ledger $ ledger -b 2008/07 –sort -d reg cash While computing value expression: -date ^^^^^ Error: Cannot negate a date/time- State “DONE” [2008-07-17 Thu 17:38]
- State “DONE” [2008-07-17 Thu 17:39]
- State “DONE” [2008-07-17 Thu 17:38]
- State “TODO” [2008-04-06 Sun 10:23]
Martin Blais <[email protected]> writes: > I think that the bug is related to the missing currency after the @ > sign.
2007/12/31 * Start of year / Opening balances. Assets:Investments:HSBC-Broker 100 IVV Assets:Investments:HSBC-Broker -15360.60 USD ; cost basis of older purchase Equity:Opening-Balances
2008/01/03 * Dividends received for IVV holding. Assets:Investments:HSBC-Broker 79.79 USD Income:Interest:Dividends
2008/02/04 * Sell 100 IVV - on 2008/01/30 Assets:Investments:HSBC-Broker -100 IVV @ 136.2901 Assets:Investments:HSBC-Broker -13629.01 USD Expenses:Financial:Commissions 24.99 USD Expenses:Financial:Fees 0.15 USD Expenses:Financial:Fees 2.00 USD
banane:~/__accounting/…/rbcinv/invest$ ledger -f /tmp/b -V register hsbc:broker Segmentation fault (core dumped) banane:~/__accounting/…/rbcinv/invest$- State “DONE” [2008-07-17 Thu 17:38]
- State “DONE” [2008-07-17 Thu 06:20]
Patch checked in. Thanks, Nathan! - State “TODO” [2008-04-06 Sun 21:59]
Nathan Jones <[email protected]> writes: > The attached patch plus the one in #38 should fix this.
The release (2.6.0.90) doesn’t seem to properly parse dates. The svn version (rev. 1048) works fine for full dates (yyyy/mm/dd) with the -b -e params but nothing else works. For example in the following only the last one works:
ledger -f my.ledger -b mar -e apr print ledger -f my.ledger -b 03/01 -e -04/01 apr print ledger -f my.ledger -b 03/01 -e 04/01 print ledger -f my.ledger -b 08/03/01 -e 08/04/01 print ledger -f my.ledger -b 2008/03/01 -e 2008/04/01 printThe -p param doesn’t seem to work at all.- State “DONE” [2008-07-17 Thu 22:01]
- State “TODO” [2008-05-03 Sat 22:27]
This is being a real problem for drewr, arete and pll! This one gets fixed for 2.6.1.
2007/11/11 Safeway
Expenses:Groceries
- State “DONE” [2008-07-17 Thu 19:08]
- State “TODO” [2008-08-18 Mon 02:15]
Simon Michael <[email protected]> writes: > And if ends with a “i” record, ledger gives a bus error. This is on > leopard.
Ledger 2.5 shows posts in my timelog file, but 2.6.1-pre shows none. There is no parse error.
- State “DONE” [2008-07-17 Thu 06:22]
-e has been reverted back to its old behavior, to avoid confusing people.
Right now (as of today) -e was made exclusive, but this isn’t right; I need another option for exclusivity.
- State “DONE” [2008-07-17 Thu 18:31]
It sounds like I’m not stripping the \r from the \r\n sequence, and thus it’s interpreting the \r as part of the file name. I’ll add this to the buglist for 3.0.
- State “DONE” [2008-04-05 Sat 18:56]
The first patch fixes parsing account names when a single space follows. This might close ticket #3. - State “TODO” [2008-04-05 Sat 18:55]
The following patch, submitted by Nathan Jones, proposes to fix this problem. - State “TODO” [2007-09-22 Sat 04:26]
Simon, have you tried this with 2.6.1-svn? I believe this is something I fixed.
Unlike 2.5, 2.6 considers an account name followed by whitespace to be different from one without (when no amount is specified).
- State “DONE” [2008-04-04 Fri 14:34]
There was a problem with the -e date parsing. I now interpret “-e june” to mean that you want the report to end AT June, rather than IN June.
2008/03/31 Office Travel:Work 16 miles Wear & Tear:Car
2008/04/01 Office Travel:Work 16 miles Wear & Tear:Car
2008/04/02 Office Travel:Work 16 miles Wear & Tear:Car
2008/04/03 Office Travel:Work 16 miles Wear & Tear:Car
2008/04/04 Office Travel:Work 16 miles Wear & Tear:Car
$ ledger -f /tmp/mileage.ledger -b 2008-03-31 reg travel 2008/03/31 Office Travel:Work 16.7 miles 16.7 miles 2008/04/01 Office Travel:Work 16.7 miles 33.4 miles 2008/04/02 Office Travel:Work 16.7 miles 50.1 miles 2008/04/03 Office Travel:Work 16.7 miles 66.8 miles 2008/04/04 Office Travel:Work 16.7 miles 83.5 miles $ ledger -f /tmp/mileage.ledger -b 2008-03-31 -e 2008-04-05 reg travel $Shouldn’t that last command give me the same output as the former?- State “DONE” [2008-07-17 Thu 17:44]
The command is:
ledger -s bal –sort O weddingThis is against my own ledger file.- State “DONE” [2008-07-17 Thu 17:50]
- State “DONE” [2008-07-17 Thu 17:49]
- State “DONE” [2008-07-17 Thu 17:45]
- State “DONE” [2008-07-17 Thu 18:08]
2.6b aborts if the last xact is the timelog is an “in” event.
- State “DONE” [2008-09-17 Wed 05:12]
- State “DONE” [2008-07-17 Thu 21:37]
- State “TODO” [2008-04-12 Sat 14:58]
Martin Blais <[email protected]> writes: > Note the typo in the error too: “evalute” -> “evaluate”.
- State “DONE” [2008-07-17 Thu 17:51]
Getting this to work correctly is going to need more work (which has already been logged as another bug).
- State “DONE” [2008-09-17 Wed 05:10]
Fixed, by simply ignoring when something that looks [TEXT] in a xact note fails to parse as a date.
The following data contains a link, not an effective date.
2008/08/11 (08/13/2008) DD/BR #337756 Q35 TONAWANDA, NY Liabilities:Visa -3.63 Assets:Company:AGIL1892 ; PersMealsBreakf- State “DONE” [2008-07-17 Thu 21:41]
I’m only taking the first patch for 2.6. The other two need a bit more polish before I would put them in the standard distro, instead of just posting them to the Wiki or some such.
- State “DONE” [2008-03-17 Mon 16:22]
Clemens writes: > Just for the record, there’s a fix: - State “DONE” [2008-03-14 Fri 21:32]
This is a known bug that was fixed in 2.6. If you need a back-patch for 2.4.1, please let me know.
diff –git a/ledger-2.6.0.90/datetime.h b/ledger-2.6.0.90/datetime.h — a/ledger-2.6.0.90/datetime.h +++ b/ledger-2.6.0.90/datetime.h @@ -96,7 +96,7 @@ class date_t operator bool() const { return when != 0; }
- operator std::time_t() const {
- operator std::time_t() *const* { return when;
} operator std::string() const {
> Let’s you compile and install. We have ledger-2.4 in the ports, but it segfaults on freebsd-8 (the current dev version of the OS). The backtrace is incoherent, because the libs are stripped and we have no symbols. Anyway, a sane person would want a more recent ledger. The tarball exhibits the exact same problem as the one from SVN:’uname -rims’ -> FreeBSD 8.0-CURRENT i386 GENERIC ‘gcc –version’ -> gcc (GCC) 4.2.1 20070719 [FreeBSD]/src/bulk/ledger/trunk 0 $ gmake gmake all-am gmake[1]: Entering directory `/home/src/bulk/ledger/trunk’ usr/local/bin/bash ./libtool –tag=CXX –mode=compile g++ -DHAVE_CONFIG_H -I. -I/l/include -g -O2 -c -o libamounts_la-amount.lo `test -f ‘amount.cc’ || echo ‘.‘`amount.cc g++ -DHAVE_CONFIG_H -I. -I/l/include -g -O2 -c amount.cc -fPIC -DPIC -o .libs/libamounts_la-amount.o In file included from amount.h:13, from amount.cc:1: datetime.h: In function ‘long int operator-(const date_t&, const date_t&)’: datetime.h:141: error: conversion from ‘date_t’ to ‘long int’ is ambiguous datetime.h:99: note: candidates are: date_t::operator time_t() const datetime.h:96: note: date_t::operator bool() const gmake[1]: *** [libamounts_la-amount.lo] Error 1 gmake[1]: Leaving directory `/home/src/bulk/ledger/trunk’ gmake: *** [all] Error 2
I know C and i can do some gdb(1), but i don’t have the C++ knowledge to even fix this one. It looks not all that complicated. Maybe a little patch could help the C++ compiler to figure out the type inference.
I used emacs for quite some time, but got annoyed with its ancient lisp. So using the common lisp version is currently not an option for me, and without emacs one has to type way to much for some little reports. Could you please bring the C++ version into a usable state again? perhaps it’s not that much work?
- State “DONE” [2008-07-17 Thu 20:04]
- State “TODO” [2008-06-16 Mon 16:05]
Luben Manolov <[email protected]> writes: > Import of this GnuCash file causes Segmentation fault
I am trying to import a simple GnuCash file and I am getting “Segmentation fault” error. Please find attached the sample file.
./ledger -f sample.gnucash balance While balancing xact: 2008/06/16 Segmentation fault- State “DONE” [2008-09-17 Wed 05:03]
The cents disappeared because ‘D $1,000.00’ must be specified at the beginning of the file, since you never use dollar figures outside of the pricing.The extra penny crept in because of the way that commodity have “lot” details automatically associated with them. I’ve now reduced this to the price only, since that’s what most people are likely to use, just as this example does.
- State “TODO” [2008-08-01 Fri 13:34]
Levin <[email protected]> writes: > This is the result of ledger in git master branch:
./ledger -f test.ledger -V reg HLIT
2008/06/01 BUY HLIT Assets:HLIT $750
2008/07/02 SELL HLIT Assets:HLIT -15 HLIT @ $50.00 Assets:HLIT 15 HLIT @ $43.875 Assets:HLIT -15 HLIT @ $43.875 Assets
[20:30:53 vinod]:~/data $ ledger -V reg HLIT 2008/06/01 BUY HLIT Assets:HLIT $750.00 $750.00 2008/07/02 SELL HLIT Assets:HLIT $-658.12 $0.01 Assets:HLIT $658.13 $658.14 Assets:HLIT $-658.12 $0.01So, I end up with an extra penny. I think it’s because 658.125 rounds down on one xact and rounds up on the other.- State “DONE” [2008-07-20 Sun 20:32]
I think I’ve isolated a bug with the xact command where I get “Equity” instead of a valid debit account:
$ ledger xact 2008/07/18 “Pei Wei” food 20 checking2008/07/18 Pei Wei Expenses:Food:Out $ 20.00 Assets:Checking
$ ledger xact 2008/07/18 “Foo Bar” food 20 checking
2008/07/18 Foo Bar Expenses:Food $ 20.00 Equity
The first command proves that ledger understands I have an `Assets:Checking` account. That’s because I already have posts for `Pei Wei`.
If I enter a description that doesn’t match a previous xact, it doesn’t match `checking` to `Assets:Checking`.
- State “DONE” [2008-08-26 Tue 10:11]
These are from http://github.com/levindu/ledger
- State “DONE” [2008-07-17 Thu 21:26]
- State “TODO” [2008-03-27 Thu 19:54]
I still have to review the patch and make the changes, before this gets closed. - State “TODO” [2008-03-27 Thu 15:20]
slanack writes: > The proposed Fix works for me. The problem was that split:quantity > received the `xact commodity’ instead of the correct `account > commodity’. There should really be a check if the account commodity has > been defined.
I am using posts between accounts with different base commodities in gnucash. Ledger reports a segfault when reading the gnucash file and using the command `print`.
- State “DONE” [2008-07-17 Thu 21:22]
- State “DONE” [2008-07-17 Thu 20:09]
- State “WONTFIX” [2007-11-09 Fri 23:34]
This expected behavior. If you multiply or divide two commoditized amounts together, the second commodity is dropped in favor of the first. You’ll have to use “30 AAPL * .01”.
Use the following legder data file (sample2.dat)
2004/05/01 * Investment balance Assets:Brokerage 100 / 30 AAPL @ $30.00 Equity:Opening BalancesCreate the bal report:
$ ledger -f sample2.dat bal 3.333333 Assets $-99.99999 Equity3.333333 $-99.99999
Notice that the “AAPL” commodity is gone.
- State “WONTFIX” [2008-07-17 Thu 21:42]
Pricing info is not used for balancing posts. For that, you’d need to use “@ … USD” for the halfg and gouda amounts, so that Ledger could be certain your posts balances to zero. - State “TODO” [2008-04-05 Sat 20:09]
I changed it to this below, and ledger stopped complaining:
2007/03/07 Irena Liabilities:Cash:Irena 7.00 USD Liabilities:Order1:Irena -1 gouda
2007/03/07 Irena Liabilities:Cash:Irena 11.00 USD Liabilities:Order1:Irena -4 halfg
djw@hector:~$ ledger bal2007/03/07 Irena Liabilities:Cash:Irena 18.00 USD Liabilities:Order1:Irena -4 halfg Liabilities:Order1:Irena -1 gouda Error: /home/djw/milk.ledger, line 106: Xact above does not balance; remainder is: 18.00 USD -1 gouda -4 halfg
Here is what is in the prices.db file:C 1.00 USD = $1.21 P 2007/03/04 00:00:00 halfg 2.75 USD P 2007/03/04 00:00:00 gouda 7 USDSo you multiply 4*2.75 and add 7, you get 18. Since the units are USD, what is the beef? Why isn’t ledger seeing 1 gouda and 4 halfg as 18 USD?- State “WONTFIX” [2008-08-15 Fri 04:14]
This feature is not ready for 2.6.1, and is being pushed to 3.0 where this issue has been fixed.
When I run ‘ledger –tail 20 reg assets:cash’ with my current ledger data, the final balance is way, way off. Something is being miscalculated.
- State “WONTFIX” [2008-07-17 Thu 20:44]
This is not an error because:- specifying no amount is the same as specifying an uncommoditized zero.
- the second line will “auto-balance” with the first line.
- the third line simply is a no-op, which I allow for the sake of script writers.
There could be a warning for something like this, but then that’s the danger of using () around an account name: you are explicitly stating you do not wish the xact to be balanced.
- State “TODO” [2008-04-23 Wed 13:35]
Martin Blais <[email protected]> writes: > Well… should “probably” fail. I mean, it does nothing, so it’s > probably an error. I’d make it fail.
Shouldn’t this fail?
2004/03/25 Donations Assets:Checking $100.00 Assets:Savings (Income:Donations)- State “WORKSFORME” [2008-07-17 Thu 20:12]
This has apparently been fixed by the recent date/time bug fixes.
The command is:
ledger -p 2005 -e 2005/08/17 –monthly regThis is against my own ledger file.- State “WORKSFORME” [2008-07-17 Thu 20:11]
This has apparently been fixed by all the other date/time fixes done today.
The command is:
ledger –weekly reg foodThis works fine in 2.5.- State “WORKSFORME” [2008-07-17 Thu 20:14]
This works for me.
- State “WORKSFORME” [2008-07-17 Thu 21:45]
Pricing posts must start with a capital P, not a lowercase p. - State “TODO” [2008-04-05 Sat 20:06]
However, even though I do not receive parse errors any longer, the price-db command does not work the way I expect it to. When I issue a ‘bal’ option, ledger still outputs the values in their commodity rather than the dollar amount, so even though I am not receiving an error, it still does not seem to work for me.
This bug also mentions other issues, which are now contained in another bug. My prices.db file looks like:
p 2007/01/14 02:18:01 WMCVX $5.04 p 2007/01/14 02:18:02 WMICX $6.65Notice there is no carriage return after the second line and that the file begins on line 1.When I run ‘ledger –price-db prices.db bal’ I get the following:
Error: prices.db, line 2: Failed to parse dateP Error: Errors parsing file ‘life/finances/ledger/prices.db’If I have a carriage return on the second line, I get errors for both line 2 and line 3. If i have one xact on a single line, I get an error for line 2.
Any ideas?
Also, I would like to get the prices.db perl script working to automatically grab the values from Fidelity, but I have not been able to do anything beyond installing the appropriate perl modules. If there are any instructions for this usage, I would appreciate it.
- State “WORKSFORME” [2008-08-17 Sun 20:13]
Is not the same as: ledger -M -n
- State “INVALID” [2008-07-13 Sun 22:16]
- State “DUPLICATE” [2008-04-04 Fri 14:35]
This has been fixed, see the comments in #36.
I’m using the latest source from CVS and it appears the `-e` option is broken. For example this works as expected:
% ledger -b 2006/05/01 balBut this does not. No output whatsoever:
% ledger -b 2006/05/01 -e 2006/05/31 balThis also doesn’t work. It just shows `Opening Balances: 0`:
% ledger -p “last month” bal- State “DUPLICATE” [2008-08-16 Sat 03:56]
Duplicated by #43.
The \r\n ending is having only the \n stripped, making the \r appear as part of the filename when doing a !include.
- State “DUPLICATE” [2008-07-13 Sun 22:38]
- State “DUPLICATE” [2008-07-18 Fri 02:12]
2007/03/07 Irena Liabilities:Cash:Irena 18.00 USD Liabilities:Order1:Irena -4 halfg Liabilities:Order1:Irena -1 gouda Error: /home/djw/milk.ledger, line 106: Xact above does not balance; remainder is: 18.00 USD -1 gouda -4 halfg
Here is what is in the prices.db file:C 1.00 USD = $1.21 P 2007/03/04 00:00:00 halfg 2.75 USD P 2007/03/04 00:00:00 gouda 7 USDSo you multiply 4*2.75 and add 7, you get 18. Since the units are USD, what is the beef? Why isn’t ledger seeing 1 gouda and 4 halfg as 18 USD?- State “TESTED” [2009-02-24 Tue 13:08]
- State “DONE” [2008-07-28 Mon 02:05]
This was quite the nasty little bug.
I just installed v2.6.1 and ledger reports errors with some posts that were fine with v2.5:
[21:51:49 vinod]:~/src/ledger $ ledger –version Ledger 2.6.1, the command-line accounting tool[21:51:55 vinod]:~/src/ledger $ ledger bal
While balancing xact:
2007/02/02 RD VMMXX
Assets:Investments:Vanguard:VMMXX 0.350 VMMXX @
- State “DONE” [2008-03-27 Thu 19:42]
Some of the at signs are not properly escaped in the texi documentation. This leads to great confusion when trying to figure out how to use commodity posts.
- State “DONE” [2008-07-16 Wed 03:59]
The gnucash docs talk about there someday being an Emacs mode. There is already one.
- State “DONE” [2008-07-18 Fri 02:28]
I started the groundwork for this, now I just have to add code to insert whitespace if needed to keep each xact valid.
- State “DONE” [2008-07-17 Thu 23:40]
Reconciling is now line-based in 2.6.1, not character based (which has serious issues with UTF-8 at the moment).
- State “DONE” [2008-07-17 Thu 22:09]
This caused me pain after a ledger upgrade. “ledger” should be sufficient if it’s in the path.
- State “DUPLICATE” [2008-07-16 Wed 03:56]
Duplicated by #64.
I’ve tried version 2.5 but have had some problems.
I use Carbon Emacs on Mac OS X to edit my Ledger files. Unfortunately the reconcile functionality doesn’t work any more. Pressing the space bar doesn’t always toggle an xact, sometimes it needs to be pressed twice, sometimes it never goes. Additionally, even if some posts are toggled, nothing is changed in the main file and pressing C-c C-c just re-sets the reconcile window back to it’s original state.
I’ve tried with and without the new ledger-clear-whole-posts variable set.
- State “DONE” [2008-07-17 Thu 20:52]
This is so that it shows what ledger is really thinking.