BaoXuebin/beancount-gs

在进行多币种记账时,出现报错无法入账的情况(当月汇率出现变化)

Closed this issue · 2 comments

删除了FIFO后依然出现报错
/data/beancount/364dcf1d38a5de6a98030f449d62a129b298d81d/month/2024-06.bean:327: No position matches "Posting(account='Liabilities:Life:**银行信用卡', units=3.19 USD, cost=CostSpec(number_per=Decimal('7.2789'), number_total=None, currency='CNY', date=None, label=None, merge=False), price=None, flag=None, meta={'filename': '/data/beancount/364dcf1d38a5de6a98030f449d62a129b298d81d/month/2024-06.bean', 'lineno': 330})" against balance (-3.19 USD {7.2425 CNY, 2024-06-02})

2024-06-20 * "还信用卡"
Assets:Flow:美元 3.19 USD {7.2789 CNY}
Assets:Flow:**银行 -23.22 CNY
Liabilities:Life:**银行信用卡 3.19 USD {7.2789 CNY}
Assets:Flow:美元 -3.19 USD {7.2789 CNY}

2 这是两次账目的情况。 这是报错的账目,应该是没有您说的那个情况。

你试试改成这样

2024-06-02 * "" "1"
 Expenses:Life:Subscribe:境外订阅 3.19 USD @ 7.242 CNY
 Liabilities:Life:**银行信用卡 -3.19 USD @ 7.242 CNY

2024-06-20 * "" "2"
 Liabilities:Life:**银行信用卡 3.19 USD @ 7.2789 CNY
 Assets:Flow:**银行 -23.22 CNY

/data/beancount/364dcf1d38a5de6a98030f449d62a129b298d81d/month/2024-06.bean:331: No position matches "Posting(account='Liabilities:Life:**银行信用卡', units=3.19 USD, cost=CostSpec(number_per=Decimal('7.2789'), number_total=None, currency='CNY', date=None, label=None, merge=False), price=None, flag=None, meta={'filename': '/data/beancount/364dcf1d38a5de6a98030f449d62a129b298d81d/month/2024-06.bean', 'lineno': 332})" against balance (-3.19 USD {7.2425 CNY, 2024-06-02})

2024-06-20 * "还信用卡"
Liabilities:Life:**银行信用卡 3.19 USD {7.2789 CNY}
Assets:Flow:美元 -3.19 USD {7.2789 CNY}

然后就变成了这样😂