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.

206 lines
15 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- Copyright 2018 Eficent Business and IT Consulting Services S.L.
  3. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
  4. <odoo>
  5. <template id="customer_activity_statement.statement_document">
  6. <t t-call="web.external_layout">
  7. <div class="page">
  8. <div class="row">
  9. <div class="col-xs-5 col-xs-offset-7">
  10. <span t-field="o.name"/><br/>
  11. <span t-raw="o.contact_address.replace('\n\n', '\n').replace('\n', '&lt;br&gt;')"/>
  12. <span t-field="o.vat"/>
  13. </div>
  14. <h4 style="padding-left:20em">
  15. Activity Statement
  16. </h4>
  17. <p>
  18. Date: <span t-esc="Date[o.id]" /><br/>
  19. <t t-if="o.ref">Partner ref: <span t-field="o.ref"/></t>
  20. </p>
  21. <t t-if="Lines[o.id]">
  22. <br/>
  23. <t t-foreach="Lines[o.id]" t-as="currency">
  24. <br t-if="not currency_first" />
  25. <p>
  26. Activity Statement in <span t-esc="Currencies[o.id][currency].name"/>:
  27. </p>
  28. <table class="table table-condensed" style="border: 1px solid black; border-collapse: collapse;">
  29. <thead>
  30. <tr>
  31. <th style="border-right: 1px solid black;">Reference number</th>
  32. <th class="text-center" style="border-right: 1px solid black;">Date</th>
  33. <th style="border-right: 1px solid black;">Description</th>
  34. <th class="text-right" style="border-right: 1px solid black;">Amount</th>
  35. <th class="text-right" style="border-right: 1px solid black;">Balance</th>
  36. </tr>
  37. </thead>
  38. <tr>
  39. <td style="border-right: 1px solid black;"/>
  40. <td style="border-right: 1px solid black;">
  41. <span t-esc="Date_start[o.id]"/>
  42. </td>
  43. <td style="border-right: 1px solid black;">
  44. Balance Forward
  45. </td>
  46. <td style="border-right: 1px solid black;"/>
  47. <td class="text-right" t-if="currency in Balance_forward[o.id]" style="border-right: 1px solid black;">
  48. <span t-esc="Balance_forward[o.id][currency]" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  49. </td>
  50. <td class="text-right" t-if="currency not in Balance_forward[o.id]" style="border-right: 1px solid black;">
  51. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  52. </td>
  53. </tr>
  54. <tr t-foreach="Lines[o.id][currency]" t-as="line">
  55. <t t-if="not line['blocked']">
  56. <td style="border-right: 1px solid black;">
  57. <span t-esc="line['move_id']"/>
  58. </td>
  59. <td style="border-right: 1px solid black;">
  60. <span t-esc="line['date']"/>
  61. </td>
  62. <td style="border-right: 1px solid black;">
  63. <t t-if="line['name'] != '/'">
  64. <t t-if="not line['ref']"><span t-esc="line['name']"/></t>
  65. <t t-if="line['ref'] and line['name']">
  66. <t t-if="line['name'] not in line['ref']"><span t-esc="line['name']"/></t>
  67. <t t-if="line['ref'] not in line['name']"><span t-esc="line['ref']"/></t>
  68. </t>
  69. </t>
  70. <t t-if="line['name'] == '/'"><span t-esc="line['ref']"/></t>
  71. </td>
  72. <td class="text-right" style="border-right: 1px solid black;">
  73. <span t-esc="line['amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  74. </td>
  75. <td class="text-right" style="border-right: 1px solid black;">
  76. <span t-esc="line['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  77. </td>
  78. </t>
  79. <t t-if="line['blocked']">
  80. <td style="border-right: 1px solid black; background-color: grey;">
  81. <span t-esc="line['move_id']"/>
  82. </td>
  83. <td style="border-right: 1px solid black; background-color: grey;">
  84. <span t-esc="line['date']"/>
  85. </td>
  86. <td style="border-right: 1px solid black; background-color: grey;">
  87. <t t-if="line['name'] != '/'">
  88. <t t-if="not line['ref']"><span t-esc="line['name']"/></t>
  89. <t t-if="line['ref'] and line['name']">
  90. <t t-if="line['name'] not in line['ref']"><span t-esc="line['name']"/></t>
  91. <t t-if="line['ref'] not in line['name']"><span t-esc="line['ref']"/></t>
  92. </t>
  93. </t>
  94. <t t-if="line['name'] == '/'"><span t-esc="line['ref']"/></t>
  95. </td>
  96. <td class="text-right" style="border-right: 1px solid black; background-color: grey;">
  97. <span t-esc="line['amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  98. </td>
  99. <td class="text-right" style="border-right: 1px solid black; background-color: grey;">
  100. <span t-esc="line['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  101. </td>
  102. </t>
  103. </tr>
  104. <tr>
  105. <td style="border-right: 1px solid black;"/>
  106. <td style="border-right: 1px solid black;">
  107. <span t-esc="Date_end[o.id]"/>
  108. </td>
  109. <td style="border-right: 1px solid black;">
  110. Ending Balance
  111. </td>
  112. <td style="border-right: 1px solid black;"/>
  113. <td class="text-right" style="border-right: 1px solid black;">
  114. <span t-esc="Amount_Due[o.id][currency]" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  115. </td>
  116. </tr>
  117. </table>
  118. <table class="table table-condensed" t-if="Show_Buckets" style="border: 1px solid black; border-collapse: collapse;">
  119. <thead>
  120. <tr>
  121. <th class="text-center" style="border-right: 1px solid black;">Current Due</th>
  122. <th class="text-center" style="border-right: 1px solid black;">1-30 Days Due</th>
  123. <th class="text-center" style="border-right: 1px solid black;">30-60 Days Due</th>
  124. <th class="text-center" style="border-right: 1px solid black;">60-90 Days Due</th>
  125. <th class="text-center" style="border-right: 1px solid black;">90-120 Days Due</th>
  126. <th class="text-center" style="border-right: 1px solid black;">+120 Days Due</th>
  127. <th class="text-right" style="border-right: 1px solid black;">Balance Due</th>
  128. </tr>
  129. </thead>
  130. <tr t-if="currency in Buckets[o.id]">
  131. <td class="text-right" style="border-right: 1px solid black;">
  132. <span t-esc="Buckets[o.id][currency]['current']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  133. </td>
  134. <td class="text-right" style="border-right: 1px solid black;">
  135. <span t-esc="Buckets[o.id][currency]['b_1_30']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  136. </td>
  137. <td class="text-right" style="border-right: 1px solid black;">
  138. <span t-esc="Buckets[o.id][currency]['b_30_60']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  139. </td>
  140. <td class="text-right" style="border-right: 1px solid black;">
  141. <span t-esc="Buckets[o.id][currency]['b_60_90']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  142. </td>
  143. <td class="text-right" style="border-right: 1px solid black;">
  144. <span t-esc="Buckets[o.id][currency]['b_90_120']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  145. </td>
  146. <td class="text-right" style="border-right: 1px solid black;">
  147. <span t-esc="Buckets[o.id][currency]['b_over_120']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  148. </td>
  149. <td class="text-right" style="border-right: 1px solid black;">
  150. <span t-esc="Buckets[o.id][currency]['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  151. </td>
  152. </tr>
  153. <tr t-if="currency not in Buckets[o.id]">
  154. <td class="text-right" style="border-right: 1px solid black;">
  155. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  156. </td>
  157. <td class="text-right" style="border-right: 1px solid black;">
  158. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  159. </td>
  160. <td class="text-right" style="border-right: 1px solid black;">
  161. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  162. </td>
  163. <td class="text-right" style="border-right: 1px solid black;">
  164. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  165. </td>
  166. <td class="text-right" style="border-right: 1px solid black;">
  167. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  168. </td>
  169. <td class="text-right" style="border-right: 1px solid black;">
  170. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  171. </td>
  172. <td class="text-right" style="border-right: 1px solid black;">
  173. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  174. </td>
  175. </tr>
  176. </table>
  177. </t>
  178. </t>
  179. <p t-if="not Lines[o.id]">
  180. <strong>The partner doesn't have due entries.</strong>
  181. </p>
  182. </div>
  183. </div>
  184. </t>
  185. </template>
  186. <template id="statement">
  187. <t t-call="web.html_container">
  188. <t t-foreach="docs" t-as="o">
  189. <t t-if="not (Filter_non_due_partners and (not Lines[o.id]) and (len(doc_ids) > 1))">
  190. <t t-call="customer_activity_statement.statement_document" t-lang="o.lang"/>
  191. </t>
  192. </t>
  193. </t>
  194. </template>
  195. <report id="action_print_customer_activity_statement"
  196. model="res.partner"
  197. report_type="qweb-pdf"
  198. menu="False"
  199. string="Statement Action to PDF"
  200. name="customer_activity_statement.statement"
  201. file="customer_activity_statement.statement"
  202. />
  203. </odoo>