<%page args="history" />

#### ${ _("Day %s") % format_date(history.history_date) }

${ _("Last balance") } | ${ _("To receive") } | ${ _("To pay") } | ${ _("Received") } | ${ _("Paid") } | ${ _("Bal. expected") } | ${ _("Bal. real") }
${ format_price(history.previous_balance) } | ${ format_price(history.to_receive) } | ${ format_price(history.to_pay) } | ${ format_price(history.received) } | ${ format_price(history.paid) } | ${ format_price(history.balance_expected) } | ${ format_price(history.balance_real) }

% if (history.to_receive_payments != history.received_payments or \ history.to_pay_payments != history.paid_payments or \ history.to_receive != history.received or \ history.to_pay != history.to_pay): <% payments = list(history.get_divergent_payments()) %> % if payments:

${ _("#") } | ${ _("Status") } | ${ _("Description") } | ${ _("Value") } | ${ _("Paid/Received") } | ${ _("Due date") } | ${ _("Paid date") }
% for payment in payments:
${ str(payment.identifier) } | ${ payment.status_str } | ${ payment.description } | ${ format_price(payment.value) } % if payment.paid_value: | ${ format_price(payment.paid_value) } % else: | ${ '' } % endif | ${ format_date(payment.due_date) } | ${ format_date(payment.paid_date) }
% endfor

% endif % endif