2 <document filename="test.pdf">
3 <template pageSize="(595.0,842.0)" title="Details of Sales" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
4 <pageTemplate id="first">
5 <frame id="first" x1="28.0" y1="57.0" width="511" height="728"/>
9 <blockTableStyle id="Standard_Outline">
10 <blockAlignment value="LEFT"/>
11 <blockValign value="TOP"/>
13 <blockTableStyle id="Table1">
14 <blockAlignment value="LEFT"/>
15 <blockValign value="TOP"/>
16 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
17 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
18 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
19 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
20 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
21 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
22 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
23 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
24 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
25 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
26 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
27 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
28 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
30 <blockTableStyle id="Table2">
31 <blockAlignment value="LEFT"/>
32 <blockValign value="TOP"/>
33 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="0,0" stop="0,-1"/>
34 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,0" stop="0,0"/>
35 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
36 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="1,0" stop="1,-1"/>
37 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,0" stop="1,0"/>
38 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
39 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="2,0" stop="2,-1"/>
40 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="2,0" stop="2,0"/>
41 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
42 <lineStyle kind="LINEBEFORE" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
43 <lineStyle kind="LINEAFTER" colorName="#e6e6e6" start="3,0" stop="3,-1"/>
44 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="3,0" stop="3,0"/>
45 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
47 <blockTableStyle id="Table3">
48 <blockAlignment value="LEFT"/>
49 <blockValign value="TOP"/>
50 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
51 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
53 <blockTableStyle id="Table5">
54 <blockAlignment value="LEFT"/>
55 <blockValign value="TOP"/>
56 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
57 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
59 <blockTableStyle id="Table9">
60 <blockAlignment value="LEFT"/>
61 <blockValign value="TOP"/>
62 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
63 <lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
65 <blockTableStyle id="Table11">
66 <blockAlignment value="LEFT"/>
67 <blockValign value="TOP"/>
68 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
69 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
71 <blockTableStyle id="Table8">
72 <blockAlignment value="LEFT"/>
73 <blockValign value="TOP"/>
75 <blockTableStyle id="Table7">
76 <blockAlignment value="LEFT"/>
77 <blockValign value="TOP"/>
78 <lineStyle kind="LINEABOVE" colorName="#000000" start="0,0" stop="0,0"/>
79 <lineStyle kind="LINEABOVE" colorName="#000000" start="1,0" stop="1,0"/>
80 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,1" stop="0,1"/>
81 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,1" stop="1,1"/>
82 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
83 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,2" stop="0,2"/>
84 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
85 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,2" stop="1,2"/>
86 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
87 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,3" stop="0,3"/>
88 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
89 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,3" stop="1,3"/>
90 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
91 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,4" stop="0,4"/>
92 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
93 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,4" stop="1,4"/>
94 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
95 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="0,5" stop="0,5"/>
96 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
97 <lineStyle kind="LINEABOVE" colorName="#e6e6e6" start="1,5" stop="1,5"/>
98 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
101 <paraStyle name="all" alignment="justify"/>
103 <paraStyle name="P1" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
104 <paraStyle name="P2" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
105 <paraStyle name="Standard" fontName="Helvetica"/>
106 <paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
107 <paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
108 <paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
109 <paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
110 <paraStyle name="Index" fontName="Helvetica"/>
111 <paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
112 <paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
113 <paraStyle name="Table Contents" fontName="Helvetica"/>
114 <paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER"/>
115 <paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
116 <paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
117 <paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
118 <paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
119 <paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
120 <paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
121 <paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
122 <paraStyle name="Footer" fontName="Helvetica"/>
123 <paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
124 <paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
125 <paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
126 <paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
127 <paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
128 <paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
129 <paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
130 <paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
131 <paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
132 <paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
133 <paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
134 <paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
135 <paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
136 <paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
140 <para style="terp_default_8">
141 <font color="white"> </font>
143 <para style="terp_header_Centre">Details of Sales</para>
144 <para style="terp_default_8">
145 <font color="white"> </font>
147 <blockTable colWidths="149.0,124.0,119.0,120.0" style="Table1">
150 <para style="terp_tblheader_General_Centre">Company</para>
153 <para style="terp_tblheader_General_Centre">Print Date</para>
156 <para style="terp_tblheader_General_Centre">Start Period</para>
159 <para style="terp_tblheader_General_Centre">End Period</para>
163 <blockTable colWidths="148.0,124.0,119.0,119.0" style="Table2">
166 <para style="terp_default_Centre_8">[[ company.name ]]</para>
169 <para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]]</para>
172 <para style="terp_default_Centre_8">[[ '%s' % getstartperiod(objects) ]] </para>
175 <para style="terp_default_Centre_8">[[ '%s' % getendperiod(objects) ]]</para>
179 <para style="terp_default_8">
180 <font color="white"> </font>
183 <para style="Standard">
184 <font color="white"> </font>
187 <blockTable colWidths="256.0,256.0" style="Table3">
190 <para style="terp_tblheader_Details">Mode of Taxes</para>
193 <para style="terp_default_8">
194 <font color="white"> </font>
200 <para style="terp_default_1">[[ repeatIn(gettaxamount(objects).items(),'p') ]]</para>
201 <blockTable colWidths="256.0,256.0" style="Table5">
204 <para style="P1">[[ p[0] ]]</para>
207 <para style="terp_default_Right_9_Bold">[[ p[1] ]] [[company.currency_id.symbol]]</para>
211 <para style="terp_default_1">
212 <font color="white"> </font>
215 <para style="terp_default_8">
216 <font color="white"> </font>
218 <blockTable colWidths="257.0,255.0" style="Table9">
221 <para style="terp_tblheader_Details">Mode of Payment</para>
224 <para style="terp_default_8">
225 <font color="white"> </font>
231 <para style="terp_default_1">[[ repeatIn(getpayments(objects).items(),'t') ]]</para>
232 <blockTable colWidths="255.0,255.0" style="Table11">
235 <para style="P2">[[ t[0] ]]</para>
238 <para style="terp_default_Right_9_Bold">[[ '%.2f' % (t[1],) ]] [[company.currency_id.symbol]]</para>
242 <para style="terp_default_1">
243 <font color="white"> </font>
246 <para style="terp_default_8">
247 <font color="white"> </font>
249 <blockTable colWidths="257.0,255.0" style="Table8">
252 <para style="terp_tblheader_Details">Summary</para>
255 <para style="terp_default_9">
256 <font color="white"> </font>
261 <blockTable colWidths="257.0,254.0" style="Table7">
264 <para style="terp_default_Bold_9">Sales total</para>
267 <para style="terp_default_Right_9_Bold">[[ '%d' % getsalestotal(objects) ]]</para>
272 <para style="terp_default_Bold_9">Qty of product</para>
275 <para style="terp_default_Right_9_Bold">[[ '%d' % getqtytotal(objects) ]]</para>
280 <para style="terp_default_Bold_9">Total invoiced</para>
283 <para style="terp_default_Right_9_Bold">[[ '%.2f' % getsuminvoice(objects) ]] [[ company.currency_id.symbol ]]</para>
288 <para style="terp_default_Bold_9">Total discount</para>
291 <para style="terp_default_Right_9_Bold">[[ '%.2f' % getsumdisc(objects) ]] [[ company.currency_id.symbol ]]</para>
296 <para style="terp_default_Bold_9">Total paid</para>
299 <para style="terp_default_Right_9_Bold">[[ '%.2f' % getpaidtotal(objects) ]] [[ company.currency_id.symbol ]]</para>
304 <para style="terp_default_Bold_9">Total of the day</para>
307 <para style="terp_default_Right_9_Bold">[[ '%.2f' % gettotalofthaday(objects) ]] [[ company.currency_id.symbol ]]</para>
311 <para style="terp_default_8">
312 <font color="white"> </font>