Revision 1baad60c
Added by Mikaël Ates over 12 years ago
| calebasse/facturation/invoice_header.py | ||
|---|---|---|
|
if invoice.list_dates:
|
||
|
dates = invoice.list_dates.split('$')
|
||
|
if dates:
|
||
|
if len(dates) > 24:
|
||
|
if len(dates) > 26:
|
||
|
raise RuntimeError('Too much acts in invoice %s' % invoice.id)
|
||
|
kind = 'X'
|
||
|
offset = 0
|
||
| ... | ... | |
|
kind = invoice.first_tag[0]
|
||
|
offset = int(invoice.first_tag[1:])
|
||
|
prestation = u'SNS' if kind == 'T' else u'SD'
|
||
|
for date in dates[:12]:
|
||
|
for date in dates[:13]:
|
||
|
tableau1.append([u'19', u'320', prestation, date, date,
|
||
|
invoice.decimal_ppa, 1, invoice.decimal_ppa, kind + str(offset)])
|
||
|
total1 += invoice.decimal_ppa
|
||
|
offset += 1
|
||
|
for date in dates[12:24]:
|
||
|
for date in dates[13:26]:
|
||
|
tableau2.append([u'19', u'320', prestation, date, date,
|
||
|
invoice.decimal_ppa, 1, invoice.decimal_ppa, kind + str(offset)])
|
||
|
total2 += invoice.decimal_ppa
|
||
Also available in: Unified diff
facturation: make invoices rendered to pdf accept 26 acts.