~camptocamp/account-financial-report/7.0-fix-1253659

« back to all changes in this revision

Viewing changes to account_financial_report/report/balance_full_4_cols_journal_ledger.rml

  • Committer: Humberto Arocha
  • Date: 2013-07-31 13:01:43 UTC
  • mfrom: (41.2.4 afr)
  • Revision ID: humbertoarocha@gmail.com-20130731130143-4oszh6d1oczhr5lq
[MERGE] [account_financial_report] Journal ledger

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0"?>
 
2
<document filename="test.pdf">
 
3
    <template pageSize="(27.94cm,21.59cm)" title="Test" author="Martin Simon" allowSplitting="20" showBoundary="0">
 
4
        <pageTemplate id="first">
 
5
            <frame id="first" x1="1.0cm" y1="1.0cm" width="26.0cm" height="16.65cm"/>
 
6
            <pageGraphics>
 
7
                <setFont name="Helvetica" size="9"/>
 
8
 
 
9
                <image x="1.0cm" y="17.65cm" width="5.0cm">[[company.logo and company.logo or removeParentNode('image')]]</image>
 
10
<!--
 
11
                <drawString x="1.0cm" y="24.5cm">[[company.logo and removeParentNode('para') or company.name]]</drawString> 
 
12
-->
 
13
 
 
14
                <place x="-3.5cm" y="16.15cm" width="19cm"  height="5.0cm"> 
 
15
                    <blockTable colWidths="9.6cm,9.4cm" style="TITLE">
 
16
                        <tr>
 
17
                            <td><para style="TOP_TITLE"></para></td>
 
18
                            <td><para style="TITLE_CENTER_NAME">
 
19
                                <font>[[ (company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE')]]</font>
 
20
                                <font>[[ company.partner_id.vat and ('- %s-%s-%s'%(company.partner_id.vat[2:3],company.partner_id.vat[3:11],company.partner_id.vat[11:12])) or '' ]]</font>
 
21
                            </para></td>
 
22
                        </tr>
 
23
                        <tr>
 
24
                            <td><para style="TOP_TITLE"></para></td>
 
25
                            <td><para style="TITLE_CENTER">[[ get_informe_text(data['form']) ]]</para></td>
 
26
                        </tr>
 
27
                        <tr>
 
28
                            <td><para style="TOP_TITLE"></para></td>
 
29
                            <td><para style="TITLE_CENTER">(Expressed in [[data['form'] and (' %s'%( exchange_name(data['form']))) or '']])</para></td>
 
30
                        </tr>
 
31
                        <tr>
 
32
                            <td><para style="TOP_TITLE"></para></td>
 
33
                            <td><para style="TITLE_CENTER">[[data['form'] and get_month(data['form']) or '']]</para></td>
 
34
                        </tr>
 
35
                    </blockTable>
 
36
                </place>
 
37
                <drawRightString x="270mm" y="5mm"> Pag.: <pageNumber/></drawRightString> 
 
38
            </pageGraphics>
 
39
 
 
40
        </pageTemplate>
 
41
    </template>
 
42
    <stylesheet>
 
43
        <blockTableStyle id="BODY_LINE">
 
44
            <blockValign value="TOP"/>
 
45
            <blockAlignment value="RIGHT"/>
 
46
            <blockTopPadding length="1.0"/>
 
47
            <blockBottomPadding length="1.0"/>
 
48
            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1" thickness='0.25'/>
 
49
        </blockTableStyle>
 
50
        <blockTableStyle id="BODY_LINE_FILLED">
 
51
            <blockBackground colorName="lightgrey" start="0,0" stop="-1,-1"/>
 
52
            <blockValign value="TOP"/>
 
53
            <blockAlignment value="RIGHT"/>
 
54
            <blockTopPadding length="1.0"/>
 
55
            <blockBottomPadding length="1.0"/>
 
56
            <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1" thickness='0.25'/>
 
57
        </blockTableStyle>
 
58
        <blockTableStyle id="TITLE">
 
59
            <blockValign value="TOP"/>
 
60
        </blockTableStyle> 
 
61
        <blockTableStyle id="BODY">
 
62
            <blockValign value="TOP"/>
 
63
            <blockAlignment value="RIGHT"/>
 
64
            <blockTopPadding length="1.0"/>
 
65
            <blockBottomPadding length="1.0"/>
 
66
            <lineStyle kind="LINEBELOW" colorName="darkgrey" start="0,0" stop="-1,-1" thickness='0.25'/>
 
67
        </blockTableStyle>
 
68
        <blockTableStyle id="BODY_STRIKE">
 
69
            <blockValign value="TOP"/>
 
70
            <blockAlignment value="RIGHT"/>
 
71
            <blockTopPadding length="1.0"/>
 
72
            <blockBottomPadding length="1.0"/>
 
73
            <lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="0,1" stop="-1,-1" thickness='0.5'/>
 
74
        </blockTableStyle>
 
75
        <blockTableStyle id="TOP_TABLE">
 
76
            <blockAlignment value="LEFT"/>
 
77
            <blockValign value="TOP"/>
 
78
            <lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="0,-1" stop="0,-1" thickness='0.25'/>
 
79
        </blockTableStyle>
 
80
 
 
81
        <initialize>
 
82
            <paraStyle name="all" alignment="justify"/>
 
83
        </initialize>
 
84
        
 
85
        <paraStyle 
 
86
            name="TITLE_LEFT_ALIGN_NEW" 
 
87
            fontName="Courier"
 
88
            fontSize="7.0"
 
89
            leading="10" 
 
90
            alignment="RIGHT" 
 
91
            spaceBefore="0.0" 
 
92
            spaceAfter="0.0"/>
 
93
        <paraStyle name="TITLES_NEW" 
 
94
            fontName="Courier"
 
95
            fontSize="7.0" 
 
96
            leading="10" 
 
97
            alignment="LEFT" 
 
98
            spaceBefore="0.0" 
 
99
            spaceAfter="0.0"/>
 
100
        <paraStyle name="TITLES_NEW_P" 
 
101
            fontName="Helvetica-Bold"
 
102
            fontSize="6.0" 
 
103
            leading="10" 
 
104
            alignment="LEFT" 
 
105
            spaceBefore="0.0" 
 
106
            spaceAfter="0.0"/>
 
107
        <paraStyle name="TITLES_NEW_RIGHT" 
 
108
            fontName="Courier"
 
109
            fontSize="7.0" 
 
110
            leading="10" 
 
111
            alignment="RIGHT" 
 
112
            spaceBefore="0.0" 
 
113
            spaceAfter="0.0"/>
 
114
        <paraStyle 
 
115
            name="TITLE_LEFT_ALIGN" 
 
116
            fontName="Helvetica-Bold" 
 
117
            fontSize="7.0" 
 
118
            leading="10" 
 
119
            alignment="RIGHT" 
 
120
            spaceBefore="0.0" 
 
121
            spaceAfter="0.0"/>
 
122
        <paraStyle name="TOP_TITLE" fontName="Helvetica-Bold" fontSize="7"  leftIndent="0.0" alignment="LEFT"/>
 
123
        <paraStyle 
 
124
            name="TITLES" 
 
125
            fontName="Helvetica-Bold" 
 
126
            fontSize="7.0" 
 
127
            leading="10" 
 
128
            alignment="LEFT"  
 
129
            spaceBefore="0.0" 
 
130
            spaceAfter="0.0"/>
 
131
        <paraStyle name="TITLE_CENTER" fontName="Helvetica-Bold" fontSize="7" leading="10" leftIndent="0.0" alignment="CENTER"/>
 
132
        <paraStyle name="TITLE_CENTER_NAME" fontName="Helvetica-Bold" fontSize="12" leading="13" leftIndent="0.0" alignment="CENTER"/>
 
133
        <paraStyle 
 
134
            name="TITLE" 
 
135
            alignment="CENTER" 
 
136
            fontName="Helvetica" 
 
137
            fontSize="18.0" 
 
138
            leading="20" 
 
139
            spaceBefore="-3.0" 
 
140
            textColor="black"/>
 
141
    </stylesheet>
 
142
    <images/>
 
143
    <story>
 
144
        <para>[[setLang(user.lang)]]</para>
 
145
 
 
146
        <blockTable colWidths="2.5cm,13.5cm,2.5cm,2.5cm,2.5cm,2.5cm" style="BODY" repeatRows="0">
 
147
           <tr noRowsplits="0">
 
148
                <td>
 
149
                    <para style="TITLE_LEFT_ALIGN">
 
150
                    <font>CODE</font>
 
151
                    </para>
 
152
                </td>
 
153
                <td>
 
154
                    <para style="TITLES">ACCOUNT</para>
 
155
                </td>
 
156
                <td>
 
157
                    <para style="TITLE_LEFT_ALIGN">INITIAL</para>
 
158
                </td>
 
159
                <td>
 
160
                    <para style="TITLE_LEFT_ALIGN">DEBIT</para>
 
161
                </td>
 
162
                <td>
 
163
                    <para style="TITLE_LEFT_ALIGN">CREDIT</para>
 
164
                </td>
 
165
                <td>
 
166
                    <para style="TITLE_LEFT_ALIGN">BALANCE</para>
 
167
                </td>
 
168
            </tr>
 
169
        </blockTable>
 
170
                <blockTable colWidths="6.0cm,3.0cm,3.0cm,2.5cm,4.0cm,2.5cm,2.5cm,2.5cm" style="BODY_LINE" repeatRows="0">
 
171
<!--
 
172
                [[ (a['type'] &lt;&gt; 'view') or removeParentNode('blockTable') ]]
 
173
-->
 
174
                    <tr noRowsplits="1">
 
175
                        <td>
 
176
                            <para style="TITLES_NEW">
 
177
                                <font>DATE</font>
 
178
                            </para>
 
179
                        </td>
 
180
                        <td>
 
181
                            <para style="TITLES_NEW">
 
182
                                <font>PERIOD</font>
 
183
                            </para>
 
184
                        </td>
 
185
                        <td>
 
186
                            <para style="TITLES_NEW">JOURNAL ENTRY</para>
 
187
                        </td>
 
188
                        <td>
 
189
                            <para style="TITLE_LEFT_ALIGN"></para>
 
190
                        </td>
 
191
                        <td>
 
192
                            <para style="TITLE_LEFT_ALIGN"></para>
 
193
                        </td>
 
194
                        <td>
 
195
                            <para style="TITLE_LEFT_ALIGN"></para>
 
196
                        </td>
 
197
                        <td>
 
198
                            <para style="TITLE_LEFT_ALIGN"></para>
 
199
                        </td>
 
200
                        <td>
 
201
                            <para style="TITLE_LEFT_ALIGN"></para>
 
202
                        </td>
 
203
                    </tr>
 
204
                </blockTable>
 
205
    <section>
 
206
        <para>[[ repeatIn([x for x in lines(data['form']) if x['type'] != 'view'], 'a') ]]</para>
 
207
        <blockTable colWidths="2.5cm,13.5cm,2.5cm,2.5cm,2.5cm,2.5cm" style="BODY" repeatRows="0">
 
208
            <tr>
 
209
                <td>
 
210
                    <para style="TITLE_LEFT_ALIGN">
 
211
                        <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
 
212
                        <i>[[a['label']==True and a['code'] or ''  ]]</i>
 
213
                    </para>
 
214
                </td>
 
215
                <td>
 
216
                    <para style="TITLES">
 
217
                        <font>[[ ((a['total'] and not a['label']) and setTag('para','para',{'alignment':"RIGHT"}) or (a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}))) or removeParentNode('font') ]]</font>
 
218
                        <font>[[ a['type']=='view' and  a['name'].upper() or a['name'].title() ]]</font>
 
219
                    </para>
 
220
                </td>
 
221
                <td>
 
222
                    <para style="TITLE_LEFT_ALIGN">
 
223
                        <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
 
224
                        <font>[[ (a['total']==True) and formatLang(a['balanceinit'] and a['balanceinit'] * a.get('change_sign',1.0) or 0.0, digits=2, grouping=True)  or '']]</font>
 
225
                    </para>
 
226
                </td>
 
227
                <td>
 
228
                    <para style="TITLE_LEFT_ALIGN">
 
229
                        <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
 
230
                        <font>[[ (a['total']==True) and formatLang(a['debit'], digits=2, grouping=True) or '']]</font>
 
231
                    </para>
 
232
                </td>
 
233
                <td>
 
234
                    <para style="TITLE_LEFT_ALIGN">
 
235
                        <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
 
236
                        <font>[[ (a['total']==True) and formatLang(a['credit'], digits=2, grouping=True) or '']]</font>
 
237
                    </para>
 
238
                </td>
 
239
                <td>
 
240
                    <para style="TITLE_LEFT_ALIGN">
 
241
                        <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
 
242
                        <font>[[ (a['total']==True) and formatLang(a['balance'] and a['balance'] * a.get('change_sign',1.0) or 0.0, digits=2, grouping=True) or '']]</font>
 
243
                    </para>
 
244
                </td>
 
245
            </tr>
 
246
        </blockTable>
 
247
 
 
248
        <section>
 
249
            <para>[[ repeatIn(a['journal'], 'j') ]]</para>
 
250
                <blockTable colWidths="6.0cm,3.0cm,3.0cm,2.5cm,4.0cm,2.5cm,2.5cm,2.5cm" style="BODY_LINE" repeatRows="1">
 
251
<!--
 
252
                [[ (a['type'] &lt;&gt; 'view') or removeParentNode('blockTable') ]]
 
253
-->
 
254
                    <tr>
 
255
                        <td>
 
256
                            <para style="TITLES_NEW_P">
 
257
                                <font> [[ formatLang( j['date'], date=True) ]]</font>
 
258
                            </para>
 
259
                        </td>
 
260
                        <td>
 
261
                            <para style="TITLES_NEW_P">
 
262
                                <font>[[ j['period'] ]]</font>
 
263
                            </para>
 
264
                        </td>
 
265
                        <td>
 
266
                            <para style="TITLES_NEW_P">
 
267
                                <font>[[ j['name'] ]] </font>
 
268
                            </para>
 
269
                        </td>
 
270
                        <td>
 
271
                            <para style="TITLES_NEW_">
 
272
                                <font></font>
 
273
                            </para>
 
274
 
 
275
                        </td>
 
276
                        <td>
 
277
                            <para style="TITLES_NEW">
 
278
                                <font></font>
 
279
                            </para>
 
280
                        </td>
 
281
                        <td>
 
282
                    <para style="TITLE_LEFT_ALIGN">
 
283
                    </para>
 
284
                        </td>
 
285
                        <td>
 
286
                    <para style="TITLE_LEFT_ALIGN">
 
287
                    </para>
 
288
                        </td>
 
289
                        <td>
 
290
                    <para style="TITLE_LEFT_ALIGN">
 
291
                    </para>
 
292
                        </td>
 
293
                    </tr>
 
294
                </blockTable>
 
295
            <section>
 
296
                <para>[[ repeatIn(j.get('obj').line_id, 'k') ]]</para>
 
297
                    <blockTable colWidths="6.0cm,3.0cm,3.0cm,1.5cm,5.0cm,2.5cm,2.5cm,2.5cm" style="BODY_LINE_FILLED" repeatRows="1">
 
298
                        <tr>
 
299
                            <td>
 
300
                                <para style="TITLES_NEW">
 
301
                                    <font> [[  k.account_id.code == a['code'] and k.name or removeParentNode('blockTable')  ]]</font>
 
302
                                </para>
 
303
                            </td>
 
304
                            <td>
 
305
                                <para style="TITLES_NEW">
 
306
                                    <font>[[ k.ref and k.ref or '']]</font>
 
307
                                </para>
 
308
                            </td>
 
309
                            <td>
 
310
                                <para style="TITLES_NEW">
 
311
                                    <font>[[ k.partner_id and k.partner_id.name or '']]</font>
 
312
                                </para>
 
313
                            </td>
 
314
                            <td>
 
315
                                <para style="TITLES_NEW">
 
316
                                    <font>[[ k.account_id and k.account_id.code or '']]</font>
 
317
                                </para>
 
318
                            </td>
 
319
                            <td>
 
320
                                <para style="TITLES_NEW">
 
321
                                    <font>[[ k.account_id and k.account_id.name or '']]</font>
 
322
                                </para>
 
323
                            </td>
 
324
                            <td>
 
325
                        <para style="TITLES_NEW_RIGHT">
 
326
                            <font>[[ k.account_id.type&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
 
327
                            <font>[[ k.debit and formatLang(k.debit, digits=2, grouping=True) or '' ]] </font>
 
328
                        </para>
 
329
                            </td>
 
330
                            <td>
 
331
                        <para style="TITLES_NEW_RIGHT">
 
332
                            <font>[[ k.account_id.type&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
 
333
                            <font>[[ k.credit and formatLang(k.credit, digits=2, grouping=True) or '' ]] </font>
 
334
                        </para>
 
335
                            </td>
 
336
                            <td>
 
337
                        <para style="TITLES_NEW_RIGHT">
 
338
                            <font>[[ k.account_id.type&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
 
339
                            <font>[[ k.reconcile_id and k.reconcile_id.name or k.reconcile_partial_id and k.reconcile_partial_id.name or '']]</font>
 
340
                        </para>
 
341
                            </td>
 
342
                        </tr>
 
343
                    </blockTable>
 
344
                    <blockTable colWidths="6.0cm,3.0cm,3.0cm,1.5cm,5.0cm,2.5cm,2.5cm,2.5cm" style="BODY_LINE" repeatRows="1">
 
345
                        <tr>
 
346
                            <td>
 
347
                                <para style="TITLES_NEW">
 
348
                                    <font> [[  k.account_id.code != a['code'] and k.name or removeParentNode('blockTable')  ]]</font>
 
349
                                </para>
 
350
                            </td>
 
351
                            <td>
 
352
                                <para style="TITLES_NEW">
 
353
                                    <font>[[ k.ref and k.ref or '']]</font>
 
354
                                </para>
 
355
                            </td>
 
356
                            <td>
 
357
                                <para style="TITLES_NEW">
 
358
                                    <font>[[ k.partner_id and k.partner_id.name or '']]</font>
 
359
                                </para>
 
360
                            </td>
 
361
                            <td>
 
362
                                <para style="TITLES_NEW">
 
363
                                    <font>[[ k.account_id and k.account_id.code or '']]</font>
 
364
                                </para>
 
365
                            </td>
 
366
                            <td>
 
367
                                <para style="TITLES_NEW">
 
368
                                    <font>[[ k.account_id and k.account_id.name or '']]</font>
 
369
                                </para>
 
370
                            </td>
 
371
                            <td>
 
372
                        <para style="TITLES_NEW_RIGHT">
 
373
                            <font>[[ k.account_id.type&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
 
374
                            <font>[[ k.debit and formatLang(k.debit, digits=2, grouping=True) or '' ]] </font>
 
375
                        </para>
 
376
                            </td>
 
377
                            <td>
 
378
                        <para style="TITLES_NEW_RIGHT">
 
379
                            <font>[[ k.account_id.type&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
 
380
                            <font>[[ k.credit and formatLang(k.credit, digits=2, grouping=True) or '' ]] </font>
 
381
                        </para>
 
382
                            </td>
 
383
                            <td>
 
384
                        <para style="TITLES_NEW_RIGHT">
 
385
                            <font>[[ k.account_id.type&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
 
386
                            <font>[[ k.reconcile_id and k.reconcile_id.name or k.reconcile_partial_id and k.reconcile_partial_id.name or '']]</font>
 
387
                        </para>
 
388
                            </td>
 
389
                        </tr>
 
390
                    </blockTable>
 
391
            </section>
 
392
        <spacer length="1.5mm"/>
 
393
        </section>
 
394
        <spacer length="2.5mm"/>
 
395
    </section>
 
396
 
 
397
    </story>
 
398
</document>