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.

207 lines
15 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <template id="customer_outstanding_statement.statement_document">
  4. <t t-call="report.external_layout">
  5. <div class="page">
  6. <div class="row">
  7. <div class="col-xs-5 col-xs-offset-7">
  8. <span t-field="o.name"/><br/>
  9. <span t-raw="o.contact_address.replace('\n\n', '\n').replace('\n', '&lt;br&gt;')"/>
  10. <span t-field="o.vat"/>
  11. </div>
  12. <h4 style="padding-left:15em;padding-top:2em">
  13. Aging Statement
  14. </h4>
  15. <p>
  16. Date: <span t-esc="Date[o.id]" /><br/><!--Today-->
  17. <t t-if="o.ref">Partner ref: <span t-field="o.ref"/></t>
  18. </p>
  19. <t t-if="Lines[o.id]">
  20. <br/>
  21. <t t-foreach="Lines[o.id]" t-as="currency">
  22. <br t-if="not currency_first" />
  23. <p>
  24. Aging Statement at <span t-esc="Date_end[o.id]" /> in <span t-esc="Currencies[o.id][currency].name"/>:
  25. </p>
  26. <table class="table table-condensed" style="border: 1px solid black; border-collapse: collapse;">
  27. <thead>
  28. <tr>
  29. <th style="border-right: 1px solid black;">Reference number</th>
  30. <th class="text-center" style="border-right: 1px solid black;">Date</th>
  31. <th class="text-center" style="border-right: 1px solid black;">Due Date</th>
  32. <th style="border-right: 1px solid black;">Description</th>
  33. <th class="text-right" style="border-right: 1px solid black;">Original Amount</th>
  34. <th class="text-right" style="border-right: 1px solid black;">Open Amount</th>
  35. <th class="text-right" style="border-right: 1px solid black;">Balance</th>
  36. </tr>
  37. </thead>
  38. <tr t-foreach="Lines[o.id][currency]" t-as="line">
  39. <t t-if="not line['blocked']">
  40. <td style="border-right: 1px solid black;">
  41. <span t-esc="line['move_id']"/>
  42. </td>
  43. <td style="border-right: 1px solid black;">
  44. <span t-esc="line['date']"/>
  45. </td>
  46. <td style="border-right: 1px solid black;">
  47. <span t-esc="line['date_maturity']"/>
  48. </td>
  49. <td style="border-right: 1px solid black;">
  50. <t t-if="line['name'] != '/'">
  51. <t t-if="not line['ref']"><span t-esc="line['name']"/></t>
  52. <t t-if="line['ref'] and line['name']">
  53. <t t-if="line['name'] not in line['ref']"><span t-esc="line['name']"/></t>
  54. <t t-if="line['ref'] not in line['name']"><span t-esc="line['ref']"/></t>
  55. </t>
  56. </t>
  57. <t t-if="line['name'] == '/'"><span t-esc="line['ref']"/></t>
  58. </td>
  59. <td class="text-right" style="border-right: 1px solid black;">
  60. <span t-esc="line['amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  61. </td>
  62. <td class="text-right" style="border-right: 1px solid black;">
  63. <span t-esc="line['open_amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  64. </td>
  65. <td class="text-right" style="border-right: 1px solid black;">
  66. <span t-esc="line['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  67. </td>
  68. </t>
  69. <t t-if="line['blocked']">
  70. <td style="border-right: 1px solid black; background-color: grey;">
  71. <span t-esc="line['move_id']"/>
  72. </td>
  73. <td style="border-right: 1px solid black; background-color: grey;">
  74. <span t-esc="line['date']"/>
  75. </td>
  76. <td style="border-right: 1px solid black; background-color: grey;">
  77. <span t-esc="line['date_maturity']"/>
  78. </td>
  79. <td style="border-right: 1px solid black; background-color: grey;">
  80. <t t-if="line['name'] != '/'">
  81. <t t-if="not line['ref']"><span t-esc="line['name']"/></t>
  82. <t t-if="line['ref'] and line['name']">
  83. <t t-if="line['name'] not in line['ref']"><span t-esc="line['name']"/></t>
  84. <t t-if="line['ref'] not in line['name']"><span t-esc="line['ref']"/></t>
  85. </t>
  86. </t>
  87. <t t-if="line['name'] == '/'"><span t-esc="line['ref']"/></t>
  88. </td>
  89. <td class="text-right" style="border-right: 1px solid black; background-color: grey;">
  90. <span t-esc="line['amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  91. </td>
  92. <td class="text-right" style="border-right: 1px solid black; background-color: grey;">
  93. <span t-esc="line['open_amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  94. </td>
  95. <td class="text-right" style="border-right: 1px solid black; background-color: grey;">
  96. <span t-esc="line['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  97. </td>
  98. </t>
  99. </tr>
  100. <tr>
  101. <td style="border-right: 1px solid black;"></td>
  102. <td style="border-right: 1px solid black;">
  103. <span t-esc="Date_end[o.id]"/>
  104. </td>
  105. <td style="border-right: 1px solid black;"></td>
  106. <td style="border-right: 1px solid black;">
  107. Ending Balance
  108. </td>
  109. <td style="border-right: 1px solid black;"></td>
  110. <td style="border-right: 1px solid black;"></td>
  111. <td class="text-right" style="border-right: 1px solid black;">
  112. <span t-esc="Amount_Due[o.id][currency]" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  113. </td>
  114. </tr>
  115. </table>
  116. <p>
  117. Aging Report at <span t-esc="Date_end[o.id]" /> in <span t-esc="Currencies[o.id][currency].name"/>:
  118. </p>
  119. <table class="table table-condensed" t-if="Show_Buckets" style="border: 1px solid black; border-collapse: collapse;">
  120. <thead>
  121. <tr>
  122. <th class="text-center" style="border-right: 1px solid black;">Current Due</th>
  123. <th class="text-center" style="border-right: 1px solid black;">1-30 Days Due</th>
  124. <th class="text-center" style="border-right: 1px solid black;">30-60 Days Due</th>
  125. <th class="text-center" style="border-right: 1px solid black;">60-90 Days Due</th>
  126. <th class="text-center" style="border-right: 1px solid black;">90-120 Days Due</th>
  127. <th class="text-center" style="border-right: 1px solid black;">+120 Days Due</th>
  128. <th class="text-right" style="border-right: 1px solid black;">Balance Due</th>
  129. </tr>
  130. </thead>
  131. <tr t-if="currency in Buckets[o.id]">
  132. <td class="text-right" style="border-right: 1px solid black;">
  133. <span t-esc="Buckets[o.id][currency]['current']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  134. </td>
  135. <td class="text-right" style="border-right: 1px solid black;">
  136. <span t-esc="Buckets[o.id][currency]['b_1_30']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  137. </td>
  138. <td class="text-right" style="border-right: 1px solid black;">
  139. <span t-esc="Buckets[o.id][currency]['b_30_60']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  140. </td>
  141. <td class="text-right" style="border-right: 1px solid black;">
  142. <span t-esc="Buckets[o.id][currency]['b_60_90']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  143. </td>
  144. <td class="text-right" style="border-right: 1px solid black;">
  145. <span t-esc="Buckets[o.id][currency]['b_90_120']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  146. </td>
  147. <td class="text-right" style="border-right: 1px solid black;">
  148. <span t-esc="Buckets[o.id][currency]['b_over_120']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  149. </td>
  150. <td class="text-right" style="border-right: 1px solid black;">
  151. <span t-esc="Buckets[o.id][currency]['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  152. </td>
  153. </tr>
  154. <tr t-if="currency not in Buckets[o.id]">
  155. <td class="text-right" style="border-right: 1px solid black;">
  156. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  157. </td>
  158. <td class="text-right" style="border-right: 1px solid black;">
  159. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  160. </td>
  161. <td class="text-right" style="border-right: 1px solid black;">
  162. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  163. </td>
  164. <td class="text-right" style="border-right: 1px solid black;">
  165. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  166. </td>
  167. <td class="text-right" style="border-right: 1px solid black;">
  168. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  169. </td>
  170. <td class="text-right" style="border-right: 1px solid black;">
  171. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  172. </td>
  173. <td class="text-right" style="border-right: 1px solid black;">
  174. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  175. </td>
  176. </tr>
  177. </table>
  178. </t>
  179. </t>
  180. <p t-if="not Lines[o.id]">
  181. <strong>The partner doesn't have due entries.</strong>
  182. </p>
  183. </div>
  184. </div>
  185. </t>
  186. </template>
  187. <template id="statement">
  188. <t t-call="report.html_container">
  189. <t t-foreach="docs" t-as="o">
  190. <t t-if="not (Filter_non_due_partners and (not Lines[o.id]) and (len(doc_ids) > 1))">
  191. <t t-call="customer_outstanding_statement.statement_document" t-lang="o.lang"/>
  192. </t>
  193. </t>
  194. </t>
  195. </template>
  196. <report id="action_print_customer_outstanding_statement"
  197. model="res.partner"
  198. report_type="qweb-pdf"
  199. menu="False"
  200. string="Statement Action to PDF"
  201. name="customer_outstanding_statement.statement"
  202. file="customer_outstanding_statement.statement"
  203. />
  204. </odoo>