fix: exception if no bookings in cashbook used for evaluation

This commit is contained in:
Frederik Jaeckel 2023-06-28 13:41:10 +02:00
parent 07b339914d
commit 0191db91c3

View file

@ -150,6 +150,8 @@ class EvaluationLine(ModelSQL, ModelView):
Currency = Pool().get('currency.currency')
exp = Decimal(Decimal(1) / 10 ** self.currency_digits)
if amount is None:
return Decimal('0.0')
return Currency.compute(
from_currency,
amount,