On Sat, Dec 1, 2018 at 9:50 PM Zhuoyun Wei <wzy...@wzyboy.org> wrote:

> 2018-12-01 20:43:39 Martin Blais <bl...@furius.ca>:
> > On Sat, Dec 1, 2018 at 11:23 AM Zhuoyun Wei <wzy...@wzyboy.org> wrote:
> >
> >     2018-11-29 21:38:57 Justus Pendleton <justu...@gmail.com>:
> >     > On Friday, November 30, 2018 at 7:27:11 AM UTC+7, mpl...@gmail.com
> wrote:
> >     >
> >     >     Let say i have transactions going into account Expenses:Rent,
> and i would like 60% of total go to
> >     >     Expenses:Rent:Personal and 40% to Expenses:Rent:Business,
> >     >     what's the best way to do it?
> >     >
> >     >
> >     > I think the best way is to just be explicit and write: $600 to one
> and $400 to the other.
> >     >
> >     > If you really want to though, beancount supports simple math
> expressions so you can write:
> >     >
> >     > Expenses:Rent:Personal (1,000 * 0.6) USD
> >     > Expenses:Rent:Business (1,000 * 0.4) USD
> >     >
> >     TIL Beancount supports basic math expressions!
> >
> >     I have quite a lot of transactions that need to be split by ratio
> >     (shared expenses with roommates). Each time I have to calculate the
> >     shares myself and fill in the result. This is lifesaver!
> >
> >
> > If you have a really specific need you could also write a plugin.
> > I do that for sharing expenses, e.g. I trigger filling off of a tag.
> > IIRC Ledger supports % as amounts, but I've never looked at how it
> actually works.
> > One way it could make sense would be to sum up the postings with non-%
> amounts, and fill in - like when you omit the
> > amount - with the % of the remainder. We'd have to also check that the
> amounts sum up to 100% (or rely on the balance
> > to fail).
> > Anyhow, I don't think it's a super common usage, and using ratios as you
> suggested works well.
> >
>
> I had always thinking about writing my own plugins. But I prefer to
> keep my repo in a self-contained way. That is to say, I do not want to
> modify PYTHONPATH each time I run bean-* commands / fava, nor do I want
> to put my plugin outside the repo. So I am counting on this issue to be
> resolved:
> https://bitbucket.org/blais/beancount/issues/214/add-top-level-directory-to-syspath
> (I may try to be helpful if possible).
>

You got it.
https://bitbucket.org/blais/beancount/commits/c61debdc8334

Insert
  option "insert_pythonpath" "TRUE"
in any file you want to have the parent directory inserted for.


Currently the new discovery of math expressions in Amount helps a lot. I
> can now just append "/ 2" to those expenses that shared with my
> roommate, instead of caculating the shares myself.
>

The expression arithmetic is still pretty basic, but I use it a lot too.
I think the new version of that shell - the only that should be rewritten
as a separate project - should have much more.




> >
> >
> >
>
> --
> Zhuoyun Wei
>
> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to beancount@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/20181202025039.GA4698%40tarball.wzyboy.org
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPM4bY1dDSYCa8%2BB6VOjdYdzRCU-Km6uW1f1GjHUWyD_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to