Skip to content

1.31: Non-print-like reports are adding decimal marks #2115

Description

@usaAmch

Given that a commodity that uses thousand separators and no decimal places is declared, when running non-print-like reports (like bal, reg, bs), the output includes the decimal mark even thought it is not needed.

Steps to reproduce

  • Generate a new ledger file with the following content:
  commodity JPY
     format 1,000. JPY

   payee open
   payee test

   account asset
   account equity
   account expense

   2023-01-01 open
     asset             1,000 JPY
     equity

   2023-01-02 test
     expense               1 JPY
     asset
  • Execute the following command: hledger -f test.journal bal

Expected Result

  • bal report should show equity amount as 1,000 JPY
             999 JPY  asset
          -1,000 JPY  equity
               1 JPY  expense
--------------------
                   0 

Current Result

  • bal report shows equity amount as 1,000. JPY, note the extra . at the end of the amount.
             999 JPY  asset
         -1,000. JPY  equity
               1 JPY  expense
--------------------
                   0 

Extra Info

% hledger --version
hledger 1.31, mac-aarch64

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.aregisterbalancebalancesheetbountyThar's some kind o' loot on offer..cashflowincomestatementregisterregressionA backwards step, indicating a weakness in our QA. We don't like these.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions