| 22245 |
ashik.ali |
1 |
<style>
|
|
|
2 |
.table-striped > tbody > tr:nth-child(odd) > td{
|
|
|
3 |
background: white;
|
|
|
4 |
background-color: white;
|
|
|
5 |
}
|
|
|
6 |
.table-striped > tbody > tr:nth-child(even) > td{
|
|
|
7 |
background: white;
|
|
|
8 |
background-color:white;
|
|
|
9 |
}
|
|
|
10 |
.table-striped > tbody > tr:hover > td,
|
|
|
11 |
.table-striped > tbody > tr:hover {
|
| 23181 |
ashik.ali |
12 |
background-color: #e98c8f;
|
| 22245 |
ashik.ali |
13 |
color:white;
|
|
|
14 |
}
|
|
|
15 |
.btn:hover{
|
|
|
16 |
color: grey;
|
|
|
17 |
text-decoration: none;
|
|
|
18 |
}
|
|
|
19 |
.btn-primary:hover{
|
|
|
20 |
color: grey;
|
|
|
21 |
text-decoration: none;
|
|
|
22 |
}
|
|
|
23 |
.sale-details{
|
|
|
24 |
cursor:pointer;
|
|
|
25 |
}
|
|
|
26 |
</style>
|
|
|
27 |
<script>
|
|
|
28 |
$(function() {
|
|
|
29 |
|
|
|
30 |
var start = moment().subtract(29, 'days');
|
|
|
31 |
var end = moment();
|
|
|
32 |
console.log(start);
|
|
|
33 |
console.log(end);
|
|
|
34 |
|
|
|
35 |
function cb(start, end) {
|
|
|
36 |
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
|
|
|
37 |
}
|
|
|
38 |
|
|
|
39 |
$('#reportrange').daterangepicker({
|
|
|
40 |
startDate: start,
|
|
|
41 |
endDate: end,
|
|
|
42 |
alwaysShowCalendars: true,
|
|
|
43 |
ranges: {
|
|
|
44 |
'Today': [moment(), moment()],
|
|
|
45 |
'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
|
|
|
46 |
'Last 7 Days': [moment().subtract(6, 'days'), moment()],
|
|
|
47 |
'Last 30 Days': [moment().subtract(29, 'days'), moment()],
|
|
|
48 |
'This Month': [moment().startOf('month'), moment().endOf('month')],
|
|
|
49 |
'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
|
|
|
50 |
}
|
|
|
51 |
}, cb);
|
|
|
52 |
|
|
|
53 |
cb(start, end);
|
|
|
54 |
|
|
|
55 |
});
|
| 23203 |
ashik.ali |
56 |
|
|
|
57 |
$(function() {
|
|
|
58 |
$('input[name="startDateTime"]').daterangepicker({
|
|
|
59 |
"showDropdowns": true,
|
|
|
60 |
"singleDatePicker": true,
|
|
|
61 |
"timePicker": true,
|
|
|
62 |
"timePicker24Hour": true,
|
|
|
63 |
"timePickerSeconds": true,
|
|
|
64 |
"startDate": "01/01/2017",
|
|
|
65 |
"autoUpdateInput": false,
|
|
|
66 |
locale: {
|
|
|
67 |
cancelLabel: 'Clear',
|
|
|
68 |
format: 'DD/MM/YYYY HH:mm:ss'
|
|
|
69 |
}
|
|
|
70 |
});
|
|
|
71 |
|
|
|
72 |
$('input[name="startDateTime"]').on('apply.daterangepicker', function(ev, picker) {
|
|
|
73 |
$(this).val(picker.startDate.format('DD/MM/YYYY HH:mm:ss'));
|
|
|
74 |
});
|
|
|
75 |
|
|
|
76 |
$('input[name="startDateTime"]').on('cancel.daterangepicker', function(ev, picker) {
|
|
|
77 |
$(this).val('');
|
|
|
78 |
});
|
|
|
79 |
|
|
|
80 |
$('input[name="endDateTime"]').daterangepicker({
|
|
|
81 |
"showDropdowns": true,
|
|
|
82 |
"singleDatePicker": true,
|
|
|
83 |
"timePicker": true,
|
|
|
84 |
"timePicker24Hour": true,
|
|
|
85 |
"timePickerSeconds": true,
|
|
|
86 |
"startDate": "01/01/2018",
|
|
|
87 |
"autoUpdateInput": false,
|
|
|
88 |
locale: {
|
|
|
89 |
cancelLabel: 'Clear',
|
|
|
90 |
format: 'DD/MM/YYYY HH:mm:ss'
|
|
|
91 |
}
|
|
|
92 |
});
|
|
|
93 |
|
|
|
94 |
$('input[name="endDateTime"]').on('apply.daterangepicker', function(ev, picker) {
|
|
|
95 |
$(this).val(picker.startDate.format('DD/MM/YYYY HH:mm:ss'));
|
|
|
96 |
});
|
|
|
97 |
|
|
|
98 |
$('input[name="endDateTime"]').on('cancel.daterangepicker', function(ev, picker) {
|
|
|
99 |
$(this).val('');
|
|
|
100 |
});
|
|
|
101 |
|
|
|
102 |
});
|
| 22245 |
ashik.ali |
103 |
</script>
|
|
|
104 |
|
|
|
105 |
<section class="wrapper">
|
|
|
106 |
<div class="row">
|
|
|
107 |
<div class="col-lg-12">
|
|
|
108 |
<h3 class="page-header"><i class="icon_document_alt"></i>SALE HISTORY</h3>
|
|
|
109 |
<ol class="breadcrumb">
|
|
|
110 |
<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
|
|
|
111 |
<li><i class="icon_document_alt"></i>SALE HISTORY</li>
|
|
|
112 |
</ol>
|
|
|
113 |
</div>
|
|
|
114 |
</div>
|
|
|
115 |
|
| 23203 |
ashik.ali |
116 |
<div id="sale-history-search">
|
| 22245 |
ashik.ali |
117 |
<div class="row">
|
| 23203 |
ashik.ali |
118 |
<div class="col-lg-2 form-group">
|
|
|
119 |
<select class="form-control" id = "searchType" name = "searchType" placeholder="Search Type">
|
|
|
120 |
<option value="" disabled selected>Search Type</option>
|
|
|
121 |
<option value="CUSTOMER_NAME">Customer Name</option>
|
|
|
122 |
<option value="CUSTOMER_MOBILE_NUMBER">Customer Mobile Number</option>
|
|
|
123 |
<option value="IMEI">IMEI</option>
|
|
|
124 |
<option value="ITEM_NAME">Item Name</option>
|
|
|
125 |
</select>
|
|
|
126 |
</div>
|
|
|
127 |
<div class="col-lg-3">
|
|
|
128 |
<input type="text" class="form-control" id="sale-history-search-text"" placeholder="Search by" value="" />
|
|
|
129 |
</div>
|
|
|
130 |
<div class="col-md-2">
|
|
|
131 |
<div class="input-group">
|
|
|
132 |
<input class="form-control" placeholder="Start Date Time" id="startDateTime" name="startDateTime" type="text" value="">
|
|
|
133 |
</div>
|
|
|
134 |
</div>
|
|
|
135 |
<div class="col-md-2">
|
|
|
136 |
<div class="input-group">
|
|
|
137 |
<input class="form-control" placeholder="End Date Time" id="endDateTime" name="endDateTime" type="text" value="">
|
|
|
138 |
</div>
|
|
|
139 |
</div>
|
|
|
140 |
<div class="col-md-1">
|
|
|
141 |
<button class="btn btn-primary submit" id="sale-history-search-button" type="button">Search</button>
|
|
|
142 |
</div>
|
|
|
143 |
|
| 22245 |
ashik.ali |
144 |
</div>
|
|
|
145 |
</div>
|
|
|
146 |
<div id="sale-history-table">
|
|
|
147 |
<div class="row">
|
|
|
148 |
<div class="col-lg-12">
|
|
|
149 |
<table class="table table-striped table-advance table-hover">
|
|
|
150 |
<tbody>
|
|
|
151 |
<tr>
|
|
|
152 |
<th>Order Id</th>
|
|
|
153 |
<th>Invoice Number</th>
|
|
|
154 |
<th>Total Amount</th>
|
|
|
155 |
<th>Created On</th>
|
|
|
156 |
</tr>
|
|
|
157 |
#if(!$saleHistories.isEmpty())
|
|
|
158 |
#foreach( $saleHistory in $saleHistories )
|
|
|
159 |
<tr class="sale-details" data="$saleHistory.getId()">
|
|
|
160 |
<td>$saleHistory.getId()</td>
|
|
|
161 |
<td>$saleHistory.getInvoiceNumber()</td>
|
|
|
162 |
<td>$saleHistory.getTotalAmount()</td>
|
|
|
163 |
<td>$saleHistory.getFormattedDate()</td>
|
|
|
164 |
</tr>
|
|
|
165 |
#end
|
|
|
166 |
#else
|
|
|
167 |
<tr>
|
|
|
168 |
<td colspan="6" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
|
|
|
169 |
</tr>
|
|
|
170 |
#end
|
|
|
171 |
</tbody>
|
|
|
172 |
</table>
|
|
|
173 |
</div>
|
|
|
174 |
</div>
|
|
|
175 |
</div>
|
|
|
176 |
#if(!$saleHistories.isEmpty())
|
|
|
177 |
<div class="row" id="sale-history-paginated">
|
|
|
178 |
<div class="col-lg-9">
|
|
|
179 |
<p>Showing <span class="start">$start</span> to <span class="end">$end</span> of <span class="size">$size</span> items</p>
|
|
|
180 |
</div>
|
|
|
181 |
<div class="col-lg-3" style="text-align:right;">
|
|
|
182 |
<div class="btn-group" style="width:40%">
|
|
|
183 |
<button class="btn btn-primary previous" disabled="disabled" style="width:100%">Previous</button>
|
|
|
184 |
</div>
|
|
|
185 |
<div class="btn-group" style="width:40%">
|
|
|
186 |
#if($end >= $size)
|
|
|
187 |
<button class="btn btn-primary next" style="width:100%" disabled="disabled">Next</button>
|
|
|
188 |
#else
|
|
|
189 |
<button class="btn btn-primary next" style="width:100%">Next</button>
|
|
|
190 |
#end
|
|
|
191 |
</div>
|
|
|
192 |
</div>
|
|
|
193 |
</div>
|
|
|
194 |
#end
|
|
|
195 |
</section>
|
|
|
196 |
<div id="sale-details-container" style="background:white;background-color:white;">
|
|
|
197 |
</div>
|