14.02.26
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user