Skip to content

1.29: Valid entries with equity conversion postings are rejected if hledger can't detect balancing postings #2045

Description

@the-solipsist

This entry is parsed without issue with hledger bal in v1.28:

2017-12-08 Giordano
    Expenses:Gift:XX-XXXXXXX                 HKD 118.00
    Expenses:Personal:Clothing               HKD 118.00
    Equity:Trading:Currency:INR-HKD:HKD     HKD -236.00
    Equity:Trading:Currency:INR-HKD:INR       ₹2,150.77
    Liabilities:Credit-Card:XXX              ₹-2,150.77

However, this is no longer the case with v1.29+, which throws up the error:

There is not a unique posting which matches the conversion posting pair:
    Equity:Trading:Currency:INR-HKD:INR       ₹2,150.77
    Equity:Trading:Currency:INR-HKD:HKD     HKD -236.00

This is essentially doing a strict --infer-costs check, rather than / in addition to whatever checks the journal parsing code was doing earlier.

This works fine:

2017-12-08 Giordano
    Expenses:Personal:Clothing               HKD 236.00
    Equity:Trading:Currency:INR-HKD:HKD     HKD -236.00
    Equity:Trading:Currency:INR-HKD:INR       ₹2,150.77
    Liabilities:Credit-Card:XXX              ₹-2,150.77
    Expenses:Gift:XX-XXXXXXX                 HKD 118.00
    Expenses:Personal:Clothing              HKD -118.00

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.bountyThar's some kind o' loot on offer..cliCommand line parsing, options, arguments and suchlike.journalThe journal file format, and its features.regressionA 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