line: buchungstyp für gegenbuchung bei splitbuchung korrigiert

This commit is contained in:
Frederik Jaeckel 2022-09-13 22:18:31 +02:00
parent 843ade71e9
commit ec4466176e

View file

@ -302,12 +302,15 @@ class Line(Workflow, ModelSQL, ModelView):
values = { values = {
'cashbook': sp_line.booktransf.id, 'cashbook': sp_line.booktransf.id,
'bookingtype': 'mvin' if line.bookingtype == 'mvout' else 'mvout',
'date': line.date, 'date': line.date,
'description': sp_line.description, 'description': sp_line.description,
'booktransf': line.cashbook.id, 'booktransf': line.cashbook.id,
'reference': line.id, 'reference': line.id,
} }
if line.bookingtype.endswith('out'):
values['bookingtype'] = 'mvin'
else :
values['bookingtype'] = 'mvout'
values.update(line.get_amount_by_second_currency( values.update(line.get_amount_by_second_currency(
sp_line.booktransf.currency, sp_line.booktransf.currency,
amount = sp_line.amount, amount = sp_line.amount,