amazon_stock_updates.tpl
4.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?php echo $header; ?><?php echo $column_left; ?>
<div id="content">
<div class="page-header">
<div class="container-fluid">
<div class="pull-right"> <a href="<?php echo $link_overview; ?>" data-toggle="tooltip" title="<?php echo $button_cancel; ?>" class="btn btn-default"><i class="fa fa-reply"></i></a> </div>
<h1><?php echo $heading_title; ?></h1>
<ul class="breadcrumb">
<?php foreach ($breadcrumbs as $breadcrumb) { ?>
<li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<div class="container-fluid">
<div class="well">
<div class="row">
<div class="col-sm-5">
<div class="input-group date">
<input type="text" class="form-control" id="input-date-start" data-date-format="YYYY-MM-DD" placeholder="<?php echo $entry_date_start; ?>" value="<?php echo $date_start; ?>" name="filter_date_start">
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span> </div>
</div>
<div class="col-sm-5">
<div class="input-group date">
<input type="text" class="form-control" id="input-date-end" data-date-format="YYYY-MM-DD" placeholder="<?php echo $entry_date_end; ?>" value="<?php echo $date_end; ?>" name="filter_date_end">
<span class="input-group-btn">
<button type="button" class="btn btn-default"><i class="fa fa-calendar"></i></button>
</span> </div>
</div>
<div class="col-sm-2 text-right"> <a id="button-filter" class="btn btn-primary" data-toggle="tooltip" title="<?php echo $button_filter; ?>"><i class="fa fa-filter"></i></a> </div>
</div>
</div>
<table class="table table-bordered table-hover">
<thead>
<tr>
<th class="text-left"><?php echo $column_ref; ?></th>
<th class="text-left"><?php echo $column_status; ?></th>
<th class="text-left"><?php echo $column_date_requested; ?></th>
<th class="text-left"><?php echo $column_date_updated; ?></th>
<th class="text-center"><?php echo $column_sku; ?></th>
<th class="text-center"><?php echo $column_stock; ?></th>
</tr>
</thead>
<tbody>
<?php if (empty($table_data)) { ?>
<tr>
<td class="text-center" colspan="6"><?php echo $text_empty; ?></td>
</tr>
<?php } ?>
<?php foreach ($table_data as $ref => $row) { ?>
<tr>
<td class="text-left" rowspan="<?php echo count($row['data']) + 1; ?>"><?php echo $ref; ?></td>
<td class="text-left" rowspan="<?php echo count($row['data']) + 1; ?>"><?php echo $row['status']; ?></td>
<td class="text-left" rowspan="<?php echo count($row['data']) + 1; ?>"><?php echo $row['date_requested']; ?></td>
<td class="text-left" rowspan="<?php echo count($row['data']) + 1; ?>"><?php echo $row['date_updated']; ?></td>
<?php foreach ($row['data'] as $dataRow) { ?>
<tr>
<td class="text-center"><?php echo $dataRow['sku']; ?></td>
<td class="text-center"><?php echo $dataRow['stock']; ?></td>
</tr>
<?php } ?>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<script type="text/javascript"><!--
$('#button-filter').on('click', function() {
url = 'index.php?route=openbay/amazon/stockUpdates&token=<?php echo $token; ?>';
var filter_date_start = $('#input-date-start').val();
if (filter_date_start) {
url += '&filter_date_start=' + encodeURIComponent(filter_date_start);
}
var filter_date_end = $('#input-date-end').val();
if (filter_date_end) {
url += '&filter_date_end=' + encodeURIComponent(filter_date_end);
}
location = url;
});
$(document).ready(function() {
$('#input-date-start').datepicker({dateFormat: 'yy-mm-dd'});
$('#input-date-end').datepicker({dateFormat: 'yy-mm-dd'});
});
$('.date').datetimepicker({
pickTime: false
});
$('.datetime').datetimepicker({
pickDate: true,
pickTime: true
});
$('.time').datetimepicker({
pickDate: false
});
//--></script>
<?php echo $footer; ?>