This commit is contained in:
2026-03-23 18:03:59 +01:00
parent 74e4ac0c1b
commit 03997db3e4

View File

@@ -116,7 +116,7 @@ class ValuationBase(ModelSQL):
if line.purchase.company.currency != currency:
with Transaction().set_context(date=Date.today()):
base_amount = Currency.compute(currency,amount, line.purchase.company.currency)
rate = round(amount / base_amount,6)
rate = round(amount / (base_amount if base_amount else 1),6)
last_price = pc.get_last_price()
# mtm = round(Decimal(last_price) * qty * Decimal(sign), 2) if last_price else Decimal(0)
values.update({