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.

172 lines
8.4 KiB

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!-- Copyright 2018 ForgeFlow, S.L. (https://www.forgeflow.com)
  3. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
  4. <odoo>
  5. <template id="partner_statement.activity_statement_document">
  6. <t t-call="web.external_layout">
  7. <t t-set="o" t-value="o.with_context({'lang': lang})" />
  8. <t t-set="address">
  9. <address
  10. t-esc="get_inv_addr(o)"
  11. t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'
  12. />
  13. <div t-if="o.vat" class="mt16"><t
  14. t-esc="company.country_id.vat_label or 'Tax ID'"
  15. />: <span t-field="o.vat" /></div>
  16. </t>
  17. <div class="page">
  18. <h2>Statement of Account</h2>
  19. <div id="informations" class="row mt32 mb32">
  20. <div class="col-3 bm-2">
  21. <strong>Date:</strong>
  22. <p t-esc="d['today']" class="m-0" />
  23. </div>
  24. <div t-if="o.ref" class="col-3 bm-2">
  25. <strong>Partner Code:</strong>
  26. <p t-field="o.ref" class="m-0" />
  27. </div>
  28. </div>
  29. <t t-if="d['currencies']">
  30. <br />
  31. <t t-foreach="d['currencies'].items()" t-as="currency">
  32. <t t-set="display_currency" t-value="Currencies[currency[0]]" />
  33. <t t-set="currency" t-value="currency[1]" />
  34. <p>
  35. <span
  36. t-if="account_type == 'payable'"
  37. >Supplier </span>Statement between <span
  38. t-esc="d['start']"
  39. /> and <span t-esc="d['end']" /> in <span
  40. t-esc="display_currency.name"
  41. />
  42. </p>
  43. <table class="table table-condensed table-statement">
  44. <thead>
  45. <tr>
  46. <th>Reference number</th>
  47. <th>Date</th>
  48. <th>Description</th>
  49. <th class="amount">Amount</th>
  50. <th class="amount">Balance</th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. <tr>
  55. <td />
  56. <td>
  57. <span t-esc="d['start']" />
  58. </td>
  59. <td>
  60. Balance Forward
  61. </td>
  62. <td />
  63. <td class="amount">
  64. <span
  65. t-esc="currency['balance_forward']"
  66. t-options="{'widget': 'monetary', 'display_currency': display_currency}"
  67. />
  68. </td>
  69. </tr>
  70. <tr
  71. t-foreach="currency['lines']"
  72. t-as="line"
  73. t-att-class="'statement-blocked' if line['blocked'] else ''"
  74. >
  75. <td>
  76. <span t-esc="line['move_id']" />
  77. </td>
  78. <td>
  79. <span t-esc="line['date']" />
  80. </td>
  81. <td>
  82. <t t-if="line['name'] != '/'">
  83. <t t-if="not line['ref']">
  84. <span t-esc="line['name']" />
  85. </t>
  86. <t t-if="line['ref'] and line['name']">
  87. <t
  88. t-if="line['name'] not in line['ref']"
  89. >
  90. <span t-esc="line['name']" />
  91. </t>
  92. <t
  93. t-if="line['ref'] not in line['name']"
  94. >
  95. <span t-esc="line['ref']" />
  96. </t>
  97. <t t-if="line['name'] == line['ref']">
  98. <span t-esc="line['name']" />
  99. </t>
  100. </t>
  101. </t>
  102. <t t-if="line['name'] == '/'">
  103. <span
  104. t-if="line['ref'] == 'Payment'"
  105. >Payment</span>
  106. <span t-else="" t-esc="line['ref']" />
  107. </t>
  108. </td>
  109. <td class="amount">
  110. <span
  111. t-esc="line['amount']"
  112. t-options="{'widget': 'monetary', 'display_currency': display_currency}"
  113. />
  114. </td>
  115. <td class="amount">
  116. <span
  117. t-esc="line['balance']"
  118. t-options="{'widget': 'monetary', 'display_currency': display_currency}"
  119. />
  120. </td>
  121. </tr>
  122. <tr>
  123. <td />
  124. <td>
  125. <span t-esc="d['end']" />
  126. </td>
  127. <td>
  128. Ending Balance
  129. </td>
  130. <td />
  131. <td class="amount">
  132. <span
  133. t-esc="currency['amount_due']"
  134. t-options="{'widget': 'monetary', 'display_currency': display_currency}"
  135. />
  136. </td>
  137. </tr>
  138. </tbody>
  139. </table>
  140. <t
  141. t-call="partner_statement.aging_buckets"
  142. t-if="currency['buckets']"
  143. />
  144. </t>
  145. </t>
  146. <p t-if="d.get('no_entries')">
  147. <strong>The partner doesn't have due entries.</strong>
  148. </p>
  149. </div>
  150. </t>
  151. </template>
  152. <template id="activity_statement">
  153. <t t-call="web.html_container">
  154. <t t-foreach="docs" t-as="o">
  155. <t t-set="d" t-value="data.get(o.id)" />
  156. <t
  157. t-call="partner_statement.activity_statement_document"
  158. t-lang="o.lang"
  159. />
  160. </t>
  161. </t>
  162. </template>
  163. <report
  164. id="action_print_activity_statement"
  165. model="res.partner"
  166. report_type="qweb-pdf"
  167. menu="False"
  168. string="Activity Statement"
  169. name="partner_statement.activity_statement"
  170. file="partner_statement.activity_statement"
  171. />
  172. </odoo>