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">
8 .list_table .act_as_row {
19 return text.replace('-', '‑') # replace by a non-breaking hyphen (it will not word-wrap between hyphen and numbers)
22 <%def name="format_amount(amount, display_option=None)">
25 if display_option == 'normal':
27 elif display_option == 'round':
28 output = u"%.0f" % round(amount)
29 elif display_option == 'kilo':
31 output = u"%.2fK" % (amount / 1000,)
36 <%setLang(user.lang)%>
38 <div class="act_as_table data_table">
39 <div class="act_as_row labels">
40 <div class="act_as_cell">${_('Chart of Account')}</div>
41 <div class="act_as_cell">${_('Fiscal Year')}</div>
42 <div class="act_as_cell">
43 %if filter_form(data) == 'filter_date':
49 <div class="act_as_cell">${_('Displayed Accounts')}</div>
50 <div class="act_as_cell">${_('Target Moves')}</div>
51 <div class="act_as_cell">${_('Initial Balance')}</div>
53 <div class="act_as_row">
54 <div class="act_as_cell">${ chart_account.name }</div>
55 <div class="act_as_cell">${ fiscalyear.name if fiscalyear else '-' }</div>
56 <div class="act_as_cell">
58 %if filter_form(data) == 'filter_date':
59 ${formatLang(start_date, date=True) if start_date else u'' }
61 ${start_period.name if start_period else u''}
64 %if filter_form(data) == 'filter_date':
65 ${ formatLang(stop_date, date=True) if stop_date else u'' }
67 ${stop_period.name if stop_period else u'' }
70 <div class="act_as_cell">
72 ${', '.join([account.code for account in accounts(data)])}
77 <div class="act_as_cell">${ display_target_move(data) }</div>
78 <div class="act_as_cell">${ _('Yes') if initial_balance else _('No') }</div>
82 %for index, params in enumerate(comp_params):
83 <div class="act_as_table data_table">
84 <div class="act_as_row">
85 <div class="act_as_cell">${_('Comparison %s') % (index + 1,)} (${"C%s" % (index + 1,)})</div>
86 <div class="act_as_cell">
87 %if params['comparison_filter'] == 'filter_date':
88 ${_('Dates : ')} ${formatLang(params['start'], date=True) } - ${formatLang(params['stop'], date=True) }
89 %elif params['comparison_filter'] == 'filter_period':
90 ${_('Periods : ')} ${params['start'].name} - ${params['stop'].name}
92 ${_('Fiscal Year : ')} ${params['fiscalyear'].name}
95 <div class="act_as_cell">${_('Initial Balance:')} ${ _('Yes') if params['initial_balance'] else _('No') }</div>
100 <div class="act_as_table list_table" style="margin-top: 20px;">
102 <div class="act_as_thead">
103 <div class="act_as_row labels">
105 <div class="act_as_cell" style="width: 80px;">${_('Account')}</div>
106 %if comparison_mode == 'no_comparison':
109 <div class="act_as_cell amount" style="width: 30px;">${_('Initial Balance')}</div>
112 <div class="act_as_cell amount" style="width: 30px;">${_('Debit')}</div>
114 <div class="act_as_cell amount" style="width: 30px;">${_('Credit')}</div>
117 <div class="act_as_cell amount" style="width: 30px;">
118 %if comparison_mode == 'no_comparison' or not fiscalyear:
121 ${_('Balance %s') % (fiscalyear.name,)}
124 %if comparison_mode in ('single', 'multiple'):
125 %for index in range(nb_comparison):
126 <div class="act_as_cell amount" style="width: 30px;">
127 %if comp_params[index]['comparison_filter'] == 'filter_year' and comp_params[index].get('fiscalyear', False):
128 ${_('Balance %s') % (comp_params[index]['fiscalyear'].name,)}
130 ${_('Balance C%s') % (index + 1,)}
133 %if comparison_mode == 'single': ## no diff in multiple comparisons because it shows too data
134 <div class="act_as_cell amount" style="width: 30px;">${_('Difference')}</div>
135 <div class="act_as_cell amount" style="width: 30px;">${_('% Difference')}</div>
142 <div class="act_as_tbody">
143 %for account_at in objects:
145 current_account = account_at['current']
146 level = current_account['level']
148 %if level_print(data, level): ## how to manage levels?
151 if level_bold(data, level):
152 styles.append('font-weight: bold;')
154 styles.append('font-weight: normal;')
156 if level_italic(data, level):
157 styles.append('font-style: italic;')
159 styles.append('font-style: normal;')
161 if level_underline(data, level):
162 styles.append('text-decoration: underline;')
164 styles.append('text-decoration: none;')
166 if level_uppercase(data, level):
167 styles.append('text-transform: uppercase;')
169 styles.append('font-decoration: none;')
171 styles.append("font-size: %spx;" % (level_size(data, level),))
174 <div class="act_as_row lines ${"account_level_%s" % (current_account['level'])}" styles="${' '.join(styles)}">
176 <div class="act_as_cell" style="padding-left: ${current_account.get('level', 0) * 5}px; ${' '.join(styles)}">${current_account['name']}</div>
177 %if comparison_mode == 'no_comparison':
180 <div class="act_as_cell amount" style="${' '.join(styles)}">${format_amount(current_account['init_balance'], numbers_display(data)) | amount}</div>
183 <div class="act_as_cell amount" style="${' '.join(styles)}">${format_amount(current_account['debit'], numbers_display(data)) | amount}</div>
185 <div class="act_as_cell amount" style="${' '.join(styles)}">${format_amount(current_account['credit'] * -1, numbers_display(data)) if current_account['credit'] else 0.0 | amount}</div>
188 <div class="act_as_cell amount" style="${' '.join(styles)}">${format_amount(current_account['balance'], numbers_display(data)) | amount}</div>
190 %if comparison_mode in ('single', 'multiple'):
191 %for comp_account in account_at['comparisons']:
192 <div class="act_as_cell amount" style="${' '.join(styles)}">${format_amount(comp_account['balance'], numbers_display(data)) | amount}</div>
193 %if comparison_mode == 'single': ## no diff in multiple comparisons because it shows too data
194 <div class="act_as_cell amount" style="${' '.join(styles)}">${format_amount(comp_account['diff'], numbers_display(data)) | amount}</div>
195 <div class="act_as_cell amount" style="${' '.join(styles)}">
196 %if comp_account['percent_diff'] is False:
199 ${comp_account['percent_diff'] | amount} %