Re: Re-naming accounts..

2016-01-04 Thread Douglas Philips
On 1/4/16 2:15 PM, John Wiegley wrote:
>> Martin Blais  writes:
> 
>> Stay away from virtual postings, they break the accounting equation. You
>> never need to use them, period.
> 
> I disagree with this statement. I've used them to good effect in the past.
> There are times when you need a bit of flexibility to get exactly the kind of
> reports you want. It's not all about accounting, or honoring the accounting
> equation; it's about managing finances the way a Ledger user wants to. I think
> this pretty much sums up the core philosophical divide between beancount and
> Ledger.

So this is interesting timing, I was thinking of using virtual postings to 
track budget amounts.
Specifically, when I have a credit card expense, I have a posting such as:

2016/01/01 Fix the thing
Expenses:Thing $20.00
Liabilities:Credit Card:Pursuit   $-20.00


What I have been doing as an experiment is to add in something additional:

2016/01/01 Fix the thing
Expenses:Thing $20.00
Liabilities:Credit Card:Pursuit   $-20.00
Budget:Pursuit $20.00
Assests:Checking  $-20.00

So that way I can see what my checking balance will be when I pay the bill for 
the Pursuit card.
This way I can see the balance of the checking account afterwards. I can't see 
it before, which is annoying.
And, when I pay off the bill (directly from Checking), I have to go back and 
delete all those additional lines.
Ugh.
So, I was thinking why not use virtual postings?

Or is there a better way?

Thanks to John for such a cool tool, and Martin for having an alternative.

-=Doug

-- 

--- 
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: Re-naming accounts..

2016-01-04 Thread John Wiegley
> Martin Blais  writes:

> Stay away from virtual postings, they break the accounting equation. You
> never need to use them, period.

I disagree with this statement. I've used them to good effect in the past.
There are times when you need a bit of flexibility to get exactly the kind of
reports you want. It's not all about accounting, or honoring the accounting
equation; it's about managing finances the way a Ledger user wants to. I think
this pretty much sums up the core philosophical divide between beancount and
Ledger.

-- 
John Wiegley  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com  60E1 46C4 BD1A 7AC1 4BA2

-- 

--- 
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: Managing combined books for spouses

2016-01-04 Thread Stefano Zacchiroli
On Sun, Jan 03, 2016 at 10:33:32AM -0800, Martin Michlmayr wrote:
> This is something I need to solve as well and I haven't come up with a
> solution yet that I'm 100% happy with.  I've changed the title of the
> thread.

Thanks for this.

> What I came up with so far is this:
> 
>  - For joint accounts, just use a normal Assets: account, e.g.
>Assets:Savings:Bank
>  - For individual accounts (e.g. credit cards on a person's name) or
>accounts at the same bank due to historical reasons, add the name
>of the person to the account name, e.g. Assets:Savings:Bank Martin
>  - I don't think a general Assets:Martin: makes sense because that
>defeats th whole purpose of combining finances (it's no longer
>"yours" vs "theirs" when you're married).

I'm doing the same.  In my hierarchy the person is invariably the leaf
in any given branch of the hierarchy --- although to be fair I think
that just happened naturally, rather than as the result of a deliberate
hierarchy design choice.

>  - However, there are some things that belong to a specific person.
>Specifically, I track frequent flyer miles and other reward points
>and for that I created Assets:Rewards:Martin since a) all those
>rewards accounts are for a specific person and b) usually both
>people have the same accounts.
> 
> I don't think this scheme is ideal since it's inconsistent
> (Assets:Rewards:Martin vs Assets:Savings:Bank Martin instead of
> Assets:Savings:Martin:Bank) but unfortunately I cannot think of a
> cleaner solution.

I understand the problem, but I don't think it is specific to the
"spouse account" scenario. It is rather a consequence of the more
general fact that forcing accounts into being a hierarchy is an
artifice. With the exception of the tier 1 accounts that come from
double entry theory (assets/liabilities/equities/etc.), accounts are not
necessarily hierarchical. Rather, they are points in a multi-dimensional
vectorial space. Out of it you can extract several possible hierarchies,
neither of which is satisfactory for all use cases.

IIRC Martin Blais had a document discussing this issue in more details,
reaching out to the fact that tags too should sometime be considered
part of the account "hierarchy" and sometime not.

My bottom line here is that you will never be able to find a single
hierarchy that is completely satisfying. So as long as the tools we use
force us to choose a hierarchy, you need to cope with the resulting
frustration the best you can. In this case you should probably just cope
with querying on the ":Martin" substring as you suggested.

> Furthermore, while in the US you can do joint tax returns, this is not
> how it works in many other countries.  So I still have to know income
> for each person.  I guess I could look for 'Income:' on accounts with
> 'Martin' in the name.

As a work-around for this, I currently rely on the fact that me and my
spouse work for different employer, so I visually distinguish on
Income:Employer1 vs Income:Employer2. But that of course is unsatisfying
as a general solution because spouses can work for the same employer, or
have part of their incomes coming from the same entity in contexts that
do not match the employer/employee scenario.

But I also add "Payer:" and "X-Payee:" [1] tags to all Income:*
postings, so that I can do stuff like:

  ledger balance --group-by "tag('x-payee')"
  ledger balance --group-by "tag('payer')"

and have incomes grouped by person or paying entity. BTW, if people here
have better suggestions for the naming of the "payer" tag, I'd really
appreciate them.

[1]: the heading "X-" is to avoid the special semantics that ledger
 associates to the "Payee" tag, which I find really annoying

> But maybe a cleaner solution would be account meta tags [1] which
> would allow me to define an owner.

That would be very useful in general, and yes also provide another range
of workarounds (but not a general solution IMO) for the single hierarchy
imposition.

> Also, I think my idea of re-write rules / ledger views [2] would come
> in really useful here to define a view that separates stuff out by
> person again.  Unfortunately this is not possible with ledger at the
> moment (I guess a beancount plug-in would be possible).

I had forget about this one, but I'll look it up again.

Cheers.
-- 
Stefano Zacchiroli  . . . . . . .  z...@upsilon.cc . . . . o . . . o . o
Maître de conférences . . . . . http://upsilon.cc/zack . . . o . . . o o
Former Debian Project Leader . . . . . @zacchiro . . . . o o o . . . o .
« the first rule of tautology club is the first rule of tautology club »

-- 

--- 
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: Re-naming accounts..

2016-01-04 Thread Ben Finney
Mark Scannell  writes:

> The challenge is that I have my partner's books, my books, and then
> our joint books. As our finances are gradually being treated as one,
> I'd like to be able to have Assets -> mine, Assets -> hers, Assets ->
> ours, Expenses -> mine|hers|ours, etc.

Pete Keen described a way to use Ledger's “virtual transactions” and
“automated transactions” to maintain a split such as you describe, while
allowing the split to be conflated when needing to deal with the “real”
transactions.

Some people decide to do this by dividing the bills up between
roommates. […] Other roommates decide to nominate one person to have
all of the bills in their name and post the amounts due every month
for everyone to see. This is what my girlfriend and have been doing
and it's been working great. All of the bills are in my name and I
give her a summary every month and she hands me a check. Easy peasy.

[…] Ledger has an extremely handy feature named automated
transactions. The basic idea is that you provide a template
transaction and a pattern to match, and ledger will insert the
filled-in template transaction every time the pattern matches.

[…] For various reasons I keep most of my money in [one real
account]. I have most of it allocated away into various "funds",
which are just fake buckets that only exist for me. […] I've
implemented these buckets using ledger's virtual transaction
feature.

[…] On their own, these two features are pretty useful. It's when
you combine them that the awesome power of ledger starts appearing.



-- 
 \   “In the long run nothing can withstand reason and experience, |
  `\and the contradiction which religion offers to both is all too |
_o__)palpable.” —Sigmund Freud |
Ben Finney

-- 

--- 
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: Re-naming accounts..

2016-01-04 Thread John Wiegley
> Douglas Philips  writes:

> What I have been doing as an experiment is to add in something additional:

> 2016/01/01 Fix the thing
> Expenses:Thing $20.00
> Liabilities:Credit Card:Pursuit   $-20.00
> (Budget:Pursuit)   $20.00

Now you can just do a balance query of Assets:Checking against Budget and see
what the net result will be.  Or use --real to strip away the budget, or just
don't query against Budget.

> Thanks to John for such a cool tool, and Martin for having an alternative.

You're most welcome!

-- 
John Wiegley  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com  60E1 46C4 BD1A 7AC1 4BA2

-- 

--- 
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: Re-naming accounts..

2016-01-04 Thread Jeffrey Brent McBeth
On Mon, Jan 04, 2016 at 02:04:38PM -0800, John Wiegley wrote:
> > Douglas Philips  writes:
> 
> > What I have been doing as an experiment is to add in something additional:
> 
> > 2016/01/01 Fix the thing
> > Expenses:Thing $20.00
> > Liabilities:Credit Card:Pursuit   $-20.00
> > (Budget:Pursuit)   $20.00
> 
> Now you can just do a balance query of Assets:Checking against Budget and see
> what the net result will be.  Or use --real to strip away the budget, or just
> don't query against Budget.

I'm really happy using the imperative (I forget the term) virtual accounts 
(surrounded by []), it maintains the accounting equation, I can easily query 
how much is really in my checking vs how much is unallocated to ther budget 
things, and I can square things up periodically if I choose.

Jeff

-- 
"The man who does not read good books has no advantage over 
 the man who cannot read them."
 -- Mark Twain

-- 

--- 
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: Re-naming accounts..

2016-01-04 Thread John Wiegley
> Douglas Philips  writes:

> I read through the manual (2.6.3, but the v3 manual is the same)... There is
> an example of using virtual accounts and automatic transactions to move
> money into a tithing liability account. Then real transactions are used to
> pay out of that virtual account? (section 5.22.9 in the v3 documentation
> pdf) That's where I get confused. If a report is run with --real then won't
> the balances be wrogn?

--real would just show a positive balance for that liability account, since
the goal without --real is to bring it to zero. No bug deal, the --real report
just looks like I've been spending money to a Liability for no reason.

> Then I want to say that there is just one actual payment from the checking
> to the liability that "absorbs" the budget account amount (or some part of
> it), all at once.

I'd have to see an example of this to completely clear on what you mean...

-- 
John Wiegley  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com  60E1 46C4 BD1A 7AC1 4BA2

-- 

--- 
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: Re-naming accounts..

2016-01-04 Thread Douglas Philips
On 1/4/16 6:27 PM, Jeffrey Brent McBeth wrote:
> On Mon, Jan 04, 2016 at 02:04:38PM -0800, John Wiegley wrote:
>>> Douglas Philips  writes:
>>
>>> What I have been doing as an experiment is to add in something additional:
>>
>>> 2016/01/01 Fix the thing
>>>  Expenses:Thing $20.00
>>>  Liabilities:Credit Card:Pursuit   $-20.00
>>>  (Budget:Pursuit)   $20.00
>>
>> Now you can just do a balance query of Assets:Checking against Budget and see
>> what the net result will be.  Or use --real to strip away the budget, or just
>> don't query against Budget.
> 
> I'm really happy using the imperative (I forget the term) virtual
> accounts (surrounded by []), it maintains the accounting equation, I
> can easily query how much is really in my checking vs how much is
> unallocated to ther budget things, and I can square things up
> periodically if I choose.

Ok, here's where I get confused about Virtual accts, parenthetical or 
squared-off)

I read through the manual (2.6.3, but the v3 manual is the same)...
There is an example of using virtual accounts and automatic transactions to 
move money into
a tithing liability account. Then real transactions are used to pay out of that 
virtual account?
(section 5.22.9 in the v3 documentation pdf)
That's where I get confused. If a report is run with --real then won't the 
balances be wrogn?


I want to move funds from checking to some kind of budget-y account, yet be 
able to see the
actual checking amounts and the "diminished by budget-y" amounts.
Ok, I think I can do that with virtual transactions as John showed above.

Then I want to say that there is just one actual payment from the checking to 
the liability that
"absorbs" the budget account amount (or some part of it), all at once. This is 
the one transaction
that the bank will see and that will be on the statement for reconciling 
purposes.
So how do I get the budget amount not to interfere with the payment amount when 
running register reports
with and without --real. (that is, I don't want to have to avoid --real or have 
to use it...)

Hmmm, hope that is slightly clearer than mud!

Thanks,
-=Doug


-- 

--- 
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: Re-naming accounts..

2016-01-04 Thread Martin Blais
Stay away from virtual postings, they break the accounting equation. You
never need to use them, period. They are a crutch that misleads many into
not figuring things out. Beancount doesn't even support them and I've doing
everything without so far without problems (though it has forced me to
learn bookkeeping).

I see at least two ways of accounting for shared expenses:


1. The simple way: You can simply create a Liabilities account. When you
book a shared expense, you book a portion of it to the liabilities account,
e.g.

2015-12-11 * "CON EDISON   ONLINE PMT"
  Assets:US:Checking  -46.51 USD
  Liabilities:AccountsPayable:Caroline  46.51/2
USD
  Expenses:Home:Electricity

You can then share the account on that liabilities account with your
partner. Cut-n-pasting from the web interface into gmail preserves the HTML
so that's one easy way share the balance details. However much your
roommate/partner owes is the balance of that account.

It's really convenient because you can use that account for a variety of
purposes. It effectively separates the "counting" and the "payment".
Counting occurs off the liabilities account; payments occur off the
balance, paid to the account.



2. You can create a separate book. I used to do this for joint expenses and
assets. I describe this here in much detail in the context of a trip but
you can do the same thing, continuously:

http://furius.ca/beancount/doc/sharing

This uses a plugin to split up shared expenses easily, but you can do it
manually too.


As for using virtual units to track only a portion of amounts where you
feel you need "virtual" units or "virtual postings", the technique you can
use that doesn't break the accounting equation is to use a mirror currency
instead. I've described this a number of times on this list. There's even a
plugin to automate that method in Beancount. Look for mirror accounting in
the archives.




http://furius.ca/beancount/doc/sharing

On Mon, Jan 4, 2016 at 7:02 AM, Ben Finney <
bignose+hates-s...@benfinney.id.au> wrote:

> Mark Scannell  writes:
>
> > The challenge is that I have my partner's books, my books, and then
> > our joint books. As our finances are gradually being treated as one,
> > I'd like to be able to have Assets -> mine, Assets -> hers, Assets ->
> > ours, Expenses -> mine|hers|ours, etc.
>
> Pete Keen described a way to use Ledger's “virtual transactions” and
> “automated transactions” to maintain a split such as you describe, while
> allowing the split to be conflated when needing to deal with the “real”
> transactions.
>
> Some people decide to do this by dividing the bills up between
> roommates. […] Other roommates decide to nominate one person to have
> all of the bills in their name and post the amounts due every month
> for everyone to see. This is what my girlfriend and have been doing
> and it's been working great. All of the bills are in my name and I
> give her a summary every month and she hands me a check. Easy peasy.
>
> […] Ledger has an extremely handy feature named automated
> transactions. The basic idea is that you provide a template
> transaction and a pattern to match, and ledger will insert the
> filled-in template transaction every time the pattern matches.
>
> […] For various reasons I keep most of my money in [one real
> account]. I have most of it allocated away into various "funds",
> which are just fake buckets that only exist for me. […] I've
> implemented these buckets using ledger's virtual transaction
> feature.
>
> […] On their own, these two features are pretty useful. It's when
> you combine them that the awesome power of ledger starts appearing.
>
>  https://www.petekeen.net/program-your-finances-automated-transactions>
>
> --
>  \   “In the long run nothing can withstand reason and experience, |
>   `\and the contradiction which religion offers to both is all too |
> _o__)palpable.” —Sigmund Freud |
> Ben Finney
>
> --
>
> ---
> 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: Managing combined books for spouses

2016-01-04 Thread Martin Blais
On Mon, Jan 4, 2016 at 4:51 AM, Stefano Zacchiroli  wrote:

> On Sun, Jan 03, 2016 at 10:33:32AM -0800, Martin Michlmayr wrote:
> >  - However, there are some things that belong to a specific person.
> >Specifically, I track frequent flyer miles and other reward points
> >and for that I created Assets:Rewards:Martin since a) all those
> >rewards accounts are for a specific person and b) usually both
> >people have the same accounts.
> >
> > I don't think this scheme is ideal since it's inconsistent
> > (Assets:Rewards:Martin vs Assets:Savings:Bank Martin instead of
> > Assets:Savings:Martin:Bank) but unfortunately I cannot think of a
> > cleaner solution.
>
> I understand the problem, but I don't think it is specific to the
> "spouse account" scenario. It is rather a consequence of the more
> general fact that forcing accounts into being a hierarchy is an
> artifice. With the exception of the tier 1 accounts that come from
> double entry theory (assets/liabilities/equities/etc.), accounts are not
> necessarily hierarchical. Rather, they are points in a multi-dimensional
> vectorial space. Out of it you can extract several possible hierarchies,
> neither of which is satisfactory for all use cases.
>

That's the right way to look at command-line accounting: the contents of a
ledger are really nothing more than a giant stupid table of posting rows.
The account is just one particular column in the row. Meta tags are just
more implicitly defined columns.

Querying implicitly joins the attributes of the transactions to the tables
of postings, so you can use them directly.

Journals are listings of subsets of rows. Balance sheets and income
statements are aggregations where the key is "account". That's it.

-- 

--- 
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: Managing combined books for spouses

2016-01-04 Thread o1bigtenor
Greetings

I deplore top posting but as I have little specific (albeit general I
do) to say to what is described I will post separately.

Before any comments, I am not an accountant nor an expert on ledger
nor any other record keeping type program!

Even before I got married a number of years ago I found it necessary
to track expenses and all the other goodies for the number of small
entities (not companies by formal incorporation but by activity) and
in the process came up with this solution that is not simple but does
do the job, and I think well.

I started from the GIFI codes (both the USA and Canada use them but
they do somewhat differently). They are a 4 digit code for use by
incorporated entities for reporting financial information to taxation
entities.

What I did was add further digits, like this - - .yy.yy.yy   use
it something like this (using and asset account followed by an expense
account to illustrate). (I'm not sure all 6 digits are necessary but
that was my design choice.)

Asset account
1002.60.40.01

1002 - - - designates Deposits in Canadian banks and institutions -
in Canadian currency
.60 - - -  designates a particular institution
.40 - - - - designates a personal savings account (same number is used
 with all the different institutions)
.01 - - - designates a particular savings account (some institutions
have multiple accounts available

Expense account
9763.10.01.02

9763 - - -  designates Machinery repairs (Agricultural equipment would
be a different number for a non-farm business)
.10 - - - - designates vehicles
.01 - - - - designates trucks
.02 - - - - designates a particular truck

So when I need information for the tax authorities I poll using the 4
digit codes and when I want informaiton for my management (costing and
expenses) I use whatever level needed to supply what I need.

I started my account list using what was provided by the taxation
authorities. From this I developed by document (list) which is now 33
pages in length.

I do my accounts using a textfile program called leafpad which makes
for easy copy and paste which I use often.

Dee


On Mon, Jan 4, 2016 at 3:51 AM, Stefano Zacchiroli  wrote:
> On Sun, Jan 03, 2016 at 10:33:32AM -0800, Martin Michlmayr wrote:
>> This is something I need to solve as well and I haven't come up with a
>> solution yet that I'm 100% happy with.  I've changed the title of the
>> thread.
>
> Thanks for this.
>
>> What I came up with so far is this:
>>
>>  - For joint accounts, just use a normal Assets: account, e.g.
>>Assets:Savings:Bank
>>  - For individual accounts (e.g. credit cards on a person's name) or
>>accounts at the same bank due to historical reasons, add the name
>>of the person to the account name, e.g. Assets:Savings:Bank Martin
>>  - I don't think a general Assets:Martin: makes sense because that
>>defeats th whole purpose of combining finances (it's no longer
>>"yours" vs "theirs" when you're married).
>
> I'm doing the same.  In my hierarchy the person is invariably the leaf
> in any given branch of the hierarchy --- although to be fair I think
> that just happened naturally, rather than as the result of a deliberate
> hierarchy design choice.
>
>>  - However, there are some things that belong to a specific person.
>>Specifically, I track frequent flyer miles and other reward points
>>and for that I created Assets:Rewards:Martin since a) all those
>>rewards accounts are for a specific person and b) usually both
>>people have the same accounts.
>>
>> I don't think this scheme is ideal since it's inconsistent
>> (Assets:Rewards:Martin vs Assets:Savings:Bank Martin instead of
>> Assets:Savings:Martin:Bank) but unfortunately I cannot think of a
>> cleaner solution.
>
> I understand the problem, but I don't think it is specific to the
> "spouse account" scenario. It is rather a consequence of the more
> general fact that forcing accounts into being a hierarchy is an
> artifice. With the exception of the tier 1 accounts that come from
> double entry theory (assets/liabilities/equities/etc.), accounts are not
> necessarily hierarchical. Rather, they are points in a multi-dimensional
> vectorial space. Out of it you can extract several possible hierarchies,
> neither of which is satisfactory for all use cases.
>
> IIRC Martin Blais had a document discussing this issue in more details,
> reaching out to the fact that tags too should sometime be considered
> part of the account "hierarchy" and sometime not.
>
> My bottom line here is that you will never be able to find a single
> hierarchy that is completely satisfying. So as long as the tools we use
> force us to choose a hierarchy, you need to cope with the resulting
> frustration the best you can. In this case you should probably just cope
> with querying on the ":Martin" substring as you suggested.
>
>> Furthermore, while in the US you can do joint tax returns, this is not
>> how it works in many other countries.  So I