  <section id="items">
    <h3>${ _('Purchase Ordered Items') }</h3>
    <table class="list">
      <thead>
        <tr>
          <td>${ _("Category") }</td>
          <td>${ _("Code") }</td>
          <td>${ _("Item") }</td>
          <td>${ _("Ordered") }</td>
          <td>${ _("Cost") }</td>
          <td>${ _("Total") }</td>
          % if report.receiving_orders:
          <td>${ _("Received") }</td>
          <td>${ _("Total") }</td>
          % endif
        </tr>
      </thead>

      <tfoot>
        <tr>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
          <td></td>
          % if report.receiving_orders:
          <td></td>
          <td></td>
          % endif
        </tr>
      </tfoot>

      <tbody >
        <%
          purchased = 0
          received = 0
          value_purchased = 0
          value_received = 0
        %>
        % for item in report.order.get_items():
          <%
            purchased += item.quantity
            received += item.quantity_received
            value_purchased += item.get_total()
            value_received += item.get_received_total()
          %>
          <tr>
            <td>${ item.sellable.get_category_description() }</td>
            <td>${ item.sellable.code }</td>
            <td>${ item.sellable.get_description() }</td>
            <td>${ format_quantity(item.quantity) } ${ item.sellable.get_unit_description() }</td>
            <td>${ format_cost(item.cost) }</td>
            <td>${ format_price(item.get_total()) }</td>
            % if report.receiving_orders:
            <td>${ format_quantity(item.quantity_received) } ${ item.sellable.get_unit_description() }</td>
            <td>${ format_price(item.get_received_total()) }</td>
            % endif
          </tr>
        % endfor
      </tbody>

      <tbody class="summary">
        <tr >
          <td></td>
          <td></td>
          <td></td>
          <td>${ format_quantity(purchased) }</td>
          <td>${ _('Total:') }</td>
          <td>${ format_price(value_purchased) }</td>
          % if report.receiving_orders:
          <td>${ format_quantity(received) }</td>
          <td>${ format_price(value_received) }</td>
          % endif
        </tr>
      </tbody>
    </table>
  </section>

