puffin icon indicating copy to clipboard operation
puffin copied to clipboard

Option to filter by commodity / currency

Open piero-vic opened this issue 1 year ago • 3 comments

Hi.

First of all, thank you for the great tool. It has been very useful.

I'm currently working with multiple currencies. It would be nice to generate reports targeting a specific currency.

I believe this could be done by using hledger commodities to list available options and a currency query (e.g., hledger cur:<currency>) when generating reports.

piero-vic avatar Jul 24 '24 18:07 piero-vic

You're welcome!

With the latest update, you can setup your own custom reports. I am yet to work on the documentation. But you can simply copy the config.debug.json file and setup reports as you wish. If you set locked to true then the filters in the app won't affect that report.

If you follow this approach, do let me know how it goes!

siddhantac avatar Jul 25 '24 07:07 siddhantac

i tried the locked method but it seems it is not working. or am i missing something. image the command still follows the filter year 2022. i have records before that.

phobo3s avatar Aug 05 '24 16:08 phobo3s

@phobo3s You're right. There is an issue with how the locked feature is working. I'll work on fixing it, but it might take some time.

siddhantac avatar Aug 08 '24 13:08 siddhantac

@phobo3s I have made some major changes. The locked option should work now. Please try with the latest release v2.0.0-rc.

You can try it with this config file config.debug.json.

Note:

  1. This is only supported for balance reports currently
  2. By default, it will show the balance report in table format with graphs (show/hide graph with g)
  3. To show the report in native hledger format, use locked: true. This will cause puffin to treat the hledger output as is, without any modification.

@piero-vic I think this would solve your issue with the commodity report as well. Since commodity isn't supported exclusively yet, setting locked field has no effect on it. It will always be treated as if it is locked.

siddhantac avatar Aug 18 '24 05:08 siddhantac

yessss. Very Very good. i can get balancesheet report without yearly. it is perfect, thank you. But graph not visible on windows.

phobo3s avatar Aug 20 '24 12:08 phobo3s

thanks @phobo3s . I opened a new issue for that https://github.com/siddhantac/puffin/issues/61

siddhantac avatar Aug 28 '24 03:08 siddhantac