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.

204 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:20em">
  13. Outstanding Statement
  14. </h4>
  15. <p>
  16. Date: <span t-esc="Date[o.id]" /><br/>
  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. Outstanding Statement 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. <table class="table table-condensed" t-if="Show_Buckets" style="border: 1px solid black; border-collapse: collapse;">
  117. <thead>
  118. <tr>
  119. <th class="text-center" style="border-right: 1px solid black;">Current Due</th>
  120. <th class="text-center" style="border-right: 1px solid black;">1-30 Days Due</th>
  121. <th class="text-center" style="border-right: 1px solid black;">30-60 Days Due</th>
  122. <th class="text-center" style="border-right: 1px solid black;">60-90 Days Due</th>
  123. <th class="text-center" style="border-right: 1px solid black;">90-120 Days Due</th>
  124. <th class="text-center" style="border-right: 1px solid black;">+120 Days Due</th>
  125. <th class="text-right" style="border-right: 1px solid black;">Balance Due</th>
  126. </tr>
  127. </thead>
  128. <tr t-if="currency in Buckets[o.id]">
  129. <td class="text-right" style="border-right: 1px solid black;">
  130. <span t-esc="Buckets[o.id][currency]['current']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  131. </td>
  132. <td class="text-right" style="border-right: 1px solid black;">
  133. <span t-esc="Buckets[o.id][currency]['b_1_30']" 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_30_60']" 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_60_90']" 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_90_120']" 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_over_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]['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  149. </td>
  150. </tr>
  151. <tr t-if="currency not in Buckets[o.id]">
  152. <td class="text-right" style="border-right: 1px solid black;">
  153. <span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
  154. </td>
  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. </tr>
  174. </table>
  175. </t>
  176. </t>
  177. <p t-if="not Lines[o.id]">
  178. <strong>The partner doesn't have due entries.</strong>
  179. </p>
  180. </div>
  181. </div>
  182. </t>
  183. </template>
  184. <template id="statement">
  185. <t t-call="report.html_container">
  186. <t t-foreach="docs" t-as="o">
  187. <t t-if="not (Filter_non_due_partners and (not Lines[o.id]) and (len(doc_ids) > 1))">
  188. <t t-call="customer_outstanding_statement.statement_document" t-lang="o.lang"/>
  189. </t>
  190. </t>
  191. </t>
  192. </template>
  193. <report id="action_print_customer_outstanding_statement"
  194. model="res.partner"
  195. report_type="qweb-pdf"
  196. menu="False"
  197. string="Statement Action to PDF"
  198. name="customer_outstanding_statement.statement"
  199. file="customer_outstanding_statement.statement"
  200. />
  201. </odoo>