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.

165 lines
8.1 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.outstanding_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. <div class="oe_structure" />
  19. <h2>Statement of Account</h2>
  20. <div id="informations" class="row mt32 mb32">
  21. <div class="col-3 bm-2">
  22. <strong>Date:</strong>
  23. <p t-esc="d['today']" class="m-0" />
  24. </div>
  25. <div t-if="o.ref" class="col-3 bm-2">
  26. <strong>Partner Code:</strong>
  27. <p t-field="o.ref" class="m-0" />
  28. </div>
  29. </div>
  30. <t t-if="d['currencies']">
  31. <br />
  32. <t t-foreach="d['currencies'].items()" t-as="currency">
  33. <t t-set="display_currency" t-value="Currencies[currency[0]]" />
  34. <t t-set="currency" t-value="currency[1]" />
  35. <p>
  36. <span
  37. t-esc="'' if account_type == 'receivable' else 'Supplier '"
  38. />Statement up to <span t-esc="d['end']" /> in <span
  39. t-esc="display_currency.name"
  40. />
  41. </p>
  42. <table class="table table-sm table-statement">
  43. <thead>
  44. <tr>
  45. <th>Reference number</th>
  46. <th>Date</th>
  47. <th>Due Date</th>
  48. <th>Description</th>
  49. <th class="amount">Original</th>
  50. <th class="amount">Open Amount</th>
  51. <th class="amount">Balance</th>
  52. </tr>
  53. </thead>
  54. <tbody>
  55. <tr
  56. t-foreach="currency['lines']"
  57. t-as="line"
  58. t-att-class="'statement-blocked' if line['blocked'] else ''"
  59. >
  60. <td>
  61. <span t-esc="line['move_id']" />
  62. </td>
  63. <td>
  64. <span t-esc="line['date']" />
  65. </td>
  66. <td>
  67. <span t-esc="line['date_maturity']" />
  68. </td>
  69. <td>
  70. <t t-if="line['name'] != '/'">
  71. <t t-if="not line['ref']">
  72. <span t-esc="line['name']" />
  73. </t>
  74. <t t-if="line['ref'] and line['name']">
  75. <t
  76. t-if="line['name'] not in line['ref']"
  77. >
  78. <span t-esc="line['name']" />
  79. </t>
  80. <t
  81. t-if="line['ref'] not in line['name']"
  82. >
  83. <span t-esc="line['ref']" />
  84. </t>
  85. <t t-if="line['ref'] == line['name']">
  86. <span t-esc="line['name']" />
  87. </t>
  88. </t>
  89. </t>
  90. <t t-if="line['name'] == '/'">
  91. <span t-esc="line['ref']" />
  92. </t>
  93. </td>
  94. <td class="amount">
  95. <span
  96. t-esc="line['amount']"
  97. t-options="{'widget': 'monetary', 'display_currency': display_currency}"
  98. />
  99. </td>
  100. <td class="amount">
  101. <span
  102. t-esc="line['open_amount']"
  103. t-options="{'widget': 'monetary', 'display_currency': display_currency}"
  104. />
  105. </td>
  106. <td class="amount">
  107. <span
  108. t-esc="line['balance']"
  109. t-options="{'widget': 'monetary', 'display_currency': display_currency}"
  110. />
  111. </td>
  112. </tr>
  113. <tr>
  114. <td />
  115. <td>
  116. <span t-esc="d['end']" />
  117. </td>
  118. <td>
  119. Ending Balance
  120. </td>
  121. <td />
  122. <td />
  123. <td />
  124. <td class="amount">
  125. <span
  126. t-esc="currency['amount_due']"
  127. t-options="{'widget': 'monetary', 'display_currency': display_currency}"
  128. />
  129. </td>
  130. </tr>
  131. </tbody>
  132. </table>
  133. <t
  134. t-call="partner_statement.aging_buckets"
  135. t-if="currency['buckets']"
  136. />
  137. </t>
  138. </t>
  139. <p t-if="d.get('no_entries')">
  140. <strong>The partner doesn't have due entries.</strong>
  141. </p>
  142. </div>
  143. </t>
  144. </template>
  145. <template id="outstanding_statement">
  146. <t t-call="web.html_container">
  147. <t t-foreach="docs" t-as="o">
  148. <t t-set="d" t-value="data.get(o.id)" />
  149. <t
  150. t-call="partner_statement.outstanding_statement_document"
  151. t-lang="o.lang"
  152. />
  153. </t>
  154. </t>
  155. </template>
  156. <report
  157. id="action_print_outstanding_statement"
  158. model="res.partner"
  159. report_type="qweb-pdf"
  160. menu="False"
  161. string="Outstanding Statement"
  162. name="partner_statement.outstanding_statement"
  163. file="partner_statement.outstanding_statement"
  164. />
  165. </odoo>