Merge lp:~camptocamp/hr-timesheet/6.1-hr_timesheet_print-wrong_dependency into lp:~hr-core-editors/hr-timesheet/6.1

Proposed by Guewen Baconnier @ Camptocamp
Status: Merged
Merge reported by: Joël Grand-Guillaume @ camptocamp
Merged at revision: not available
Proposed branch: lp:~camptocamp/hr-timesheet/6.1-hr_timesheet_print-wrong_dependency
Merge into: lp:~hr-core-editors/hr-timesheet/6.1
Diff against target: 531 lines (+167/-198)
6 files modified
hr_timesheet_print/__init__.py (+16/-22)
hr_timesheet_print/__openerp__.py (+20/-24)
hr_timesheet_print/report.xml (+2/-2)
hr_timesheet_print/report/__init__.py (+20/-27)
hr_timesheet_print/report/timesheet_report.py (+24/-36)
hr_timesheet_print/report/timesheet_report.rml (+85/-87)
To merge this branch: bzr merge lp:~camptocamp/hr-timesheet/6.1-hr_timesheet_print-wrong_dependency
Reviewer Review Type Date Requested Status
Guewen Baconnier @ Camptocamp Abstain
Alexandre Fayolle - camptocamp code review, no test Approve
Review via email: mp+139414@code.launchpad.net

Commit message

[FIX] hr_timesheet_print requires hr_timesheet_invoice, backport the changes done for the 7.0 migration

Most of the changes are styling issues.
Corrected a wrong copyright attribution and changed the license to AGPLv3

Description of the change

To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

LGTM

review: Approve (code review, no test)
39. By Guewen Baconnier @ Camptocamp <email address hidden>

[IMP] backport the changes done for the 7.0 migration

Most of the changes are styling issues.
Corrected a wrong copyright attribution and changed the license to AGPLv3

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

I updated my merge with all the others changes done on https://code.launchpad.net/~c2c/hr-timesheet/7.0-hr_timesheet_print-migr/+merge/139416

They are compatible with version 6.1

review: Needs Resubmitting
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) :
review: Abstain

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_timesheet_print/__init__.py'
2--- hr_timesheet_print/__init__.py 2011-08-12 12:33:12 +0000
3+++ hr_timesheet_print/__init__.py 2012-12-12 10:37:22 +0000
4@@ -1,27 +1,21 @@
5-# -*- coding: utf-8 -*-
6+# -*- coding: utf-8 -*-
7 ##############################################################################
8 #
9-# @author Renaville Vincent, ported by Joel Grand-Guillaume
10-# WARNING: This program as such is intended to be used by professional
11-# programmers who take the whole responsability of assessing all potential
12-# consequences resulting from its eventual inadequacies and bugs
13-# End users who are looking for a ready-to-use solution with commercial
14-# garantees and support are strongly adviced to contract a Free Software
15-# Service Company
16-#
17-# This program is Free Software; you can redistribute it and/or
18-# modify it under the terms of the GNU General Public License
19-# as published by the Free Software Foundation; either version 2
20-# of the License, or (at your option) any later version.
21-#
22-# This program is distributed in the hope that it will be useful,
23-# but WITHOUT ANY WARRANTY; without even the implied warranty of
24-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25-# GNU General Public License for more details.
26-#
27-# You should have received a copy of the GNU General Public License
28-# along with this program; if not, write to the Free Software
29-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
30+# Author: Vincent Renaville
31+# Copyright 2012 Camptocamp SA
32+#
33+# This program is free software: you can redistribute it and/or modify
34+# it under the terms of the GNU Affero General Public License as
35+# published by the Free Software Foundation, either version 3 of the
36+# License, or (at your option) any later version.
37+#
38+# This program is distributed in the hope that it will be useful,
39+# but WITHOUT ANY WARRANTY; without even the implied warranty of
40+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
41+# GNU Affero General Public License for more details.
42+#
43+# You should have received a copy of the GNU Affero General Public License
44+# along with this program. If not, see <http://www.gnu.org/licenses/>.
45 #
46 ##############################################################################
47 import report
48
49=== modified file 'hr_timesheet_print/__openerp__.py'
50--- hr_timesheet_print/__openerp__.py 2011-08-12 12:33:12 +0000
51+++ hr_timesheet_print/__openerp__.py 2012-12-12 10:37:22 +0000
52@@ -1,26 +1,21 @@
53-# -*- coding: utf-8 -*-
54+# -*- coding: utf-8 -*-
55 ##############################################################################
56-## @author Bessi Nicolas, ported by Joel Grand-Guillaume
57-# WARNING: This program as such is intended to be used by professional
58-# programmers who take the whole responsability of assessing all potential
59-# consequences resulting from its eventual inadequacies and bugs
60-# End users who are looking for a ready-to-use solution with commercial
61-# garantees and support are strongly adviced to contract a Free Software
62-# Service Company
63-#
64-# This program is Free Software; you can redistribute it and/or
65-# modify it under the terms of the GNU General Public License
66-# as published by the Free Software Foundation; either version 2
67-# of the License, or (at your option) any later version.
68-#
69-# This program is distributed in the hope that it will be useful,
70-# but WITHOUT ANY WARRANTY; without even the implied warranty of
71-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
72-# GNU General Public License for more details.
73-#
74-# You should have received a copy of the GNU General Public License
75-# along with this program; if not, write to the Free Software
76-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
77+#
78+# Author: Nicolas Bessi, ported by Joel Grand-Guillaume
79+# Copyright 2012 Camptocamp SA
80+#
81+# This program is free software: you can redistribute it and/or modify
82+# it under the terms of the GNU Affero General Public License as
83+# published by the Free Software Foundation, either version 3 of the
84+# License, or (at your option) any later version.
85+#
86+# This program is distributed in the hope that it will be useful,
87+# but WITHOUT ANY WARRANTY; without even the implied warranty of
88+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
89+# GNU Affero General Public License for more details.
90+#
91+# You should have received a copy of the GNU Affero General Public License
92+# along with this program. If not, see <http://www.gnu.org/licenses/>.
93 #
94 ##############################################################################
95
96@@ -31,13 +26,14 @@
97 detailed of hours passed.
98
99 """,
100- "version" : "1.2",
101+ "version" : "1.3",
102 "author" : "Camptocamp",
103 "category" : "Generic Modules/Projects & Services",
104 "website": "http://www.camptocamp.com",
105+ "license": 'AGPL-3',
106 "depends" : [
107 "analytic",
108- "hr_timesheet",
109+ "hr_timesheet_invoice",
110 ],
111 "init_xml" : [],
112 "update_xml" : [
113
114=== modified file 'hr_timesheet_print/report.xml'
115--- hr_timesheet_print/report.xml 2011-08-12 12:33:12 +0000
116+++ hr_timesheet_print/report.xml 2012-12-12 10:37:22 +0000
117@@ -3,13 +3,13 @@
118 <data>
119
120 <report id="timesheet_hours_report"
121- string="Timesheet report"
122+ string="Timesheet Report"
123 model="hr.analytic.timesheet"
124 name="hr.analytic.timesheet.report"
125 rml="hr_timesheet_print/report/timesheet_report.rml"/>
126
127 <report id="timesheet_hours_report_aal"
128- string="Timesheet report"
129+ string="Timesheet Report"
130 model="account.analytic.line"
131 name="analytic.line.timesheet.report"
132 rml="hr_timesheet_print/report/timesheet_report.rml"/>
133
134=== modified file 'hr_timesheet_print/report/__init__.py'
135--- hr_timesheet_print/report/__init__.py 2011-08-12 12:33:12 +0000
136+++ hr_timesheet_print/report/__init__.py 2012-12-12 10:37:22 +0000
137@@ -1,27 +1,20 @@
138-# -*- encoding: utf-8 -*-
139-##############################################################################
140-#
141-#
142-# WARNING: This program as such is intended to be used by professional
143-# programmers who take the whole responsability of assessing all potential
144-# consequences resulting from its eventual inadequacies and bugs
145-# End users who are looking for a ready-to-use solution with commercial
146-# garantees and support are strongly adviced to contract a Free Software
147-# Service Company
148-#
149-# This program is Free Software; you can redistribute it and/or
150-# modify it under the terms of the GNU General Public License
151-# as published by the Free Software Foundation; either version 2
152-# of the License, or (at your option) any later version.
153-#
154-# This program is distributed in the hope that it will be useful,
155-# but WITHOUT ANY WARRANTY; without even the implied warranty of
156-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
157-# GNU General Public License for more details.
158-#
159-# You should have received a copy of the GNU General Public License
160-# along with this program; if not, write to the Free Software
161-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
162-#
163-##############################################################################
164-import timesheet_report
165\ No newline at end of file
166+# -*- coding: utf-8 -*-
167+##############################################################################
168+#
169+# Copyright 2012 Camptocamp SA
170+#
171+# This program is free software: you can redistribute it and/or modify
172+# it under the terms of the GNU Affero General Public License as
173+# published by the Free Software Foundation, either version 3 of the
174+# License, or (at your option) any later version.
175+#
176+# This program is distributed in the hope that it will be useful,
177+# but WITHOUT ANY WARRANTY; without even the implied warranty of
178+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
179+# GNU Affero General Public License for more details.
180+#
181+# You should have received a copy of the GNU Affero General Public License
182+# along with this program. If not, see <http://www.gnu.org/licenses/>.
183+#
184+##############################################################################
185+import timesheet_report
186
187=== modified file 'hr_timesheet_print/report/timesheet_report.py'
188--- hr_timesheet_print/report/timesheet_report.py 2011-09-23 08:28:16 +0000
189+++ hr_timesheet_print/report/timesheet_report.py 2012-12-12 10:37:22 +0000
190@@ -1,39 +1,30 @@
191+# -*- coding: utf-8 -*-
192 ##############################################################################
193 #
194-# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.
195-#
196-# WARNING: This program as such is intended to be used by professional
197-# programmers who take the whole responsability of assessing all potential
198-# consequences resulting from its eventual inadequacies and bugs
199-# End users who are looking for a ready-to-use solution with commercial
200-# garantees and support are strongly adviced to contract a Free Software
201-# Service Company
202-#
203-# This program is Free Software; you can redistribute it and/or
204-# modify it under the terms of the GNU General Public License
205-# as published by the Free Software Foundation; either version 2
206-# of the License, or (at your option) any later version.
207-#
208-# This program is distributed in the hope that it will be useful,
209-# but WITHOUT ANY WARRANTY; without even the implied warranty of
210-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
211-# GNU General Public License for more details.
212-#
213-# You should have received a copy of the GNU General Public License
214-# along with this program; if not, write to the Free Software
215-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
216+# Copyright 2012 Camptocamp SA
217+#
218+# This program is free software: you can redistribute it and/or modify
219+# it under the terms of the GNU Affero General Public License as
220+# published by the Free Software Foundation, either version 3 of the
221+# License, or (at your option) any later version.
222+#
223+# This program is distributed in the hope that it will be useful,
224+# but WITHOUT ANY WARRANTY; without even the implied warranty of
225+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
226+# GNU Affero General Public License for more details.
227+#
228+# You should have received a copy of the GNU Affero General Public License
229+# along with this program. If not, see <http://www.gnu.org/licenses/>.
230 #
231 ##############################################################################
232
233 import time
234-from datetime import *
235-from report import report_sxw
236-
237-#import xml.dom.minidom
238-#import re
239+from datetime import datetime
240+from openerp.report import report_sxw
241
242
243 class timesheet_report(report_sxw.rml_parse):
244+
245 def __init__(self, cr, uid, name, context=None):
246 super(timesheet_report, self).__init__(cr, uid, name, context)
247 self.localcontext.update({
248@@ -42,11 +33,11 @@
249 })
250 self.context = context
251
252- def set_context(self, objects, data, ids, report_type = None):
253- super(timesheet_report,self).set_context(objects,data,ids,report_type)
254+ def set_context(self, objects, data, ids, report_type=None):
255 self.localcontext['ts_lines'] = objects
256 self.localcontext['tot_hours'] = self._get_tot_hours(objects)
257-
258+ super(timesheet_report, self).set_context(objects, data, ids, report_type)
259+
260 def _get_tot_hours(self, ts_lines):
261 tot = 0.0
262 deduced = 0.0
263@@ -60,22 +51,19 @@
264 factor_invoicing = 1.0
265 if line.to_invoice and line.to_invoice.factor != 0.0:
266 factor_invoicing = 1.0 - line.to_invoice.factor / 100
267- # deduced += ((line.unit_amount / factor) * factor_invoicing)
268 if factor_invoicing > 1.0:
269 deduced += ((line.unit_amount / factor) * factor_invoicing)
270 tot += ((line.unit_amount / factor) * factor_invoicing)
271 elif factor_invoicing <= 1.0:
272 tot += (line.unit_amount / factor)
273 deduced += ((line.unit_amount / factor) * factor_invoicing)
274-
275-
276- return {'total':tot,'deduced':deduced}
277-
278+
279+ return {'total': tot, 'deduced': deduced}
280
281 def _get_and_change_date_format_for_swiss(self, date_to_format):
282 date_formatted = ''
283 if date_to_format:
284- date_formatted = strptime(date_to_format, '%Y-%m-%d').strftime('%d.%m.%Y')
285+ date_formatted = datetime.strptime(date_to_format, '%Y-%m-%d').strftime('%d.%m.%Y')
286 return date_formatted
287
288 report_sxw.report_sxw('report.hr.analytic.timesheet.report', 'hr.analytic.timesheet', 'addons/hr_timesheet_print/report/timesheet_report.rml', parser=timesheet_report)
289
290=== modified file 'hr_timesheet_print/report/timesheet_report.rml'
291--- hr_timesheet_print/report/timesheet_report.rml 2011-08-12 12:33:12 +0000
292+++ hr_timesheet_print/report/timesheet_report.rml 2012-12-12 10:37:22 +0000
293@@ -1,22 +1,22 @@
294 <?xml version="1.0"?>
295 <document filename="test.pdf">
296- <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
297+ <template pageSize="(595.0,842.0)" title="Timesheet Report" author="" allowSplitting="20">
298 <pageTemplate id="first">
299 <frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
300- <pageGraphics>
301- <setFont name="Helvetica-Bold" size="9"/>
302-
303- <drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
304- <drawString x="17.7cm" y="28.1cm">Maintenance And Support Summary</drawString>
305-
306- <setFont name="Helvetica" size="9"/>
307- <drawString x="1.0cm" y="2cm"> [[ time.strftime("%m-%d-%y %H:%M", time.localtime()) ]]</drawString>
308- <drawString x="17.7cm" y="2cm">Page <pageNumber/></drawString>
309-
310- <lineMode width="0.7"/>
311- <lines>0.6cm 27.9cm 20.3cm 27.9cm</lines>
312- <setFont name="Helvetica" size="8"/>
313- </pageGraphics>
314+ <pageGraphics>
315+ <setFont name="Helvetica-Bold" size="9"/>
316+
317+ <drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
318+ <drawString x="17.7cm" y="28.1cm">Maintenance And Support Summary</drawString>
319+
320+ <setFont name="Helvetica" size="9"/>
321+ <drawString x="1.0cm" y="2cm"> [[ time.strftime("%m-%d-%y %H:%M", time.localtime()) ]]</drawString>
322+ <drawString x="17.7cm" y="2cm">Page <pageNumber/></drawString>
323+
324+ <lineMode width="0.7"/>
325+ <lines>0.6cm 27.9cm 20.3cm 27.9cm</lines>
326+ <setFont name="Helvetica" size="8"/>
327+ </pageGraphics>
328
329 </pageTemplate>
330 </template>
331@@ -26,7 +26,7 @@
332 <blockValign value="TOP"/>
333 </blockTableStyle>
334 <blockTableStyle id="Table1">
335- <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,0" stop="-1,-1"/>
336+ <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,0" stop="-1,-1"/>
337 <blockAlignment value="LEFT"/>
338 <blockValign value="TOP"/>
339 <blockBackground colorName="#e6e6e6" start="0,0" stop="0,-1"/>
340@@ -35,7 +35,7 @@
341 <blockBackground colorName="#e6e6e6" start="0,1" stop="0,-1"/>
342 <blockBackground colorName="#e6e6e6" start="1,1" stop="1,-1"/>
343 <blockBackground colorName="#e6e6e6" start="2,1" stop="2,-1"/>
344-
345+
346 </blockTableStyle>
347 <blockTableStyle id="Table6">
348 <blockAlignment value="LEFT"/>
349@@ -57,7 +57,7 @@
350 <blockTableStyle id="Table2">
351 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
352 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
353-
354+
355 <blockValign value="TOP"/>
356 <blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>
357 </blockTableStyle>
358@@ -85,7 +85,7 @@
359 <blockTableStyle id="Table7">
360 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
361 </blockTableStyle>
362-
363+
364 <initialize>
365 <paraStyle name="all" alignment="justify"/>
366 </initialize>
367@@ -94,7 +94,7 @@
368 <paraStyle name="P2c" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
369 <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
370 <paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="14" spaceBefore="0.0" spaceAfter="6.0" alignment="RIGHT"/>
371- <paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/>
372+ <paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/>
373 <paraStyle name="P9b" fontName="Helvetica" fontSize="8" alignment="LEFT"/>
374 <paraStyle name="P9c" fontName="Helvetica" fontSize="8" alignment="RIGHT"/>
375 <paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
376@@ -130,64 +130,62 @@
377 </blockTableStyle>
378
379 <paraStyle
380- name="Level5"
381- fontName="Helvetica"
382- fontSize="8.0" />
383- <paraStyle
384- name="Level4"
385- fontName="Helvetica"
386- fontSize="8.0" />
387- <paraStyle
388- name="Level3"
389- fontName="Helvetica"
390- fontSize="8.0" />
391- <paraStyle
392- name="Level2"
393- firstLineIndent="-0.03cm"
394- fontName="Helvetica-Bold"
395- fontSize="8.0" />
396+ name="Level5"
397+ fontName="Helvetica"
398+ fontSize="8.0" />
399+ <paraStyle
400+ name="Level4"
401+ fontName="Helvetica"
402+ fontSize="8.0" />
403+ <paraStyle
404+ name="Level3"
405+ fontName="Helvetica"
406+ fontSize="8.0" />
407+ <paraStyle
408+ name="Level2"
409+ firstLineIndent="-0.03cm"
410+ fontName="Helvetica-Bold"
411+ fontSize="8.0" />
412 <paraStyle name="Level1"
413- fontSize="8.0"
414- fontName="Helvetica-Bold"
415- />
416+ fontSize="8.0"
417+ fontName="Helvetica-Bold"
418+ />
419 <paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
420 <paraStyle name="Index" fontName="Helvetica"/>
421 </stylesheet>
422 <images/>
423 <story>
424
425- <para style="P2">[[ objects and objects[0] and setLang(objects[0].account_id.partner_id.lang) ]]</para>
426- <para style="P1">Spent hours details</para>
427-
428+ <para style="P2">[[ objects and objects[0] and setLang(objects[0].account_id.partner_id.lang) ]]</para>
429+ <para style="P1">Spent hours details</para>
430+
431 <para style="P12a"></para>
432 <para style="P12a"></para>
433 <blockTable colWidths="258.0,259.0" style="Table1" repeatRows="1">
434- <tr>
435- <td>
436- <para style="P12a">Report Date : </para>
437- </td>
438- <td>
439- <para style="P2">[[ time.strftime("%d.%m.%Y", time.localtime()) ]]</para>
440- </td>
441- </tr>
442- <tr>
443- <td>
444- <!-- <para style="P12a">[[ o.type == 'hours' and "Quantity of hours" or "Amount"]] used : </para> -->
445- <para style="P12a">Total hours : </para>
446- </td>
447- <td>
448- <para style="P2">[[ round(tot_hours['total'],2) ]]</para>
449- </td>
450- </tr>
451- <tr>
452- <td>
453- <!-- <para style="P12a">[[ o.type == 'hours' and "Quantity of hours" or "Amount"]] used : </para> -->
454- <para style="P12a">Invoiced hours : </para>
455- </td>
456- <td>
457- <para style="P2">[[ round(tot_hours['deduced'],2) or '0.0' ]]</para>
458- </td>
459- </tr>
460+ <tr>
461+ <td>
462+ <para style="P12a">Report Date: </para>
463+ </td>
464+ <td>
465+ <para style="P2">[[ time.strftime("%d.%m.%Y", time.localtime()) ]]</para>
466+ </td>
467+ </tr>
468+ <tr>
469+ <td>
470+ <para style="P12a">Total hours: </para>
471+ </td>
472+ <td>
473+ <para style="P2">[[ round(tot_hours['total'],2) ]]</para>
474+ </td>
475+ </tr>
476+ <tr>
477+ <td>
478+ <para style="P12a">Invoiced hours: </para>
479+ </td>
480+ <td>
481+ <para style="P2">[[ round(tot_hours['deduced'], 2) or '0.0' ]]</para>
482+ </td>
483+ </tr>
484 </blockTable>
485 <para style="P12a"></para>
486 <para style="P12a"></para>
487@@ -210,25 +208,25 @@
488 <para style="P12a">Deduced</para>
489 </td>
490 </tr>
491-
492- <tr>
493- [[ repeatIn(objects,'l') ]]
494- <td>
495- <para style="P2">[[ l.date and format_date(l.date) or '' ]]</para>
496- </td>
497- <td>
498- <para style="P2">[[ l.name or '' ]]</para>
499- </td>
500- <td>
501- <para style="P2c">[[ round(l.to_invoice.factor &gt;= 0.0 and l.unit_amount or l.to_invoice.factor &lt;= -0.01 and l.unit_amount and ((l.unit_amount and l.to_invoice) and (l.unit_amount - (l.unit_amount * l.to_invoice.factor) / 100 ) or '0.0') or '0.0',2) ]]</para>
502- </td>
503- <td>
504- <para style="P2c">[[ l.to_invoice.factor &gt;= 0.0 and l.to_invoice.customer_name or l.to_invoice.factor &lt;= -0.01 and '100%' ]]</para>
505- </td>
506- <td>
507- <para style="P2c">[[ round((l.unit_amount and l.to_invoice) and (l.unit_amount - (l.unit_amount * l.to_invoice.factor) / 100 ) or '0.0', 2) ]]</para>
508- </td>
509- </tr>
510+
511+ <tr>
512+ [[ repeatIn(objects, 'l') ]]
513+ <td>
514+ <para style="P2">[[ l.date and format_date(l.date) or '' ]]</para>
515+ </td>
516+ <td>
517+ <para style="P2">[[ l.name or '' ]]</para>
518+ </td>
519+ <td>
520+ <para style="P2c">[[ round(l.to_invoice.factor &gt;= 0.0 and l.unit_amount or l.to_invoice.factor &lt;= -0.01 and l.unit_amount and ((l.unit_amount and l.to_invoice) and (l.unit_amount - (l.unit_amount * l.to_invoice.factor) / 100 ) or 0.0), 2) or '0.0' ]]</para>
521+ </td>
522+ <td>
523+ <para style="P2c">[[ l.to_invoice.factor &gt;= 0.0 and l.to_invoice.customer_name or l.to_invoice.factor &lt;= -0.01 and '100%' ]]</para>
524+ </td>
525+ <td>
526+ <para style="P2c">[[ round((l.unit_amount and l.to_invoice) and (l.unit_amount - (l.unit_amount * l.to_invoice.factor) / 100 ) or 0.0, 2) or '0.0' ]]</para>
527+ </td>
528+ </tr>
529 </blockTable>
530
531 </story>

Subscribers

People subscribed via source and target branches

to all changes: