{{ header }}
<style type="text/css">
.table tr:nth-child(odd),.table tr:nth-child(even) {
    background-color: unset !important;
}
.table thead th {
    border-bottom: 2px solid #f1ae004d;
}

.table-bordered td, .table-bordered th {
   border-color: #f1ae004d !important;
}
#input-date-added, #input-date-modified{
    height: 44px ;
    border-radius: 5px ;
    border:2px solid #f1ae004d;
  }
#input-date-added:focus, #input-date-modified:focus{
    border:2px solid #f1ae004d;
    box-shadow:none;
  }
</style>
<div id="account-order" class="container">
  <ul class="breadcrumb">
    {% for breadcrumb in breadcrumbs %}
    <li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
    {% endfor %}
  </ul>
  <div class="row">{{ column_left }}
    {% if column_left and column_right %}
    {% set class = 'col-sm-6' %}
    {% elseif column_left or column_right %}
    {% set class = 'col-sm-9' %}
    {% else %}
    {% set class = 'col-sm-12' %}
    {% endif %}
     
    <div id="content" class="col-sm-9">
        <div class="row">
             <div id="filter-order" class="col-12">
              <div class="panel panel-default">
                <div class="panel-heading">
                  <h3 class="panel-title"><i class="fa fa-filter"></i> {{ text_filter }}</h3>
                </div>
                <div class="panel-body">
                  <div class="form-group row">
                    <div class="col-sm-6">
                       <label class="control-label" for="input-date-added">{{ entry_date_start}}</label>
                      <input type="date" name="filter_date_start" value="{{ filter_date_start}}" placeholder="{{ entry_date_start }}" id="input-date-added" class="form-control" />
                    </div>
                    <div class="col-sm-6">
                      <label class="control-label" for="input-date-modified">{{ entry_date_end }}</label>
                      <input type="date" name="filter_date_end" value="{{ filter_date_end }}" placeholder="{{ entry_date_end }}" id="input-date-modified" class="form-control" />
                    </div>
                  </div>
                  <div class="form-group text-right">
                    <button type="button" id="button-filter" class="btn btn-default"><i class="fa fa-filter"></i> {{ button_filter }}</button>
                  </div>
                </div>
              </div>
            </div>
            <div id="filter-order" class="col-12">
                 {{ content_top }}
                  <h2>Business Earn</h2>
                  {% if businesses %}
                  <div class="table-responsive">
                    <table class="table table-bordered table-hover">
                      <thead>
                        <tr style="background:#fffcf4 !important;">
                          <th>{{ column_total_GBP }}</td>
                          <th>{{ column_total_GBPurchase }}</td>
                        </tr>
                      </thead>
                      <tbody>
                       {% for business in businesses %}
                        <tr>
                          <td>{{ business.points }}</td>
                          <td>{{ business.total }}</td>
                        </tr>
                        {% endfor %}
                      </tbody>
                    </table>
                  </div>
                  {% else %}
                  <p>{{ text_empty }}</p>
                  {% endif %}
                  {{ content_bottom }}
            </div>
            <div id="filter-order" class="col-12">
                 {{ content_top }}
                  <h2>Business Deduct</h2>
                  {% if deduction %}
                  <div class="table-responsive">
                    <table class="table table-bordered table-hover">
                      <thead>
                        <tr style="background:#fffcf4 !important;">
                          <th>{{ column_total_GBP }}</td>
                          <th>{{ column_total_GBPurchase }}</td>
                        </tr>
                      </thead>
                      <tbody>
                       {% for deduct in deduction %}
                        <tr>
                          <td>{{ deduct.points }}</td>
                          <td>{{ deduct.total }}</td>
                        </tr>
                        {% endfor %}
                      </tbody>
                    </table>
                  </div>
                  {% else %}
                  <p>{{ text_empty }}</p>
                  {% endif %}
                  {{ content_bottom }}
            </div>
            <div id="filter-order" class="col-12">
              {{ content_top }}
              <h2>Total Business</h2>
              <div class="table-responsive">
                  <table class="table table-bordered table-hover">
                      <thead>
                          <tr style="background:#fffcf4 !important;">
                              <th>{{ column_total_GBP }}</th>
                              <th>{{ column_total_GBPurchase }}</th>
                          </tr>
                      </thead>
                      <tbody>
                          <tr>
                              <td>{{ total_points }}</td>
                              <td>{{ total_amount }}</td>
                          </tr>
                      </tbody>
                  </table>
              </div>
              {{ content_bottom }}
          </div>
           
        </div>
        
       </div>
    {{ column_right }}</div>
</div>
 <script type="text/javascript"><!--
   $('#button-filter').on('click', function() {
       
	url = '';
	
	var filter_date_start = $('input[name=\'filter_date_start\']').val();

	if (filter_date_start) {
		url += '&filter_date_start=' + encodeURIComponent(filter_date_start);
	}

	var filter_date_end = $('input[name=\'filter_date_end\']').val();

	if (filter_date_end) {
		url += '&filter_date_end=' + encodeURIComponent(filter_date_end);
	}

	location = 'index.php?route=account/business_detail' + url;
});
//--></script> 
   

{{ footer }}
