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">
5 <style type="text/css">
7 text-transform: uppercase;
9 background-color:#F0F0F0;
14 background-color:#F0F0F0;
17 .regular_account_type {
25 .account_level_consol {
32 .list_table .act_as_row {
42 return text.replace('-', '‑') # replace by a non-breaking hyphen (it will not word-wrap between hyphen and numbers)
45 <%setLang(user.lang)%>
48 initial_balance_text = {'initial_balance': _('Computed'), 'opening_balance': _('Opening Entries'), False: _('No')}
51 <div class="act_as_table data_table">
52 <div class="act_as_row labels">
53 <div class="act_as_cell">${_('Chart of Account')}</div>
54 <div class="act_as_cell">${_('Fiscal Year')}</div>
55 <div class="act_as_cell">
56 %if filter_form(data) == 'filter_date':
59 ${_('Periods Filter')}
62 <div class="act_as_cell">${_('Accounts Filter')}</div>
63 <div class="act_as_cell">${_('Target Moves')}</div>
64 <div class="act_as_cell">${_('Initial Balance')}</div>
66 <div class="act_as_row">
67 <div class="act_as_cell">${ chart_account.name }</div>
68 <div class="act_as_cell">${ fiscalyear.name if fiscalyear else '-' }</div>
69 <div class="act_as_cell">
71 %if filter_form(data) == 'filter_date':
72 ${formatLang(start_date, date=True) if start_date else u'' }
74 ${start_period.name if start_period else u''}
77 %if filter_form(data) == 'filter_date':
78 ${ formatLang(stop_date, date=True) if stop_date else u'' }
80 ${stop_period.name if stop_period else u'' }
83 <div class="act_as_cell">
85 ${', '.join([account.code for account in accounts(data)])}
90 <div class="act_as_cell">${ display_target_move(data) }</div>
91 <div class="act_as_cell">${ initial_balance_text[initial_balance_mode] }</div>
95 %for index, params in enumerate(comp_params):
96 <div class="act_as_table data_table">
97 <div class="act_as_row">
98 <div class="act_as_cell">${_('Comparison %s') % (index + 1,)} (${"C%s" % (index + 1,)})</div>
99 <div class="act_as_cell">
100 %if params['comparison_filter'] == 'filter_date':
101 ${_('Dates Filter:')} ${formatLang(params['start'], date=True) } - ${formatLang(params['stop'], date=True) }
102 %elif params['comparison_filter'] == 'filter_period':
103 ${_('Periods Filter:')} ${params['start'].name} - ${params['stop'].name}
105 ${_('Fiscal Year :')} ${params['fiscalyear'].name}
108 <div class="act_as_cell">${_('Initial Balance:')} ${ initial_balance_text[params['initial_balance_mode']] }</div>
113 <div class="act_as_table list_table" style="margin-top: 20px;">
115 <div class="act_as_thead">
116 <div class="act_as_row labels">
118 <div class="act_as_cell first_column" style="width: 20px;">${_('Code')}</div>
120 <div class="act_as_cell" style="width: 80px;">${_('Account')}</div>
121 %if comparison_mode == 'no_comparison':
122 %if initial_balance_mode:
124 <div class="act_as_cell amount" style="width: 30px;">${_('Initial Balance')}</div>
127 <div class="act_as_cell amount" style="width: 30px;">${_('Debit')}</div>
129 <div class="act_as_cell amount" style="width: 30px;">${_('Credit')}</div>
132 <div class="act_as_cell amount" style="width: 30px;">
133 %if comparison_mode == 'no_comparison' or not fiscalyear:
136 ${_('Balance %s') % (fiscalyear.name,)}
139 %if comparison_mode in ('single', 'multiple'):
140 %for index in range(nb_comparison):
141 <div class="act_as_cell amount" style="width: 30px;">
142 %if comp_params[index]['comparison_filter'] == 'filter_year' and comp_params[index].get('fiscalyear', False):
143 ${_('Balance %s') % (comp_params[index]['fiscalyear'].name,)}
145 ${_('Balance C%s') % (index + 1,)}
148 %if comparison_mode == 'single': ## no diff in multiple comparisons because it shows too data
149 <div class="act_as_cell amount" style="width: 30px;">${_('Difference')}</div>
150 <div class="act_as_cell amount" style="width: 30px;">${_('% Difference')}</div>
157 <div class="act_as_tbody">
159 last_child_consol_ids = []
162 %for current_account in objects:
164 if not current_account.to_display:
167 comparisons = current_account.comparisons
169 if current_account.id in last_child_consol_ids:
170 # current account is a consolidation child of the last account: use the level of last account
172 level_class = "account_level_consol"
174 # current account is a not a consolidation child: use its own level
175 level = current_account.level or 0
176 level_class = "account_level_%s" % (level,)
177 last_child_consol_ids = [child_consol_id.id for child_consol_id in current_account.child_consol_ids]
178 last_level = current_account.level
180 <div class="act_as_row lines ${level_class} ${"%s_account_type" % (current_account.type,)}">
182 <div class="act_as_cell first_column">${current_account.code}</div>
184 <div class="act_as_cell" style="padding-left: ${level * 5}px;">${current_account.name}</div>
185 %if comparison_mode == 'no_comparison':
186 %if initial_balance_mode:
188 <div class="act_as_cell amount">${formatLang(current_account.init_balance) | amount}</div>
191 <div class="act_as_cell amount">${formatLang(current_account.debit) | amount}</div>
193 <div class="act_as_cell amount">${formatLang(current_account.credit) | amount}</div>
196 <div class="act_as_cell amount">${formatLang(current_account.balance) | amount}</div>
198 %if comparison_mode in ('single', 'multiple'):
199 %for comp_account in comparisons:
200 <div class="act_as_cell amount">${formatLang(comp_account['balance']) | amount}</div>
201 %if comparison_mode == 'single': ## no diff in multiple comparisons because it shows too data
202 <div class="act_as_cell amount">${formatLang(comp_account['diff']) | amount}</div>
203 <div class="act_as_cell amount">
204 %if comp_account['percent_diff'] is False:
207 ${int(round(comp_account['percent_diff'])) | amount} %