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.

158 lines
8.3 KiB

  1. <?xml version="1.0"?>
  2. <document filename="test.pdf">
  3. <template pageSize="(21.59cm,27.94cm)" title="Test" author="Martin Simon" allowSplitting="20" showBoundary="0">
  4. <pageTemplate id="first">
  5. <frame id="first" x1="0.5cm" y1="1.0cm" width="20.5cm" height="23cm"/>
  6. <pageGraphics>
  7. <setFont name="Helvetica-Oblique" size="6"/>
  8. <image x="1.0cm" y="24.0cm" 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="22.50cm" 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="207mm" 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="TITLE">
  41. <blockValign value="TOP"/>
  42. </blockTableStyle>
  43. <blockTableStyle id="BODY">
  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,1" stop="-1,-1" thickness='0.25'/>
  49. </blockTableStyle>
  50. <blockTableStyle id="BODY_STRIKE">
  51. <blockValign value="TOP"/>
  52. <blockAlignment value="RIGHT"/>
  53. <blockTopPadding length="1.0"/>
  54. <blockBottomPadding length="1.0"/>
  55. <lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="0,1" stop="-1,-1" thickness='0.5'/>
  56. </blockTableStyle>
  57. <blockTableStyle id="TOP_TABLE">
  58. <blockAlignment value="LEFT"/>
  59. <blockValign value="TOP"/>
  60. <lineStyle kind="LINEBELOW" colorName="#FFFFFF" start="0,-1" stop="0,-1" thickness='0.25'/>
  61. </blockTableStyle>
  62. <initialize>
  63. <paraStyle name="all" alignment="justify"/>
  64. </initialize>
  65. <paraStyle
  66. name="TITLE_LEFT_ALIGN"
  67. fontName="Helvetica-Bold"
  68. fontSize="6.0"
  69. leading="10"
  70. alignment="RIGHT"
  71. spaceBefore="0.0"
  72. spaceAfter="0.0"/>
  73. <paraStyle name="TOP_TITLE" fontName="Helvetica-Bold" fontSize="7" leftIndent="0.0" alignment="LEFT"/>
  74. <paraStyle name="TITLES" fontName="Helvetica-Bold" fontSize="6.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
  75. <paraStyle name="TITLE_CENTER" fontName="Helvetica-Bold" fontSize="7" leading="10" leftIndent="0.0" alignment="CENTER"/>
  76. <paraStyle name="TITLE_CENTER_NAME" fontName="Helvetica-Bold" fontSize="12" leading="13" leftIndent="0.0" alignment="CENTER"/>
  77. <paraStyle name="TITLE" alignment="CENTER" fontName="Helvetica" fontSize="18.0" leading="20" spaceBefore="-3.0" textColor="black"/>
  78. </stylesheet>
  79. <images/>
  80. <story>
  81. <para>[[setLang(user.context_lang)]]</para>
  82. <blockTable colWidths="2.5cm,6.0cm,2.5cm,2.5cm,2.5cm,2.5cm,2.5cm" style="BODY" repeatRows="1">
  83. <tr noRowsplits="1">
  84. <td>
  85. <para style="TITLE_LEFT_ALIGN">
  86. <font>CODE</font>
  87. </para>
  88. </td>
  89. <td>
  90. <para style="TITLES">ACCOUNT</para>
  91. </td>
  92. <td>
  93. <para style="TITLE_LEFT_ALIGN">Q1</para>
  94. </td>
  95. <td>
  96. <para style="TITLE_LEFT_ALIGN">Q2</para>
  97. </td>
  98. <td>
  99. <para style="TITLE_LEFT_ALIGN">Q3</para>
  100. </td>
  101. <td>
  102. <para style="TITLE_LEFT_ALIGN">Q4</para>
  103. </td>
  104. <td>
  105. <para style="TITLE_LEFT_ALIGN">YTD</para>
  106. </td>
  107. </tr>
  108. <tr>
  109. <td>
  110. <para style="TITLE_LEFT_ALIGN">[[ repeatIn(lines(data['form']), 'a') ]]
  111. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  112. <i>[[a['label']==True and a['code'] or '' ]]</i>
  113. </para>
  114. </td>
  115. <td>
  116. <para style="TITLES">
  117. <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"}))) or removeParentNode('font') ]]</font>
  118. <font>[[ a['type']=='view' and a['name'].upper() or a['name'].title() ]]</font>
  119. </para>
  120. </td>
  121. <td>
  122. <para style="TITLE_LEFT_ALIGN">
  123. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  124. <font>[[ (a['total']==True) and formatLang(a['bal1'] and (a['bal1'] * a.get('change_sign',1)) or 0.0, digits=2, grouping=True) or '']]</font>
  125. </para>
  126. </td>
  127. <td>
  128. <para style="TITLE_LEFT_ALIGN">
  129. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  130. <font>[[ (a['total']==True) and formatLang(a['bal2'] and a['bal2'] * a.get('change_sign',1) or 0.0, digits=2, grouping=True) or '']]</font>
  131. </para>
  132. </td>
  133. <td>
  134. <para style="TITLE_LEFT_ALIGN">
  135. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  136. <font>[[ (a['total']==True) and formatLang(a['bal3'] and a['bal3'] * a.get('change_sign',1) or 0.0, digits=2, grouping=True) or '']]</font>
  137. </para>
  138. </td>
  139. <td>
  140. <para style="TITLE_LEFT_ALIGN">
  141. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  142. <font>[[ (a['total']==True) and formatLang(a['bal4'] and a['bal4'] * a.get('change_sign',1) or 0.0, digits=2, grouping=True) or '']]</font>
  143. </para>
  144. </td>
  145. <td>
  146. <para style="TITLE_LEFT_ALIGN">
  147. <font>[[ a['type']&lt;&gt;'view' and setTag('para','para',{'fontName':"Courier"}) or removeParentNode('font') ]]</font>
  148. <font>[[ (a['total']==True) and formatLang(a['bal5'] and a['bal5'] * a.get('change_sign',1) or 0.0, digits=2, grouping=True) or '']]</font>
  149. </para>
  150. </td>
  151. </tr>
  152. </blockTable>
  153. </story>
  154. </document>