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.

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