Automated Depreciation Entries

216 views
Skip to first unread message

happ...@gmail.com

unread,
Aug 13, 2015, 7:34:25 AM8/13/15
to Beancount
As part of exploring the space of things beancount can do, last night I wrote a plugin to automatically add entries at the end of the year for depreciation of assets.

https://bitbucket.org/snippets/happyalu/EAMgj/beancount-automated-depreciation-plugin

It was a lot of fun doing this and learning the beancount internals! However, I'm sure there are lots of places to improve the code, so a beancount-expert perspective on this would be very valuable! Please also let me know if there already is built-in code to handle depreciation that I could use instead.

Alok

Martin Blais

unread,
Aug 13, 2015, 11:13:48 AM8/13/15
to Beancount
Hi Alok,
Thanks for your plugin!
I've added a link to to it from the contributions web page.
I'll have a look later this weekend when there is time and answer your other email as well (busy times).



--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To post to this group, send email to bean...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/d6868bce-e448-4f93-97fb-a4cf04a52e1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dave Stephens

unread,
Aug 15, 2015, 2:37:03 PM8/15/15
to Beancount
Thanks for sharing that - coincidentally, I was just adding depreciation to my corporate beancount, so this helps a lot.  

I have to add some options for Canadian taxes.  Where should I contribute them?  Are you going to add this as a plugin in the main repository Martin?

Martin Blais

unread,
Aug 15, 2015, 2:50:16 PM8/15/15
to Beancount
I think for now I won't integrate contributions just yet. I will eventually write up a contributor's agreement and perhaps integrate these submissions in, but also only if people want me to, and much later.

I have a fair bit of other priorities to deal with over the next few months:
- Finish the new inventory booking method (ongoing, see 'booking' branch if interested)
- Fold ledgerhub into Beancount
- Complete some work on export & price fetching
- Write the main intro doc
Everything else comes after (unless I'm procrastinating).



Dave Stephens

unread,
Aug 15, 2015, 11:47:56 PM8/15/15
to Beancount
Thanks for sharing that plugin Alok, exactly what I needed (subject to a few changes).

Since I couldn't add contributions to that snippet, I made a new version of it here:

It adds a couple features:
- option to add a subaccount to the depreciation expense.
   ie: instead of Expenses:Depreciation, option to break out the depreciation between different categories (Expenses:Depreciation:Printer, Expenses:Depreciation:Computer, etc).
- option to add subaccount to the asset.
   ie: instead of the depreciation being applied directly to Assets:Printer, it is applied to Assets:Printer:Depreciation, so you can see the book value of the asset and accumulated depreciation.
- "CRA" depreciation method.   Calculation used by the Canada Revenue Agency - applies 50% depreciation if the asset was purchased during the fiscal year.
- Ability to adjust individual years by arbitrary multiplier.
    My business had a shortened fiscal year in its first year of business.  I used this to reduce depreciation to 340/365 days.
Reply all
Reply to author
Forward
0 new messages