This commit is contained in:
Oscar 2021-11-28 01:32:38 -05:00
parent 31b232d879
commit 6eaeb758d9
8 changed files with 26 additions and 26 deletions

View File

@ -1 +0,0 @@
,psk,Tech,25.11.2021 20:56,file:///home/psk/.config/libreoffice/4;

View File

@ -1 +0,0 @@
,psk,Tech,25.11.2021 20:47,file:///home/psk/.config/libreoffice/4;

View File

@ -1 +0,0 @@
,psk,Tech,25.11.2021 20:57,file:///home/psk/.config/libreoffice/4;

View File

@ -425,29 +425,29 @@ class Booking(Workflow, ModelSQL, ModelView):
'taxes_exception': bk.taxes_exception,
})
for charge in charges:
invoice_party_id = charge.invoice_to.id
unit_price = bk.currency.round(charge.unit_price)
if invoice_party_id != party.id:
if invoice_party_id not in res.keys():
res[invoice_party_id] = {
'party': charge.invoice_to.id,
'currency': bk.currency.id,
'payment_term': None,
'lines': [],
}
res[invoice_party_id]['lines'].append({
'description': ' | '.join([
str(charge.date_service),
charge.order or '',
charge.description or ''
]),
'quantity': charge.quantity,
'product': charge.product,
'unit_price': unit_price,
'charge': charge,
'taxes_exception': bk.taxes_exception,
})
for charge in charges:
invoice_party_id = charge.invoice_to.id
unit_price = bk.currency.round(charge.unit_price)
if invoice_party_id != party.id:
if invoice_party_id not in res.keys():
res[invoice_party_id] = {
'party': charge.invoice_to.id,
'currency': bk.currency.id,
'payment_term': None,
'lines': [],
}
res[invoice_party_id]['lines'].append({
'description': ' | '.join([
str(charge.date_service),
charge.order or '',
charge.description or ''
]),
'quantity': charge.quantity,
'product': charge.product,
'unit_price': unit_price,
'charge': charge,
'taxes_exception': bk.taxes_exception,
})
return res
@classmethod
@ -549,6 +549,7 @@ class Booking(Workflow, ModelSQL, ModelView):
'invoice_line': line.id,
})
invoice.save()
invoice.update_taxes([invoice])
@classmethod
def _get_new_invoice(cls, data):

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -12,6 +12,8 @@ this repository contains the full copyright notices and license terms. -->
<field name="birthday"/>
<label name="sex"/>
<field name="sex"/>
<label name="nationality"/>
<field name="nationality"/>
<group colspan="6" col="8" id="names">
<separator string="Names" colspan="4" id="names"/>
<newline/>