On Mon, Apr 30, 2018 at 4:53 PM, <tin...@gmail.com> wrote: > Sweet, thanks! > - For my holding, I need to generate tax reports and income and >>> balancesheets at the end of the year. The latter ones are present, but a >>> bit bare (no dates on the page, no formatting for example). >> >> Do you mean a list of trades? Trades (i.e., "reductions and their >> corresponding augmentations") are available as metadata. I'm not sure if I >> ever bothered creating a report for them, but they're available from the >> stream of transactions, it should be easy to write a script to list them >> out in your favorite format. >> > > No, I meant the amount of tax I have posted to an account in a certain > period. But I saw you also added a QUARTER function, which helps a lot with > that! >
For that you can just select sum(postings) where date >= ... and date < ... On Monday, 30 April 2018 05:42:25 UTC+2, Martin Blais wrote: >> >> hg update, I've added a couple of things: >> - A POSSIGN() function, which can be used to straighten the sign based on >> the account associated with an amount. You can use it like this: >> >> bean-query $L "select account, sum(possign(position, account)) where >> account ~ 'Liabilities:' group by 1" >> >> - A NEG() function, which can be used to negate the value of an Amount, >> Position or Inventory. >> >> This works as a temporary fix, but it isn't great. There isn't real >> arithmetic on all field types. (The SQL shell was developed in a weekend a >> long time ago and has become a bit of a dumping ground for ideas and has >> overserved its time. It needs a complete rewrite from scratch, for many >> reasons. I want to do that eventually, but before then, merge all the >> pending pull requests and fix some of the more important bugs.) In any >> case, I hope this helps, >> >> >> >> >> On Sun, Apr 29, 2018 at 7:38 PM, Martin Blais <bl...@furius.ca> wrote: >> >>> On Sun, Apr 29, 2018 at 6:10 AM, <tin...@gmail.com> wrote: >>> >>>> I have a couple use cases for "reports", that I haven't found an easy >>>> way to generate yet. >>>> >>>> - For my holding, I need to generate tax reports and income and >>>> balancesheets at the end of the year. The latter ones are present, but a >>>> bit bare (no dates on the page, no formatting for example). >>>> >>> >>> Do you mean a list of trades? Trades (i.e., "reductions and their >>> corresponding augmentations") are available as metadata. I'm not sure if I >>> ever bothered creating a report for them, but they're available from the >>> stream of transactions, it should be easy to write a script to list them >>> out in your favorite format. >>> >>> >>> >>>> - For a group of friends, I manage the common account. I've set them up >>>> as Liabilities, as that's what the account owns to them. But now all >>>> balances are inverted, which makes it a bit weird for them. I'd like to >>>> just output the Liabilities accounts with balance * -1. (I tried: >>>> >>>> SELECT account, sum(position) * -1 WHERE account ~ 'Liabilities:' GROUP BY >>>> account; >>>> >>>> but that results in "TypeError: descriptor '__mul__' requires a >>>> 'decimal.Decimal' object but received a 'Inventory' >>>> ". I guess I could export to csv, open in Excel and just add this, but >>>> that's cheating :). Ideally I'd add a page to Fava with this "report", but >>>> haven't found a way yet.) >>>> >>> >>> You just need an operator to negate an inventory object. Let me make you >>> one. >>> In fact, better might be a function which switches the signs based on >>> the account type, e.g. something like this: >>> >>> SELECT account, sum(position) * account_sign(account) .. >>> >>> ACCOUNT_SIGN(account) would take the value -1 for Liabilities, Equity >>> and Income, and +1 for the others. >>> I can add those later. >>> >>> >>> >>> >>>> >>>> How do you all generate your (tax) reports and in what format do you >>>> save them? >>>> >>> >>> Tax reports? I use TurboTax. I kick off bean-web with a restricted >>> period for that year and eyeball the numbers from the income statement. >>> Most of the actual input is automated from imported 1099-R's. >>> >>> >>> >>> >>>> >>>> Regards, >>>> >>>> >>>> Tino >>>> >>>> >>>> On Sunday, 1 April 2018 07:53:42 UTC+2, Martin Blais wrote: >>>>> >>>>> How many people here use bean-report as their main way to generate >>>>> data from Beancount? >>>>> How many use bean-web? >>>>> Does anybody still care about bean-web now that Fava exists? >>>>> >>>>> Also... is it possible to bean-bake Fava (or some equivalent creation >>>>> of a static version for sharing)? >>>>> >>>>> Any input appreciated, >>>>> >>>>> >>>>> (Reason I'm asking is: I'm thinking about >>>>> - rewriting the query engine to something more powerful and general, >>>>> and promoting it from experimental and somewhat flaky to the main way of >>>>> getting data out >>>>> - rewriting bean-web to be a dumber, more generic web interface that >>>>> basically renders SQL queries (using the new query engine) without any >>>>> special treatment (just tables and tree-tables) >>>>> - deleting bean-reports and all of beancount/reports, or replacing >>>>> most of it by SQL queries >>>>> - in the process deleting the Holdings code >>>>> Basically, I think that with a slightly improved query engine I could >>>>> delete a ton of code without removing functionality at all.) >>>>> >>>>> -- >>>> 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/ms >>>> gid/beancount/da245774-db4e-4e44-ba34-84e5c4bff222%40googlegroups.com >>>> <https://groups.google.com/d/msgid/beancount/da245774-db4e-4e44-ba34-84e5c4bff222%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>>> 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/1e8741d6-83b3-42f1-bb24-e5b7a63893e8%40googlegroups.com > <https://groups.google.com/d/msgid/beancount/1e8741d6-83b3-42f1-bb24-e5b7a63893e8%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > 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%2BhPMYASEM%3D02XjQWp%2BRrfx%3D0HWpXY1%2BVaQ-YaN6vg1msCw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.