{{ header }}{{ column_left }}
<!-- Content Wrapper. Contains page content -->
<div id="content" class="content-wrapper">
  <!-- Content Header (Page header) -->
  <section class="content-header">
    <div>
      <div class="pull-right">
        <a href="{{ cancel }}" data-toggle="tooltip" title="{{ button_cancel }}" class="btn btn-default btn-sm"><i class="fa fa-reply"></i> {{ button_cancel }}</a>
      </div>
      <h1>
        {{ heading_title }}
      </h1>
    </div>
    <div class="row">
      <div class="col-sm-12">
        <ul class="breadcrumb">
          {% for breadcrumb in breadcrumbs %}
          <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
          {% endfor %}
        </ul>
      </div>
    </div>
  </section>

  <!-- Main content -->
  <section class="content">

    <!-- Default box -->
    <div class="box">
      <div class="box-header with-border">
        <h3 class="panel-title"><i class="fa fa-list"></i> {{ heading_title }}</h3>
        <h3 class="box-title">{{ text_edit }}</h3>

        <div class="box-tools pull-right">
          <button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="{{ text_collapse }}">
            <i class="fa fa-minus"></i></button>
        </div>
      </div>
      <div class="box-body">
        <table class="table table-striped table-bordered">
          {% if lines %}
          <tr>
            <td>{{ text_product_lines }}</td>
            <td><table class="table table-striped table-bordered">
                {% set i = 0 %}
                {% for k,v in lines %}
                  {% if i == 0 %}
                    <thead>
                      <tr>
                        {% for k,row in v %}
                          {% if k == 'L_EBAYITEMTXNID' %} <td class="left">{{ text_ebay_txn_id }}</td> {% endif %}
                          {% if k == 'L_NAME' %} <td class="left">{{ text_name }}</td> {% endif %}
                          {% if k == 'L_NUMBER' %} <td class="left">{{ text_number }}</td> {% endif %}
                          {% if k == 'L_QTY' %} <td class="left">{{ text_qty }}</td> {% endif %}
                          {% if k == 'L_COUPONID' %} <td class="left">{{ text_coupon_id }}</td> {% endif %}
                          {% if k == 'L_COUPONAMOUNT' %} <td class="left">{{ text_coupon_amount }}</td> {% endif %}
                          {% if k == 'L_COUPONAMOUNTCURRENCY' %} <td class="left">{{ text_coupon_currency }}</td> {% endif %}
                          {% if k == 'L_LOYALTYCARDDISCOUNTAMOUNT' %} <td class="left">{{ text_loyalty_disc_amt }}</td> {% endif %}
                          {% if k == 'L_LOYALTYCARDISCOUNTCURRENCY' %} <td class="left">{{ text_loyalty_currency }}</td> {% endif %}
                          {% if k == 'L_AMT' %} <td class="left">{{ text_amount }}</td> {% endif %}
                          {% if k == 'L_OPTIONSNAME' %} <td class="left">{{ text_options_name }}</td> {% endif %}
                          {% if k == 'L_TAXAMT' %} <td class="left">{{ text_tax_amt }}</td> {% endif %}
                          {% if k == 'L_CURRENCYCODE' %} <td class="left">{{ text_currency_code }}</td> {% endif %}
                        {% endfor %}
						{% set i = i + 1 %}
                      </tr>
                    </thead>
                  {% endif %}
                <tr>
                  {% for k,row in v %}
                  {% if k == 'L_EBAYITEMTXNID' %} <td class="left">{{ row }}</td> {% endif %}
                  {% if k == 'L_NAME' %} <td class="left">{{ row }}</td> {% endif %}
                  {% if k == 'L_NUMBER' %} <td class="left">{{ row }}</td> {% endif %}
                  {% if k == 'L_QTY' %} <td class="left">{{ row }}</td> {% endif %}
                  {% if k == 'L_COUPONID' %} <td class="left">{{ row }}</td> {% endif %}
                  {% if k == 'L_COUPONAMOUNT' %} <td class="left">{{ row }}</td> {% endif %}
                  {% if k == 'L_COUPONAMOUNTCURRENCY' %} <td class="left">{{ row }}</td> {% endif %}
                  {% if k == 'L_LOYALTYCARDDISCOUNTAMOUNT' %} <td class="left">{{ row }}</td> {% endif %}
                  {% if k == 'L_LOYALTYCARDISCOUNTCURRENCY' %} <td class="left">{{ row }}</td>{% endif %}
                  {% if k == 'L_AMT' %} <td class="left">{{ row }}</td> {% endif %}
                  {% if k == 'L_OPTIONSNAME' %} <td class="left">{{ row }}</td> {% endif %}
                  {% if k == 'L_OPTIONSVALUE' %} <td class="left">{{ row }}</td> {% endif %}
                  {% if k == 'L_TAXAMT' %} <td class="left">{{ row }}</td> {% endif %}
                  {% if k == 'L_CURRENCYCODE' %} <td class="left">{{ row }}</td>{% endif %}
                  {% endfor %}
				  {% set i = i + 1 %}
                </tr>
                {% endfor %}
              </table></td>
          </tr>
          {% endif %}
          {% if transaction.GIFTMESSAGE %}
          <tr>
            <td>{{ text_gift_msg }}</td>
            <td>{{ transaction.GIFTMESSAGE }}</td>
          </tr>
          {% endif %}
          {% if transaction.GIFTRECEIPTENABLE %}
          <tr>
            <td>{{ text_gift_receipt }}</td>
            <td>{{ transaction.GIFTRECEIPTENABLE }}</td>
          </tr>
          {% endif %}
          {% if transaction.GIFTWRAPNAME %}
          <tr>
            <td>{{ text_gift_wrap_name }}</td>
            <td>{{ transaction.GIFTWRAPNAME }}</td>
          </tr>
          {% endif %}
          {% if transaction.GIFTWRAPAMOUNT %}
          <tr>
            <td>{{ text_gift_wrap_amt }}</td>
            <td>{{ transaction.GIFTWRAPAMOUNT }}</td>
          </tr>
          {% endif %}
          {% if transaction.BUYERMARKETINGEMAIL %}
          <tr>
            <td>{{ text_buyer_email_market }}</td>
            <td>{{ transaction.BUYERMARKETINGEMAIL }}</td>
          </tr>
          {% endif %}
          {% if transaction.SURVEYQUESTION %}
          <tr>
            <td>{{ text_survey_question }}</td>
            <td>{{ transaction.SURVEYQUESTION }}</td>
          </tr>
          {% endif %}
          {% if transaction.SURVEYCHOICESELECTED %}
          <tr>
            <td>{{ text_survey_chosen }}</td>
            <td>{{ transaction.SURVEYCHOICESELECTED }}</td>
          </tr>
          {% endif %}
          {% if transaction.RECEIVERBUSINESS %}
          <tr>
            <td>{{ text_receiver_business }}</td>
            <td>{{ transaction.RECEIVERBUSINESS }}</td>
          </tr>
          {% endif %}
          {% if transaction.RECEIVEREMAIL %}
          <tr>
            <td>{{ text_receiver_email }}</td>
            <td>{{ transaction.RECEIVEREMAIL }}</td>
          </tr>
          {% endif %}
          {% if transaction.RECEIVERID %}
          <tr>
            <td>{{ text_receiver_id }}</td>
            <td>{{ transaction.RECEIVERID }}</td>
          </tr>
          {% endif %}
          {% if transaction.EMAIL %}
          <tr>
            <td>{{ text_buyer_email }}</td>
            <td>{{ transaction.EMAIL }}</td>
          </tr>
          {% endif %}
          {% if transaction.PAYERID %}
          <tr>
            <td>{{ text_payer_id }}</td>
            <td>{{ transaction.PAYERID }}</td>
          </tr>
          {% endif %}
          {% if transaction.PAYERSTATUS %}
          <tr>
            <td>{{ text_payer_status }}</td>
            <td>{{ transaction.PAYERSTATUS }}</td>
          </tr>
          {% endif %}
          {% if transaction.COUNTRYCODE %}
          <tr>
            <td>{{ text_country_code }}</td>
            <td>{{ transaction.COUNTRYCODE }}</td>
          </tr>
          {% endif %}
          {% if transaction.PAYERBUSINESS %}
          <tr>
            <td>{{ text_payer_business }}</td>
            <td>{{ transaction.PAYERBUSINESS }}</td>
          </tr>
          {% endif %}
          {% if transaction.SALUTATION %}
          <tr>
            <td>{{ text_payer_salute }}</td>
            <td>{{ transaction.SALUTATION }}</td>
          </tr>
          {% endif %}
          {% if transaction.FIRSTNAME %}
          <tr>
            <td>{{ text_payer_firstname }}</td>
            <td>{{ transaction.FIRSTNAME }}</td>
          </tr>
          {% endif %}
          {% if transaction.MIDDLENAME %}
          <tr>
            <td>{{ text_payer_middlename }}</td>
            <td>{{ transaction.MIDDLENAME }}</td>
          </tr>
          {% endif %}
          {% if transaction.LASTNAME %}
          <tr>
            <td>{{ text_payer_lastname }}</td>
            <td>{{ transaction.LASTNAME }}</td>
          </tr>
          {% endif %}
          {% if transaction.SUFFIX %}
          <tr>
            <td>{{ text_payer_suffix }}</td>
            <td>{{ transaction.SUFFIX }}</td>
          </tr>
          {% endif %}
          {% if transaction.ADDRESSOWNER %}
          <tr>
            <td>{{ text_address_owner }}</td>
            <td>{{ transaction.ADDRESSOWNER }}</td>
          </tr>
          {% endif %}
          {% if transaction.ADDRESSSTATUS %}
          <tr>
            <td>{{ text_address_status }}</td>
            <td>{{ transaction.ADDRESSSTATUS }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOSECONDARYNAME %}
          <tr>
            <td>{{ text_ship_sec_name }}</td>
            <td>{{ transaction.SHIPTOSECONDARYNAME }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTONAME %}
          <tr>
            <td>{{ text_ship_name }}</td>
            <td>{{ transaction.SHIPTONAME }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOSTREET %}
          <tr>
            <td>{{ text_ship_street1 }}</td>
            <td>{{ transaction.SHIPTOSTREET }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOSECONDARYADDRESSLINE1 %}
          <tr>
            <td>{{ text_ship_sec_add1 }}</td>
            <td>{{ transaction.SHIPTOSECONDARYADDRESSLINE1 }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOSTREET2 %}
          <tr>
            <td>{{ text_ship_street2 }}</td>
            <td>{{ transaction.SHIPTOSTREET2 }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOSECONDARYADDRESSLINE2 %}
          <tr>
            <td>{{ text_ship_sec_add2 }}</td>
            <td>{{ transaction.SHIPTOSECONDARYADDRESSLINE2 }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOCITY %}
          <tr>
            <td>{{ text_ship_city }}</td>
            <td>{{ transaction.SHIPTOCITY }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOSECONDARYCITY %}
          <tr>
            <td>{{ text_ship_sec_city }}</td>
            <td>{{ transaction.SHIPTOSECONDARYCITY }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOSTATE %}
          <tr>
            <td>{{ text_ship_state }}</td>
            <td>{{ transaction.SHIPTOSTATE }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOSECONDARYSTATE %}
          <tr>
            <td>{{ text_ship_sec_state }}</td>
            <td>{{ transaction.SHIPTOSECONDARYSTATE }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOZIP %}
          <tr>
            <td>{{ text_ship_zip }}</td>
            <td>{{ transaction.SHIPTOZIP }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOSECONDARYZIP %}
          <tr>
            <td>{{ text_ship_sec_zip }}</td>
            <td>{{ transaction.SHIPTOSECONDARYZIP }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOCOUNTRYCODE %}
          <tr>
            <td>{{ text_ship_country }}</td>
            <td>{{ transaction.SHIPTOCOUNTRYCODE }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOSECONDARYCOUNTRYCODE %}
          <tr>
            <td>{{ text_ship_sec_country }}</td>
            <td>{{ transaction.SHIPTOSECONDARYCOUNTRYCODE }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOPHONENUM %}
          <tr>
            <td>{{ text_ship_phone }}</td>
            <td>{{ transaction.SHIPTOPHONENUM }}</td>
          </tr>
          {% endif %}
          {% if transaction.SHIPTOSECONDARYPHONENUM %}
          <tr>
            <td>{{ text_ship_sec_phone }}</td>
            <td>{{ transaction.SHIPTOSECONDARYPHONENUM }}</td>
          </tr>
          {% endif %}
          {% if transaction.TRANSACTIONID %}
          <tr>
            <td>{{ text_trans_id }}</td>
            <td>{{ transaction.TRANSACTIONID }}</td>
          </tr>
          {% endif %}
          {% if transaction.PARENTTRANSACTIONID %}
          <tr>
            <td>{{ text_parent_trans_id }}</td>
            <td><a href="{{ view_link ~ '&transaction_id=' ~ transaction.PARENTTRANSACTIONID }}">{{ transaction.PARENTTRANSACTIONID }}</a></td>
          </tr>
          {% endif %}
          {% if transaction.RECEIPTID %}
          <tr>
            <td>{{ text_receipt_id }}</td>
            <td>{{ transaction.RECEIPTID }}</td>
          </tr>
          {% endif %}
          {% if transaction.TRANSACTIONTYPE %}
          <tr>
            <td>{{ text_trans_type }}</td>
            <td>{{ transaction.TRANSACTIONTYPE }}</td>
          </tr>
          {% endif %}
          {% if transaction.PAYMENTTYPE %}
          <tr>
            <td>{{ text_payment_type }}</td>
            <td>{{ transaction.PAYMENTTYPE }}</td>
          </tr>
          {% endif %}
          {% if transaction.ORDERTIME %}
          <tr>
            <td>{{ text_order_time }}</td>
            <td>{{ transaction.ORDERTIME }}</td>
          </tr>
          {% endif %}
          {% if transaction.AMT %}
          <tr>
            <td>{{ text_amount }}</td>
            <td>{{ transaction.AMT }}</td>
          </tr>
          {% endif %}
          {% if transaction.CURRENCYCODE %}
          <tr>
            <td>{{ text_currency_code }}</td>
            <td>{{ transaction.CURRENCYCODE }}</td>
          </tr>
          {% endif %}
          {% if transaction.FEEAMT %}
          <tr>
            <td>{{ text_fee_amount }}</td>
            <td>{{ transaction.FEEAMT }}</td>
          </tr>
          {% endif %}
          {% if transaction.SETTLEAMT %}
          <tr>
            <td>{{ text_settle_amount }}</td>
            <td>{{ transaction.SETTLEAMT }}</td>
          </tr>
          {% endif %}
          {% if transaction.TAXAMT %}
          <tr>
            <td>{{ text_tax_amount }}</td>
            <td>{{ transaction.TAXAMT }}</td>
          </tr>
          {% endif %}
          {% if transaction.EXCHANGERATE %}
          <tr>
            <td>{{ text_exchange }}</td>
            <td>{{ transaction.EXCHANGERATE }}</td>
          </tr>
          {% endif %}
          {% if transaction.PAYMENTSTATUS %}
          <tr>
            <td>{{ text_payment_status }}</td>
            <td>{{ transaction.PAYMENTSTATUS }}</td>
          </tr>
          {% endif %}
          {% if transaction.PENDINGREASON %}
          <tr>
            <td>{{ text_pending_reason }}</td>
            <td>{{ transaction.PENDINGREASON }}</td>
          </tr>
          {% endif %}
          {% if transaction.REASONCODE %}
          <tr>
            <td>{{ text_reason_code }}</td>
            <td>{{ transaction.REASONCODE }}</td>
          </tr>
          {% endif %}
          {% if transaction.PROTECTIONELIGIBILITY %}
          <tr>
            <td>{{ text_protect_elig }}</td>
            <td>{{ transaction.PROTECTIONELIGIBILITY }}</td>
          </tr>
          {% endif %}
          {% if transaction.PROTECTIONELIGIBILITYTYPE %}
          <tr>
            <td>{{ text_protect_elig_type }}</td>
            <td>{{ transaction.PROTECTIONELIGIBILITYTYPE }}</td>
          </tr>
          {% endif %}
          {% if transaction.STOREID %}
          <tr>
            <td>{{ text_store_id }}</td>
            <td>{{ transaction.STOREID }}</td>
          </tr>
          {% endif %}
          {% if transaction.TERMINALID %}
          <tr>
            <td>{{ text_terminal_id }}</td>
            <td>{{ transaction.TERMINALID }}</td>
          </tr>
          {% endif %}
          {% if transaction.INVNUM %}
          <tr>
            <td>{{ text_invoice_number }}</td>
            <td>{{ transaction.INVNUM }}</td>
          </tr>
          {% endif %}
          {% if transaction.CUSTOM %}
          <tr>
            <td>{{ text_custom }}</td>
            <td>{{ transaction.CUSTOM }}</td>
          </tr>
          {% endif %}
          {% if transaction.NOTE %}
          <tr>
            <td>{{ text_note }}</td>
            <td>{{ transaction.NOTE }}</td>
          </tr>
          {% endif %}
          {% if transaction.SALESTAX %}
          <tr>
            <td>{{ text_sales_tax }}</td>
            <td>{{ transaction.SALESTAX }}</td>
          </tr>
          {% endif %}
          {% if transaction.BUYERID %}
          <tr>
            <td>{{ text_buyer_id }}</td>
            <td>{{ transaction.BUYERID }}</td>
          </tr>
          {% endif %}
          {% if transaction.CLOSINGDATE %}
          <tr>
            <td>{{ text_close_date }}</td>
            <td>{{ transaction.CLOSINGDATE }}</td>
          </tr>
          {% endif %}
          {% if transaction.MULTIITEM %}
          <tr>
            <td>{{ text_multi_item }}</td>
            <td>{{ transaction.MULTIITEM }}</td>
          </tr>
          {% endif %}
          {% if transaction.AMOUNT %}
          <tr>
            <td>{{ text_sub_amt }}</td>
            <td>{{ transaction.AMOUNT }}</td>
          </tr>
          {% endif %}
          {% if transaction.PERIOD %}
          <tr>
            <td>{{ text_sub_period }}</td>
            <td>{{ transaction.PERIOD }}</td>
          </tr>
          {% endif %}
        </table>
      </div>
      <!-- /.box-body -->
    </div>
    <!-- /.box -->

  </section>
  <!-- /.content -->
</div>
<!-- /.content-wrapper -->
{{ footer }}
