Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
134 lines (125 sloc) 5.44 KB
<div class="row">
<div id="filter-report" class="col-md-3 col-sm-12 order-md-9 d-none d-md-block mb-3">
<div class="card">
<div class="card-header"><i class="fas fa-filter"></i> {{ text_filter }}</div>
<div class="card-body">
<div class="form-group">
<label for="input-date-start" class="col-form-label">{{ entry_date_start }}</label>
<div class="input-group date">
<input type="text" name="filter_date_start" value="{{ filter_date_start }}" placeholder="{{ entry_date_start }}" id="input-date-start" class="form-control"/>
<div class="input-group-append">
<div class="input-group-text"><i class="fas fa-calendar"></i></div>
</div>
</div>
</div>
<div class="form-group">
<label for="input-date-end" class="col-form-label">{{ entry_date_end }}</label>
<div class="input-group date">
<input type="text" name="filter_date_end" value="{{ filter_date_end }}" placeholder="{{ entry_date_end }}" id="input-date-end" class="form-control"/>
<div class="input-group-append">
<div class="input-group-text"><i class="fas fa-calendar"></i></div>
</div>
</div>
</div>
<div class="form-group">
<label for="input-group" class="col-form-label">{{ entry_group }}</label> <select name="filter_group" id="input-group" class="form-control">
{% for group in groups %}
{% if group.value == filter_group %}
<option value="{{ group.value }}" selected="selected">{{ group.text }}</option>
{% else %}
<option value="{{ group.value }}">{{ group.text }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="form-group">
<label for="input-status" class="col-form-label">{{ entry_status }}</label> <select name="filter_order_status_id" id="input-status" class="form-control">
<option value="0">{{ text_all_status }}</option>
{% for order_status in order_statuses %}
{% if order_status.order_status_id == filter_order_status_id %}
<option value="{{ order_status.order_status_id }}" selected="selected">{{ order_status.name }}</option>
{% else %}
<option value="{{ order_status.order_status_id }}">{{ order_status.name }}</option>
{% endif %}
{% endfor %}
</select>
</div>
<div class="form-group text-right">
<button type="button" id="button-filter" class="btn btn-light"><i class="fas fa-filter"></i> {{ button_filter }}</button>
</div>
</div>
</div>
</div>
<div class="col-md-9 col-sm-12">
<div class="card">
<div class="card-header"><i class="fas fa-chart-bar"></i> {{ heading_title }}</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<td class="text-left">{{ column_date_start }}</td>
<td class="text-left">{{ column_date_end }}</td>
<td class="text-right">{{ column_orders }}</td>
<td class="text-right">{{ column_products }}</td>
<td class="text-right">{{ column_tax }}</td>
<td class="text-right">{{ column_total }}</td>
</tr>
</thead>
<tbody>
{% if orders %}
{% for order in orders %}
<tr>
<td class="text-left">{{ order.date_start }}</td>
<td class="text-left">{{ order.date_end }}</td>
<td class="text-right">{{ order.orders }}</td>
<td class="text-right">{{ order.products }}</td>
<td class="text-right">{{ order.tax }}</td>
<td class="text-right">{{ order.total }}</td>
</tr>
{% endfor %}
{% else %}
<tr>
<td class="text-center" colspan="6">{{ text_no_results }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>
<div class="row">
<div class="col-sm-6 text-left">{{ pagination }}</div>
<div class="col-sm-6 text-right">{{ results }}</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript"><!--
$('#button-filter').on('click', function() {
var 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);
}
var filter_group = $('select[name=\'filter_group\']').val();
if (filter_group) {
url += '&filter_group=' + encodeURIComponent(filter_group);
}
var filter_order_status_id = $('select[name=\'filter_order_status_id\']').val();
if (filter_order_status_id != 0) {
url += '&filter_order_status_id=' + encodeURIComponent(filter_order_status_id);
}
location = 'index.php?route=report/report&code=sale_order&user_token={{ user_token }}' + url;
});
//--></script>
<script type="text/javascript"><!--
$('.date').datetimepicker({
'format': 'YYYY-MM-DD',
'locale': '{{ datepicker }}',
'allowInputToggle': true
});
//--></script>
You can’t perform that action at this time.