line: fee tests ergänzt

This commit is contained in:
Frederik Jaeckel 2023-02-20 23:22:31 +01:00
parent 4e118afffb
commit 2176b84d52
2 changed files with 173 additions and 3 deletions

View file

@ -283,7 +283,10 @@ class Line(SecondUomMixin, metaclass=PoolMeta):
).select(
tab_line.id,
Sum(Coalesce(
tab_inout_fee.credit - tab_inout_fee.debit,
# out-booking, positive amount = fee positive
tab_inout_fee.debit - tab_inout_fee.credit,
# a category-out on splitbooking as counterpart of
# transfer = fee is positive
tab_mv_spline_fee.amount,
Case(
(tab_line.bookingtype == 'spin', tab_spline_fee.amount),