Greetings, I am a long-time occasional user of hledger and looking to use income statement more. I am using hledger 1.27.1, mac-x86_64.
My typical salary posting involves 3 aspects that I track:
1. Monetary income
2. Superannuation (pension fund)
3. Annual leave balance
A MWE is shown below:
D $1,000,000.00
commodity $1,000.00
P 2022/11/18 units $2.00
P 2022/11/18 hours $50.00
2022/11/18 * Salary
assets:checking $1,000
assets:superannuation 100 units @@ $200
assets:leave 10 hours
income:salary
I would like to be able to look at income statements relating only to cash ($, not units or hours). I have not yet found a way to satisfactorily do this.
I would like to run something like hledger is -f ./test.ledger cur:\\$, however the result is the following:
Income Statement 2022-11-18
|| 2022-11-18
===============++============
Revenues ||
---------------++------------
income:salary || $1,200.00
---------------++------------
|| $1,200.00
===============++============
Expenses ||
---------------++------------
---------------++------------
||
===============++============
Net: || $1,200.00
By running this command I am trying to see the $1,000.00 line only however I cannot find a way to filter this for income statements. It seems that by writing the current value of a 'unit' in the superannuation line, hledger views the superannuation payment primarily as cash, and not in its chief unit of account.
Additionally, I cannot negate the logic usefully with hledger is -f ./test.ledger not:cur:\\$
Income Statement 2022-11-18
|| 2022-11-18
==========++============
Revenues ||
----------++------------
----------++------------
||
==========++============
Expenses ||
----------++------------
----------++------------
||
==========++============
Net: ||
This outcome didn't make much sense based on other outputs.
Ideally I would like to filter specifically the assets:superannuation and assets:leave components so that other income ancillary in other commodities will be captured in the report; filtering out 'units' and 'hours' would work for this purpose. However if I have to do something to specify only "$" as the unit, this would be a workable solution too.
Is there any way to achieve this with hledger?
Many thanks,
Joel