+
+ ## code
+
${_('Code')}
+ ## account name
+
${_('Account')}
+ %if comparison_mode == 'no_comparison':
+ %if initial_balance_mode:
+ ## initial balance
+
${_('Initial Balance')}
+ %endif
+ ## debit
+
${_('Debit')}
+ ## credit
+
${_('Credit')}
+ %endif
+ ## balance
+
+ %if comparison_mode == 'no_comparison' or not fiscalyear:
+ ${_('Balance')}
+ %else:
+ ${_('Balance %s') % (fiscalyear.name,)}
+ %endif
+
+ %if comparison_mode in ('single', 'multiple'):
+ %for index in range(nb_comparison):
+
+ %if comp_params[index]['comparison_filter'] == 'filter_year' and comp_params[index].get('fiscalyear', False):
+ ${_('Balance %s') % (comp_params[index]['fiscalyear'].name,)}
+ %else:
+ ${_('Balance C%s') % (index + 1,)}
+ %endif
+
+ %if comparison_mode == 'single': ## no diff in multiple comparisons because it shows too data
+
${_('Difference')}
+
${_('% Difference')}
+ %endif
+ %endfor
+ %endif
+
+
+ <%
+ last_child_consol_ids = []
+ last_level = False
+ %>
+ %for current_account in objects:
+ <%
+ if not current_account.to_display:
+ continue
+
+ comparisons = current_account.comparisons
+
+ if current_account.id in last_child_consol_ids:
+ # current account is a consolidation child of the last account: use the level of last account
+ level = last_level
+ level_class = "account_level_consol"
+ else:
+ # current account is a not a consolidation child: use its own level
+ level = current_account.level or 0
+ level_class = "account_level_%s" % (level,)
+ last_child_consol_ids = [child_consol_id.id for child_consol_id in current_account.child_consol_ids]
+ last_level = current_account.level
+ %>
+
+ ## code
+
${current_account.code}
+ ## account name
+
${current_account.name}
+ %if comparison_mode == 'no_comparison':
+ %if initial_balance_mode:
+ ## opening balance
+
${formatLang(current_account.init_balance) | amount}
+ %endif
+ ## debit
+
${formatLang(current_account.debit) | amount}
+ ## credit
+
${formatLang(current_account.credit) | amount}
+ %endif
+ ## balance
+
${formatLang(current_account.balance) | amount}
+
+ %if comparison_mode in ('single', 'multiple'):
+ %for comp_account in comparisons:
+
${formatLang(comp_account['balance']) | amount}
+ %if comparison_mode == 'single': ## no diff in multiple comparisons because it shows too data
+
${formatLang(comp_account['diff']) | amount}
+
+ %if comp_account['percent_diff'] is False:
+ ${ '-' }
+ %else:
+ ${int(round(comp_account['percent_diff'])) | amount} %
+ %endif
+
+ %endif
+ %endfor
+ %endif
+
+ %endfor
+