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.

170 lines
7.5 KiB

  1. ## -*- coding: utf-8 -*-
  2. <!DOCTYPE html SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <style type="text/css">
  6. .overflow_ellipsis {
  7. text-overflow: ellipsis;
  8. overflow: hidden;
  9. white-space: nowrap;
  10. }
  11. ${css}
  12. </style>
  13. </head>
  14. <body>
  15. <%!
  16. def amount(text):
  17. return text.replace('-', '&#8209;') # replace by a non-breaking hyphen (it will not word-wrap between hyphen and numbers)
  18. %>
  19. <%setLang(user.lang)%>
  20. <div class="act_as_table data_table">
  21. <div class="act_as_row labels">
  22. <div class="act_as_cell">${_('Chart of Account')}</div>
  23. <div class="act_as_cell">${_('Fiscal Year')}</div>
  24. <div class="act_as_cell">
  25. %if filter_form(data) == 'filter_date':
  26. ${_('Dates Filter')}
  27. %else:
  28. ${_('Periods Filter')}
  29. %endif
  30. </div>
  31. <div class="act_as_cell">${_('Journal Filter')}</div>
  32. <div class="act_as_cell">${_('Target Moves')}</div>
  33. </div>
  34. <div class="act_as_row">
  35. <div class="act_as_cell">${ chart_account.name }</div>
  36. <div class="act_as_cell">${ fiscalyear.name if fiscalyear else '-' }</div>
  37. <div class="act_as_cell">
  38. ${_('From:')}
  39. %if filter_form(data) == 'filter_date':
  40. ${formatLang(start_date, date=True) if start_date else u'' }
  41. %else:
  42. ${start_period.name if start_period else u''}
  43. %endif
  44. ${_('To:')}
  45. %if filter_form(data) == 'filter_date':
  46. ${ formatLang(stop_date, date=True) if stop_date else u'' }
  47. %else:
  48. ${stop_period.name if stop_period else u'' }
  49. %endif
  50. </div>
  51. <div class="act_as_cell">
  52. %if journals(data):
  53. ${', '.join([journal.name for journal in journals(data)])}
  54. %else:
  55. ${_('All')}
  56. %endif
  57. </div>
  58. <div class="act_as_cell">${ display_target_move(data) }</div>
  59. </div>
  60. </div>
  61. %for journal_period in objects:
  62. <%
  63. account_total_debit = 0.0
  64. account_total_credit = 0.0
  65. account_total_currency = 0.0
  66. %>
  67. <div class="account_title bg" style="width: 1080px; margin-top: 20px; font-size: 12px;">${journal_period.journal_id.name} - ${journal_period.period_id.name}</div>
  68. <!-- we use div with css instead of table for tabular data because div do not cut rows at half at page breaks -->
  69. <div class="act_as_table list_table" style="margin-top: 5px;">
  70. <div class="act_as_thead">
  71. <div class="act_as_row labels">
  72. ## date
  73. <div class="act_as_cell first_column">${_('Date')}</div>
  74. ## move
  75. <div class="act_as_cell">${_('Entry')}</div>
  76. ## account code
  77. <div class="act_as_cell">${_('Account')}</div>
  78. ## date
  79. <div class="act_as_cell">${_('Due Date')}</div>
  80. ## partner
  81. <div class="act_as_cell" style="width: 280px;">${_('Partner')}</div>
  82. ## label
  83. <div class="act_as_cell" style="width: 310px;">${_('Label')}</div>
  84. ## debit
  85. <div class="act_as_cell amount">${_('Debit')}</div>
  86. ## credit
  87. <div class="act_as_cell amount">${_('Credit')}</div>
  88. %if amount_currency(data):
  89. ## currency balance
  90. <div class="act_as_cell amount sep_left">${_('Curr. Balance')}</div>
  91. ## curency code
  92. <div class="act_as_cell amount" style="text-align: right;">${_('Curr.')}</div>
  93. %endif
  94. </div>
  95. </div>
  96. %for move in moves[journal_period.id]:
  97. <%
  98. new_move = True
  99. %>
  100. %for line in move.line_id:
  101. <div class="act_as_tbody">
  102. <%
  103. account_total_debit += line.debit or 0.0
  104. account_total_credit += line.credit or 0.0
  105. %>
  106. <div class="act_as_row lines">
  107. ## date
  108. <div class="act_as_cell first_column">${formatLang(move.date, date=True) if new_move else ''}</div>
  109. ## move
  110. <div class="act_as_cell">${move.name if new_move else ''}</div>
  111. ## account code
  112. <div class="act_as_cell">${line.account_id.code}</div>
  113. ## date
  114. <div class="act_as_cell">${formatLang(line.date_maturity or '', date=True)}</div>
  115. ## partner
  116. <div class="act_as_cell overflow_ellipsis" style="width: 280px;">${line.partner_id.name if new_move else ''}</div>
  117. ## label
  118. <div class="act_as_cell overflow_ellipsis" style="width: 310px;">${line.name}</div>
  119. ## debit
  120. <div class="act_as_cell amount">${formatLang(line.debit) if line.debit else ''}</div>
  121. ## credit
  122. <div class="act_as_cell amount">${formatLang(line.credit) if line.credit else ''}</div>
  123. %if amount_currency(data):
  124. ## currency balance
  125. <div class="act_as_cell amount sep_left">${formatLang(line.amount_currency) if line.amount_currency else ''}</div>
  126. ## curency code
  127. <div class="act_as_cell amount" style="text-align: right;">${line.currency_id.symbol or ''}</div>
  128. %endif
  129. </div>
  130. <%
  131. new_move = False
  132. %>
  133. </div>
  134. %endfor
  135. %endfor
  136. <div class="act_as_row lines labels">
  137. ## date
  138. <div class="act_as_cell first_column"></div>
  139. ## move
  140. <div class="act_as_cell"></div>
  141. ## account code
  142. <div class="act_as_cell"></div>
  143. ## date
  144. <div class="act_as_cell"></div>
  145. ## partner
  146. <div class="act_as_cell" style="width: 280px;"></div>
  147. ## label
  148. <div class="act_as_cell" style="width: 310px;"></div>
  149. ## debit
  150. <div class="act_as_cell amount">${formatLang(account_total_debit) | amount }</div>
  151. ## credit
  152. <div class="act_as_cell amount">${formatLang(account_total_credit) | amount }</div>
  153. %if amount_currency(data):
  154. ## currency balance
  155. <div class="act_as_cell amount sep_left"></div>
  156. ## currency code
  157. <div class="act_as_cell" style="text-align: right; right;"></div>
  158. %endif
  159. </div>
  160. </div>
  161. %endfor
  162. </body>
  163. </html>