On Wed, 31 Jul 2019 at 01:14, kuba jamro <[email protected]> wrote:

> Hi,
>
> Why not use beancount to work out the math for you to attribute the
> correct proportional amount to each expenses?
>
> For instance:
> 2019-07-30 * "Amazon"
>   Expenses:Gadgets (20/50)*60 AUD ; Where 50 is the total USD spent
>   Expenses:Books
>   Liabilities:CreditCard -60 AUD
>
> Does this not give the desired result?
>

Yes it does, but I find this clunky: e.g. 60 and 50 need to be repeated on
all but 1 expense line.


> You could easily add this logic to your import code too.
>

This is true, assuming I use import code to label expenses (unlikely --
receipts are too varied). Seems neater to write a plugin so that I can
instead say...

2019-07-30 * "Amazon"
  Expenses:Gadgets 20 ZZ
  Expenses:Books 30 ZZ
  Liabilities:CreditCard -60 AUD


>
> Jakub.
>
> On Sunday, 28 July 2019 16:30:52 UTC+1, Martin Blais wrote:
>>
>> On Thu, Jul 25, 2019 at 11:50 AM <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> New here (and new to beancount in general); I tried doing a search but
>>> was unsuccessful.
>>>
>>> The problem: I have this "transaction"
>>>
>>> 2019-07-01 * "amazon.com" "stuff"
>>>   Expenses:Gadgets 20USD
>>>   Expenses:Books 30USD
>>>   Liabilities:CreditCard 60AUD
>>>
>>> I don't really care to track USD in my Expenses accounts, so I'd like
>>> beancount to apportion 60USD in that ratio.
>>>
>>> I was hoping that this kind of syntax would work:
>>>
>>> 2019-07-01 * "amazon.com" "stuff"
>>>   Expenses:Gadgets 20
>>>   Expenses:Books 30
>>>   Liabilities:CreditCard 60AUD
>>>
>>> where amount interpolation occurs on all postings that are
>>> commodity-less in the ratios specified by the numbers, but this isn't a
>>> thing.
>>>
>>> I can probably introduce a special commodity (and, depending on whether
>>> transaction balances are checked before plugins run, a throwaway account
>>> for interpolation) and write a plugin, but I'm wondering whether there are
>>> better ways of doing this..
>>>
>>
>> There's currently no automatic way to distribute the interpolated amount.
>> I would write some code.
>> You can try use a commodity and/or a posting flag.
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Beancount" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beancount/xfyzQxJoBjo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/3302ea14-f6ee-4bd9-b628-756c1f14719c%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/3302ea14-f6ee-4bd9-b628-756c1f14719c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAGHU-qP1S-y7J1-mhubAVhGoXPCFZfw%2B3bPtWi-LB-cy4nniPw%40mail.gmail.com.

Reply via email to