actual date, effective date

423 views
Skip to first unread message

Simon Michael

unread,
Oct 24, 2008, 3:37:40 AM10/24/08
to ledge...@googlegroups.com
All ledger entries have a date, the actual date. An effective date may
be specified by adding =theeffectivedate. Also, individual
transactions may have their actual and/or effective date specified in
brackets in a comment: ; [actualdate] or [=effectivedate] or
[actualdate=effectivedate].

Like other ledger file features which aren't obvious at first, I
believe the goal is to allow you to model the real world more closely,
as eg when your bank takes a few days to process a transaction.

I don't yet have a good idea of why an individual transaction could
need to specify its own actual *and* effective date. Does anyone have
a good example ?

Bill Harris

unread,
Oct 26, 2008, 1:05:18 PM10/26/08
to ledge...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I tried to send 2 messages yesterday from my regular email, but both
failed. I'll try again from gmail. :-(

Simon Michael writes:

> I don't yet have a good idea of why an individual transaction could
> need to specify its own actual *and* effective date. Does anyone have
> a good example ?

Sure. Say you're in business. If you bill a customer, you can enter
something like

2008/01/01=2008/01/14 Client invoice ; estimated date you'll be paid
Assets:Accounts Receivable $100.00
Income: Client name

Then, when you receive the payment, you change it to

2008/01/01=2008/01/15 Client invoice ; actual date money received
Assets:Accounts Receivable $100.00
Income: Client name

and add something like

2008/01/15 Client payment
Assets:Checking $100.00
Assets:Accounts Receivable

Now

ledger -s -b 2008/01/01 -e 2008/01/14 bal Income

gives you your accrued income in the first two weeks of the year, and

ledger --effective -s -b 2008/01/01 -e 2008/01/14 bal Income

gives you your cash basis income in the same two weeks. John pointed
this one out to me not too long ago.

Is that what you wanted to know?

Bill
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: http://getfiregpg.org

iD8DBQFJBKNE3J3HaQTDvd8RAnJFAJ9P9XimtzuVIcd6Nc9A5I9T8aRFzQCfUoYZ
ltJTc8qnl5G8aHSvYUzdPaI=
=mRUD
-----END PGP SIGNATURE-----

--
Bill Harris http://facilitatedsystems.com/weblog/
Facilitated Systems Everett, WA 98208 USA
http://facilitatedsystems.com/ phone: +1 425 337-5541

Simon Michael

unread,
Oct 26, 2008, 1:23:12 PM10/26/08
to ledge...@googlegroups.com
> Is that what you wanted to know?


Thanks Bill! Not quite what I wanted. I was asking about the feature
where you can specify both dates on a transaction line, like

Assets:Checking $100.00 ; [actual=effective]

Also, side issue, in your example you duplicate the payment entry's date
(1/15) in the effective date of the invoice entry. Aside from the
duplication, this seems semantically incorrect, since the invoicing
really did take effect on 1/1. But maybe you find it useful in some way ?

Bill

unread,
Oct 26, 2008, 1:45:32 PM10/26/08
to Ledger
On Oct 26, 10:23 am, Simon Michael <si...@joyful.com> wrote:
> > Is that what you wanted to know?
>
> Thanks Bill! Not quite what I wanted. I was asking about the feature
> where you can specify both dates on a transaction line, like
>
>   Assets:Checking             $100.00  ; [actual=effective]

I thought you were just describing an alternative syntax to what I
did. I guess I misunderstood that one.

> Also, side issue, in your example you duplicate the payment entry's date
> (1/15) in the effective date of the invoice entry. Aside from the
> duplication, this seems semantically incorrect, since the invoicing
> really did take effect on 1/1. But maybe you find it useful in some way ?

Sure. This way, I can run a reg report and see "net sales billed" on
2008/01/01 and a different (effective) report and see "receipts" on
2008/01/15. If I don't put that effective date on the invoice entry,
I'll never see the income on a cash flow basis, as the cash only flows
from receivables to checking. In other words, the "income" has two
dates, one seen from an accrual sense and one from a cash basis sense.

Or am I missing something? That's what John suggested to me, anyway,
and it seems to work.

Bill

Simon Michael

unread,
Oct 26, 2008, 6:57:24 PM10/26/08
to ledge...@googlegroups.com
Bill wrote:
> 2008/01/15. If I don't put that effective date on the invoice entry,
> I'll never see the income on a cash flow basis, as the cash only flows
> from receivables to checking. In other words, the "income" has two
> dates, one seen from an accrual sense and one from a cash basis sense.

I think I see what you mean, thanks.

I'm considering a rule of thumb for myself: actual dates deal with
accrual, effective dates deal with cash.

Drew Raines

unread,
Oct 26, 2008, 9:06:20 PM10/26/08
to ledge...@googlegroups.com
Simon Michael wrote:

> I don't yet have a good idea of why an individual transaction could
> need to specify its own actual *and* effective date. Does anyone
> have a good example ?

I'll give you one from the other day. My wife and I just prepaid
into a local vegetable co-op that sustains us through the winter. It
cost $225 to join the program, so we wrote a check. I didn't want
our October grocery budget to be that much out of whack, however.
What I really wanted was for the money to be evenly distributed over
the next six months so that our monthly budgets gradually take a hit
for the vegetables we'll pick up from the co-op, even though we've
already paid for them.

These entries accomplish this. Every month until April we'll start
with an automatic $37.50 deficit like we should, while our checking
account really knows that it debited $225 this month.

--8<---------------cut here---------------start------------->8---

2008/10/16 * (2090) Bountiful Blessings Farm
Expenses:Food:Groceries $ 225.00
Assets:Checking

2008/10/16 Veggies Distribution
Expenses:Food:Groceries $ 37.50 ; [2008/10/16=2008/10/01]
Expenses:Food:Groceries $ 37.50 ; [2008/10/16=2008/11/01]
Expenses:Food:Groceries $ 37.50 ; [2008/10/16=2008/12/01]
Expenses:Food:Groceries $ 37.50 ; [2008/10/16=2009/01/01]
Expenses:Food:Groceries $ 37.50 ; [2008/10/16=2009/02/01]
Expenses:Food:Groceries $ 37.50 ; [2008/10/16=2009/03/01]
Expenses:Food:Groceries $ -225.00

--8<---------------cut here---------------end--------------->8---

If you're curious, I use the entry-based effective dates for things
like when my bank auto-pays some bills at the beginning of the month,
but they back-date them sometime before the 1st to compensate for a
weekend. So, my mortgage might go out on 08/31, but for budgeting I
really want it to affect September:

--8<---------------cut here---------------start------------->8---

2008/08/31=2008/09/01 Lender
Liabilities... $ 1,000.00
Assets:Checking

--8<---------------cut here---------------end--------------->8---

-Drew

Simon Michael

unread,
Oct 26, 2008, 9:31:51 PM10/26/08
to ledge...@googlegroups.com
Thanks Drew! That is interesting. My question still stands in a sense, I
don't see why *both* actual and effective need to be configurable on a
transaction. But that was informative.

John Wiegley

unread,
Oct 26, 2008, 10:03:09 PM10/26/08
to ledge...@googlegroups.com
On Oct 26, 2008, at 7:06 PM, Drew Raines wrote:

> I'll give you one from the other day. My wife and I just prepaid
> into a local vegetable co-op that sustains us through the winter. It
> cost $225 to join the program, so we wrote a check. I didn't want
> our October grocery budget to be that much out of whack, however.
> What I really wanted was for the money to be evenly distributed over
> the next six months so that our monthly budgets gradually take a hit
> for the vegetables we'll pick up from the co-op, even though we've
> already paid for them.

That's really a great example, Drew, can I use that for the manual?

My only question is, why not just say this:

2008/10/16 * (2090) Bountiful Blessings Farm

Expenses:Food:Groceries $ 37.50 ;
[2008/10/16=2008/10/01]
Expenses:Food:Groceries $ 37.50 ;
[2008/10/16=2008/11/01]
Expenses:Food:Groceries $ 37.50 ;
[2008/10/16=2008/12/01]
Expenses:Food:Groceries $ 37.50 ;
[2008/10/16=2009/01/01]
Expenses:Food:Groceries $ 37.50 ;
[2008/10/16=2009/02/01]
Expenses:Food:Groceries $ 37.50 ;
[2008/10/16=2009/03/01]

Assets:Checking

John

Simon Michael

unread,
Oct 27, 2008, 12:11:44 AM10/27/08
to ledge...@googlegroups.com
Yes - that's nicer, eh ?

Drew Raines

unread,
Oct 27, 2008, 7:34:13 AM10/27/08
to ledge...@googlegroups.com
John Wiegley wrote:

> That's really a great example, Drew, can I use that for the manual?

Sure! I remembered I do this for another scenario too, so take your
pick. When I buy a one-year subscription to a web site, I distribute
the cost over 12 months with the same technique.

--8<---------------cut here---------------start------------->8---

2006/06/12 * Wall Street Journal
Expenses:Home:Computing $ 8.25 ; [2006/06/12=2006/06/01]
Expenses:Home:Computing $ 8.25 ; [2006/06/12=2006/07/01]
Expenses:Home:Computing $ 8.25 ; [2006/06/12=2006/08/01]
Expenses:Home:Computing $ 8.25 ; [2006/06/12=2006/09/01]
Expenses:Home:Computing $ 8.25 ; [2006/06/12=2006/10/01]
Expenses:Home:Computing $ 8.25 ; [2006/06/12=2006/11/01]
Expenses:Home:Computing $ 8.25 ; [2006/06/12=2006/12/01]
Expenses:Home:Computing $ 8.25 ; [2006/06/12=2007/01/01]
Expenses:Home:Computing $ 8.25 ; [2006/06/12=2007/02/01]
Expenses:Home:Computing $ 8.25 ; [2006/06/12=2007/03/01]
Expenses:Home:Computing $ 8.25 ; [2006/06/12=2007/04/01]
Expenses:Home:Computing $ 8.25 ; [2006/06/12=2007/05/01]
Liabilities:Credit Card $ -99.00

--8<---------------cut here---------------end--------------->8---

> My only question is, why not just say this:
>
> 2008/10/16 * (2090) Bountiful Blessings Farm

[...]
> Assets:Checking

Good point! You can in my modified example. In the interest of
simplicity, I left out the fact that the program really cost $675 and
that we split it with two other families. We were responsible for
gathering the monies and paying the lump sum.

All told it looks like this:

--8<---------------cut here---------------start------------->8---

2008/10/01 * ATM
Expenses:Food:Groceries $ -225.00 ; Smith vegetable contribution
Expenses:Food:Groceries $ -225.00 ; Jones vegetable contribution
Assets:Checking $ 450.00

2008/10/16 * (2090) Bountiful Blessings Farm

Expenses:Food:Groceries $ 675.00
Assets:Checking

2008/10/16 CSA Veggies Distribution


Expenses:Food:Groceries $ 37.50 ; [2008/10/16=2008/10/01]
Expenses:Food:Groceries $ 37.50 ; [2008/10/16=2008/11/01]
Expenses:Food:Groceries $ 37.50 ; [2008/10/16=2008/12/01]
Expenses:Food:Groceries $ 37.50 ; [2008/10/16=2009/01/01]
Expenses:Food:Groceries $ 37.50 ; [2008/10/16=2009/02/01]
Expenses:Food:Groceries $ 37.50 ; [2008/10/16=2009/03/01]

Expenses:Food:Groceries $ -225.00

--8<---------------cut here---------------end--------------->8---

I might still have made this more complicated than I needed to, but
this is what made sense to me.

-Drew

Drew Raines

unread,
Oct 27, 2008, 7:40:33 AM10/27/08
to ledge...@googlegroups.com
Simon Michael wrote:

You're welcome! I'm confused by your question though. What's
configurable about the actual date? AFAIK, it's just using the same
syntax as entry-level effective dates to simplify the parser.

-Drew

Simon Michael

unread,
Oct 27, 2008, 12:55:43 PM10/27/08
to ledge...@googlegroups.com
My point is that the ledger manual says that you can configure dates in
up to four places. Actual and effective, on the entry and
per-transaction. I can see why one per-transaction date can be useful,
thanks to you, but not two.

John Wiegley

unread,
Oct 27, 2008, 9:31:41 PM10/27/08
to ledge...@googlegroups.com
Even cleaner:

2008/10/16 * (2090) Bountiful Blessings Farm

Expenses:Food:Groceries $ 37.50 ; [=2008/10/01]
Expenses:Food:Groceries $ 37.50 ; [=2008/11/01]
Expenses:Food:Groceries $ 37.50 ; [=2008/12/01]
Expenses:Food:Groceries $ 37.50 ; [=2009/01/01]
Expenses:Food:Groceries $ 37.50 ; [=2009/02/01]
Expenses:Food:Groceries $ 37.50 ; [=2009/03/01]
Assets:Checking

John

Reply all
Reply to author
Forward
0 new messages