This commit is contained in:
oscar alvarez 2022-05-19 10:20:43 -05:00
parent 3177d01285
commit 51648f3e7a
1 changed files with 3 additions and 3 deletions

View File

@ -583,7 +583,7 @@ class Booking(Workflow, ModelSQL, ModelView):
Config = Pool().get('account.voucher_configuration')
config = Config.get_configuration()
lines_to_create = []
commission = bk.currency.round(bk.channel_commission)
note, = Note.create([{
'description': bk.number,
'journal': config.default_journal_note.id,
@ -593,14 +593,14 @@ class Booking(Workflow, ModelSQL, ModelView):
line1, = NoteLine.create([{
'note': note.id,
'debit': 0,
'credit': bk.channel_commission,
'credit': commission,
'party': bk.channel.agent.party.id,
'account': bk.channel_invoice.account.id,
'description': bk.ota_booking_code,
}])
line2, = NoteLine.create([{
'note': note.id,
'debit': bk.channel_commission,
'debit': commission,
'credit': 0,
'party': bk.channel.agent.party.id,
'account': bk.channel.debit_account.id,