Re: Optionally make commodity directive mandatory?

2023-12-28 Thread Martin Blais
You're welcome!

On Thu, Dec 28, 2023, 20:11 Lover O'Bean  wrote:

> Yes; while it doesn't address timing, it should be good enough for now:
>
> https://beancount.github.io/docs/api_reference/beancount.plugins.html#beancount.plugins.check_commodity.validate_commodity_directives
>
> (Also, while I was "in the neighborhood", I noticed another plugin that
> addresses another concern that I had.)
>
> Thanks Martin!
>
>
> On Thursday, December 28, 2023 at 6:08:17 PM UTC-5 t...@cyrius.com wrote:
>
>> There's a plugin for this: validate_commodity_directives
>>
>> A plugin that verifies that all seen commodities have a Commodity
>> directive.
>>
>> * Lover O'Bean  [2023-12-28 17:16]:
>> > I am new to beancount, but would like the option of requiring that each
>> > commodity / currency be created with a commodity directive before being
>> > used, in the same way that accounts require an open directive before
>> being
>> > used.
>> >
>> > For example, if I declare AIRMILES.WN (IATA code) today but two years
>> from
>> > now enter a transaction which accrues AIRMILES.SW (vernacular), I would
>> > like to get an error, just like if I referred to a nonexistent account.
>> >
>> > Is this a good idea, or am I off-base?
>> >
>> > --
>> > 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/CABV0qx7m7iR8vYK%2BsgXjGx7UvV0uEsh1WaGE3hpL8eGc8Qiiqw%40mail.gmail.com.
>>
>>
>> --
>> Martin Michlmayr
>> https://www.cyrius.com/
>>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/aaf37c31-dbeb-433a-9257-ca1de809dedfn%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPo8Z%2B0cFDfQ5j6kbFb1J0BFJg3dqky33KdK_q1Ci5YMg%40mail.gmail.com.


Re: Optionally make commodity directive mandatory?

2023-12-28 Thread Lover O'Bean
Yes; while it doesn't address timing, it should be good enough for now:
https://beancount.github.io/docs/api_reference/beancount.plugins.html#beancount.plugins.check_commodity.validate_commodity_directives

(Also, while I was "in the neighborhood", I noticed another plugin that 
addresses another concern that I had.)

Thanks Martin!


On Thursday, December 28, 2023 at 6:08:17 PM UTC-5 t...@cyrius.com wrote:

> There's a plugin for this: validate_commodity_directives
>
> A plugin that verifies that all seen commodities have a Commodity 
> directive.
>
> * Lover O'Bean  [2023-12-28 17:16]:
> > I am new to beancount, but would like the option of requiring that each
> > commodity / currency be created with a commodity directive before being
> > used, in the same way that accounts require an open directive before 
> being
> > used.
> > 
> > For example, if I declare AIRMILES.WN (IATA code) today but two years 
> from
> > now enter a transaction which accrues AIRMILES.SW (vernacular), I would
> > like to get an error, just like if I referred to a nonexistent account.
> > 
> > Is this a good idea, or am I off-base?
> > 
> > -- 
> > 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/beancount/CABV0qx7m7iR8vYK%2BsgXjGx7UvV0uEsh1WaGE3hpL8eGc8Qiiqw%40mail.gmail.com
> .
>
> -- 
> Martin Michlmayr
> https://www.cyrius.com/
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/aaf37c31-dbeb-433a-9257-ca1de809dedfn%40googlegroups.com.


Re: Optionally make commodity directive mandatory?

2023-12-28 Thread Martin Michlmayr
There's a plugin for this: validate_commodity_directives

A plugin that verifies that all seen commodities have a Commodity directive.

* Lover O'Bean  [2023-12-28 17:16]:
> I am new to beancount, but would like the option of requiring that each
> commodity / currency be created with a commodity directive before being
> used, in the same way that accounts require an open directive before being
> used.
> 
> For example, if I declare AIRMILES.WN (IATA code) today but two years from
> now enter a transaction which accrues AIRMILES.SW (vernacular), I would
> like to get an error, just like if I referred to a nonexistent account.
> 
> Is this a good idea, or am I off-base?
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/beancount/CABV0qx7m7iR8vYK%2BsgXjGx7UvV0uEsh1WaGE3hpL8eGc8Qiiqw%40mail.gmail.com.

-- 
Martin Michlmayr
https://www.cyrius.com/

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/20231228230734.GB942024%40jirafa.cyrius.com.


Re: Moving assets between accounts and preserve cost basis?

2023-12-28 Thread Artur Matos
Thanks everyone. I was hoping I could avoid transferring the lots 
explicitly but it's OK. Thanks. 

On Saturday 23 December 2023 at 03:41:41 UTC-5 Justus Pendleton wrote:

> This may not help you but I figure I'll mention it here since moving cost 
> basis came up.
>
> A few years I wrote a plugin to (try to) do this. "It worked for me" but a 
> user soon reported an issue. You can't ever use the {} syntax.
>
> https://github.com/hoostus/beancount-asset-transfer-plugin/issues/1
>
> "In loader.py around lines 506-513 it looks like the loader runs 
> "interpolation" on incomplete booking entries before it runs 
> "transformations" from plugins. So the {} gets triggered (and then fails 
> because it can't find enough matching holdings) before the asset_transfer 
> plugin has a chance to run and actually generate the holdings. 
>
> You can workaround this by not using {} and instead specifying the lots 
> explicitly."
>
> On Friday, December 22, 2023 at 8:29:05 AM UTC+7 Artur Matos wrote:
>
>> Hi everyone,
>>
>> I've changed one of my taxable accounts providers and need to transfer 
>> the assets from one beancount account to the other. Transfer happens "in 
>> specie" and I need to preserve the cost basis and lots as part of the 
>> transfer. If I understood the docs correctly , transferring like this won't 
>> work and will remove the lots from the new account:
>>
>> 2015-05-15 * "Transfer" Assets:InvestAccount1 -60 HOOL {} 
>> Assets:InvestAccount2 
>> 60 HOOL {}
>>
>> Is there a shorthand way to transfer the assets while preserving lot 
>> information? I've had the original account for rather long and doing it lot 
>> by lot will be very tedious.
>>
>> Thanks.
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/630afbb6-78da-4f88-b136-c454c5220244n%40googlegroups.com.


Optionally make commodity directive mandatory?

2023-12-28 Thread Lover O'Bean
I am new to beancount, but would like the option of requiring that each
commodity / currency be created with a commodity directive before being
used, in the same way that accounts require an open directive before being
used.

For example, if I declare AIRMILES.WN (IATA code) today but two years from
now enter a transaction which accrues AIRMILES.SW (vernacular), I would
like to get an error, just like if I referred to a nonexistent account.

Is this a good idea, or am I off-base?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CABV0qx7m7iR8vYK%2BsgXjGx7UvV0uEsh1WaGE3hpL8eGc8Qiiqw%40mail.gmail.com.


Re: Labeling/ marking Accounts

2023-12-28 Thread 'Patrick Ruckstuhl' via Beancount

Hi nugget,


yes you can add metadata also on an account level. You add it on the 
open directive. There is even bean query support for it


OPEN_META(str)': Get the metadata dict of the open directive of the account.


2016-10-07 open Income:Foo  CHF
  tax_relevant: true


Regards,

Patrick


On 28.12.2023 13:34, nug get wrote:

Hi all
I started a basic tax-forecast plugin 
 
for Switzerland. One key ingredient is the providing of a list of all 
accounts that are subject to income and wealth taxation.


My current working prototype requires a lengthy config string to be 
passed to the plugin, listing, among other configurations, all 
accounts subject for income taxation, i.e.


plugin"drnukebean.plugins.tax_forecast""{'taxable_accounts': 
['Income:Jobs:Job1:TaxableSalary', 'Income:Jobs:Job1:TaxableBonus', 
'Income:Invest:.*:Dividends'], ...}"


I dont like it, but have not found a better way so far. Any Ideas?
Does beancount allow the tagging of individual accounts, or 
associating them with metadata similar to transactions, that can then 
be filtered for?


Thanks, merry Christmas and a happy new year!
-nugget
--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/8d88fbf8-73c6-41e1-8bc9-2c6d5a6b44b4n%40googlegroups.com 
.


--
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/987d3e79-522f-4efb-9544-70ca9737eea3%40tario.org.


Labeling/ marking Accounts

2023-12-28 Thread nug get
Hi all
I started a basic tax-forecast plugin 

 
for Switzerland. One key ingredient is the providing of a list of all 
accounts that are subject to income and wealth taxation.

My current working prototype requires a lengthy config string to be passed 
to the plugin, listing, among other configurations, all accounts subject 
for income taxation, i.e. 

plugin "drnukebean.plugins.tax_forecast" "{'taxable_accounts': 
['Income:Jobs:Job1:TaxableSalary', 'Income:Jobs:Job1:TaxableBonus', 
'Income:Invest:.*:Dividends'], ...}"

I dont like it, but have not found a better way so far. Any Ideas?
Does beancount allow the tagging of individual accounts, or associating 
them with metadata similar to transactions, that can then be filtered for?

Thanks, merry Christmas and a happy new year!
-nugget

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/8d88fbf8-73c6-41e1-8bc9-2c6d5a6b44b4n%40googlegroups.com.