<h2>{{ heading_title }}</h2>
<table class="table table-bordered table-hover">
  <thead>
    <tr>
      <td class="text-left" colspan="2">{{ text_reference_info }}</td>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td class="text-left" style="width: 50%;"><b>{{ text_laybuy_ref_no }}</b> {{ transaction.laybuy_ref_no }} </td>
      <td class="text-left"><b>{{ text_paypal_profile_id }}</b> {{ transaction.paypal_profile_id }} </td>
    </tr>
  </tbody>
</table>
<table class="table table-bordered table-hover">
  <thead>
    <tr>
      <td class="text-left" colspan="2">{{ text_payment_plan }}</td>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td class="text-left" style="width: 50%;"><b>{{ text_status }}</b> {{ transaction.status }}<br />
        <b>{{ text_downpayment_percent }}</b> {{ transaction.downpayment }} %<br />
        <b>{{ text_payment_amounts }}</b> {{ transaction.payment_amounts }}<br />
        <b>{{ text_first_payment_due }}</b> {{ transaction.first_payment_due }} </td>
      <td class="text-left"><b>{{ text_amount }}</b> {{ transaction.amount }}<br />
        <b>{{ text_downpayment_amount }}</b> {{ transaction.downpayment_amount }}<br />
        <b>{{ text_months }}</b> {{ transaction.months }}<br />
        <b>{{ text_last_payment_due }}</b> {{ transaction.last_payment_due }} </td>
    </tr>
  </tbody>
</table>
<table class="table table-bordered table-hover">
  <thead>
    <tr>
      <th>{{ column_instalment }}</th>
      <th>{{ column_amount }}</th>
      <th>{{ column_date }}</th>
      <th>{{ column_pp_trans_id }}</th>
      <th>{{ column_status }}</th>
    </tr>
  </thead>
  <tbody>
  {% for report in transaction.report %}
  {% if report.instalment == '0' %}
  <tr>
    <td>{{ text_downpayment }}</td>
    <td>{{ report.amount }}</td>
    <td>{{ report.date }}</td>
    <td>{{ report.pp_trans_id }}</td>
    <td>{{ report.status }}</td>
  </tr>
  {% else %}
  <tr>
    <td>{{ text_month }} {{ report.instalment }}</td>
    <td>{{ report.amount }}</td>
    <td>{{ report.date }}</td>
    <td>{{ report.pp_trans_id }}</td>
    <td>{{ report.status }}</td>
  </tr>
  {% endif %}
  {% endfor %}
  </tbody>
</table>
