You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

273 lines
13 KiB

  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-Oblique" size="6"/>
  8. <image x="1.0cm" y="17.65cm" width="5.0cm">[[company.logo and company.logo or removeParentNode('image')]]</image>
  9. <!--
  10. <drawString x="1.0cm" y="24.5cm">[[company.logo and removeParentNode('para') or company.name]]</drawString>
  11. -->
  12. <place x="-3.5cm" y="16.15cm" width="19cm" height="5.0cm">
  13. <blockTable colWidths="9.6cm,9.4cm" style="TITLE">
  14. <tr>
  15. <td><para style="TOP_TITLE"></para></td>
  16. <td><para style="TITLE_CENTER_NAME">
  17. <font>[[ (company.name and company.name or 'NOMBRE DE COMPANIA NO DISPONIBLE')]]</font>
  18. <font>[[ get_vat_by_country(data['form']) ]]</font>
  19. </para></td>
  20. </tr>
  21. <tr>
  22. <td><para style="TOP_TITLE"></para></td>
  23. <td><para style="TITLE_CENTER">[[ get_informe_text(data['form']) ]]</para></td>
  24. </tr>
  25. <tr>
  26. <td><para style="TOP_TITLE"></para></td>
  27. <td><para style="TITLE_CENTER">(Expressed in [[data['form'] and (' %s'%( exchange_name(data['form']))) or '']])</para></td>
  28. </tr>
  29. <tr>
  30. <td><para style="TOP_TITLE"></para></td>
  31. <td><para style="TITLE_CENTER">[[data['form'] and get_month(data['form']) or '']]</para></td>
  32. </tr>
  33. </blockTable>
  34. </place>
  35. <drawRightString x="270mm" y="5mm">Printing Date: [[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time=True) ]] [[ get_informe_text(data['form']) ]] / Pág.: <pageNumber/>-<pageCount/></drawRightString>
  36. </pageGraphics>
  37. </pageTemplate>
  38. </template>
  39. <stylesheet>
  40. <blockTableStyle id="BODY_LINE">
  41. <blockValign value="TOP"/>
  42. <blockAlignment value="RIGHT"/>
  43. <blockTopPadding length="1.0"/>
  44. <blockBottomPadding length="1.0"/>
  45. <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,0" stop="-1,-1" thickness='0.25'/>
  46. </blockTableStyle>
  47. <blockTableStyle id="TITLE">
  48. <blockValign value="TOP"/>
  49. </blockTableStyle>
  50. <blockTableStyle id="BODY">
  51. <blockValign value="TOP"/>
  52. <blockAlignment value="RIGHT"/>
  53. <blockTopPadding length="1.0"/>
  54. <blockBottomPadding length="1.0"/>
  55. <lineStyle kind="LINEBELOW" colorName="darkgrey" start="0,0" stop="-1,-1" thickness='0.25'/>
  56. </blockTableStyle>
  57. <blockTableStyle id="BODY_STRIKE">
  58. <blockValign value="TOP"/>
  59. <blockAlignment value="RIGHT"/>
  60. <blockTopPadding length="1.0"/>
  61. <blockBottomPadding length="1.0"/>
  62. <lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="0,1" stop="-1,-1" thickness='0.5'/>
  63. </blockTableStyle>
  64. <blockTableStyle id="TOP_TABLE">
  65. <blockAlignment value="LEFT"/>
  66. <blockValign value="TOP"/>
  67. <lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="0,-1" stop="0,-1" thickness='0.25'/>
  68. </blockTableStyle>
  69. <initialize>
  70. <paraStyle name="all" alignment="justify"/>
  71. </initialize>
  72. <paraStyle
  73. name="TITLE_LEFT_ALIGN_NEW"
  74. fontName="Courier"
  75. fontSize="7.0"
  76. leading="10"
  77. alignment="RIGHT"
  78. spaceBefore="0.0"
  79. spaceAfter="0.0"/>
  80. <paraStyle name="TITLES_NEW"
  81. fontName="Courier"
  82. fontSize="7.0"
  83. leading="10"
  84. alignment="LEFT"
  85. spaceBefore="0.0"
  86. spaceAfter="0.0"/>
  87. <paraStyle
  88. name="TITLE_LEFT_ALIGN"
  89. fontName="Helvetica-Bold"
  90. fontSize="7.0"
  91. leading="10"
  92. alignment="RIGHT"
  93. spaceBefore="0.0"
  94. spaceAfter="0.0"/>
  95. <paraStyle name="TOP_TITLE" fontName="Helvetica-Bold" fontSize="7" leftIndent="0.0" alignment="LEFT"/>
  96. <paraStyle
  97. name="TITLES"
  98. fontName="Helvetica-Bold"
  99. fontSize="7.0"
  100. leading="10"
  101. alignment="LEFT"
  102. spaceBefore="0.0"
  103. spaceAfter="0.0"/>
  104. <paraStyle name="TITLE_CENTER" fontName="Helvetica-Bold" fontSize="7" leading="10" leftIndent="0.0" alignment="CENTER"/>
  105. <paraStyle name="TITLE_CENTER_NAME" fontName="Helvetica-Bold" fontSize="12" leading="13" leftIndent="0.0" alignment="CENTER"/>
  106. <paraStyle
  107. name="TITLE"
  108. alignment="CENTER"
  109. fontName="Helvetica"
  110. fontSize="18.0"
  111. leading="20"
  112. spaceBefore="-3.0"
  113. textColor="black"/>
  114. </stylesheet>
  115. <images/>
  116. <story>
  117. <para>[[setLang(user.lang)]]</para>
  118. <blockTable colWidths="2.5cm,13.5cm,2.5cm,2.5cm,2.5cm,2.5cm" style="BODY" repeatRows="0">
  119. <tr noRowsplits="0">
  120. <td>
  121. <para style="TITLE_LEFT_ALIGN">
  122. <font>CODE</font>
  123. </para>
  124. </td>
  125. <td>
  126. <para style="TITLES">ACCOUNT</para>
  127. </td>
  128. <td>
  129. <para style="TITLE_LEFT_ALIGN">INITIAL</para>
  130. </td>
  131. <td>
  132. <para style="TITLE_LEFT_ALIGN">DEBIT</para>
  133. </td>
  134. <td>
  135. <para style="TITLE_LEFT_ALIGN">CREDIT</para>
  136. </td>
  137. <td>
  138. <para style="TITLE_LEFT_ALIGN">BALANCE</para>
  139. </td>
  140. </tr>
  141. </blockTable>
  142. <blockTable colWidths="2.25cm,13.75cm,2.5cm,2.5cm,2.5cm,2.5cm" style="BODY_LINE" repeatRows="1">
  143. <!--
  144. [[ (a['type'] &lt;&gt; 'view') or removeParentNode('blockTable') ]]
  145. -->
  146. <tr noRowsplits="1">
  147. <td>
  148. <para style="TITLES_NEW">
  149. <font></font>
  150. </para>
  151. </td>
  152. <td>
  153. <para style="TITLES_NEW">
  154. <font>PARTNER</font>
  155. </para>
  156. </td>
  157. <td>
  158. <para style="TITLES_NEW"></para>
  159. </td>
  160. <td>
  161. <para style="TITLE_LEFT_ALIGN"></para>
  162. </td>
  163. <td>
  164. <para style="TITLE_LEFT_ALIGN"></para>
  165. </td>
  166. <td>
  167. <para style="TITLE_LEFT_ALIGN"></para>
  168. </td>
  169. </tr>
  170. </blockTable>
  171. <section>
  172. <para>[[ repeatIn([x for x in lines(data['form']) if x['type'] != 'view'], 'a') ]]</para>
  173. <blockTable colWidths="2.5cm,13.5cm,2.5cm,2.5cm,2.5cm,2.5cm" style="BODY" repeatRows="0">
  174. <tr>
  175. <td>
  176. <para style="TITLE_LEFT_ALIGN">
  177. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
  178. <i>[[a['label']==True and a['code'] or '' ]]</i>
  179. </para>
  180. </td>
  181. <td>
  182. <para style="TITLES">
  183. <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>
  184. <font>[[ a['type']=='view' and a['name'].upper() or a['name'].title() ]]</font>
  185. </para>
  186. </td>
  187. <td>
  188. <para style="TITLE_LEFT_ALIGN">
  189. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
  190. <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>
  191. </para>
  192. </td>
  193. <td>
  194. <para style="TITLE_LEFT_ALIGN">
  195. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
  196. <font>[[ (a['total']==True) and formatLang(a['debit'], digits=2, grouping=True) or '']]</font>
  197. </para>
  198. </td>
  199. <td>
  200. <para style="TITLE_LEFT_ALIGN">
  201. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
  202. <font>[[ (a['total']==True) and formatLang(a['credit'], digits=2, grouping=True) or '']]</font>
  203. </para>
  204. </td>
  205. <td>
  206. <para style="TITLE_LEFT_ALIGN">
  207. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
  208. <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>
  209. </para>
  210. </td>
  211. </tr>
  212. </blockTable>
  213. <section>
  214. <para>[[ repeatIn(a['partner'], 'm') ]]</para>
  215. <blockTable colWidths="2.25cm,13.75cm,2.5cm,2.5cm,2.5cm,2.5cm" style="BODY_LINE" repeatRows="1">
  216. <!--
  217. [[ (a['type'] &lt;&gt; 'view') or removeParentNode('blockTable') ]]
  218. -->
  219. <tr>
  220. <td>
  221. <para style="TITLES_NEW">
  222. </para>
  223. </td>
  224. <td>
  225. <para style="TITLES_NEW">
  226. <font>[[ m['partner_name'] ]]</font>
  227. </para>
  228. </td>
  229. <td>
  230. <para style="TITLE_LEFT_ALIGN">
  231. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  232. <font>[[ (a['total']==True) and formatLang(m['balanceinit'] and m['balanceinit'] * m.get('change_sign',1.0) or 0.0, digits=2, grouping=True) or '']]</font>
  233. </para>
  234. </td>
  235. <td>
  236. <para style="TITLE_LEFT_ALIGN">
  237. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  238. <font>[[ (a['total']==True) and formatLang(m['debit'], digits=2, grouping=True) or '']]</font>
  239. </para>
  240. </td>
  241. <td>
  242. <para style="TITLE_LEFT_ALIGN">
  243. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  244. <font>[[ (a['total']==True) and formatLang(m['credit'], digits=2, grouping=True) or '']]</font>
  245. </para>
  246. </td>
  247. <td>
  248. <para style="TITLE_LEFT_ALIGN">
  249. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  250. <font>[[ (a['total']==True) and formatLang(m['balance'] and m['balance'] * a.get('change_sign',1.0) or 0.0, digits=2, grouping=True) or '']]</font>
  251. </para>
  252. </td>
  253. </tr>
  254. </blockTable>
  255. </section>
  256. <spacer length="2.5mm"/>
  257. </section>
  258. </story>
  259. </document>