facturation: make invoices rendered to pdf accept 26 acts.

This commit is contained in:
Mikaël Ates 2013-08-09 12:09:52 +02:00
parent 2562d590f9
commit 1baad60c92
2 changed files with 5 additions and 5 deletions

View File

@ -149,7 +149,7 @@ def invoice_files(service, invoicing, batch, invoice, counter=None):
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
@ -158,12 +158,12 @@ def invoice_files(service, invoicing, batch, invoice, counter=None):
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

View File

@ -73,7 +73,7 @@ class InvoiceTemplate(object):
'type': 'array',
'size': 6,
'y': 323,
'lineheight': 12,
'lineheight': 11,
'cols': [
38,
65,
@ -88,7 +88,7 @@ class InvoiceTemplate(object):
'type': 'array',
'size': 6,
'y': 323,
'lineheight': 12,
'lineheight': 11,
'x': 395.5,
'cols': [
38,