Visitar URL original
1.21: --budget doesn't do anything with incomestatement · Issue #2302 · hledgerorg/hledger · GitHub
Skip to content

1.21: --budget doesn't do anything with incomestatement #2302

Closed

Description

@lowercasename

From the docs it appears that incomestatement should take the --budget command, like balance. But I don't see that happening (hledger 1.41, mac-aarch64):

> hledger bal --budget -M

Budget performance in 2024-11-01..2024-12-31:

                           ||                         Nov                                Dec
===========================++================================================================
...
 expenses                  ||   £36.00 [1% of  £2,453.22]    £3,071.67 [ 125% of  £2,453.22]
 expenses:bills            ||   £36.00 [7% of    £532.22]      £384.67 [  72% of    £532.22]
...
---------------------------++----------------------------------------------------------------
                           ||        0 [               0]            0 [                  0]
                           
> hledger is --budget -M
Monthly Income Statement 2024-11-01..2024-12-31

                           ||     Nov         Dec
===========================++=====================
 Revenues                  ||
---------------------------++---------------------
...
---------------------------++---------------------
                           ||       0     £633.51
===========================++=====================
 Expenses                  ||
---------------------------++---------------------
 expenses:bills            ||  £36.00     £384.67
...
---------------------------++---------------------
                           ||  £36.00   £3,071.67
===========================++=====================
 Net:                      || £-36.00  £-2,438.16

(I've removed most of the lines, but the point is that is doesn't show the square bracketed numbers and percentages).

Activity

  1. simonmichael commented on Dec 17, 2024

    @simonmichael
    Member

    Thanks for the report. But --budget is only supported by the balance command at present. Which docs made you think otherwise ?

  2. lowercasename commented on Dec 17, 2024

    @lowercasename
    Author

    The section here: https://hledger.org/1.41/hledger.html#incomestatement

    Screenshot 2024-12-17 at 18 46 03

    Have I misread the docs somehow?

  3. lowercasename commented on Dec 17, 2024

    @lowercasename
    Author

    I get the same with the --help flag on the command line:

    > hledger is --help
    incomestatement [OPTIONS] [QUERY]
      Show revenue inflows and expense outflows during the report period.
      Amounts are shown with normal positive sign, as in conventional
      financial statements.
    
    Flags:
         --sum                  show sum of posting amounts (default)
         --valuechange          show total change of period-end historical
                                balance value (caused by deposits, withdrawals,
                                market price fluctuations)
         --gain                 show unrealised capital gain/loss (historical
                                balance value minus cost basis)
         --budget               show sum of posting amounts compared to budget
                                goals defined by periodic transactions
    
  4. simonmichael commented on Dec 17, 2024

    @simonmichael
    Member

    You've read them right, that does seem like a bug.

    Flags listed under "General * flags" headings are not expected to have an effect with all commands, which sometimes surprises people.

    But here it's in the command-specific "Flags" section, which is definitely wrong. This changed in hledger-1.21. Thanks!

    I'll either remove the flag, or (better ?) someone could add --budget support to incomestatement. I'm not sure how big or small a task that is.

    Does this qualify for https://hledger.org/REGRESSIONS.html#regression-bounty ? One or two bounties have been granted for 0.21, so I think yes. Please claim your $50 regression finder's bounty!

  5. added
    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.
    regressionA backwards step, indicating a weakness in our QA. We don't like these.
    on Dec 17, 2024
  6. simonmichael commented on Dec 17, 2024

    @simonmichael
    Member

    Yes I see, perfectly valid finder's bounty. I'll clarify that page a bit.

  7. lowercasename commented on Dec 17, 2024

    @lowercasename
    Author

    Oh wonderful, this has made my evening - I didn't realise there was a bug bounty! I'd love to add --budget support to incomestatement but probably not as a Haskell novice - something to work towards perhaps.

    Thank you for making hledger, I've been really enjoying it.

  8. simonmichael commented on Dec 20, 2024

    @simonmichael
    Member

    Dropped the --budget option from bs/bse/cf/is commands.

  9. changed the title [-]--budget doesn't do anything with incomestatement[/-] [+]1.21: --budget doesn't do anything with incomestatement[/+] on Sep 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.balancebountyThar's some kind o' loot on offer..budgetThe balance command's --budget reportdocsDocumentation-related.incomestatementregressionA backwards step, indicating a weakness in our QA. We don't like these.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions