main #7

Merged
admin merged 620 commits from main into dev 2026-03-29 13:03:25 +00:00
Showing only changes of commit e040a4fc11 - Show all commits

View File

@@ -293,16 +293,20 @@ class ValuationBase(ModelSQL):
fees = [e.fee for e in fl]
for sf in cls.group_fees_by_type_supplier(line, fees):
sign = -1 if sf.p_r == 'pay' else 1
qty = round(lot.get_current_quantity_converted(), 5)
if sf.mode == 'ppack':
price = sf.price
amount = sf.amount
elif sf.mode == 'lumpsum':
price = sf.price
amount = sf.price
qty = 1
else:
price = Decimal(sf.get_price_per_qt())
amount = round(price * lot.get_current_quantity_converted() * sign, 2)
if sf.currency != line.purchase.currency:
with Transaction().set_context(date=Date.today()):
price = Currency.compute(sf.currency, price, line.purchase.currency)
qty = round(lot.get_current_quantity_converted(), 5)
if line.mtm:
for strat in line.mtm:
fee_lines.append({