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.

169 lines
9.4 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="report_assets_common" name="oca_statements report assets" inherit_id="report.assets_common">
  4. <xpath expr="." position="inside">
  5. <link href="/customer_activity_statement/static/src/less/layout_statement.less" rel="stylesheet" type="text/less"/>
  6. </xpath>
  7. </template>
  8. <template id="customer_activity_statement.statement_document">
  9. <t t-call="report.external_layout">
  10. <div class="page">
  11. <div class="row">
  12. <div class="col-xs-5 col-xs-offset-7">
  13. <span t-field="o.name"/><br/>
  14. <span t-raw="o.contact_address.replace('\n\n', '\n').replace('\n', '&lt;br&gt;')"/>
  15. <span t-field="o.vat"/>
  16. </div>
  17. <h4 style="padding-left:15em;padding-top:2em">
  18. Activity Statement
  19. </h4>
  20. <p>
  21. Date: <span t-esc="Date[o.id]" /><br/><!--Today-->
  22. <t t-if="o.ref">Partner ref: <span t-field="o.ref"/></t>
  23. </p>
  24. <t t-if="Lines[o.id]">
  25. <br/>
  26. <t t-foreach="Lines[o.id]" t-as="currency">
  27. <br t-if="not currency_first" />
  28. <p >
  29. <span t-esc="'Customer' if account_type == 'receivable' else 'Supplier'"/> Activity Statement between <span t-esc="Date_start[o.id]" /> and <span t-esc="Date_end[o.id]" /> in <span t-esc="Currencies[o.id][currency].name"/>:
  30. </p>
  31. <table class="table table-condensed table-statement" >
  32. <thead>
  33. <tr>
  34. <th >Reference number</th>
  35. <th >Date</th>
  36. <th >Description</th>
  37. <th class="amount" >Amount</th>
  38. <th class="amount" >Balance</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. <tr>
  43. <td />
  44. <td >
  45. <span t-esc="Date_start[o.id]"/>
  46. </td>
  47. <td >
  48. Balance Forward
  49. </td>
  50. <td />
  51. <td class="amount" >
  52. <span t-esc="Balance_forward[o.id].get(currency, 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
  53. </td>
  54. </tr>
  55. <tr t-foreach="Lines[o.id][currency]" t-as="line" t-att-class="'statement-blocked' if line['blocked'] else ''">
  56. <td >
  57. <span t-esc="line['move_id']"/>
  58. </td>
  59. <td >
  60. <span t-esc="line['date']"/>
  61. </td>
  62. <td >
  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="amount" >
  73. <span t-esc="line['amount']" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
  74. </td>
  75. <td class="amount" >
  76. <span t-esc="line['balance']" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
  77. </td>
  78. </tr>
  79. <tr>
  80. <td />
  81. <td >
  82. <span t-esc="Date_end[o.id]"/>
  83. </td>
  84. <td >
  85. Ending Balance
  86. </td>
  87. <td />
  88. <td class="amount" >
  89. <span t-esc="Amount_Due[o.id][currency]" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
  90. </td>
  91. </tr>
  92. </tbody>
  93. </table>
  94. <p>
  95. Aging Report at <span t-esc="Date_end[o.id]" /> in <span t-esc="Currencies[o.id][currency].name"/>:
  96. </p>
  97. <table class="table table-condensed table-statement" t-if="Show_Buckets" >
  98. <thead>
  99. <tr>
  100. <th class="amount" >Current Due</th>
  101. <th class="amount" >1-30 Days Due</th>
  102. <th class="amount" >30-60 Days Due</th>
  103. <th class="amount" >60-90 Days Due</th>
  104. <th class="amount" >90-120 Days Due</th>
  105. <th class="amount" >+120 Days Due</th>
  106. <th class="amount" >Balance Due</th>
  107. </tr>
  108. </thead>
  109. <t t-set="buckets" t-value="Buckets[o.id].get(currency, {})" />
  110. <tbody >
  111. <tr >
  112. <td class="amount" >
  113. <span t-esc="buckets.get('current', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
  114. </td>
  115. <td class="amount" >
  116. <span t-esc="buckets.get('b_1_30', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
  117. </td>
  118. <td class="amount" >
  119. <span t-esc="buckets.get('b_30_60', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
  120. </td>
  121. <td class="amount" >
  122. <span t-esc="buckets.get('b_60_90', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
  123. </td>
  124. <td class="amount" >
  125. <span t-esc="buckets.get('b_90_120', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
  126. </td>
  127. <td class="amount" >
  128. <span t-esc="buckets.get('b_over_120', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
  129. </td>
  130. <td class="amount" >
  131. <span t-esc="buckets.get('balance', 0.0)" t-options="{'widget': 'monetary', 'display_currency': currency}"/>
  132. </td>
  133. </tr>
  134. </tbody>
  135. </table>
  136. </t>
  137. </t>
  138. <p t-if="not Lines[o.id]">
  139. <strong>The partner doesn't have due entries.</strong>
  140. </p>
  141. </div>
  142. </div>
  143. </t>
  144. </template>
  145. <template id="statement">
  146. <t t-call="report.html_container">
  147. <t t-foreach="docs" t-as="o">
  148. <t t-if="not (Filter_non_due_partners and (not Lines[o.id]) and (len(doc_ids) > 1))">
  149. <t t-call="customer_activity_statement.statement_document" t-lang="o.lang"/>
  150. </t>
  151. </t>
  152. </t>
  153. </template>
  154. <report id="action_print_customer_activity_statement"
  155. model="res.partner"
  156. report_type="qweb-pdf"
  157. menu="False"
  158. string="Activity Statement"
  159. name="customer_activity_statement.statement"
  160. file="customer_activity_statement.statement"
  161. />
  162. </odoo>