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.

294 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.context_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,2.0cm,7.75cm,2.5cm,4.0cm,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>DATE</font>
  150. </para>
  151. </td>
  152. <td>
  153. <para style="TITLES_NEW">
  154. <font>PERIOD</font>
  155. </para>
  156. </td>
  157. <td>
  158. <para style="TITLES_NEW">REFERENCE</para>
  159. </td>
  160. <td>
  161. <para style="TITLES_NEW">JOURNAL ENTRY</para>
  162. </td>
  163. <td>
  164. <para style="TITLES_NEW">PARTNER</para>
  165. </td>
  166. <td>
  167. <para style="TITLE_LEFT_ALIGN"></para>
  168. </td>
  169. <td>
  170. <para style="TITLE_LEFT_ALIGN"></para>
  171. </td>
  172. <td>
  173. <para style="TITLE_LEFT_ALIGN"></para>
  174. </td>
  175. </tr>
  176. </blockTable>
  177. <section>
  178. <para>[[ repeatIn([x for x in lines(data['form']) if x['type'] != 'view'], 'a') ]]</para>
  179. <blockTable colWidths="2.5cm,13.5cm,2.5cm,2.5cm,2.5cm,2.5cm" style="BODY" repeatRows="0">
  180. <tr>
  181. <td>
  182. <para style="TITLE_LEFT_ALIGN">
  183. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
  184. <i>[[a['label']==True and a['code'] or '' ]]</i>
  185. </para>
  186. </td>
  187. <td>
  188. <para style="TITLES">
  189. <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>
  190. <font>[[ a['type']=='view' and a['name'].upper() or a['name'].title() ]]</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['balanceinit'] and a['balanceinit'] * a.get('change_sign',1.0) or 0.0, 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['debit'], 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['credit'], digits=2, grouping=True) or '']]</font>
  209. </para>
  210. </td>
  211. <td>
  212. <para style="TITLE_LEFT_ALIGN">
  213. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier-Bold"}) or removeParentNode('font') ]]</font>
  214. <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>
  215. </para>
  216. </td>
  217. </tr>
  218. </blockTable>
  219. <section>
  220. <para>[[ repeatIn(a['mayor'], 'm') ]]</para>
  221. <blockTable colWidths="2.25cm,2.0cm,7.75cm,2.5cm,4.0cm,2.5cm,2.5cm,2.5cm" style="BODY_LINE" repeatRows="1">
  222. <!--
  223. [[ (a['type'] &lt;&gt; 'view') or removeParentNode('blockTable') ]]
  224. -->
  225. <tr>
  226. <td>
  227. <para style="TITLES_NEW">
  228. <font> [[ formatLang( m['date'], date=True) ]]</font>
  229. </para>
  230. </td>
  231. <td>
  232. <para style="TITLES_NEW">
  233. <font>[[ m['period'] ]]</font>
  234. </para>
  235. </td>
  236. <td>
  237. <para style="TITLES_NEW">
  238. <font>[[ m['name'] ]] [[ m['ref'] and (' - Ref %s'%m['ref']) or '' ]] </font>
  239. </para>
  240. </td>
  241. <td>
  242. <para style="TITLES_NEW">
  243. <font>[[ m['entry'] ]]</font>
  244. </para>
  245. <!--
  246. <para style="TITLES_NEW">
  247. <font>[[ m['journal'] ]]</font>
  248. </para>
  249. -->
  250. </td>
  251. <td>
  252. <para style="TITLES_NEW">
  253. <font>[[ m['partner'] ]]</font>
  254. </para>
  255. </td>
  256. <td>
  257. <para style="TITLE_LEFT_ALIGN">
  258. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  259. <font>[[ (a['total']==True) and formatLang(m['debit'], digits=2, grouping=True) or '']]</font>
  260. </para>
  261. </td>
  262. <td>
  263. <para style="TITLE_LEFT_ALIGN">
  264. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  265. <font>[[ (a['total']==True) and formatLang(m['credit'], digits=2, grouping=True) or '']]</font>
  266. </para>
  267. </td>
  268. <td>
  269. <para style="TITLE_LEFT_ALIGN">
  270. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  271. <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>
  272. </para>
  273. </td>
  274. </tr>
  275. </blockTable>
  276. </section>
  277. <spacer length="2.5mm"/>
  278. </section>
  279. </story>
  280. </document>