This commit is contained in:
oscar alvarez 2022-07-22 10:38:42 -05:00
parent 4bde3e1c5a
commit ab226ddca7
1 changed files with 9 additions and 9 deletions

View File

@ -567,19 +567,19 @@ class Booking(Workflow, ModelSQL, ModelView):
for charge in charges:
bk = charge.folio.booking
invoice_party_id = fo.booking.party.id
invoice_party = fo.booking.party
if charge.invoice_to:
invoice_party_id = charge.invoice_to.id
invoice_party = charge.invoice_to
unit_price = bk.currency.round(charge.unit_price)
if invoice_party_id not in res.keys():
res[invoice_party_id] = {
'party': invoice_party_id,
'currency': bk.currency.id,
'payment_term': None,
'number': bk.number,
'reference': charge.folio.registration_card,
'lines': [],
res[invoice_party.id] = {
'party': invoice_party,
'currency': bk.currency.id,
'payment_term': None,
'number': bk.number,
'reference': charge.folio.registration_card,
'lines': [],
}
res[invoice_party_id]['lines'].append({