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.

133 lines
7.0 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="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.partner_id.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>
  69. </t>
  70. <t t-if="line['name'] == '/'">
  71. <span t-esc="line['ref']"/>
  72. </t>
  73. </td>
  74. <td class="amount">
  75. <span t-esc="line['amount']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  76. </td>
  77. <td class="amount">
  78. <span t-esc="line['open_amount']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  79. </td>
  80. <td class="amount">
  81. <span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  82. </td>
  83. </tr>
  84. <tr>
  85. <td />
  86. <td>
  87. <span t-esc="d['end']"/>
  88. </td>
  89. <td>
  90. Ending Balance
  91. </td>
  92. <td />
  93. <td />
  94. <td />
  95. <td class="amount">
  96. <span t-esc="currency['amount_due']" t-options="{'widget': 'monetary', 'display_currency': display_currency}"/>
  97. </td>
  98. </tr>
  99. </tbody>
  100. </table>
  101. <t t-call="partner_statement.aging_buckets" t-if="currency['buckets']" />
  102. </t>
  103. </t>
  104. <p t-if="d.get('no_entries')">
  105. <strong>The partner doesn't have due entries.</strong>
  106. </p>
  107. </div>
  108. </t>
  109. </template>
  110. <template id="outstanding_statement">
  111. <t t-call="web.html_container">
  112. <t t-foreach="docs" t-as="o">
  113. <t t-set="d" t-value="data.get(o.id)" />
  114. <t t-call="partner_statement.outstanding_statement_document" t-lang="o.lang"/>
  115. </t>
  116. </t>
  117. </template>
  118. <report id="action_print_outstanding_statement"
  119. model="res.partner"
  120. report_type="qweb-pdf"
  121. menu="False"
  122. string="Outstanding Statement"
  123. name="partner_statement.outstanding_statement"
  124. file="partner_statement.outstanding_statement"
  125. />
  126. </odoo>