Recording next year's membership subs paid this year

2023-10-19 Thread Eric

I am doing the accounts for a small club/association. Each year is already a 
separate ledger file.

People often pay next year's membership subscriptions this year, so how should 
I record this in ledger this year (when they paid and we have the money) and 
next year (when it is a current membership)?

Details of who paid and what kind of membership it is should be easily 
reportable for memberships valid in a single year from just that year's file.

Thanks for any suggestions.

Eric


--

--- 
You received this message because you are subscribed to the Google Groups "Ledger" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/a35f87759ddc64169c17809fb0ce72a2%40bruno.


Re: A how to question - -

2023-09-25 Thread Eric S Fraga
On Monday, 25 Sep 2023 at 09:37, o1bigtenor wrote:
> As soon as you even think of calling it 'Income' the tax man wants his hunk.

I have used income:taxable and income:taxfree in the past to
disambiguate.  Tax free income, at least in the UK, does exist in the
form of, for instance, interest from various allowable types of savings
accounts.

-- 
Eric S Fraga via gnus (Emacs 30.0.50 2023-09-14) on Debian 12.1

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/87lecumgie.fsf%40ucl.ac.uk.


Re: A feature idea: An alternative org-mode input format

2023-02-10 Thread Eric S Fraga
On Thursday,  9 Feb 2023 at 11:40, John Wiegley wrote:
> I was thinking of creating a separate tool for translating specially formatted
> Org-mode files into Ledger files. For example, this entry:

Why not just use ob-ledger?  Then your entry would look like

--8<---cut here---start->8---
#+PROPERTY: header-args:ledger :tangle ledgerfile

* Adobe Acrobat Pro
:PROPERTIES:
:ID:   076497DC-45F7-43EC-BFDA-00177EFC3C0D
:CREATED:  [2023-01-25 Wed 21:40]
:END:
#+begin_src ledger
  2023-01-10 Adobe Acrobat Pro
 Expenses:Administrative   $33.59
 Equity:Admin:Somebody
#+end_src
--8<---cut here---end--->8---

The only negative aspect would be having to repeat the description of
the entry.

Tangling would create the ledgerfile which you can then process using
other babel src blocks or directly with ledger on the command line.

-- 
Eric S Fraga via gnus (Emacs 30.0.50 2023-01-06) on Debian 11.5

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/875yc9vm1c.fsf%40ucl.ac.uk.


Re: ledger-accounts-file?

2021-10-28 Thread Eric S Fraga
On Wednesday, 27 Oct 2021 at 14:53, stan laurel wrote:
> I edit to read ~/Accounts.ledger which is where all my accounts are listed 
> and it still comes back 'mismatch'. 

Untested but maybe ledger requires the full path name, i.e. it may not
expand ~?

-- 
Eric S Fraga via Emacs 28.0.60 & org 9.5 on Debian 11.1

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/87mtmt1nza.fsf%40ucl.ac.uk.


Re: Year end date

2021-02-22 Thread Eric S Fraga
On Monday, 22 Feb 2021 at 07:20, o1bigtenor wrote:
> May I suggest that you are making life more difficult for yourself and
> to the OP there is a simple yet, imo anyway, elegant solution.

Thank you.  I do use -b and -e as well.

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4.4 on Debian bullseye/sid

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/87v9akqlcu.fsf%40ucl.ac.uk.


Re: Year end date

2021-02-22 Thread Eric S Fraga
On Monday, 22 Feb 2021 at 00:59, Dan Sladden wrote:
> Is there a way of specifying the date of the financial year end so I can 
> use --yearly (or an appropriate *PERIOD_EXPRESSION)* to show annual data 
> for each year from e.g. 6 April to 5 April?

This would be a nice feature to have!

My solution has been to have a separate ledger file for each tax year
but that means transferring balances at the end of one year to create
the new year's file which sometimes leads to issues should anything need
to be updated in the previous year's records (missing entry, for
instance).

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4.4 on Debian bullseye/sid

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/87lfbgs2lv.fsf%40ucl.ac.uk.


Re: Request for assistance - - - saving files

2020-11-23 Thread Eric S Fraga
On Friday, 20 Nov 2020 at 08:25, o1bigtenor wrote:
> H -- -- interesting that you call a vertical line a curve --
> --yes?

as a mathematician, a vertical line does indeed come under the
designation of curve... ;-)

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4 on Debian bullseye/sid

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/87ft50mde2.fsf%40ucl.ac.uk.


Re: Request for assistance - - - saving files

2020-11-20 Thread Eric S Fraga
On Thursday, 19 Nov 2020 at 12:30, o1bigtenor wrote:
> So - - - I'd bet this procedure in emacs is hard coded - - -yes?

Not quite sure what you mean about hard code.  In Emacs, other than the
very small core of code written in C, the code is written in Lisp and
totally user accessible, meaning that almost all the functionality can
be modified by the user (although needing to know Lisp etc., of
course).  This is actually what makes Emacs incredibly powerful and
adaptable.  But also what, to some (to all?), makes it difficult, having
a very steep learning curve.

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4 on Debian bullseye/sid

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/875z60qgzm.fsf%40ucl.ac.uk.


Re: Request for assistance - - - saving files

2020-11-19 Thread Eric S Fraga
On Thursday, 19 Nov 2020 at 09:49, o1bigtenor wrote:
> The 'TL;DR' brought a smile to my face. 

;-)

> This kind of function just isn't in text editors

Well, this isn't quite true.  Emacs will create backup files when you
edit one and you can ask Emacs to create new backups every time you save
the file.  These backup files will be numbered and you can specify how
many such backups to keep.  But using Emacs may not be what you would
like to do...

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4 on Debian bullseye/sid

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/87eekp1f2h.fsf%40ucl.ac.uk.


Re: Request for assistance - - - saving files

2020-11-19 Thread Eric S Fraga
TL;DR: I use a combination of git (as Boyd has suggested, committing
changes every transaction) and rsync to back up to a different device.

Longer version: there are 2 different issues here:

1. micro-management of information, e.g. changes and reasons for those
   changes
2. keeping back ups in case of hardware/software/user failure (e.g. rm)

Different tools are appropriate for each of these but both of these
issues are important in their own right.

For 1, version (or revision) control systems are ideal.  There are many,
including git, mercurial, subversion, src, rcs, ...  Each of these has
their respective advantages and disadvantages and personal taste often
is the deciding factor.  I use src for single file revision control and
git for projects.  They do not provide more than simple backup but do
provide the ability to roll back changes and an audit trail.

For 2, I would avoid the use of symlinks and instead ensure you have a
proper more general backup procedure.  For instance, I rsync my whole
disc to a different computer in a different site frequently (hourly
often but at least once a day in any case) during the day and I do full
scheduled backups onto detachable drives periodically (weekly or monthly
depending on how I feel).

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.4 on Debian bullseye/sid

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/87blft5y9l.fsf%40ucl.ac.uk.


Re: Need help just getting started

2020-07-18 Thread Eric S Fraga
On Friday, 17 Jul 2020 at 12:37, Oliver Hardy wrote:
> If someone can point me to where in the man pages it describes how to 
> create a journal I would be grateful. Also how does one create accounts, 
> add entries

Just in case, maybe you're missing the very simple point that you create
the files yourself manually.  The program doesn't create files or add
accounts for you.  It takes a ledger file and outputs different
information from it.  This is unlike other accounting software you may
have used in the past.

So crank up your favourite text editor [1] and type in example entries
from the manual.  Then use the ledger command line tool to output
balances, registers, etc.

HTH,
eric

Footnotes:
[1] I use Emacs which has a ledger-mode which makes entry much easier.

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.3.7 on Debian bullseye/sid

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/875zal2iew.fsf%40ucl.ac.uk.


Re: In ledger-mode, how can I color posting account names differently depending on an initial substring?

2020-06-09 Thread Eric S Fraga
On Tuesday,  9 Jun 2020 at 06:24, dersuchmann wrote:
> How can I adjust ledger-mode syntax highlighting such that a posting's 
> account name is colored differently depending on an initial substring? I 
> put all accounts either under "Assets:", "Equity:", "Liabilities:", or 
> "Budgets:" and would love to see each of these four groups being colored 
> differently while I work on the file.

hi-lock-mode will allow you to do this by specifying regular expressions
at the beginning of the file.

-- 
Eric S Fraga via Emacs 28.0.50 & org 9.3.7 on Debian bullseye/sid

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/87h7vkgu6j.fsf%40ucl.ac.uk.


Re: Auto-complete of accounts in emacs ledger-mode

2019-06-13 Thread Eric S Fraga
On Wednesday, 12 Jun 2019 at 21:15, Alexandre Rademaker wrote:
> The auto-complete with tab of accounts stop works on my emacs ! Any idea?

You haven't given any details so it's difficult to diagnose.

First thing: what have you changed in your environment since it last
worked, including any new packages in Emacs?

Secondly, what is they key you use to complete account names actually
bound to in the ledger buffer?  E.g.  if it's the TAB key, type C-h k
TAB to see what Emacs thinks should happen when you hit that key.

-- 
Eric S Fraga via Emacs 27.0.50 & org 9.2.3 on Debian 9.9

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ledger-cli/xuu6ef3xu9u6.fsf%40ucl.ac.uk.
For more options, visit https://groups.google.com/d/optout.


Re: Please, make a new relelase

2018-06-01 Thread Eric Portis
I didn’t — should have searched around a bit more before pressing send. Thanks 
for the pointer!

—eric

> On Jun 1, 2018, at 10:30, jungle Boogie  wrote:
> 
>> On 1 June 2018 at 10:13, Eric Portis  wrote:
>> I’d just like to second this.
>> 
>> I discovered/reproduced/isolated the bug described here:
>> https://github.com/ledger/ledger/issues/532, searched for it in issues,
>> added a +1 there, and today see that it was fixed a year and a half ago (but
>> I'm on the stable version, installed via Homebrew).
> 
> Did you also see this issue?
> https://github.com/ledger/ledger/issues/523
> 
> John references this bug from holding the release back:
> https://github.com/ledger/ledger/issues/546
> 
>> 
>> I’m tempted to install from source?
> 
> It was easy on linux, not so much on openBSD.
> 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to ledger-cli+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Please, make a new relelase

2018-06-01 Thread Eric Portis
I’d just like to second this.

I discovered/reproduced/isolated the bug described 
here: https://github.com/ledger/ledger/issues/532, searched for it in 
issues, added a +1 there, and today see that it was fixed a year and a half 
ago (but I'm on the stable version, installed via Homebrew).

I’m tempted to install from source?

On Wednesday, December 13, 2017 at 4:05:11 AM UTC-8, Vitaly Lipatov wrote:
>
> Please, plan a new release. It is hard to maintain application when it 
> rare released.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Please, make a new relelase

2017-12-13 Thread Eric S Fraga
On Wednesday, 13 Dec 2017 at 15:49, Michael Cooper wrote:
> I would generally agree with the "if it isn't broken, don't fix it" ideal,
> but in Ledger's case, there is almost 2 years and 172 commits worth of
> development, according to Github [0], since the release of 3.1.1. There
> should be at least a plan for when that effort is going to be deemed
> suitable for a new release. Otherwise it goes to waste.

Ah, okay.  Thanks.  I had not been aware of this number of commits since
last release.

-- 
Eric S Fraga via Emacs 27.0.50, org 9.1.4

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Re: Please, make a new relelase

2017-12-13 Thread Eric S Fraga
On Wednesday, 13 Dec 2017 at 04:05, Vitaly Lipatov wrote:
> Please, plan a new release. It is hard to maintain application when it rare 
> released.

Curious: why?  If an application works, why is there a need for a new release?

-- 
Eric S Fraga via Emacs 27.0.50, org 9.1.4

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Re: ledger-mode color customization

2017-05-12 Thread Eric S Fraga
On Thursday, 11 May 2017 at 22:13, James wrote:
> hi,
> I was wondering if it is possible to change the ledger-mode entries
> (at the
> moment its red and blue) on my emacs. 
> And which file would I have to edit to change colors.
> Thanks

The easiest way, in my opinion, is:

1. put cursor on some text whose properties you wish to change.
2. type C-u C-x = which will display the properties of the text
3. find out from properties which face you need to customise
4. type M-x customize-face RET the.face.name.from.above RET
5. change and save changes


-- 
Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D)

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature


Info files in Emacs?

2017-03-24 Thread Eric Abrahamsen
Apologies if this gets asked a lot, but there are fewer facilities for
searching these newsgroups than there used to be...

After a bit of a financial hiatus/period of irresponsibility, I'm
tracking finances for my small company again. I run Arch Linux and
Emacs, and have both the Arch ledger and the Emacs ledger-mode packages
installed. Neither have given me Info manuals, however -- I seem to
remember getting both by default. I see the ledger-mode repo has a
doc/ledger-mode.texi file -- couldn't that be built for the Melpa
package? And, ideally, the ledger/doc/ledger3.texi file for the Arch
package?

What would have to be done to get those Info files available?

Thanks!
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: new docs site, anyone ?

2016-02-13 Thread Eric
On Fri, 12 Feb 2016 23:21:56 -0500, Martin Blais <bl...@furius.ca> wrote:
8>< 

> In the meantime you have a inexistant hypothetical "libre" wiki server
> which once you get consensus over who will take care of it will require
> ongoing maintenance by someone who will stop paying attention at some
> point and then it will rot out of date within three months. I've been
> there before, maintained a few of those myself.

Somebody sets it up, and gets a couple of other community members with
suitable skills to help keep an eye on it, including full admin on
whatever is running it. They're not all going to go away at once, and
when one does they get replaced. You might shift hosts from time to time,
but never domains. A wiki is self-maintaining, or, rather, community
maintained. There will sometimes be arguments about how content should
be presented or organised, but this gets settled. By way of example,
wiki.tcl.tk (running since 1999) is like this!

> In the meantime I have an real, live ongoing conversation with my
> users in the documents which are constantly lighting up with feedback,
> buttressed by 100's of world-class engineers on their own cloud. For free.

And do you have a local download of the content, including all the
feedback, and is it up to date? No-one expects Google to go away, and I
won't get into the "evil" argument, but they do change, drop, and replace
their services and terms and conditions from time to time. What happens
when it ceases to be suitable? Even if someone has complete content,
conversion to somewhere else may well be a lot more work than "a few
hours with emacs".

Eric
-- 
ms fnd in a lbry

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: support negative arguments in xact?

2015-03-22 Thread Eric Abrahamsen
John Buxton lquer...@gmail.com writes:

 Try:

 ledger xact -- restaurant 24 credit -14 cash -10

 The '--' stops option processing.

That works great -- thanks very much for the tip!

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


support negative arguments in xact?

2015-01-27 Thread Eric Abrahamsen
Is there any way that negative values could be supported in ledger xact.
I've got a few fairly complicated recurring postings where I need to
specify one of the lines as a negative value, and no variety of quoting
approaches has allowed me to specify, for example:

ledger xact restaurant 24 credit -14 cash -10

Thanks!
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Balance assertions with lot prices?

2015-01-12 Thread Eric Weigle
Mostly paranoia. Since switching from gnucash to ledger I've messed things
up majorly a couple times with overzealous search and replace cleanup and
want to avoid that as much as possible.

My main use case is that I get a stock statement and want to do an account
reconciliation at the lot level. Adding some asserts as a marker for next
time would be nice in case I screw something up in the interim.

On Sat, Jan 10, 2015 at 10:48 AM, Martin Blais bl...@furius.ca wrote:

 I've thought about this before: Beancount only offers checks in units, not
 individual lots, neither in total cost basis for those units. This is not
 an unreasonable feature to consider however, but I haven't found it to be
 necessary yet.

 Are you just being particularly sensitive to making assertions, or do you
 have a specific use case in mind?




 On Sat, Jan 10, 2015 at 11:20 AM, Eric Weigle eric.wei...@gmail.com
 wrote:

 Related to the earlier question about currencies/commodities, I can't
 seem to find a way to say something like this:

 2015/01/01 Stock balance forward
 Assets:Stock0 = 5 AAPL {$100}
 Assets:Stock0 = 10 AAPL {$200}

 Is this possible?

 --

 ---
 You received this message because you are subscribed to the Google Groups
 Ledger group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to ledger-cli+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


  --

 ---
 You received this message because you are subscribed to the Google Groups
 Ledger group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to ledger-cli+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Balance assertions with lot prices?

2015-01-10 Thread Eric Weigle
Related to the earlier question about currencies/commodities, I can't seem
to find a way to say something like this:

2015/01/01 Stock balance forward
Assets:Stock0 = 5 AAPL {$100}
Assets:Stock0 = 10 AAPL {$200}

Is this possible?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Further Ledger Development

2015-01-06 Thread Eric Abrahamsen
Alexis surryh...@gmail.com writes:

 Hello everyone,
 lately I have been providing some patches to Ledger and John was
 kind enough to help out with valuable feedback, insightful conversations,
 and allow me access to the official Ledger repository.  Thanks John!

 I am committed to do what I can to move Ledger forward, my main focus
 is getting rid of the segmentation faults, adding more tests, improving
 the documentation by covering all available options, and expanding the
 Python module.

Not very sexy but... more docs! More reporting syntax examples, and
real-world scenarios. The docs are a little bit wrong in a few places,
but mostly they just need more examples. Larger tutorials (keeping track
of stock, working in multiple currencies, etc) would be great, as many
of the questions on this list are about that stuff.

And thanks for working on it! Coincidentally, my ledger-git Arch package
is updating as I type this...

Eric

 John and I have been talking about various aspects and which need
 more work and I am currently planning what issues should be addressed
 for the next release (3.1.1).
 I am uncertain who has a say (apart from John ;) in deciding what bugs
 should be fixed and which features implemented, so make yourself
 heard and let's talk about important issues to plan a roadmap.

 John and I agreed to keep all P1 bugs (8 in total) and moved all P2 bugs
 to P3, so I can move bugs I feel should be addressed for Ledger 3.1.1
 back to P2 and start working on it.
 Since I'm not yet too familiar with all aspects of Ledger I will
 also address minor bugs that I think will help me in digging deeper
 into Ledger's code.

 I found 23 segmentation fault related bugs in Bugzilla and I would like
 to set their Status to UNCONFIRMED, then go through them one by one
 and schedule the ones that can be reproduced with a master build for
 3.1.1 and set their Status to CONFIRMED.

 John and I agreed to follow the git-flowน model for development, which
 means the master branch will only see updates when a new version is
 released as of now and development will happen on the next branch, so
 please make pull request against next from now on.

 You're more than welcome to help out if you can by contributing patches,
 going through Bugzilla verifying that bugs are still reproducible,
 sharing your knowledge so you or someone else can document it, add
 tests, tell your story with Ledger, share ideas or cool things you've
 done with Ledger, the community and Ledger will benefit from you contribution.

 It would be great if we can coordinate our work to gain the most from
 our joint effort and I invite you to talk to me; I'm afh in #ledger.


 Thanks,
 Alexis


 น http://nvie.com/posts/a-successful-git-branching-model/
   https://github.com/nvie/gitflow

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Modelling stock options in ledger

2014-12-25 Thread Eric Weigle
Hi Martin-

Thanks for the response- I tried that and it mostly works.

Unfortunately, encoding the strike price in the commodity means that you
need N entries in your price database for the same stock to get the value
of N different grants. I also tried setting up an equivalency of the
different commodities with the 'real' stock, but this gets back into it
reports showing that an actual amount of income, which doesn't yet exist.

What I ended up actually doing is basically what I used to do: track
estimated gross value of options in dollars. It's really what I want to
know, anyway. I wrote a short python script that does the calculation given
a list of grants and the price database, and spits out monthly records I
copy into my ledger.


Cheers
-Eric

On Thu, Dec 11, 2014 at 10:07 PM, Martin Blais bl...@furius.ca wrote:

 Hi Eric,
 I haven't done this myself yet (I don't have options), but I think what
 you're doing is incorrect.

 You're not meant to track the cost basis of unexercised options, e.g.,
 what if they vest OOM?
 I would track the cost of the option itself.
 With the method I suggest below you can just enter price values for your
 particular option as the underlying moves.
 For example, an ITM option close to expiration should converge closely to
 the payoff, so having a recent-ish database of option price values in your
 ledger should allow calculation of the cash equivalent.

 I had a quick shot at it below, and this is probably closer to want you
 want (assuming ESP options, which I _assume_ an employer would
 automatically report the gains for on your W-2, for each exercise during
 the year, again, I haven't actually been in that situation so I might get
 some of the particulars wrong. I read up some IRS documents online to
 figure out what I needed, as I was curious).

 I'd love to hear some feedback,



 ;; Notes:
 ;;
 ;; * I put the exercise price in the commodity name itself, e.g.,
 FOO_X100, as
 ;;   in 'X' for strike price and '100' for 100$/share. This defines the
 ;;   instrument. Put the expiration date in there as well if you feel a
 need
 ;;   to do that (use the exchange codes if it makes sense to you).
 ;;
 ;; * I track the value of the option itself, not of the exercise price.
 When
 ;;   you use the option by exercising it, I would track that as an
 expense
 ;;   as in the below with 'Expenses:OptionsExercises' because the option
 ;;   vanishes and it acts as a privilege token you've now used.
 ;;

 plugin beancount.ops.auto_accounts

 2014-06-01 * Stock options - acquire
 Assets:BorganSchmanley:FOO-X1008 FOO-X100 {0.80 USD}
 Income:BorganSchmanley:OptionsVesting  ;; Note: Non-taxable if
 statutory

 2014-12-01 * Stock options - exercise
 Assets:BorganSchmanley:FOO-X100   -4 FOO-X100 {0.80 USD} @ 120.00
 USD
 Expenses:OptionsExercise3.20 USD
 Assets:BorganSchmanley:FOO 4 FOO {120.00 USD}
 Assets:BorganSchmanley:Cash  -400.00 USD
 Income:BorganSchmanley:Gains  -80.00 USD ;; These gains to be
 reported on W-2 AFAIK.

 2014-12-01 * Stock options - sale
 Assets:BorganSchmanley:FOO-4 FOO {120.00 USD} @ 121.00 USD
 Assets:BorganSchmanley:Cash   484.00 USD
 Income:BorganSchmanley:Gains   -4.00 USD


 ;; In my sale example above, I assume you waited a bit before selling after
 ;; exercise and got a small gain/loss from it. If you did not and you sold
 at
 ;; 120.00 (same as FMV at exercise) then you would have a gain or zero.
 ;;
 ;; If you wanted to represent an exercise + sell in one transaction, you
 could
 ;; do it this way, without the stock, you'd just get the money:

 2014-12-15 * Stock options - exercise  auto-sale
 Assets:BorganSchmanley:FOO-X100   -4 FOO-X100 {0.80 USD} @ 120.00
 USD
 Expenses:OptionsExercise3.20 USD
 Assets:BorganSchmanley:Cash80.00 USD
 Income:BorganSchmanley:Gains  -80.00 USD ;; These gains to be
 reported on W-2 AFAIK.





 On Tue, Dec 9, 2014 at 11:40 PM, Eric Weigle eric.wei...@gmail.com
 wrote:

 I'm trying to figure out how to model stock options in ledger. My goals
 are that
   (1) individual lots are tracked separately by the grant price, and
   (2) I can track the potential value in a sane way.

 This seems to work for (1) when I exercise for cash:

 2014/06/01 Stock options - acquire
 Assets:Stock Options:Foo   4 FOO_OPTIONS {$100} @ $0

 2014/12/01 Stock options - exercise
 Assets:Stock Options:Foo  -4 FOO_OPTIONS {$100} @ $0
 Assets:Stock:Foo   4 FOO @ $100
 Income:Transient Stock$-400

 2014/12/01 Stock options - sale
 Assets:Stock:Foo  -4 FOO {$100} @ $200
 Income:Capital Gains  $-400
 Income:Transient Stock$400
 Assets:Checking   $400

 But I can't seem to figure out a way to track what the exercise would be
 worth at, say, August in my example. I tried adding  a pricesdb value
 for FOO_OPTIONS of $150

Re: How to make faster posts on ledger

2014-12-21 Thread Eric Abrahamsen
Craig Earls ender...@gmail.com writes:

 Ledger-mode only uses ledger xact in one very specific case. Tab
 completion of payees, accounts, tags and meta-data is done within
 emacs. 

Oh sure -- that's what I meant. What I was misunderstanding was what the
OP was looking for, I think...

 On Sunday, December 21, 2014, Eric Abrahamsen
 e...@ericabrahamsen.net wrote:

 Kev Lau
 superinterstel...@gmail.com
 writes:
 
  Hello,
 
  Currently I am using nano to make my ledger entries and it takes
 a
  very long time as I have to write the full form for everything
  (Expenses:Car:Petrol) etc and get very tired making entries.
 
  Is there something we can do to make entries on nano faster
  (predictive-text)? I heard emac can take care of this. Can
 someone
  confirm on this and provide a page dedicated to emac and ledger
  (perhaps showing tutorials for newbies?)
 
  Appreciate feedback for this.
  Regards
  Kevin
 
 As Alexis mentioned, ledger comes with an xact command that
 makes it
 very easy to create new entries. The way Emacs takes care of
 this is
 just calling out to xact. If you could incorporate that into nano
 somehow, you'd be taken care of. I don't know if nano can call
 shell
 commands...?
 
 Eric
 
 --
 
 ---
 You received this message because you are subscribed to the Google
 Groups Ledger group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to ledger-cli+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.
 

 -- 
 Craig, Corona De Tucson, AZ
 enderw88.wordpress.com

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Modelling stock options in ledger

2014-12-11 Thread Eric Weigle
I'm trying to figure out how to model stock options in ledger. My goals are 
that
  (1) individual lots are tracked separately by the grant price, and
  (2) I can track the potential value in a sane way.

This seems to work for (1) when I exercise for cash:

2014/06/01 Stock options - acquire
Assets:Stock Options:Foo   4 FOO_OPTIONS {$100} @ $0

2014/12/01 Stock options - exercise
Assets:Stock Options:Foo  -4 FOO_OPTIONS {$100} @ $0
Assets:Stock:Foo   4 FOO @ $100
Income:Transient Stock$-400

2014/12/01 Stock options - sale
Assets:Stock:Foo  -4 FOO {$100} @ $200
Income:Capital Gains  $-400
Income:Transient Stock$400
Assets:Checking   $400

But I can't seem to figure out a way to track what the exercise would be 
worth at, say, August in my example. I tried adding  a pricesdb value for 
FOO_OPTIONS of $150, but then it thinks I have $600 rather than $200, 
because it doesn't account for the $100 exercise price. All the transaction 
variants I've tried for FOO_OPTIONS {$} rebase the option, which is not 
what I'm hoping to do. 

I'm coming from Gnucash. What I did there was to track an account Stock 
options in dollars, and just do change in value transactions monthly. 
This achieved #2, but not #1.

Any suggestions appreciated. Maybe some magic with virtual transactions to 
track #1 and #2 separately?


Thanks
-Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ledger.el 3.1 destroys syntax

2014-11-01 Thread Eric Abrahamsen
Craig Earls ender...@gmail.com writes:

 I use it every day and don't see anything like this. What emacs are
 you using?

Yeah, I'd definitely assume gremlins of some sort -- we'd have heard
about it if things were really broken that bad as a general case.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: limiting the output of --pivot=payee?

2014-10-31 Thread Eric Abrahamsen
Martin Blais bl...@furius.ca writes:

 Hi Eric,
 I tried reproducing the problem you describe but cannot (I hit other
 problems, but eventually get it working).
 Can you provide a minimal example ledger file where it fails? (Just a
 couple of transactions that highlight the problem.)

Sure! I'm responsible for handing out translation payments for a
literary magazine. I am given cash, and hand that out to people. Here's
my test file:

09/01 * Magazine Company
Assets:Cash  100 USD
Liabilities:Payable:Magazine -20 USD ; Payee: Bob Jones
Liabilities:Payable:Magazine -55 USD ; Payee: Sam Bob 
Liabilities:Payable:Magazine -25 USD ; Payee: Jane Doe 

09/02 * Bob Jones
Liabilities:Payable:Magazine  20 USD
Assets:Cash 

So I got the money, then paid one of the translators. I run:

ledger -f ~/.ledger/test.dat bal payable --pivot=payee

And get:

  20 USD  Liabilities:Payable:Magazine
-100 USD  payee
 -20 USDBob Jones:Liabilities:Payable:Magazine
 -25 USDJane Doe:Liabilities:Payable:Magazine
 -55 USDSam Bob:Liabilities:Payable:Magazine

 -80 USD


This tells me that I've paid back 20 USD so far, but not to whom! When
there are a big pile of payees, it becomes impossible to tell who hasn't
been paid. What I'm after is a command that will produce this:

 -80 USD  payee
 -25 USDJane Doe:Liabilities:Payable:Magazine
 -55 USDSam Bob:Liabilities:Payable:Magazine

 -80 USD

Ie, just remove the postings that cancel out. Is that possible, do you
think? I guess, with the --pivot option, ledger would have to treat each
payee as if it were sort of an account of its own, so it knew *how* to
cancel them out...

Thanks again,
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: limiting the output of --pivot=payee?

2014-10-31 Thread Eric Abrahamsen
Martin Michlmayr t...@cyrius.com writes:

 * Eric Abrahamsen e...@ericabrahamsen.net [2014-10-31 14:05]:
 ledger -f ~/.ledger/test.dat bal payable --pivot=payee
 
 And get:
 
   20 USD  Liabilities:Payable:Magazine
 -100 USD  payee
  -20 USDBob Jones:Liabilities:Payable:Magazine
  -25 USDJane Doe:Liabilities:Payable:Magazine
  -55 USDSam Bob:Liabilities:Payable:Magazine
 
  -80 USD

 This looks like the same issue as
 http://bugs.ledger-cli.org/show_bug.cgi?id=1048

 A workaround is:

 ledger -f b bal liab --account payee
  -25 USD  Jane Doe:Liabilities:Payable:Magazine
  -55 USD  Sam Bob:Liabilities:Payable:Magazine
 
  -80 USD

But that's perfect! Doesn't seem like a workaround if it does exactly
what I want. I don't know enough to say if the --pivot=payee behavior
should be different than it is now, but this command does precisely what
I want, so I'll probably be sticking with that.

Thanks again, this really makes me happier with ledger as a whole.

Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


limiting the output of --pivot=payee?

2014-10-30 Thread Eric Abrahamsen
When I want to see how much money I owe people, I do:

ledger bal liabilities:payable

And see an undifferentiated total.

When I want to see who I owe that money to (ie, the payees), I do:

ledger bal liabilities:payable --pivot=payee

Which gives me an output that seems to include all the people I've ever
owed money to, with the positive and negative amounts in a big list,
ending in the same balance as the first command.

That makes it pretty impossible to see which payments are still
outstanding. The reverse, with assets:receivable, is also true.

Is there a different command I can use to see only the remaining balance
of outstanding payments, and the payees for those payments, and nothing
more?

Thanks!
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: New fontification Scheme

2014-09-17 Thread Eric Abrahamsen
Craig Earls ender...@gmail.com writes:

 I have spent the last month overhauling ledger fontification.  I gave
 up on using the standard REGEX based methods that most font lockers
 use. Instead I wrote a few functions that actually understand the
 semantics of a ledger xact then had jit-lock and font-lock call those.
   Overall there is much more flexibility and it seems to be plenty
 fast.  The regexes I do use are much simpler.   I tested with a file
 that had 2,613,072 postings and it was lighting fast.  Comments after
 amounts are now properly recognized and you can fontify an entire xact
 based on its overall status (my favorite part, that font-lock just
 really couldn't do).

 For those of you who use lots of different directives there are now
 separate faces possible for all valid directives (or just use one face
 for all directives)

 Please check it out and report any bugs you find.  I have banged on it
 for a while and it has been stable and well behaved.  Of course you
 will find problems.

Hey I'm using the ledger-git package on archlinux, and this doesn't seem
to have landed there. Does anyone know who is maintaining that package
(Joni according to the AUR), and if this bit is going to land soon?
The package has otherwise been updated fairly regularly, I'm just not
seeing new fontification.

I'll ask on the AUR page if no one here has anything to do with it...

Thanks,
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


payee limiting question

2014-07-30 Thread Eric Abrahamsen
For the longest time I haven't been able to use payee limiting in
reports in any convenient way, and I'm finally getting around to
bringing it up here. I am using git ledger, built on archlinux. Here's
the basic problem:

[eric@pellet ~]$ ledger reg assets:receivable --limit 'payee=~/CBI/'
14-May-03 CBI  Assets:Receivable   2,000.00 RMB  2,000.00 RMB
14-Jun-18 CBI  Assets:Receivable  -2,000.00 RMB 0

[eric@pellet ~]$ ledger reg assets:receivable and CBI
[eric@pellet ~]$ ledger reg assets:receivable @CBI
{displays all postings for assets:receivable}

According to the docs and whatnot, one of the shorter forms ought to
work. The longer one is horrible to type!

Am I doing something wrong, or are the docs incorrect, or is this a bug
of some sort?

Thanks!
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: payee limiting question

2014-07-30 Thread Eric Abrahamsen
Nathan Grigg nat...@nathangrigg.net writes:

 On Jul 30, 2014, at 2:13 AM, Eric Abrahamsen 
 e...@ericabrahamsen.net wrote:


 [eric@pellet ~]$ ledger reg assets:receivable and CBI
 [eric@pellet ~]$ ledger reg assets:receivable @CBI
 {displays all postings for assets:receivable}


 It should work if you combine these into 

 ledger reg assets:receivable and @CBI

 Nathan

So it does! Thank you very much. I should have experimented a bit more...

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: payee limiting question

2014-07-30 Thread Eric Abrahamsen
Nathan Grigg nat...@nathangrigg.net writes:

 On Jul 30, 2014, at 7:16 AM, Martin Blais bl...@furius.ca wrote:

 This is perhaps a second question, but I'm confused as to the meaning of 
 Ledger's filter expressions.
 
 When you say:
 ledger reg assets:receivable and @CBI
 
 Does it mean:
 Select all the POSTINGS with account Assets:Receivable 
 AND
 select all the TRANSACTIONS with payee CBI?

 As I understand it, you are always matching postings, but the payee is
 propagated to each posting. I think of it as postings with given
 account and payee, but you may be more comfortable if you say
 postings with a given account and in a transaction with given payee.
 (Although this might also be less correct because you can override the
 payee per posting in a transaction.)

In my case, I was hoping for something exactly equivalent in meaning to
the more verbose --limit statement. So what I understood was: spit out
all postings that match assets:receivable, but then only show me those
with a payee that matches 'CBI'.

 Note that it doesn't say give me postings matching given account AND
 give me postings matching given payee. Despite our use of and
 there, this would require an OR (i.e. union) operation.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: payee limiting question

2014-07-30 Thread Eric Abrahamsen
Nathan Grigg nat...@nathangrigg.net writes:

 On Jul 30, 2014, at 7:13 AM, Martin Blais bl...@furius.ca wrote:
 
 So then what does this one mean:
 ledger reg assets:receivable @CBI
 
 Is it to be or'ed?

 Yes

Thanks, that makes a lot more sense. I had assumed that the @CBI was
simply being ignored there; now I see it really is an or.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


two ledger-mode tweaks

2014-07-15 Thread Eric Abrahamsen
While Craig's giving a little love to ledger-mode, can I put in two
small requests? Very small requests, but you know emacs users...

One is that the posting inserted by 'ledger-add-transaction' is indented
differently than what you get by calling `ledger-post-align-xact' on an
existing posting. In my case, the amounts end up a few columns short of
ledger-post-amount-alignment-column, which in my case is 52 (the
default?). That means that after calling add-transaction, I have to
additionally hit C-c C-q to re-align it. That bugs me... more than it
ought to.

The other thing is that sorting a file doesn't take default years into
account. I've got year 2014 at the top of my file. When I insert a
posting manually, I usually write 07/14 as the date. When I add a
posting with xact, it comes out as 2014/07/14. That has no adverse
effects, except that sorting the file does a simple lexical sort, and
all the postings with a year value in the date end up at the bottom of
the file.

Again, not such a big deal (and this second request might be more
difficult to implement than the first), but if it seemed worth
addressing, one user at least would be grateful.

Thanks!
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: two ledger-mode tweaks

2014-07-15 Thread Eric Abrahamsen
Craig Earls ender...@gmail.com writes:

 Add them as feature requests in bugzilla please, then I won't lose
 track of them.

 http://bugs.ledger-cli.org/buglist.cgi?product=Ledgercomponent=lispresolution=---

Done! And thanks.

 Thanks,
 Craig

 On Tue, Jul 15, 2014 at 7:08 PM, Eric Abrahamsen
 e...@ericabrahamsen.net wrote:
 While Craig's giving a little love to ledger-mode, can I put in two
 small requests? Very small requests, but you know emacs users...

 One is that the posting inserted by 'ledger-add-transaction' is indented
 differently than what you get by calling `ledger-post-align-xact' on an
 existing posting. In my case, the amounts end up a few columns short of
 ledger-post-amount-alignment-column, which in my case is 52 (the
 default?). That means that after calling add-transaction, I have to
 additionally hit C-c C-q to re-align it. That bugs me... more than it
 ought to.

 The other thing is that sorting a file doesn't take default years into
 account. I've got year 2014 at the top of my file. When I insert a
 posting manually, I usually write 07/14 as the date. When I add a
 posting with xact, it comes out as 2014/07/14. That has no adverse
 effects, except that sorting the file does a simple lexical sort, and
 all the postings with a year value in the date end up at the bottom of
 the file.

 Again, not such a big deal (and this second request might be more
 difficult to implement than the first), but if it seemed worth
 addressing, one user at least would be grateful.

 Thanks!
 Eric

 --

 ---
 You received this message because you are subscribed to the Google Groups 
 Ledger group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to ledger-cli+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



 -- 
 Craig, Corona De Tucson, AZ
 enderw88.wordpress.com

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: two ledger-mode tweaks

2014-07-15 Thread Eric Abrahamsen
Craig Earls ender...@gmail.com writes:

 Yzour first request is done.  Please update with the latest source
 code.  Turns out it was adding two lines and deleting one line...The
 year directive thingy is much trickier.  I need to handle multiple
 year directives spread throughout the file and sort them sanely...

That was swift!

And yes, I'd imagine the second one would take quite a bit of effort. If
and when you get to it! It's obviously just a nice-to-have...

Thanks,
Eric

 On Tue, Jul 15, 2014 at 8:14 PM, Craig Earls ender...@gmail.com wrote:
 Add them as feature requests in bugzilla please, then I won't lose
 track of them.

 http://bugs.ledger-cli.org/buglist.cgi?product=Ledgercomponent=lispresolution=---

 Thanks,
 Craig

 On Tue, Jul 15, 2014 at 7:08 PM, Eric Abrahamsen
 e...@ericabrahamsen.net wrote:
 While Craig's giving a little love to ledger-mode, can I put in two
 small requests? Very small requests, but you know emacs users...

 One is that the posting inserted by 'ledger-add-transaction' is indented
 differently than what you get by calling `ledger-post-align-xact' on an
 existing posting. In my case, the amounts end up a few columns short of
 ledger-post-amount-alignment-column, which in my case is 52 (the
 default?). That means that after calling add-transaction, I have to
 additionally hit C-c C-q to re-align it. That bugs me... more than it
 ought to.

 The other thing is that sorting a file doesn't take default years into
 account. I've got year 2014 at the top of my file. When I insert a
 posting manually, I usually write 07/14 as the date. When I add a
 posting with xact, it comes out as 2014/07/14. That has no adverse
 effects, except that sorting the file does a simple lexical sort, and
 all the postings with a year value in the date end up at the bottom of
 the file.

 Again, not such a big deal (and this second request might be more
 difficult to implement than the first), but if it seemed worth
 addressing, one user at least would be grateful.

 Thanks!
 Eric

 --

 ---
 You received this message because you are subscribed to the Google Groups 
 Ledger group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to ledger-cli+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



 --
 Craig, Corona De Tucson, AZ
 enderw88.wordpress.com



 -- 
 Craig, Corona De Tucson, AZ
 enderw88.wordpress.com

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: specifying transaction schedules in ledger-mode

2014-07-09 Thread Eric Abrahamsen
Richard Cobbe rco...@gmail.com writes:

 I'd hate to see ledger-mode's support for scheduled transactions
 removed entirely in favor of cron -- not least because I tend not to
 have my computer running 24-7, so I'd be worried about missing
 transactions that fall due on a day when the computer's off (because
 I'm out of town or something).

FWIW, the cron suggesting wasn't to actually *use* cron, but to borrow
from its syntax. Though, as pointed out, every other Tuesday is hard
to do in cron.

 Additionally, I'm not sure cron would fit my usage pattern well.  I
 chiefly use scheduled transactions for various transactions (monthly
 or bi-weekly) that take money out of my checking account -- and in
 GnuCash, I specifically had them set to appear a week before the
 transaction actually posts, so I could make sure I have enough in the
 checking account to cover them.  (These are payments for which I
 don't get bills in advance -- things like automatic monthly transfers
 from checking into investment accounts, and automatic bi-weekly
 mortgage payments, and so forth.)

 Right now, I rely on the fact that I start GnuCash often enough that
 I see the transaction pretty close to a week in advance, and that
 seems to work pretty well, although of course it's not foolproof.  If
 I had to use cron for something like this, I'd have to put a
 mechanism in place to notify me somehow, probably via email, that a
 scheduled transaction has posted.  As it is, even with ledger-mode,
 I'll have to get into the habit of hitting C-c C-u every time I open
 the file.

 Another option that I'm still considering is just sitting down on Jan
 1 or whenever and writing up (probably programmatically) a year's
 worth of recurring transactions into the ledger file directly, and
 then just running ledger bal every morning with the appropriate
 options to display the projected balance 7 days out.

 Richard
 Richard

 On Tuesday, July 8, 2014 8:26:11 PM UTC-4, Craig Earls wrote:

 cron, I never even thought of it.  Brilliant.  There is probably
 even
 an elisp parser already written than I can steal...

 On Tue, Jul 8, 2014 at 4:38 PM, Eric Abrahamsen 
 er...@ericabrahamsen.net wrote:
  Craig Earls ende...@gmail.com writes:
 
  I have been very slowly working on exactly that for a long
 time. I
  keep dithering on how to represent that kind of recurrence.
 So, since
  you are the first to ask, what would you like it to look like?
 
  Cron has been around for ages and is just about as expressive
 as you can
  get -- maybe something based on that?
 
  I was think of something like:
  anchor date+ perodicity
  For example every o
  Third Monday starting on 2014-07-14 would be:
  2014-07-14+3w
 
  I have thought of other ways and all have merits. What would
 you
  like. Keep in mind the requirement for specifying a starting
 point
 
  On Tuesday, July 8, 2014, Richard Cobbe 
  rco...@gmail.com wrote:
 
  (Please forgive me if this is a duplicate post -- I'm
 fairly new
  to Google groups, and my first attempt apparently went off
 into
  the ether rather than showing up on this list.)
 
  I'm trying to transition from GnuCash to ledger, and I'm
 looking
  for an equivalent to GnuCash's scheduled transactions.  I
 see
  from the ledger-mode manual that there's some support for
 this
  feature in Emacs, and I've played around with it and
 figured out
  how to do simple things, like scheduling a transaction to
 run
  every month on the 13th, say, by supplying a date in the
 form [*/
  */13].
 
  Is there a way to schedule a transaction to run every
 other
  Monday?  I don't see how to fit that into the date syntax
 that's
  described in the manual.  I took a quick look at
  ledger-schedule.el, and ledger-schedule-descriptor-regex
 appears
  to support more expressive date specifications than just
 [*/*/
  13], but it's going to take me a while to figure out
 what's going
  on here.  In particular, ledger-schedule-constrain-day
 appears
  not to support all of the possible options that the regex
 appears
  to allow.
 
  Ledger 3.0.3-20140608 on MacOS 10.9.4, for what it's
 worth.  Oh,
  and Emacs 24.3.1.
 
  Thanks!
 
  Richard
 
  --
 
  ---
  You received this message because you are subscribed to
 the
  Google Groups Ledger group.
  To unsubscribe from this group and stop receiving emails
 from it,
  send an email to ledger-cli+...@googlegroups.com.
  For more options, visit https://groups.google.com/d/optout
 .
 
 
 
  --
  Craig, Corona De Tucson, AZ

Re: specifying transaction schedules in ledger-mode

2014-07-08 Thread Eric Abrahamsen
Craig Earls ender...@gmail.com writes:

 I have been very slowly working on exactly that for a long time. I
 keep dithering on how to represent that kind of recurrence. So, since
 you are the first to ask, what would you like it to look like?

Cron has been around for ages and is just about as expressive as you can
get -- maybe something based on that?

 I was think of something like:
 anchor date+ perodicity
 For example every o
 Third Monday starting on 2014-07-14 would be:
 2014-07-14+3w

 I have thought of other ways and all have merits. What would you
 like. Keep in mind the requirement for specifying a starting point 

 On Tuesday, July 8, 2014, Richard Cobbe 
 rco...@gmail.com wrote:

 (Please forgive me if this is a duplicate post -- I'm fairly new
 to Google groups, and my first attempt apparently went off into
 the ether rather than showing up on this list.)

 I'm trying to transition from GnuCash to ledger, and I'm looking
 for an equivalent to GnuCash's scheduled transactions.  I see
 from the ledger-mode manual that there's some support for this
 feature in Emacs, and I've played around with it and figured out
 how to do simple things, like scheduling a transaction to run
 every month on the 13th, say, by supplying a date in the form [*/
 */13].

 Is there a way to schedule a transaction to run every other
 Monday?  I don't see how to fit that into the date syntax that's
 described in the manual.  I took a quick look at
 ledger-schedule.el, and ledger-schedule-descriptor-regex appears
 to support more expressive date specifications than just [*/*/
 13], but it's going to take me a while to figure out what's going
 on here.  In particular, ledger-schedule-constrain-day appears
 not to support all of the possible options that the regex appears
 to allow.

 Ledger 3.0.3-20140608 on MacOS 10.9.4, for what it's worth.  Oh,
 and Emacs 24.3.1.

 Thanks!

 Richard

 --

 ---
 You received this message because you are subscribed to the
 Google Groups Ledger group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to ledger-cli+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



 --
 Craig, Corona De Tucson, AZ
 enderw88.wordpress.com

 --

 ---
 You received this message because you are subscribed to the Google
 Groups Ledger group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to ledger-cli+unsubscribe-/
 jypxa39uh5tlh3mboc...@public.gmane.org.
 For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to install/use ledger emacs support?

2014-07-02 Thread Eric Abrahamsen
Ra Wa rw950...@gmail.com writes:

 I'm an emacs newbie , usually using vim.

 Can someone tell me how/where  to install the emacs support files
 (*.el) and how to invoke the reconcile command? (ledger version 3.0
 compiled from github sources)


 I copied all the *.el files to ~/.emacs.d
 I created ~/.emacs with
 (add-to-list 'load-path ~/.emacs.d)

 But wasnt sure what else to add.


 Should I use Control+C Control+R to invoke reconcile mode or has this
 changed?

Emacs won't know by default to use ledger mode for ledger files. So tell
emacs to use ledger-mode for your ledger files:

(add-to-list 'auto-mode-alist
 '(ledger.*\\.dat$ . ledger-mode))

Adjust the regexp if necessary, mine is like that so I can use file
names like ledger.dat, ledger.thingA.dat, ledger.thingB.dat, etc. 

Emacs should put you in ledger mode when you open the file. If it
doesn't, use M-x ledger-mode (and then figure out why it doesn't,
because you want that done automatically).

Then yes, C-c C-r will do reconciling.

Hope that helps,
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: xact doesn't return anything?

2014-06-20 Thread Eric Abrahamsen
Martin Michlmayr t...@cyrius.com writes:

 * Eric Abrahamsen e...@ericabrahamsen.net [2014-06-19 22:05]:
 ledger --sort=d --cleared xact starbucks
 
 Gives me the blank line. Is this because of the particular flags I've
 got in my config file, or because xact isn't meant to take any
 command-line flags?

 The problem is that the transaction generated by xact is not cleared
 but you specify --cleared, which means that uncleared transactions are
 not shown.

 Maybe xact should ignore --cleared.  Doesn't seem to make much sense,
 but who knows.

Aha! Thanks for that. Specifying -U or --uncleared for the ledger xact
command, with my rc file in place, still doesn't give me any results --
I would have expected the command-line switch to override the rc file
directive. Anyway, at least I know what the problem is, thank you! I'll
remove --cleared from the rc file for now: it was only a minor
convenience anyway.

E

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: xact doesn't return anything?

2014-06-19 Thread Eric Abrahamsen
Craig Earls ender...@gmail.com writes:

 That explains it. Xact requires an argument. Give it part of a payee
 you are interested in and it will provide you a prototype with the
 last xact using that payee.

Sorry, I wasn't clear: it doesn't *ever* return anything, no matter what
the argument. So with this posting in my ledger file:

06/19 * Starbucks
Expenses:Food:Cafe   5.15 USD
Assets:Cash

All of these invocation return the exact same value: a blank newline,
and the 0 exit code:

ledger xact
ledger xact Starbucks
ledger xact Starbucks cafe 8
ledger xact no such account
ledger xact asdfasdfadf

Everything returns a blank.

Thanks,
Eric


 Craig Earls
 520-300-1182

 On Jun 18, 2014, at 6:42, Eric Abrahamsen e...@ericabrahamsen.net wrote:
 
 Craig Earls ender...@gmail.com writes:
 
 what exact command are you issuing?
 
 Just ledger xact from the command line. ledger xact plus *anything*
 (nothing, gibberish, a valid specification) returns the same thing: a
 blank newline.
 
 On Tue, Jun 17, 2014 at 11:13 PM, Eric Abrahamsen
 e...@ericabrahamsen.net wrote:
 Hi, I'm using the ledger-git package on archlinux's AUR -- it reports
 version 3.0.3-20140608.
 
 So far as I can tell, since that most recent update, the xact command
 doesn't return anything at all. From the command line and within emacs,
 it just spits out a newline, and that's it. Malformed input doesn't
 trigger an error, and valid input doesn't result in a posting. Just
 nothing. Running echo $? after the xact command gives me 0 -- all is
 well!
 
 Is anyone else seeing this?
 
 Thanks,
 Eric
 
 --
 
 ---
 You received this message because you are subscribed to the Google Groups 
 Ledger group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to
 ledger-cli+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.
 
 
 
 -- 
 Craig, Corona De Tucson, AZ
 enderw88.wordpress.com
 
 -- 
 
 --- 
 You received this message because you are subscribed to the Google Groups 
 Ledger group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to
 ledger-cli+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: xact doesn't return anything?

2014-06-19 Thread Eric Abrahamsen
Eric Abrahamsen e...@ericabrahamsen.net
writes:

 Craig Earls ender...@gmail.com writes:

 That explains it. Xact requires an argument. Give it part of a payee
 you are interested in and it will provide you a prototype with the
 last xact using that payee.


Whoa, on a total whim I removed my .ledgerrc file and tried it again,
and xact went back to working normally. Put it back, and it stopped
outputting anything. The contents of my .ledgerrc:

--sort=d
--cleared

That works great as bal/reg defaults, but sure enough:

ledger --sort=d --cleared xact starbucks

Gives me the blank line. Is this because of the particular flags I've
got in my config file, or because xact isn't meant to take any
command-line flags? If it isn't, could it maybe ignore .ledgerrc by
default? Any other way I can shield it from those config options?

Thanks,
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


xact doesn't return anything?

2014-06-18 Thread Eric Abrahamsen
Hi, I'm using the ledger-git package on archlinux's AUR -- it reports
version 3.0.3-20140608.

So far as I can tell, since that most recent update, the xact command
doesn't return anything at all. From the command line and within emacs,
it just spits out a newline, and that's it. Malformed input doesn't
trigger an error, and valid input doesn't result in a posting. Just
nothing. Running echo $? after the xact command gives me 0 -- all is
well!

Is anyone else seeing this?

Thanks,
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'equity' cannot accept virtual and non-virtual postings to the same account

2014-05-23 Thread Eric Abrahamsen
Martin Blais bl...@furius.ca writes:


[...]

 I think you're just not being creative enough with it. Here's an
 alternative system that solves your accounting problem without
 resorting to virtual accounts: just count the receipts themselves.



 option operating_currency RMB

 2014-01-01 open Assets:Merchants:C5231
 2014-01-01 open Income:Salary
 2014-01-01 open Expenses:Food:Restaurant
 2014-01-01 open Assets:Cash

 ;; Amount of receipts I was promised I could gather for payment.
 2014-01-01 open Assets:Receipts:Allowable   RECEIPTS

 ;; Amount of receipts I accumulated in envelope, pending to be
 ;; submitted to Tax Dodgers Inc.
 2014-01-01 open Assets:Receipts:Pending RECEIPTS

 ;; Amount of cash receipts already submitted to Tax Dodgers, waiting
 ;; to be received in cash.
 2014-01-01 open Assets:Receipts:Receivable  RMB

[...]

 You have an account to track how much you've been promised, how much
 you've accumulated, how much you've submitted and is receivable in
 cash. Your income account will have RMB and RECEIPT units so you can
 easily see how much of each composed your compensation. Does this
 work?

This does work! When I was thinking this through in the beginning, I was
put off by proliferating accounts: I felt like I should just have one
account for receipts (it's just one value, after all), one account for
income, one cheater account for receivables, and views on everything
else (the fancy footwork with the receipts) should be a function of how
I write my reports.

You make a persuasive argument with the above, though, and I'll give
this some serious thought. Multiple sub-accounts of Assets:Receipts does
sound like a good idea.

 Here's the ugly:  my method above requires you to insert two postings
 to the allowable expenses, instead of one, like in your method.

[...]

This is what I was messing with in another branch of this thread,
talking to John about automating transactions using tags/metadata. That
doesn't look like it will work in the short term, but maybe it will in
the future, and when it does it will simplify things much as your
pre-processing scheme would: add a simple tag to receipt-able
transactions, and the automation does the rest. I'm not likely to dive
into beancount any time soon (I'm still re-wrapping my head around
plain ledger, after an absence), but I do appreciate the thought and
effort that went into your reply.

 (Finally, a disclaimer: this email is not to suggest or help you
 carry out tax evasion activities; you should probably consult a tax
 lawyer about how best to treat those gifts. This message merely
 aims to help solve your counting problem in the context of text-based
 bookkeeping software.)

Lord knows I wish this wasn't necessary. I console myself, as one often
does in China, with the thought that everyone else is doing the same
thing.

Thanks again,
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: query metadata in automated transactions?

2014-05-22 Thread Eric Abrahamsen
John Wiegley jo...@newartisans.com writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 No, I'd tried that one before. It looks like parenthesis inside any expr
 clause will cause the parsing error. If there's no expr, the parenthesis
 is read correctly and things seem to work. In your above suggestion, I got
 the parsing error at (Receipt. If I take out the first expr, I get the
 parsing error at (transportation|food|books)/, saying: Error: Missing '/'.

 Sorry, copy and paste bug, the second expr shouldn't appear.

 The only way I can get it to work is to have no first expr, use tag
 instead of has_tag (using has_tag simply produces no results), and have no
 parenthesis in the expr account clause.

 The ternary expression works if given as:

 ((to_amount(tag(Receipt))  0) ? to_amount(tag(Receipt)) : 1)

 So really all I'm missing there is the ability to match:

 = expr amount = to_amount(tag(Receipt)) and expr etc etc etc

 with parentheses in.

 Yes, you can't do variable assignments like this at the moment.

 John

Okay, no worries. Thanks for your help!

Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'equity' cannot accept virtual and non-virtual postings to the same account

2014-05-21 Thread Eric Abrahamsen
Martin Michlmayr t...@cyrius.com writes:

 * Eric Abrahamsen e...@ericabrahamsen.net [2014-05-19 09:59]:
 ~ Monthly
 ; Payee: Tax Dodgers, Inc
 Assets:Merchants:5231   7000 RMB ; regular salary 
 part
 Assets:Receivable   3000 RMB ; receipts
 Income:Salary

 Is this just an example or something you actually use?  I'm asking
 becaue I don't understand this transactions.  Why would
 Assets:Receivable go up every month?  Also, what it
 Assets:Merchants:5231?  Surely, if you're paid monthly, your bank
 account would go up, and not some Assets:Merchants account.

Yup, that's the real transaction: Merchants is the name of my bank :)

 After a few weeks I have 1920.90 RMB in my virtual receipt account, and
 I hand them in (but they haven't paid me the reimbursement yet):
 
 05/04 ! Tax Dodgers, Inc
 * (Assets:Receipts)  = 0 RMB
 Assets:Merchants:52311920.90 RMB
 Assets:Receivable
 
 When the reimbursement comes through I clear the whole transaction, and
 add an aux date.

 This whole approach looks a bit complicated and fragile to me.  I'll
 explain the workflow I use.  I'm not sure it's better, but it works
 for me:

[...]

 I think this workflow follows a logical approach: when you spend
 money, you have an asset that can be reimbursed (Assets:Reimbursable).
 When you do an expensive report, it becomes a receivable
 (Assets:Receivable).  And finally, this receivable goes away when you
 get paid.

The main difference is, in my case it _isn't_ a reimbursement -- it is
money spent entirely on my own behalf. The receipts are simply an excuse
for the company to give out funds without paying payroll taxes. To me
these receipts are the perfect definition of virtual: no money is
moving between accounts, but at the same time I'd like to know how much
I've got, and how much I still need. The manual balancing is a bit
questionable, but it seems like a fine trade-off.

 Now I understand that it might be slightly different if I were a
 contractor rather than an employee.  In that case, I can see an
 argument for booking these expenses a actual Expenses: rather than
 Assets:Reimbursable.  (After all, they are expenses for your business
 regardless of whether you get reimbused or not.)

 You could tag with them with your client, and then use
   ledger reg Expenses: tag client
 to get a list in order to bill them.  This would just be income and
 not a reimbursement as with a true employee.

 I believe this approach should work for most people.  Now in your
 case, we need to be slightly more creative.  It sounds as if got paid
 $40 if you had a receipt for $40, even though you only spent $20 (no
 need to confirm).  I have one idea how to handle this.  It's not
 currently supported by ledger, but it's a feature that I realized a
 few days ago would be useful.

 It would be nice if ledger would allow you to run 'reg' or 'bal' on
 tags.  In order words, you could have:

[...]

I tried (Project is another tag in my files):

$ ledger reg --limit 'tag(Project)'

And it worked correctly. I don't know if that would do what you're
trying to achieve below, with keeping track of nights, but maybe give it
a shot?

 I have a use case for this: I track points I receive when I stay in a
 hotel.  In addition to points, the number of nights stayed count
 towards lifetime status.  This isn't something I track in ledger
 (since it's not really an asset), so I just put it in a comment.
 However, it would be nice to do:
   ledger reg --account=tag('Nights')
 to get the total number of nights I've achieved.

 -- 
 Martin Michlmayr
 http://www.cyrius.com/

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: query metadata in automated transactions?

2014-05-21 Thread Eric Abrahamsen
John Wiegley jo...@newartisans.com writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 John Wiegley jo...@newartisans.com writes:
 Eric Abrahamsen e...@ericabrahamsen.net writes:
 
 = expr recpt = tag(Receipt) and expr account =~
 /^expenses:(transportation|food|books)/ (Assets:Receipts) ((recpt  0) ?
 recpt : 1)
 
 Only use expr at the beginning.

 Still getting the same error without the second expr. Just reducing the
 matching line to this:

 Try this maybe?

 = expr has_tag(Receipt) and expr account =~
 /^expenses:(transportation|food|books)/ (Assets:Receipts) 
 ((tag(Receipt)  0) ? tag(Receipt) : 1)

No, I'd tried that one before. It looks like parenthesis inside any
expr clause will cause the parsing error. If there's no expr, the
parenthesis is read correctly and things seem to work. In your above
suggestion, I got the parsing error at (Receipt. If I take out the
first expr, I get the parsing error at (transportation|food|books)/,
saying: Error: Missing '/'.

The only way I can get it to work is to have no first expr, use tag
instead of has_tag (using has_tag simply produces no results), and have
no parenthesis in the expr account clause.

The ternary expression works if given as:

((to_amount(tag(Receipt))  0) ? to_amount(tag(Receipt)) : 1)

So really all I'm missing there is the ability to match:

= expr amount = to_amount(tag(Receipt)) and expr etc etc etc

with parentheses in.

Sorry to keep on with this -- it seems like a hassle just to get a
little convenience. On the other hand, it really does seem to be just
the one issue!

Thanks,
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: query metadata in automated transactions?

2014-05-18 Thread Eric Abrahamsen
John Wiegley jo...@newartisans.com writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 = expr recpt = tag(Receipt) and expr account =~
 /^expenses:(transportation|food|books)/ (Assets:Receipts) ((recpt  0) ?
 recpt : 1)

 Only use expr at the beginning.

Still getting the same error without the second expr. Just reducing
the matching line to this:

= expr recpt = tag(Receipt)

Is enough to get the Invalid token parsing error. Tried it with single
quotes around Receipt as well...

Thanks,
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: 'equity' cannot accept virtual and non-virtual postings to the same account

2014-05-18 Thread Eric Abrahamsen
Martin Blais bl...@furius.ca writes:


[...]

 It would be useful to build a list of real-world use cases of virtual
 postings and see if they can all be solved without or not - make a
 compelling argument about the need for virtual postings.

I have a fairly simple use-case, the system for which I'm putting
together right now. I have a consulting contract with a company here in
China, and like many local companies they are creative about tax
evasion. My fee is paid in part as salary, which is taxed, and in part
as spurious reimbursements for expenditures, which aren't taxed. I
have to collect official receipts for various things I spend money on,
and then present them to the company each month, and they reimburse me.

I spent a while thinking about how to represent this. I knew I wanted
the reimbursed portion to be a real account, under Assets:Receivable,
because that's real value. I also needed to keep track of how much I'd
accumulated in receipts, but decided to use a virtual account for that,
because it isn't real value moving from one account to another, it's
simply a catalyst for movement between two other accounts. So now I've
got:

~ Monthly
; Payee: Tax Dodgers, Inc
Assets:Merchants:5231   7000 RMB ; regular salary part
Assets:Receivable   3000 RMB ; receipts
Income:Salary

Then I go to dinner and get a receipt:

04/13 * 华堂
Expenses:Food:Restaurant  143.10 RMB
(Assets:Receipts) 143.10 RMB
Assets:Cash

After a few weeks I have 1920.90 RMB in my virtual receipt account, and
I hand them in (but they haven't paid me the reimbursement yet):

05/04 ! Tax Dodgers, Inc
* (Assets:Receipts)  = 0 RMB
Assets:Merchants:52311920.90 RMB
Assets:Receivable

When the reimbursement comes through I clear the whole transaction, and
add an aux date.

There are several handy ways to report on this, but in practice all I
need is:

ledger reg --limit 'payee=~/dodgers/' assets:receivable

This is nice because the last line comes out bold on the terminal if the
reimbursement is still pending. At a glance I can see how much I gave
them in receipts, how much they still owe me, and how much in receipts I
still need to gather to get my full salary.

The ugly bits are the duplicate numbers when I collect a receipt for an
expenditure (though I'm working on solving that with automated
transactions), and the fact that I end up manually balancing a virtual
account against a real account. That feels weird, but does no real harm.

Anyway, that's my story!

Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: query metadata in automated transactions?

2014-05-17 Thread Eric Abrahamsen
John Wiegley jo...@newartisans.com writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 Is it possible to see transaction metadata when doing matching for automated
 transactions?

 Yes, if you start the automated transaction directive with = expr , then you
 can use any value expression, which includes tag('NAME'), whose value is
 whatever the metadata tag as set to.

Okay, I'm nearly there, but not quite. My test data looks like this:

05/15 * Taxi
; Receipt: 40 RMB
Expenses:Transportation   23 RMB
Assets:Cash

05/15 * BHG
; Receipt:
Expenses:Food:Supermarket154 RMB
Assets:Bank

I've got the simple case (just making an automated transaction when the
Receipt tag appears) working, with this:

= tag(Receipt) and /^expenses:(transportation|food|books)/
(Assets:Receipts)   1

My best guess for the complicated case (using the value of the Receipt
tag, when present, instead of the posting value) is this:

= expr recpt = tag(Receipt) and expr account =~ 
/^expenses:(transportation|food|books)/
(Assets:Receipts)((recpt  0) ? recpt : 1)

But running that gives me this error:

While parsing value expression:
  recpt = tag(Receipt

While parsing automated transaction:
 = expr recpt = tag(Receipt) and expr account =~ 
 /^expenses:(transportation|food|books)/
Error: Invalid token 'end of input' (wanted ')')

I'm not sure if this is a bug, or if I'm just writing it wrong. Should
it work as I've got it?

Thanks again,
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: query metadata in automated transactions?

2014-05-16 Thread Eric Abrahamsen
John Wiegley jo...@newartisans.com writes:

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 Is it possible to see transaction metadata when doing matching for automated
 transactions?

 Yes, if you start the automated transaction directive with = expr , then you
 can use any value expression, which includes tag('NAME'), whose value is
 whatever the metadata tag as set to.

 John

Very cool, thanks for the explanation!

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


query metadata in automated transactions?

2014-05-15 Thread Eric Abrahamsen
Is it possible to see transaction metadata when doing matching for
automated transactions? For some arbitrary transactions, I want to be
able to say I got a receipt for this transaction, and then add a
virtual posting for the amount of the transaction, into Assets:Receipts.
Ideally, I'd also be able to give an amount for the metadata, and if
it's present use that instead of the transaction amount. So if I had
this transaction:

05/15 Shoe Store
  ; Receipt
  Expenses:Personal:Clothes  $50
  Assets:Cash

I would get an automatic:

  (Assets:Receipts)  $50

But if I had:

05/15 Fancy Restaurant
  ; Receipt: $240
  Expenses:Food:Restaurant  $82
  Assets:Cash

I would get the automatic:

  (Assets:Receipts)  $240


Is that possible? The manual doesn't mention anything like this...

Thanks!

Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: can't use this month or this week as period?

2014-05-14 Thread Eric Abrahamsen
Martin Michlmayr t...@cyrius.com writes:

 * Eric Abrahamsen e...@ericabrahamsen.net [2014-05-12 11:39]:
 I think I figured it out. I used a test file with a single transaction
 and added information from there, and it looks like giving a top-of-file
 year specification as Y2014 rather than year 2014 messes up the date
 period parsing.

 Someone reported the same issue on IRC yesterday and I just filed a
 bug report today (before reading your email):
 http://bugs.ledger-cli.org/show_bug.cgi?id=1038

 I'll add some of your observations to the bug report.

 In any case, I can confirm this issue.

Cool, thanks!

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


can't use this month or this week as period?

2014-05-11 Thread Eric Abrahamsen
I hope I'm missing something here -- using this year as a period
argument to the command line works great, but the same thing gives an
empty output for this month or this week. Specifying the month
works:

[.ledger] $ ledger bal -p may cats
   30.00 RMB  Expenses:Cats:Food
[.ledger] $ ledger bal -p this month cats
[.ledger] $

I can't get any other fuzzy date specification to work, with the
exception of this year: things like yesterday, this week, etc all
return no response. This despite the fact that running them with the
ledger period command shows the same output as running a specific
date.

I'm using ledger on archlinux, with the ledger-git package from the AUR.
Looks like that's 3.0.2-20140417

Thanks!
Eric

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: can't use this month or this week as period?

2014-05-11 Thread Eric Abrahamsen
Craig Earls ender...@gmail.com writes:

 this month and last month both work for me with latest build.

I think I figured it out. I used a test file with a single transaction
and added information from there, and it looks like giving a top-of-file
year specification as Y2014 rather than year 2014 messes up the date
period parsing.

This file reported today correctly:

---
year 2014

05/12 * 大茶叶   ; beef bones from the butcher I'm never going to again
Expenses:Food:Market   26.00 RMB
Assets:Cash
---

This one gives no transactions for today, but does for May 12:

--
Y2014

05/12 * 大茶叶   ; beef bones from the butcher I'm never going to again
Expenses:Food:Market   26.00 RMB
Assets:Cash
--

Not a disaster, as it looks like year 2014 is the recommended new
format. Y2014 is still mentioned in the manual -- maybe it should just
be dispensed with?

Thanks,
Eric

 On Sun, May 11, 2014 at 7:05 PM, Eric Abrahamsen
 e...@ericabrahamsen.net wrote:
 I hope I'm missing something here -- using this year as a period
 argument to the command line works great, but the same thing gives an
 empty output for this month or this week. Specifying the month
 works:

 [.ledger] $ ledger bal -p may cats
30.00 RMB  Expenses:Cats:Food
 [.ledger] $ ledger bal -p this month cats
 [.ledger] $

 I can't get any other fuzzy date specification to work, with the
 exception of this year: things like yesterday, this week, etc all
 return no response. This despite the fact that running them with the
 ledger period command shows the same output as running a specific
 date.

 I'm using ledger on archlinux, with the ledger-git package from the AUR.
 Looks like that's 3.0.2-20140417

 Thanks!
 Eric

 --

 ---
 You received this message because you are subscribed to the Google Groups 
 Ledger group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to
 ledger-cli+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



 -- 
 Craig, Corona De Tucson, AZ
 enderw88.wordpress.com

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to start emacs-ledger

2013-06-10 Thread Eric Abrahamsen
Craig Earls ender...@gmail.com writes:

 The first thing to do is to download version 3 of ledger. Ledger mode
 doesn't support 2.6

I found the elisp file naming situation a little weird -- I assume
ldg-new.el is going to get named ledger.el at some point? As it is,
several invocations seem necessary to get the mode loaded:

(add-to-list 'load-path /path/to/ledger/lisp)
(load-library ldg-new)
(require 'ledger)

Is this right?

(The new ledger-mode is *much* nicer than the old on, BTW)

E

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: How to start emacs-ledger

2013-06-10 Thread Eric Abrahamsen
Craig Earls ender...@gmail.com writes:

 renaming is a good question.  There are some still using ledger.el.

 Setting it up is covered in the ledger-mode.pdf available in the
 distribution (may have to make it from ledger-mode.text

 this is what is in my emacs initializatio file:

 (add-to-list 'load-path (expand-file-name ~/source/ledger-devel/lisp/))
 (load ldg-new)

Thanks! That's simpler.

 my ledger file has
 ; -*- ledger -*-

 this at the beginning of each file.

 On Mon, Jun 10, 2013 at 6:01 PM, Eric Abrahamsen
 e...@ericabrahamsen.net wrote:
 Craig Earls ender...@gmail.com writes:

 The first thing to do is to download version 3 of ledger. Ledger mode
 doesn't support 2.6

 I found the elisp file naming situation a little weird -- I assume
 ldg-new.el is going to get named ledger.el at some point? As it is,
 several invocations seem necessary to get the mode loaded:

 (add-to-list 'load-path /path/to/ledger/lisp)
 (load-library ldg-new)
 (require 'ledger)

 Is this right?

 (The new ledger-mode is *much* nicer than the old on, BTW)

 E

 --

 ---
 You received this message because you are subscribed to the Google Groups 
 Ledger group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to ledger-cli+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.





 -- 
 Craig, Corona De Tucson, AZ
 enderw88.wordpress.com

-- 

--- 
You received this message because you are subscribed to the Google Groups 
Ledger group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Print drops information (was: RESTful web service API to Ledger)

2012-10-21 Thread Eric
On Sat, 20 Oct 2012 08:51:12 -0700, John Wiegley jwieg...@gmail.com wrote:
...
 You can manipulate the data structures in Python, but you'd have to write the
 whole file back out with a print.  However, this drops information.  At the
 moment this is no way to perform an information-preserving transformation,
 since that has never been a feature of Ledger.

I am slightly stunned as I have always seen print as a way to, for
example, re-order a file. In fact, from the 2.6 manual:

   The `print' command prints out ledger entries in a textual format that
   can be parsed by Ledger.  They will be properly formatted, and output
   in the most economic form possible.  The print command also takes a
   list of optional regexps, which will cause only those transactions
   which match in some way to be printed.

   The `print' command can be a handy way to clean up a ledger file
   whose formatting has gotten out of hand.

So when did it start dropping information and why? What information does
it drop?

Eric
-- 
ms fnd in a lbry


Re: Print drops information (was: RESTful web service API to Ledger)

2012-10-21 Thread Eric
On Sun, 21 Oct 2012 13:42:18 -0700, Craig Earls ender...@gmail.com wrote:
 On Sun, Oct 21, 2012 at 5:09 AM, Eric e...@deptj.eu wrote:

 So when did it start dropping information and why? What information does
 it drop?

 Print has never preserved comments that appear outside of transactions.
  Nor does it preserve file level commands

Reasonable, and more or less what I expected someone to say. Also only
implied by the 2.6 doc, not actually stated.

Thanx for clearing that up.

Eric
-- 
ms fnd in a lbry


Re: best way to slurp bank records?

2012-10-02 Thread Eric Abrahamsen
On Tue, Oct 02 2012, Russell Adams wrote:

  I was too using a personal perl script, doing the mapping from a table. But
  I tried the 'i' of icsv2ledger, and felt in love with this 'i'. On 
  contrary,
  rubycsv and CSV2ledger does not (yet?) implement this 'interactiveness'.
  Also CSV2ledger is not unicode compliant, and I am not living in an ASCII
  world :-).

 It was the interactiveness that was the key feature for me as well.  I
 came from using MS Money, and so was used to it automatically
 suggesting payees and accounts from the string supplied by the bank,
 so I wanted something similar when I processed my download from the
 bank.

 Interactive sounds like a nice feature! I hadn't tried that.

 Normally I import hundreds of records... So my focus isn't on one at a
 time data entry, I want bulk and standardized records.

 I'm keen on John's new emacs mode that's letting me query my files for
 items to clear / update (ie: my queue in my workflow). I can now see
 one line per transaction, and hit enter on them to jump to the right
 file.

I realized, with no small embarrassment, that I don't really need an
external tool, since I use emacs for maintaining my ledger files, and
for everything else. In the course of writing some elisp functions to
consume bank records I noticed the new version of ledger-mode, and am
considering using it -- do you have any pointers or things to watch out
for? I noticed strings in there that still point to directories on
John's computer :)

E



Re: best way to slurp bank records?

2012-09-26 Thread Eric Abrahamsen
On Tue, Sep 25 2012, Peter Ross wrote:

 On 25 September 2012 08:19, thierry wrote:
 icsv2ledger, from Quentin Stafford-Fraser
 https://github.com/quentinsf/icsv2ledger
 - code does not look to be unicode compliant
 - can not rename payee

 You can rename the payee now.

 It also has the advantage that it remembers the renaming of payee (and
 account), so that if you have the exact same payee in the future it
 automatically suggests your renaming.

 It also has the advantage that it does tab completion on account names
 and payees, so that you can type just a few letters for the payee and
 press tab to get complete payee name.

 I personally use this tool (and contributed the rename payee code) and
 for me it works how I want.

Thanks for all the responses! Given that I've really only got the one
format to handle, and that I can see what icsv2ledger is doing in terms
of writing ledger entries from Python, I'll probably just skip the
intermediary CSV step and go straight to ledger.

Thanks again,

Eric



best way to slurp bank records?

2012-09-23 Thread Eric Abrahamsen
I've got some text files from my Chinese banks formatted according to
their own system. I'm planning on just using Python to slurp the file
in, but I'll need to write it out to ledger format. What's the best way
of doing that? I didn't see anything in the /python or /contrib folders
that look like ledger writers. Should I just use a string template?

Given that I'm conversant in python and bash, and not likely to be
learning any C/C++ anytime soon (though I can copy-and-paste with the
best of them), what's my best option for writing a ledger file from
python/bash data?

Thanks!
Eric



escape @ in ledger3.texi

2012-08-07 Thread Eric Abrahamsen
Unless I've got something wrong here, there's an unescaped @ symbol in
the ledger3.texi file that prevents the creation of the info file. It's
line 1338:

ledger --code-as-payee -P reg ^Expenses @School

@School should be escaped with an additional @.

Thanks!
Eric



Re: org mode

2011-10-28 Thread Eric S Fraga
Craig Earls ender...@gmail.com writes:

 Eric, thank you very much.  Would you mind if I used the explanation below
 and portions of your tutorial in the official documentation?

by all means!

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.0.90.1 + No Gnus v0.18



Re: dependencies on Ubuntu Oneiric

2011-10-19 Thread Eric Abrahamsen
On Thu, Oct 20 2011, John Wiegley wrote:



 acprep: INFO: Found a Boost library: /usr/lib/libboost_regex.so.1.46.1

 But right after that, using the ledger executable in the source folder
 (cloned from git) still gives me the above error.

 Is there some sort of cleaning or resetting process I can do?

 Can you run ldd ledger?  And check the modification timestamp on that Ledger
 binary?

Okay, I wasn't building a new ledger at all -- the binary was from June.
I have no idea what went wrong there: I noticed many of the
configure-related files in the build directory were owned by root, so
perhaps that was hanging things up. acprep update (even with the
--debug option) wasn't producing any particular errors, and it wasn't
obvious that a new binary actually wasn't being built.

Anyway I trashed the directory and re-cloned from git, and all is
working well now. Sorry for the noise.

Eric



dependencies on Ubuntu Oneiric

2011-10-18 Thread Eric Abrahamsen
I recently upgraded to Ubuntu 11.10 (Oneiric), and am getting unmet
dependency problems I'm not sure how to resolve:

--8---cut here---start-8---
./acprep dependencies
acprep: INFO: Invoking primary phase: dependencies
acprep: INFO: Executing phase: dependencies
acprep: INFO: Installing Ledger's build dependencies ...
acprep: INFO: Looks like you are using APT on Ubuntu Hardy
acprep: INFO: Executing: sudo apt-get install build-essential libtool autoconf 
automake autopoint zlib1g-dev libbz2-dev python-dev cvs gettext libgmp3-dev 
libmpfr-dev libedit-dev texinfo lcov sloccount bjam libboost-dev 
libboost-python-dev libboost-regex-dev libboost-date-time-dev 
libboost-filesystem-dev libboost-iostreams-dev
Reading package lists... Done
Building dependency tree   
Reading state information... Done
Package bjam is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  libboost1.46-dev

E: Package 'bjam' has no installation candidate
acprep: ERROR: Execution failed: sudo apt-get install build-essential libtool 
autoconf automake autopoint zlib1g-dev libbz2-dev python-dev cvs gettext 
libgmp3-dev libmpfr-dev libedit-dev texinfo lcov sloccount bjam libboost-dev 
libboost-python-dev libboost-regex-dev libboost-date-time-dev 
libboost-filesystem-dev libboost-iostreams-dev
--8---cut here---end---8---

(Note that acprep seems to think I'm still using Hardy.)

I've got libboost1.46-dev installed, and looking at it with apt-get it
says it both conflicts with and replaces bjam; the description says it
provides the auxiliary tools bjam (and others).

Running ./acprep update, it complains that it can't find the boost
libraries, though among the attempted directories is:

acprep: INFO: Looking for Boost in /usr/lib...

That's where the boost libraries are, but it can't seem to find them.
The lib files are:

libboost_iostreams.so.1.46.1
libboost_serialization.so.1.46.1
libboost_wserialization.so.1.46.1

It's possible to run make and make install, but invoking ledger gets me:

ledger: error while loading shared libraries:
libboost_iostreams.so.1.42.0: cannot open shared object file: No such file or 
directory

I've tried running acprep with --debug, and with --boost-home, but it
doesn't tell me anything more than that it can't find the libraries.
Presumably it's still looking for the older version of the libs for some
reason, can I tell it to use 1.46.1 somehow?

Thanks!
Eric



Re: dependencies on Ubuntu Oneiric

2011-10-18 Thread Eric Abrahamsen
On Wed, Oct 19 2011, thierry wrote:

 I installed Ubuntu Oneiric this weekend. I just had to

 sudo aptitude install git-core autoconf libtool gettext libmpfr-dev
 libgmp3-dev  libboost-date-time-dev libboost-filesystem-dev libboost-
 regex-dev libboost-python-dev  libboost-iostreams-dev texinfo zlib1g-
 dev libbz2-dev libedit-dev libboost-test-dev
 git clone git://github.com/jwiegley/ledger.git
 cd ledger
 ./acprep opt update

Thanks for this, I was indeed missing some of those libraries, not sure
why.

However after running ./acprep opt update (no errors this time), I still
get the error:

libboost_iostreams.so.1.42.0: cannot open shared object file: No such file or 
directory

Even using the ledger executable in the source directory, before running
make install. 

Also, there is no package called bjam…

Thanks again,
Eric


 and it worked!

 Thierry

 PS : just remove bjam


 On 18 oct, 08:48, Eric Abrahamsen e...@ericabrahamsen.net wrote:
 I recently upgraded to Ubuntu 11.10 (Oneiric), and am getting unmet
 dependency problems I'm not sure how to resolve:

 --8---cut here---start-8---
 ./acprep dependencies
 acprep: INFO: Invoking primary phase: dependencies
 acprep: INFO: Executing phase: dependencies
 acprep: INFO: Installing Ledger's build dependencies ...
 acprep: INFO: Looks like you are using APT on Ubuntu Hardy
 acprep: INFO: Executing: sudo apt-get install build-essential
 libtool autoconf automake autopoint zlib1g-dev libbz2-dev python-dev
 cvs gettext libgmp3-dev libmpfr-dev libedit-dev texinfo lcov
 sloccount bjam libboost-dev libboost-python-dev libboost-regex-dev
 libboost-date-time-dev libboost-filesystem-dev
 libboost-iostreams-dev
 Reading package lists... Done
 Building dependency tree      
 Reading state information... Done
 Package bjam is not available, but is referred to by another package.
 This may mean that the package is missing, has been obsoleted, or
 is only available from another source
 However the following packages replace it:
   libboost1.46-dev

 E: Package 'bjam' has no installation candidate
 acprep: ERROR: Execution failed: sudo apt-get install
 build-essential libtool autoconf automake autopoint zlib1g-dev
 libbz2-dev python-dev cvs gettext libgmp3-dev libmpfr-dev
 libedit-dev texinfo lcov sloccount bjam libboost-dev
 libboost-python-dev libboost-regex-dev libboost-date-time-dev
 libboost-filesystem-dev libboost-iostreams-dev
 --8---cut here---end---8---

 (Note that acprep seems to think I'm still using Hardy.)

 I've got libboost1.46-dev installed, and looking at it with apt-get it
 says it both conflicts with and replaces bjam; the description says it
 provides the auxiliary tools bjam (and others).

 Running ./acprep update, it complains that it can't find the boost
 libraries, though among the attempted directories is:

 acprep: INFO: Looking for Boost in /usr/lib...

 That's where the boost libraries are, but it can't seem to find them.
 The lib files are:

 libboost_iostreams.so.1.46.1
 libboost_serialization.so.1.46.1
 libboost_wserialization.so.1.46.1

 It's possible to run make and make install, but invoking ledger gets me:

 ledger: error while loading shared libraries:
 libboost_iostreams.so.1.42.0: cannot open shared object file: No such file 
 or directory

 I've tried running acprep with --debug, and with --boost-home, but it
 doesn't tell me anything more than that it can't find the libraries.
 Presumably it's still looking for the older version of the libs for some
 reason, can I tell it to use 1.46.1 somehow?

 Thanks!
 Eric



Re: dependencies on Ubuntu Oneiric

2011-10-18 Thread Eric Abrahamsen
On Wed, Oct 19 2011, John Wiegley wrote:

 Eric Abrahamsen eric-5ibekglo59aik5deombc7kxock334...@public.gmane.org 
 writes:

 libboost_iostreams.so.1.42.0: cannot open shared object file: No such file
 or directory

 Why is Oneiric using 1.42, instead of 1.46 or 1.47?

It isn't! 1.46 is installed, it appears to be ledger that's looking for
1.42 and not finding it. Probably I'm just missing a step in the build
process. Now, ./acprep update finds the right libraries:

acprep: INFO: Found a Boost library: /usr/lib/libboost_regex.so.1.46.1

But right after that, using the ledger executable in the source folder
(cloned from git) still gives me the above error.

Is there some sort of cleaning or resetting process I can do?

Thanks,
Eric


 Also, there is no package called bjam…

 You don't need it from 1.46 onward.

 John



ledger.el, highlighting of account names w/spaces

2011-04-18 Thread Eric Abrahamsen
I'm using the git ledger 3.0, and notice that account names with spaces
in them are not highlighted properly. I'm quite sure single spaces are
allowed in account names, and it troubles my little mind when they are
not highlighted properly. I suspect the following font-lock statement:

#+begin_src lisp
(defvar ledger-font-lock-keywords
  '((\\(   \\|  \\|^\\)\\(;.*\\) 2 font-lock-comment-face)
(^[0-9]+[-/.=][-/.=0-9]+\\s-+\\(([^)]+)\\s-+\\)?\\([^*].+?\\)\\(\\(
;\\|  ;\\|$\\)\\) 2 bold)
;;(^[0-9]+[-/.=][-/.=0-9]+\\s-+\\(([^)]+)\\s-+\\)?\\([*].+?\\)\\(\\(   
;\\|  ;\\|$\\)\\)
;; 2 font-lock-type-face)
(^\\s-+\\([*]\\s-*\\)?\\(\\([[(]\\)?[^*:
]+?:[^]);
]+?\\([])]\\)?\\)\\(\\|  \\|$\\)
 2 font-lock-keyword-face)
(^\\([~=].+\\) 1 font-lock-function-name-face)
(^\\([A-Za-z]+ .+\\) 1 font-lock-function-name-face))
  Expressions to highlight in Ledger mode.)
#+end_src

In particular, the font-lock-keyword-face part. After staring at the
regexp, however, I can't tell where the whitespace counter should be
inserted. Can someone fix it?

Sorry for the petty confusion, but it does make a difference…

Thank



Re: a little hand-holding…

2011-04-17 Thread Eric Abrahamsen
On Thu, Apr 07 2011, Darald Bantel wrote:

[...]

 Some ideas - - Write it as a deferred spending account 2 levels deep.

 1. expense - salaries etc
    liability - - insufficient funds account (original payment date
 (what you wanted to do!))

 2. expense - - insufficient funds account
    liability - - personal account (with date (charge interest or
 whatever you want and bill fully)

 3. expense - personal account
     liability - salaries

Finally understood what you were telling me here… This works perfectly!
Thank you.

E



a little hand-holding…

2011-04-06 Thread Eric Abrahamsen
I'm getting used to the more complex usages of Ledger, and have a little
scenario that I hope someone will help walk me through. I'm running
Ledger 3.

I have a small company with a few employees, we've just gotten started.
I'm a terrible boss -- I was unable to pay salaries for the first couple
of months. To make it up I paid part of the salaries out of my own
personal account. Later our revenue stream kicked in, and I paid myself
back for the salaries.

I'd like records that show:

1. The dates that the employees should have been paid.
2. The dates that I actually paid them out of my account (say at the end
   of month two)
3. The date that money came into the company bank account, and I
   transferred it to my own account (say in the middle of month three),
   ideally this line would also somehow indicate why I was paying myself.

So something like:

2011/01/01 Should have paid Bob and Alice
  Expenses:Salaries:Bob  5000 RMB
  Expenses:Salaries:Alice  5000 RMB
  Assets:Accounts:Eric's Personal Account   ; or company account with some sort
  of note? or debt?

2011/02/01 Should have paid Bob and Alice
  Expenses:Salaries:Bob  5000 RMB
  Expenses:Salaries:Alice  5000 RMB
  ; same question here

2011/02/20 Actually paid Bob and Alice
  Liabilities:Debt  ; I'm just making this up
  ??

2011/03/05 Made money back
  Assets:Bank:Company Account 2 HKD
  Income:Projects:Project X

2011/03/06 Paid myself back
  Assets:Bank:Company Account 2 HKD
  Debt?  2 RMB

There's also a HKD -- RMB conversion, just to make things more fun.

So just working out this much I'm thinking this will have something to
do with liabilities, but I would very much appreciate it if someone
could show me how this sort of thing should be done!

Thanks,
Eric
  



Re: a little hand-holding…

2011-04-06 Thread Eric Abrahamsen
On Wed, Apr 06 2011, Michael Norrish wrote:

 On 6/04/11 6:24 PM, Eric Abrahamsen wrote:
 I'm getting used to the more complex usages of Ledger, and have a little
 scenario that I hope someone will help walk me through. I'm running
 Ledger 3.

 I have a small company with a few employees, we've just gotten started.
 I'm a terrible boss -- I was unable to pay salaries for the first couple
 of months. To make it up I paid part of the salaries out of my own
 personal account. Later our revenue stream kicked in, and I paid myself
 back for the salaries.

[...]

 How about

 2011/01/01:
   Expenses:Salaries:Bob   5000 RMB
   Liabilities:Deferred Salaries

 2011/02/01:
   Expenses:Salaries:Bob   5000 RMB
   Liabilities:Deferred Salaries

 2011/02/20:
   Assets:Bank Account   1 RMB
   Liabilities:Owe Founder

 2011/02/20:
   Liabilities:Deferred Salaries  2 RMB
   Assets:Bank Account

 2011/03/05:
   Assets:Bank Account  2 HKD
   Income:Project1

 2011/03/06:
   Liabilities:Owe Founder  1 RMB
   Assets:Bank Account -500 HKD

Thanks for the quick and helpful answer! I like the usage of
Liabilities, that definitely seems right. I guess I was originally
wondering if there was something I should be doing with effective dates,
because doesn't the above make it look like money is actually changing
places on January and February first? Or am I misreading this?

E



Re: a little hand-holding…

2011-04-06 Thread Eric Abrahamsen
On Wed, Apr 06 2011, Peter Ross wrote:

 On Wed, Apr 6, 2011 at 10:20 PM, Eric Abrahamsen
 e...@ericabrahamsen.net wrote:
 On Wed, Apr 06 2011, Michael Norrish wrote:

 On 6/04/11 6:24 PM, Eric Abrahamsen wrote:
 I'm getting used to the more complex usages of Ledger, and have a little
 scenario that I hope someone will help walk me through. I'm running
 Ledger 3.

 I have a small company with a few employees, we've just gotten started.
 I'm a terrible boss -- I was unable to pay salaries for the first couple
 of months. To make it up I paid part of the salaries out of my own
 personal account. Later our revenue stream kicked in, and I paid myself
 back for the salaries.

 [...]

 How about

 2011/01/01:
   Expenses:Salaries:Bob   5000 RMB
   Liabilities:Deferred Salaries

 2011/02/01:
   Expenses:Salaries:Bob   5000 RMB
   Liabilities:Deferred Salaries

 2011/02/20:
   Assets:Bank Account   1 RMB
   Liabilities:Owe Founder

 2011/02/20:
   Liabilities:Deferred Salaries  2 RMB
   Assets:Bank Account

 2011/03/05:
   Assets:Bank Account  2 HKD
   Income:Project1

 2011/03/06:
   Liabilities:Owe Founder  1 RMB
   Assets:Bank Account     -500 HKD

 Thanks for the quick and helpful answer! I like the usage of
 Liabilities, that definitely seems right. I guess I was originally
 wondering if there was something I should be doing with effective dates,
 because doesn't the above make it look like money is actually changing
 places on January and February first? Or am I misreading this?

 If I understand correctly

 Jan 1 you paid your employees from your personal bank account.

No, that was part of the problem -- no one got paid anything until
February 20 (they are patient people), at which point I gave them two
months' salary. I did want a solution that somehow both indicated when
they were *supposed* to get paid, and then when they *actually* got
paid. If the repayment to myself could be somehow tied to the actual
payments to them, that would be nice, but I don't see how that would
happen.

So I guess my second question (the first was answered by using a
Liability) is how to indicate this date disparity between supposed to
and did…


 You represent this by adding

 2011/01/01:
Expenses:Salaries:Bob   5000 RMB
Liabilities:Deferred Salaries

 because on Jan 1 Bob was paid 5000 RMB and the money for that payment
 came from a loan which has to be repaid.

 Then at some future date you have money in your company account, so
 you can discharge that liability and you record that in your ledger
 so.

 2011/03/01:
Assets:Bank   -5000 RMB
Liabilities:Deferred Salaries

 here you pay yourself back the 5000 RMB you owe.

 If you are doing things in multiple currencies, I suggest reading

 https://github.com/jwiegley/ledger/wiki/Multiple-currencies

 where after my accountant reported that my profit and loss didn't
 match the change in my balance sheet, I had to learn how to properly
 account for currency fluctuations.

 The key point is that you have an income stream which is the
 profit/loss you make from currency fluctuations from when you book an
 expense to when you actually pay the expense.

This will come in very handy, thank you.



Re: Handling tithe and taxes

2010-07-29 Thread Eric Abrahamsen
On Wed, Jul 28 2010, Peter Ross wrote:

 On Thu, Jul 29, 2010 at 2:48 AM, spiffytech spiffyt...@gmail.com wrote:
 I'm unclear on how I should record tithe and taxes when I get paid.
 Neither are paid yet, so I don't want to put them in Expenses. This
 really applied to any sort of setting money aside scenario, but
 tithe and taxes are the boat I'm in right now.

 I've thought of a couple ways to handle this, but neither is
 satisfactory. Can anyone suggest a better solution? Am I missing
 something obvious (I'm new to both double-entry and rigorous personal
 accounting)? Or am I just being to picky about what my journal looks
 like?

 You are trying to do cash based accounting, I find it much easier to
 do accrual based accounting.

This is something I've been wondering about for a while, thanks for
explaining these different approaches so thoroughly! Now if you could
just do the same for college loan accounting...

E


 From 
 http://www.allbusiness.com/accounting-reporting/methods-standards-cash/1308-1.html

 Cash-based accounting recognizes income when money is received.
 Accrual-based accounting recognizes income when goods are shipped or
 services are rendered. Under the cash method, an expense is recognized
 when it's paid. Under the accrual method, an expense is recognized
 when the business is obligated to pay it.

 Thus for accrual you recognize the expense of tax and tithe the
 instant you receive your paycheck, but as you've yet to actually pay
 it you add it as a liability, giving you the following transaction
 (assuming 10% tax and 5% tithe)

 2010/01/31 Salary
 Assets:Bank  $1000
 Income:Paycheck -$1000
 Expenses:Tax  $100
 Liabilities:Tax  -$100
 Expenses:Tithe $50
 Liabilities:Tithe -$50

 Or as an automated transaction.

 = /^Income:Paycheck/
 Liabilities:Taxes0.1
 Expenses:Taxes  -0.1
 Liabilities:Tithe0.05
 Expenses:Tithe  -0.05


 2010/01/31 Salary
 Assets:Bank $1000
 Income:Paycheck

 Thus at any instant you can now determine how much tax you've actually
 paid in cash to date (expense minus liability), how much expense you
 would have to pay today (liability) and how much you've meant to have
 paid as of today (expense).

 So hopefully you can see the accrual system allows you to look at your
 position in any number of ways, while doing the cash based system is
 actually much more difficult.

 Hope that helps,
 Pete



Re: Question about actual vs effective dates

2010-07-07 Thread Eric
* Martin Michlmayr t...@cyrius.com 2010-07-07 18:58

 * Simon Michael si...@joyful.com [2010-07-07 08:31]:
 I thought of identifying them by which is earliest!

 I don't think that works either.  Consider cashing a check: your bank
 might show the transaction when you give them the check but it might
 take a few days for the check to clear.  I don't know if this is
 actually the case in the US but we had a similar case in Austria until
 recently: when you received a bank transacation, it would show up on
 your account as a transaction but it would take a few days for the
 money to actually be on your account (i.e. the booking date is earlier
 than the value date).  People found this really confusing and spent
 the money they didn't yet have, leading to overdraft charges, so
 recently they changed the rules - the transacation will only show up
 in your bank account when the money has fully cleared (i.e. booking
 date and value date are now the same).


But you might still put it in your own records (i.e. Ledger) when you know
about it, and then date it to match your bank statement when you see that
(paper or online).

My (British) Debit Card account shows transactions only after the details
reach the bank, but they have an effect as soon as they are authorised, so
that I am given different figures for balance and available funds. I do
not try to record this, but I can't work out which date should be labelled
effective if I did.

My French bank statement shows both Date Opération (The real date that a
debit or credit is made) and Date de Valeur (Date at which the bank
considers the debit or credit is valid i.e used for calculation of
interest and charges). It may or may not be obvious that the statement
entry for a charge made by the bank should show different dates for these!
I might myself consider that the transaction was made on yet a third date!

Clear as mud then :)

Eric



Re: Best practice for managing ledger data?

2010-06-29 Thread Eric Betts
I keep my ledger files in a directory that is backed up, although I've
been tempted to put them into git or Dropbox.  I have a file for each
month, plus one for my budget, my planned purchases (future
transactions) and one for expected income (future rebates, etc).  Each
month file has an !include of the previous, with the first month file !
including the budget/planned purchases/expected income.  I wrap it all
up with a symlink file to the current month, and a edit is using VIM.
I have also written some web based charts, one set using open flash
charts, the other using jquery and flot.  Anyone interested in seeing
a live copy can contact me in #ledger, and the source for both are at
github under my account: http://github.com/bettse/

~Eric

On Jun 22, 4:38 pm, Felipe Magno de Almeida
felipe.m.alme...@gmail.com wrote:
 On Tue, Jun 22, 2010 at 8:26 PM, Leandro Henrique Oliveira Fernandes

 leandro...@gmail.com wrote:

  I use emacs, unison (sync) and rsync.net. The last is very interest
  paid service.
  Unison does not do control version but it can save backup history that
  is enough for me. I am thinking in using (emacs + unison + rsync ) on
  maemo OS (smartphone N900). But I generate my ledger file by hand
  using ledger-mode in emacs. I am interest to know what other people
  are doing with those perl and python scripts.

 It would be nice if there were some HOWTO and php/python source-code
 for setting up a HTTP server(apache) for entering data on ledger file
 and getting reports.
 And it would be *really* cool if it were integrated with gnuplot for
 generating on-the-fly graphs.

 Regards,
 --
 Felipe Magno de Almeida


Re: choosing currency for display with -V option

2009-09-25 Thread eric



On Sep 24, 8:48 pm, John Wiegley jwieg...@gmail.com wrote:
 On Sep 24, 2009, at 8:29 AM, eric wrote:

  where x and y have been used to obfuscate a little...  My problem is
  the last line of output where the sum of the previous running total
  (1433.13) and the last entry (1010.90) does not add up to 2466.11
  (should be 2444.03).  I can try to extract and obfuscate the relevant
  entries in the ledger file if need be.

 This is another issue which has been remedied in the current source  
 code.  You see, -V reports the total market value _at each date_.  
 This means that everything won't add up without the addition of  
 special price change entries, which is what the current code will  
 now do.

 John

Ah ha.  Okay, I need to upgrade!  Thanks.


choosing currency for display with -V option

2009-09-21 Thread eric

Hello,

for one of my ledger files, I have entries in two different
currencies.  I also have a number of non-currency items (shares).
When I use the -V option to see the current value of the assets in
this ledger, using a specific prices database file, ledger outputs all
the entries in one of the two currencies, but not necessarily in the
one I want the output reported in!

Can somebody point me to the right place in the manual (or anywhere
else) that would tell me how to tell ledger to report in a specific
currency?  Or some way to tell it to not use a particular currency?

I am running ledger 2.6.2 on Debian testing/unstable.

Thanks,
eric

PS - I tried posting this via my newsreader but was told that I did
not have permission to post to this group.  Is this the normal
behaviour for google groups?