line: field 'trade_fee' ok + test

This commit is contained in:
Frederik Jaeckel 2023-02-21 12:57:10 +01:00
parent 2176b84d52
commit 242f6d9578
2 changed files with 109 additions and 8 deletions

View file

@ -289,8 +289,8 @@ class Line(SecondUomMixin, metaclass=PoolMeta):
# transfer = fee is positive
tab_mv_spline_fee.amount,
Case(
(tab_line.bookingtype == 'spin', tab_spline_fee.amount),
(tab_line.bookingtype == 'spout', tab_spline_fee.amount * Decimal('-1.0')),
(tab_line.bookingtype == 'spin', tab_spline_fee.amount * Decimal('-1.0')),
(tab_line.bookingtype == 'spout', tab_spline_fee.amount),
),
Decimal('0.0'),
)).as_('fee'),