Garfield1985 · GitHub

Output from: hledger setup

Checking your hledger setup..
Legend: good, neutral, unknown, warning
hledger
'"ver' is not recognized as an internal or external command,
operable program or batch file.
* is running on                                 windows on x86_64
* is built with a supported compiler/RTS   yes  ghc 9.14.1, using threaded RTS
* is a native binary for this machine ?    yes  x86_64
* is a released version ?                  yes  hledger 1.99.2-gad6068782-20260428, windows-x86_64
* is up to date ? checking latest...       yes  latest is 1.52.1, 1.99.2 is installed
* is installed in PATH (this version) ?    yes  C:\Users\fatca\Documents\Utils\hledger\hledger.exe
* has a system text encoding configured ?  yes  UTF-8, data files must use this encoding
* has a user config file ?                  no
* has a local config file ?                yes  C:\肥猫-EE1AAE\华为家庭存储\Ledger\gnucash2leder\hledger.conf
* the config file is readable ?            yes
terminal
* the NO_COLOR variable is defined ?        no
* --color is configured by config file ?   yes  --color
* hledger will use color by default ?      yes
* the PAGER variable is defined ?           no
* --pager is configured by config file ?    no
* hledger will use a pager when needed ?    no  no pager was found
* box-drawing chars are used by default ?  yes
journal
* the LEDGER_FILE variable is defined ?     no
* a default journal file is readable ?      no  C:\Users\fatca\.hledger.journal:
data file "C:\Users\fatca\.hledger.journal" was not found.
Please create it first, eg with "hledger add" or a text editor.
Or, specify an existing data file with -f or $LEDGER_FILE.

Running on windows 11 25H2

Issues

I run the "hledger check basis", and it report there is an issue with the posting's cost basis vs. calculated cost basis.

PS C:\肥猫-EE1AAE\华为家庭存储\Ledger\gnucash2leder> hledger -V check basis
hledger.exe: Error: C:\肥猫-EE1AAE\华为家庭存储\Ledger\gnucash2leder\.\mydata.journal:5722:
     | 2025-05-24 * 购买理财
     |     资产:中国银行:理财                                                                                              -XXXXX CNY  ; Cash
5722 |     资产:中国银行:理财:{2025-05-24, 1.05 CNY}    "交银理财稳享灵动慧利日开7号_5811224055" XXXXXX {1.05 CNY} @@XXXXXX CNY
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This acquire posting's cost basis (1.04630000 CNY) differs from its transacted cost (1.04630000 CNY).
Acquire postings should ideally have basis equal to transacted cost. Common fixes:
  - drop the {}/{{}} so basis is inferred from the transacted cost
  - drop the @/@@ so transacted cost is inferred from the basis
  - set both to the same value (eg capitalising fees into basis,
    in which case remove any separate fee or expense posting)

However, the reported posting is different from the one I wrote in the journal file as below.

Image

Read the original on github.com ↗