~unifield-team/unifield-wm/us-826

« back to all changes in this revision

Viewing changes to msf_budget/report/engagement.rml

UF-385 [ADD] Added consumption_calculation module

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0"?>
2
 
<document filename="test.pdf">
3
 
 
4
 
    <template pageSize="(595.0,842.0)" title="Test" author="Medecins Sans Frontieres" allowSplitting="20">
5
 
        <pageTemplate id="first">
6
 
            <frame id="first" x1="42.0" y1="42.0" width="539" height="756" />
7
 
 
8
 
        <pageGraphics>
9
 
            <fill color="blue"/>
10
 
            <image x="35" y="790.0" height="53.3" width="100">[[ company.logo or removeParentNode('image') ]]</image>
11
 
            <setFont name="Helvetica" size="8"/>
12
 
            <fill color="black"/>
13
 
            <drawString x="275" y="10.0">Page <pageNumber /></drawString>
14
 
            <!-- TODO: OEB-148 - Waiting integration on unifield-server -->
15
 
            <!--            <drawString x="765" y="520.0">/</drawString>
16
 
            <drawString x="770" y="520.0"><pageCount /> </drawString>-->
17
 
        </pageGraphics>
18
 
 
19
 
    </pageTemplate>
20
 
    </template>
21
 
 
22
 
  <stylesheet>
23
 
    <blockTableStyle id="Standard_Outline">
24
 
      <blockAlignment value="LEFT"/>
25
 
      <blockValign value="TOP"/>
26
 
    </blockTableStyle>
27
 
    <blockTableStyle id="Table2">
28
 
      <blockAlignment value="LEFT"/>
29
 
      <blockValign value="TOP"/>
30
 
      <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
31
 
      <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
32
 
      <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
33
 
      <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
34
 
      <lineStyle kind="LINEAFTER" colorName="#000000" start="1,0" stop="1,-1"/>
35
 
      <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
36
 
      <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
37
 
    </blockTableStyle>
38
 
    <blockTableStyle id="Table3">
39
 
      <blockAlignment value="LEFT"/>
40
 
      <blockValign value="TOP"/>
41
 
      <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
42
 
      <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
43
 
      <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
44
 
      <lineStyle kind="LINEBEFORE" colorName="#000000" start="1,0" stop="1,-1"/>
45
 
      <lineStyle kind="LINEAFTER" colorName="#000000" start="1,0" stop="1,-1"/>
46
 
      <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
47
 
      <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
48
 
    </blockTableStyle>
49
 
    <blockTableStyle id="Table1">
50
 
      <blockAlignment value="LEFT"/>
51
 
      <blockValign value="TOP"/>
52
 
    </blockTableStyle>
53
 
    <blockTableStyle id="Table10">
54
 
      <blockAlignment value="LEFT"/>
55
 
      <blockValign value="TOP"/>
56
 
      <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="13,-1"/>
57
 
    </blockTableStyle>
58
 
    <blockTableStyle id="Table8">
59
 
      <blockAlignment value="LEFT"/>
60
 
      <blockValign value="TOP"/>
61
 
    </blockTableStyle>
62
 
    <blockTableStyle id="Table12">
63
 
      <blockAlignment value="LEFT"/>
64
 
      <blockValign value="TOP"/>
65
 
    </blockTableStyle>
66
 
    <blockTableStyle id="Table11">
67
 
      <blockAlignment value="LEFT"/>
68
 
      <blockValign value="TOP"/>
69
 
      <lineStyle kind="LINEABOVE" colorName="#000000" start="0,-1" stop="7,-1"/>
70
 
      <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="7,-1"/>
71
 
      <lineStyle kind="LINEBEFORE" colorName="#000000" start="0,0" stop="0,-1"/>
72
 
      <lineStyle kind="LINEAFTER" colorName="#000000" start="0,0" stop="0,-1"/>
73
 
      <lineStyle kind="LINEAFTER" colorName="#000000" start="1,0" stop="1,-1"/>
74
 
      <lineStyle kind="LINEAFTER" colorName="#000000" start="2,0" stop="2,-1"/>
75
 
      <lineStyle kind="LINEAFTER" colorName="#000000" start="3,0" stop="3,-1"/>
76
 
      <lineStyle kind="LINEAFTER" colorName="#000000" start="4,0" stop="4,-1"/>
77
 
      <lineStyle kind="LINEAFTER" colorName="#000000" start="5,0" stop="5,-1"/>
78
 
      <lineStyle kind="LINEAFTER" colorName="#000000" start="6,0" stop="6,-1"/>
79
 
      <lineStyle kind="LINEAFTER" colorName="#000000" start="7,0" stop="7,-1"/>
80
 
 
81
 
    </blockTableStyle>
82
 
    <blockTableStyle id="Table6">
83
 
      <blockAlignment value="LEFT"/>
84
 
      <blockValign value="TOP"/>
85
 
    </blockTableStyle>
86
 
    <blockTableStyle id="Table9">
87
 
      <blockAlignment value="LEFT"/>
88
 
      <blockValign value="TOP"/>
89
 
    </blockTableStyle>
90
 
    <blockTableStyle id="Table4">
91
 
      <blockAlignment value="LEFT"/>
92
 
      <blockValign value="TOP"/>
93
 
      <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="6,-1"/>
94
 
    </blockTableStyle>
95
 
    <blockTableStyle id="Table5">
96
 
      <blockAlignment value="LEFT"/>
97
 
      <blockValign value="TOP"/>
98
 
    </blockTableStyle>
99
 
    <blockTableStyle id="Table7">
100
 
      <blockAlignment value="LEFT"/>
101
 
      <blockValign value="TOP"/>
102
 
    </blockTableStyle>
103
 
    <initialize>
104
 
      <paraStyle name="all" alignment="justify"/>
105
 
    </initialize>
106
 
    <paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="11" alignment="CENTER" textColor="#4c4c4c"/>
107
 
    <paraStyle name="P2" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="CENTER"/>
108
 
    <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="11" alignment="CENTER"/>
109
 
    <paraStyle name="P3a" fontName="Helvetica" fontSize="8.0" leading="11" alignment="LEFT"/>
110
 
 
111
 
 
112
 
    <paraStyle name="P4" fontName="Helvetica-Bold" fontSize="8.0" leading="11" spaceBefore="0.0" spaceAfter="6.0"/>
113
 
    <paraStyle name="P5" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
114
 
    <paraStyle name="P6" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
115
 
    <paraStyle name="P7" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
116
 
    <paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
117
 
    <paraStyle name="P9" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
118
 
    <paraStyle name="P10" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
119
 
    <paraStyle name="P11" fontName="Helvetica" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
120
 
    <paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
121
 
    <paraStyle name="P13" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
122
 
    <paraStyle name="P14" fontName="Helvetica" fontSize="8.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
123
 
    <paraStyle name="P15" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
124
 
    <paraStyle name="P16" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
125
 
    <paraStyle name="P17" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
126
 
    <paraStyle name="P18" fontName="Helvetica" fontSize="8.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
127
 
    <paraStyle name="P19" fontName="Helvetica" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
128
 
    <paraStyle name="P20" fontName="Helvetica" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
129
 
    <paraStyle name="P21" fontName="Helvetica" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
130
 
    <paraStyle name="P22" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
131
 
    <paraStyle name="P23" fontName="Helvetica" fontSize="8.0" leading="11" alignment="CENTER"/>
132
 
    <paraStyle name="P24" fontName="Helvetica" fontSize="8.0" leading="11" alignment="CENTER" textColor="#444444"/>
133
 
    <paraStyle name="P25" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
134
 
    <paraStyle name="P26" fontName="Helvetica-Bold" fontSize="14.0" leading="19" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
135
 
    <paraStyle name="P27" fontName="Helvetica-Bold" fontSize="10.0" leading="19" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
136
 
    <paraStyle name="Standard" fontName="Helvetica"/>
137
 
    <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
138
 
    <paraStyle name="Heading" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="12.0" spaceAfter="6.0"/>
139
 
    <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
140
 
    <paraStyle name="Table Contents" fontName="Helvetica"/>
141
 
    <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
142
 
    <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
143
 
    <paraStyle name="Index" fontName="Helvetica"/>
144
 
    <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
145
 
    <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
146
 
    <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
147
 
    <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
148
 
    <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
149
 
    <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
150
 
    <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
151
 
    <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
152
 
    <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
153
 
    <paraStyle name="Footer" fontName="Helvetica"/>
154
 
    <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
155
 
    <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
156
 
    <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
157
 
    <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
158
 
    <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
159
 
    <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
160
 
    <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
161
 
    <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
162
 
    <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
163
 
    <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="8.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
164
 
    <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="8.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
165
 
    <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
166
 
    <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
167
 
    <paraStyle name="terp_default_Italic" rightIndent="0.0" leftIndent="20.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
168
 
    <paraStyle name="Preformatted Text" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
169
 
    <paraStyle name="terp_default_Centre_9_Bold" fontName="Helvetica-Bold" fontSize="8.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
170
 
    <images/>
171
 
  </stylesheet>
172
 
  <story>
173
 
    <para style="P5">[[repeatIn(objects,'o')]]</para>
174
 
    <para style="P27">        
175
 
                <font color="white"> </font>
176
 
        </para>
177
 
    <para style="P26">Order impact vs. budget</para>
178
 
    <para style="P27">        
179
 
                <font color="white"> </font>
180
 
        </para>
181
 
    <para style="P27">        
182
 
                <font color="white"> </font>
183
 
        </para>
184
 
    <para style="P10">Delivery requested date: [[ (str(o.delivery_requested_date) and str(o.delivery_requested_date)) or '' ]]</para>
185
 
    <para style="P10">Delivery confirmed date: [[ (str(o.delivery_confirmed_date) and str(o.delivery_confirmed_date)) or '' ]]</para>
186
 
    <para style="P10">PO reference: [[ (o.name and o.name) or '' ]]</para>
187
 
    <para style="P10">Fiscal year: [[ (get_fiscal_year(o) and get_fiscal_year(o)) or ' ' ]]</para>
188
 
    <para style="P10">Functional currency: [[ o.functional_currency_id and o.functional_currency_id.name or ' ' ]]</para>
189
 
    <para style="P10">Report date: [[ time.strftime('%d/%m/%Y') ]]</para>
190
 
    <para style="P27">        
191
 
                <font color="white"> </font>
192
 
        </para>
193
 
    <para style="P5">
194
 
      <font color="white"> </font>
195
 
    </para>
196
 
    <para style="P5">
197
 
      <font color="red">[[ check_distribution(o) and ' ' or 'WARNING: analytic distribution for this PO is not complete!' ]]</font>
198
 
    </para>
199
 
    <para style="P5">
200
 
      <font color="white"> </font>
201
 
    </para>
202
 
 
203
 
    <blockTable style="Table9">
204
 
      <tr>
205
 
        <td>
206
 
          <blockTable colWidths="115.0,115.0,40.0,52.0,52.0,52.0,52.0,52.0" style="Table11">
207
 
              <tr>
208
 
                <td>
209
 
                  <para style="P2">Cost Centre</para>
210
 
                </td>
211
 
                <td>
212
 
                  <para style="P2">Account</para>
213
 
                </td>
214
 
                <td>
215
 
                  <para style="P2">Dest.</para>
216
 
                </td>
217
 
                <td>
218
 
                  <para style="P2">Budget amount</para>
219
 
                </td>
220
 
                <td>
221
 
                  <para style="P2">Actuals amount</para>
222
 
                </td>
223
 
                <td>
224
 
                  <para style="P2">Remaining Budget</para>
225
 
                </td>
226
 
                <td>
227
 
                  <parawrap style="P2">PO amount</parawrap>
228
 
                </td>
229
 
                <td>
230
 
                  <parawrap style="P2">PO impact</parawrap>
231
 
                </td>
232
 
              </tr>
233
 
          </blockTable>
234
 
          <blockTable colWidths="115.0,115.0,40.0,52.0,52.0,52.0,52.0,52.0" style="Table11">
235
 
            <tr>
236
 
              <para style="P20">[[ repeatIn(get_report_lines(o),'line', 'blockTable') ]]</para>
237
 
              <td>
238
 
                <para style="P3">[[ line[0] ]]</para>
239
 
              </td>
240
 
              <td>
241
 
                <para style="P3a">[[ line[1] ]]</para>
242
 
              </td>
243
 
 
244
 
              <td>
245
 
                <para style="P3">[[ line[7] ]]</para>
246
 
              </td>
247
 
 
248
 
              <td>
249
 
                <para style="P3"><font color="red">[[ (line[2] == 'Budget missing' and line[2]) or '' ]]</font>[[ (line[2] != 'Budget missing' and formatLang(line[2], digits=0, grouping=True )) or '' ]]</para>
250
 
              </td>
251
 
              <td>
252
 
                <para style="P3">[[ formatLang(line[3], digits=0, grouping=True ) or '' ]]</para>
253
 
              </td>
254
 
              <td>
255
 
                <para style="P3">[[ formatLang(line[4], digits=0, grouping=True ) or '' ]]</para>
256
 
              </td>
257
 
              <td>
258
 
                <para style="P3">[[ formatLang(line[5], digits=0, grouping=True ) or '' ]]</para>
259
 
              </td>
260
 
              <td>
261
 
                <para style="P3"><font color="red">[[ not isPos(line[6]) and formatLang(line[6], digits=0, grouping=True ) or '' ]]</font>[[ isPos(line[6]) and formatLang(line[6], digits=0, grouping=True) or '' ]]</para>
262
 
              </td>
263
 
            </tr>
264
 
          </blockTable>
265
 
        </td>
266
 
      </tr>
267
 
    </blockTable>
268
 
 
269
 
    <para style="P5">
270
 
      <font color="white"> </font>
271
 
    </para>
272
 
    <para style="P5">Actuals amounts in this report include confirmed POs (commitments) but not open / validated POs</para>
273
 
  </story>
274
 
</document>