+ <%
+ total_debit = 0.0
+ total_credit = 0.0
+ %>
+ <%!
+ def amount(text):
+ return text.replace('-', '‑') # replace by a non-breaking hyphen (it will not word-wrap between hyphen and numbers)
+ %>
+ %for line in account.ledger_lines.get(p_id, []):
+ <%
+ total_debit += line.get('debit') or 0.0
+ total_credit += line.get('credit') or 0.0
+
+ label_elements = [line.get('lname') or '']
+ if line.get('invoice_number'):
+ label_elements.append("(%s)" % (line['invoice_number'],))
+ label = ' '.join(label_elements)
+ %>
+
+ ## date
+
${formatLang(line.get('ldate') or '', date=True)}
+ ## period
+
${line.get('period_code') or ''}
+ ## move
+
${line.get('move_name') or ''}
+ ## journal
+
${line.get('jcode') or ''}
+ ## partner
+
${line.get('partner_name') or ''}
+ ## move reference
+
${line.get('lref') or ''}
+ ## label
+
${label}
+ ## reconcile
+
${line.get('rec_name') or ''}
+ ## maturity date
+
${formatLang(line.get('date_maturity') or '', date=True)}
+ ## debit
+
${formatLang(line.get('debit') or 0.0) | amount }
+ ## credit
+
${formatLang(line.get('credit') or 0.0) | amount }
+ ## balance cumulated
+ <% cumul_balance += line.get('balance') or 0.0 %>
+
${formatLang(cumul_balance) | amount }
+ %if amount_currency(data):
+ ## currency balance
+
${formatLang(line.get('amount_currency') or 0.0) | amount }
+ ## curency code
+
${line.get('currency_code') or ''}
+ %endif
+
+ %endfor
+
+ ## date
+
+ ## period
+
+ ## move
+
+ ## journal
+
+ ## partner
+
+ ## move reference
+
+ ## label
+
${_('Cumulated Balance on Partner')}
+ ## reconcile
+
+ ## maturity date
+
+ ## debit
+
${formatLang(total_debit) | amount }
+ ## credit
+
${formatLang(total_credit) | amount }
+ ## balance cumulated
+
${formatLang(cumul_balance) | amount }
+ %if amount_currency(data):
+ %if account.currency_id:
+ ## currency balance
+
${formatLang(cumul_balance_curr) | amount }
+ %else:
+
${ u'-' }
+ %endif
+ ## curency code
+
${ account.currency_id.name if account.currency_id else u'' }
+ %endif
+
+