tbm / test

0 stars 0 forks source link

@ EUR not working #77

Closed tbm closed 6 years ago

tbm commented 9 years ago

Original report by clemente (Bitbucket: clemente, GitHub: clemente).


I tried „booking“ branch to use the „@ EUR“ syntax. grammar.py, around line 740:

        # If the price is specified for the entire amount, compute the effective
        # price here and forget about that detail of the input syntax.
        if istotal:
            if position.units.number == ZERO:
                number = ZERO
            else:
                if __allow_negative_prices__:
                    number = price.number/position.units.number
                else:
                    number = price.number/abs(position.units.number)
            price = Amount(number, price.currency)

But price.number is <class 'beancount.core.number.MISSING'> EUR, so line 740 fails with:

/w/beancount/src/python/beancount/parser/grammar.py:741:     TypeError: unsupported operand type(s) for /: 'type' and 'decimal.Decimal'
tbm commented 9 years ago

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


I don't recommend working with the booking branch. It's not ready for users yet.

tbm commented 6 years ago

Original comment by Justus Pendleton (Bitbucket: hoostus, GitHub: hoostus).


This issue appears to be obsolete and can be closed.

tbm commented 6 years ago

Original comment by Martin Blais (Bitbucket: blais, GitHub: blais).


Completed.