%for rec in objects:

${_("Detailed %s account:") % rec.name} ${rec.account_id.code} - ${rec.account_id.name}

|  |  | ${_("Date")} | ${_("Reference")} | ${_("Partner")} | ${_("Amount")}
${_("Beginning Balance")} |  |  | ${formatLang(rec.multi_currency and rec.starting_balance_in_currency or rec.starting_balance, monetary=True, currency_obj=rec.multi_currency and rec.account_id.currency_id or rec.company_id.currency_id)}
| ${_("Cleared Transactions")} |  |
|  | ${_("Deposits and Credits")}${" - %s " % int(rec.sum_of_debits_lines)}${_("items")} | ${formatLang(rec.multi_currency and rec.sum_of_debits_in_currency or rec.sum_of_debits, monetary=True, currency_obj=rec.multi_currency and rec.account_id.currency_id or rec.company_id.currency_id)}
%for rec_line in [line for line in rec.debit_move_line_ids if line.cleared_bank_account]:
|  |  | ${rec_line.date} | ${rec_line.ref and rec_line.ref or ""} | ${rec_line.partner_id.name and rec_line.partner_id.name or ""} | ${formatLang(rec.multi_currency and rec_line.amount_in_currency or rec_line.amount, monetary=True, currency_obj=rec.multi_currency and rec_line.currency_id or rec.company_id.currency_id)}
%endfor
|  | ${_("Cheques and Debits")}${" - %s " % int(rec.sum_of_credits_lines)}${_("items")} | ${formatLang(rec.multi_currency and rec.sum_of_credits_in_currency or rec.sum_of_credits, monetary=True, currency_obj=rec.multi_currency and rec.account_id.currency_id or rec.company_id.currency_id)}
%for rec_line in [line for line in rec.credit_move_line_ids if line.cleared_bank_account]:
|  |  | ${rec_line.date} | ${rec_line.ref and rec_line.ref or ""} | ${rec_line.partner_id.name and rec_line.partner_id.name or ""} | ${formatLang(rec.multi_currency and rec_line.amount_in_currency or rec_line.amount, monetary=True, currency_obj=rec.multi_currency and rec_line.currency_id or rec.company_id.currency_id)}
%endfor
| ${_("Total Cleared Transactions")} |  | ${formatLang(rec.multi_currency and rec.cleared_balance_in_currency or rec.cleared_balance, monetary=True, currency_obj=rec.multi_currency and rec.account_id.currency_id or rec.company_id.currency_id)}
${_("Cleared Balance")} |  |  | ${formatLang(rec.multi_currency and (rec.cleared_balance_in_currency + rec.starting_balance_in_currency) or (rec.cleared_balance + rec.starting_balance), monetary=True, currency_obj=rec.multi_currency and rec.account_id.currency_id or rec.company_id.currency_id)}
| ${_("Uncleared Transactions")} |  |
|  | ${_("Deposits and Credits")}${" - %s " % int(rec.sum_of_debits_lines_unclear)}${_("items")} | ${formatLang(rec.multi_currency and rec.sum_of_debits_unclear_in_currency or rec.sum_of_debits_unclear, monetary=True, currency_obj=rec.multi_currency and rec.account_id.currency_id or rec.company_id.currency_id)}
%for rec_line in [line for line in rec.debit_move_line_ids if not line.cleared_bank_account]:
|  |  | ${rec_line.date} | ${rec_line.ref and rec_line.ref or ""} | ${rec_line.partner_id.name and rec_line.partner_id.name or ""} | ${formatLang(rec.multi_currency and rec_line.amount_in_currency or rec_line.amount, monetary=True, currency_obj=rec.multi_currency and rec_line.currency_id or rec.company_id.currency_id)}
%endfor
|  | ${_("Cheques and Debits")}${" - %s " % int(rec.sum_of_credits_lines_unclear)}${_("items")} | ${formatLang(rec.multi_currency and rec.sum_of_credits_unclear_in_currency or rec.sum_of_credits_unclear, monetary=True, currency_obj=rec.multi_currency and rec.account_id.currency_id or rec.company_id.currency_id)}
%for rec_line in [line for line in rec.credit_move_line_ids if not line.cleared_bank_account]:
|  |  | ${rec_line.date} | ${rec_line.ref and rec_line.ref or ""} | ${rec_line.partner_id.name and rec_line.partner_id.name or ""} | ${formatLang(rec.multi_currency and rec_line.amount_in_currency or rec_line.amount, monetary=True, currency_obj=rec.multi_currency and rec_line.currency_id or rec.company_id.currency_id)}
%endfor
| ${_("Total Uncleared Transactions")} |  | ${formatLang(rec.multi_currency and rec.uncleared_balance_in_currency or rec.uncleared_balance, monetary=True, currency_obj=rec.multi_currency and rec.account_id.currency_id or rec.company_id.currency_id)}

${_("Register Balance as of")}${" %s" % formatLang(rec.ending_date, date=True)}

${formatLang(rec.multi_currency and (rec.starting_balance_in_currency + rec.cleared_balance_in_currency + rec.uncleared_balance_in_currency) or (rec.starting_balance + rec.cleared_balance + rec.uncleared_balance), monetary=True, currency_obj=rec.multi_currency and rec.account_id.currency_id or rec.company_id.currency_id)}

%endfor