Replying from my phone, so I'll be quick. The first transaction requires to
be booked at cost, but you only specified the price.

10595 BYE {} @ 0.47 YEN

The empty bracket content {0.47 YEN} should be automatically filled out by
beancount.

On Sun, May 4, 2025, 07:50 'Alen Šiljak' via Beancount <
[email protected]> wrote:

> During the migration, I have identified a record that causes problems and
> I don't really understand why.
> I am going through the trading documentation to understand the concepts
> better but if someone can point me in the right direction, that would be
> much appreciated.
>
> The case seems rather simple:
> ```
> 1970-01-01 open Assets:Investments:Shares:BYE
> 1970-01-01 open Assets:Investments:Cash
> 1970-01-01 open Expenses:Commissions
>
> 2013-02-25 txn "Buy BYE"
>   Assets:Investments:Shares:BYE         10595 BYE @ 0.47 YEN
>   Expenses:Commissions                  19.95 YEN
>   Assets:Investments:Cash            -4999.60 YEN
>
> 2014-06-02 txn "Sell BYE"
>   Assets:Investments:Shares:BYE            -5000 BYE {0.47 YEN, 2013-02-25
> } @ 0.95 YEN
>   Expenses:Commissions                     19.95 YEN
>   ;Income:Investment:Capital-Gains         -2400.00 YEN
>   Assets:Investments:Cash                4730.05 YEN
> ```
> yet bean-check throws
> ```
> No position matches "Posting(account='Assets:Investments:Shares:BYE',
> units=-5000 BYE, cost=CostSpec(number_per=Decimal('0.47'),
> number_total=None, currency='YEN', date=datetime.date(2013, 2, 25),
> label=None, merge=False), price=0.95 YEN, flag=None, meta={'filename':
> '/mnt/x/pim/beancount/test.bean', 'lineno': 13})" against balance (10595
> BYE)
> ```
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion visit
> https://groups.google.com/d/msgid/beancount/21f2f590-0df2-48d2-ae50-5a6e213b9ef7n%40googlegroups.com
> <https://groups.google.com/d/msgid/beancount/21f2f590-0df2-48d2-ae50-5a6e213b9ef7n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/beancount/CAMzm8_p3N8mQrpRiZ8dbSVrU7ghUwOer6wLNeFzOXssnoH1%3DQw%40mail.gmail.com.

Reply via email to