Exclude empty amounts with GROUP BY

2020-03-16 Thread Martin Michlmayr
I want to see a list of outstanding invoices. Given the example below, I can use: beancount> SELECT ENTRY_META('invoice'), SUM(position) WHERE account ~ '^Assets:Receivable' GROUP BY ENTRY_META('invoice') ent sum_posit --- - A01 B01 30.00 USD Is there a way to exclude position

GROUP by financial year

2020-03-16 Thread Martin Michlmayr
I can use: SELECT YEAR, SUM(position) WHERE account ~ '^Income' GROUP BY YEAR ORDER BY YEAR to see all income per year. Unfortunately, the financial year is not the calendar year. Is there a way to use bean-query to do a GROUP BY on a fiancial year or do I have to write a script? -- Martin Mi

Re: GROUP by financial year

2020-03-16 Thread Martin Blais
I don't think there's a concert of financial year that's != calendar year. On Mon, Mar 16, 2020, 04:19 Martin Michlmayr wrote: > I can use: > > SELECT YEAR, SUM(position) WHERE account ~ '^Income' GROUP BY YEAR ORDER > BY YEAR > > to see all income per year. > > Unfortunately, the financial year

Re: Exclude empty amounts with GROUP BY

2020-03-16 Thread Martin Blais
This would need a filtering expression of the aggregate, it's not implemented. SQL defines a syntax thought. On Mon, Mar 16, 2020, 04:19 Martin Michlmayr wrote: > I want to see a list of outstanding invoices. Given the example > below, I can use: > > beancount> SELECT ENTRY_META('invoice'), SUM

Re: GROUP by financial year

2020-03-16 Thread Martin Michlmayr
s/concert/concept/? * Martin Blais [2020-03-16 08:07]: > I don't think there's a concert of financial year that's != calendar year. > > On Mon, Mar 16, 2020, 04:19 Martin Michlmayr wrote: > > > I can use: > > > > SELECT YEAR, SUM(position) WHERE account ~ '^Income' GROUP BY YEAR ORDER > > BY Y

Re: GROUP by financial year

2020-03-16 Thread Martin Blais
Yep Cell phone finger fart On Mon, Mar 16, 2020, 08:17 Martin Michlmayr wrote: > s/concert/concept/? > > * Martin Blais [2020-03-16 08:07]: > > I don't think there's a concert of financial year that's != calendar > year. > > > > On Mon, Mar 16, 2020, 04:19 Martin Michlmayr wrote: > > > > > I c

Re: GROUP by financial year

2020-03-16 Thread Oon-Ee Ng
Fairly common for some organizations to have financial years starting on (say) 1st August or something similar. Sometimes to sync up with regulatory requirements, sometimes so that bonuses/promotions hit a particular period of the year, sometimes due to expected peak dates for a particular industry

Re: GROUP by financial year

2020-03-16 Thread Martin Michlmayr
I wasn't sure how to interpret Martin's reply. At first, I thought he was saying that he's not aware of circumstances where the FY != calendar year. But then I realized that he he was just stating that beancount doesn't have a concept of FY. As you say (and I'm sure as Martin is full aware), the

Re: New Fava extension: Tax loss harvester

2020-03-16 Thread Red S
Updates to the TLH extension in these interesting times we live in: - the command line client has now been folded in to the fava client and uses the same code (refactored out to support both fava and bean-query) - a --brief option to the command line client displays the summary only - unit tests