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.

155 lines
6.2 KiB

  1. ## -*- coding: utf-8 -*-
  2. <!DOCTYPE html SYSTEM
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <style type="text/css">
  7. .overflow_ellipsis {
  8. text-overflow: ellipsis;
  9. overflow: hidden;
  10. white-space: nowrap;
  11. }
  12. .open_invoice_previous_line {
  13. font-style: italic;
  14. }
  15. .percent_line {
  16. font-style: italic;
  17. }
  18. .amount {
  19. text-align:right;
  20. }
  21. .classif_title {
  22. text-align:right;
  23. }
  24. .classif{
  25. width: ${700/len(ranges)}px;
  26. }
  27. .total{
  28. font-weight:bold;
  29. }
  30. ${css}
  31. </style>
  32. </head>
  33. <%!
  34. def amount(text):
  35. # replace by a non-breaking hyphen (it will not word-wrap between hyphen and numbers)
  36. return text.replace('-', '&#8209;')
  37. %>
  38. <body>
  39. <%setLang(user.lang)%>
  40. <div class="act_as_table data_table">
  41. <div class="act_as_row labels">
  42. <div class="act_as_cell">${_('Chart of Account')}</div>
  43. <div class="act_as_cell">${_('Fiscal Year')}</div>
  44. <div class="act_as_cell">
  45. %if filter_form(data) == 'filter_date':
  46. ${_('Dates Filter')}
  47. %else:
  48. ${_('Periods Filter')}
  49. %endif
  50. </div>
  51. <div class="act_as_cell">${_('Clearance Date')}</div>
  52. <div class="act_as_cell">${_('Accounts Filter')}</div>
  53. <div class="act_as_cell">${_('Target Moves')}</div>
  54. </div>
  55. <div class="act_as_row">
  56. <div class="act_as_cell">${ chart_account.name }</div>
  57. <div class="act_as_cell">${ fiscalyear.name if fiscalyear else '-' }</div>
  58. <div class="act_as_cell">
  59. ${_('From:')}
  60. %if filter_form(data) == 'filter_date':
  61. ${formatLang(start_date, date=True) if start_date else u'' }
  62. %else:
  63. ${start_period.name if start_period else u''}
  64. %endif
  65. ${_('To:')}
  66. %if filter_form(data) == 'filter_date':
  67. ${ formatLang(stop_date, date=True) if stop_date else u'' }
  68. %else:
  69. ${stop_period.name if stop_period else u'' }
  70. %endif
  71. </div>
  72. <div class="act_as_cell">${ formatLang(date_until, date=True) }</div>
  73. <div class="act_as_cell">
  74. %if partner_ids:
  75. ${_('Custom Filter')}
  76. %else:
  77. ${ display_partner_account(data) }
  78. %endif
  79. </div>
  80. <div class="act_as_cell">${ display_target_move(data) }</div>
  81. </div>
  82. </div>
  83. %for acc in objects:
  84. %if agged_lines_accounts[acc.id]:
  85. <div class="account_title bg" style="width: 1080px; margin-top: 20px; font-size: 12px;">${acc.code} - ${acc.name}</div>
  86. <div class="act_as_table list_table" style="margin-top: 5px;">
  87. <div class="act_as_thead">
  88. <div class="act_as_row labels">
  89. ## partner
  90. <div class="act_as_cell first_column" style="width: 60px;">${_('Partner')}</div>
  91. ## code
  92. <div class="act_as_cell" style="width: 70px;">${_('code')}</div>
  93. ## balance
  94. <div class="act_as_cell classif_title" style="width: 70px;">${_('balance')}</div>
  95. ## Classifications
  96. %for title in ranges_titles:
  97. <div class="act_as_cell classif classif_title">${title}</div>
  98. %endfor
  99. </div>
  100. </div>
  101. <div class="act_as_tbody">
  102. %for partner_name, p_id, p_ref, p_name in partners_order[acc.id]:
  103. %if agged_lines_accounts[acc.id].get(p_id):
  104. <div class="act_as_row lines">
  105. <%line = agged_lines_accounts[acc.id][p_id]%>
  106. <%percents = agged_percents_accounts[acc.id]%>
  107. <%totals = agged_totals_accounts[acc.id]%>
  108. <div class="act_as_cell first_column">${partner_name}</div>
  109. <div class="act_as_cell">${p_ref or ''}</div>
  110. <div class="act_as_cell amount">${formatLang(line.get('balance') or 0.0) | amount}</div>
  111. %for classif in ranges:
  112. <div class="act_as_cell classif amount">
  113. ${formatLang(line['aged_lines'][classif] or 0.0) | amount}
  114. </div>
  115. %endfor
  116. </div>
  117. %endif
  118. %endfor
  119. <div class="act_as_row labels">
  120. <div class="act_as_cell total">${_('Total')}</div>
  121. <div class="act_as_cell"></div>
  122. <div class="act_as_cell amount classif total">${formatLang(totals['balance']) | amount}</div>
  123. %for classif in ranges:
  124. <div class="act_as_cell amount classif total">${formatLang(totals[classif]) | amount}</div>
  125. %endfor
  126. </div>
  127. <div class="act_as_row">
  128. <div class="act_as_cell"><b>${_('Percents')}</b></div>
  129. <div class="act_as_cell"></div>
  130. <div class="act_as_cell"></div>
  131. %for classif in ranges:
  132. <div class="act_as_cell amount percent_line classif">${formatLang(percents[classif]) | amount}%</div>
  133. %endfor
  134. </div>
  135. </div>
  136. <br/>
  137. %endif
  138. %endfor
  139. </div>
  140. </body>
  141. </html>