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
7.5 KiB

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