Subversion Repositories SmartDukaan

Rev

Rev 23353 | Rev 23886 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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,
23884 amit.gupta 61
    		"startDate": moment(),
62
    		"autoUpdateInput": true,
23203 ashik.ali 63
    		locale: {
23884 amit.gupta 64
    			format: 'DD/MM/YYYY'
23203 ashik.ali 65
  			}
66
	    });
67
 
68
	    $('input[name="endDateTime"]').daterangepicker({
69
	    	"showDropdowns": true,
70
    		"singleDatePicker": true,
23884 amit.gupta 71
    		"startDate": moment()
72
    		"autoUpdateInput": true,
23203 ashik.ali 73
    		locale: {
74
    			cancelLabel: 'Clear',
23884 amit.gupta 75
    			format: 'DD/MM/YYYY'
23203 ashik.ali 76
  			}
77
	    });
78
	});
22245 ashik.ali 79
</script>
80
 
81
<section class="wrapper">            
82
	<div class="row">
83
		<div class="col-lg-12">
84
			<h3 class="page-header"><i class="icon_document_alt"></i>SALE HISTORY</h3>
85
			<ol class="breadcrumb">
86
				<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
87
				<li><i class="icon_document_alt"></i>SALE HISTORY</li>						  	
88
			</ol>
89
		</div>
90
	</div>
91
 
23203 ashik.ali 92
	<div id="sale-history-search">
22245 ashik.ali 93
    	<div class="row">
23203 ashik.ali 94
        	<div class="col-lg-2 form-group">
95
        		<select class="form-control" id = "searchType" name = "searchType" placeholder="Search Type">
96
					<option value="" disabled selected>Search Type</option>
23353 ashik.ali 97
					#foreach($searchType in $searchTypes)
98
						#if($searchType == "CUSTOMER_NAME")
99
							<option value="$searchType">Customer Name</option>
100
						#elseif($searchType == "CUSTOMER_MOBILE_NUMBER")
101
							<option value="$searchType">Customer Mobile Number</option>
102
						#elseif($searchType == "ITEM_NAME")
103
							<option value="$searchType">Item Name</option>
104
						#else
105
							<option value="$searchType">$searchType</option>
106
						#end
107
					#end
23203 ashik.ali 108
             	</select>
109
        	</div>
110
        	<div class="col-lg-3">
111
            	<input type="text" class="form-control" id="sale-history-search-text"" placeholder="Search by" value="" />
112
        	</div>
113
        	<div class="col-md-2">
114
				<div class="input-group">
115
					<input class="form-control" placeholder="Start Date Time" id="startDateTime" name="startDateTime" type="text" value="">
116
				</div>
117
			</div>
118
			<div class="col-md-2">
119
				<div class="input-group">
120
					<input class="form-control" placeholder="End Date Time" id="endDateTime" name="endDateTime" type="text" value="">
121
				</div>
122
			</div>
123
			<div class="col-md-1">
124
              	<button class="btn btn-primary submit" id="sale-history-search-button" type="button">Search</button>
125
			</div>
126
 
22245 ashik.ali 127
       	</div>
128
   	</div>
129
  	<div id="sale-history-table">
130
		<div class="row">
131
	    	<div class="col-lg-12">
132
	    		<table class="table table-striped table-advance table-hover">
133
	    			<tbody>
134
	    				<tr>
135
	    					<th>Invoice Number</th>
136
	    					<th>Total Amount</th>
137
	    					<th>Created On</th>
138
	    				</tr>
139
	    				#if(!$saleHistories.isEmpty())
140
			    			#foreach( $saleHistory in $saleHistories )
141
			    				<tr class="sale-details" data="$saleHistory.getId()">
142
			    					<td>$saleHistory.getInvoiceNumber()</td>
143
			    					<td>$saleHistory.getTotalAmount()</td>
144
			    					<td>$saleHistory.getFormattedDate()</td>
145
			    				</tr>
146
			    			#end
147
		    			#else
148
		    				<tr>
149
		    					<td colspan="6" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
150
		    				</tr>
151
		    			#end
152
	    			</tbody>
153
	    		</table>
154
	    	</div>
155
	    </div>
156
    </div>
157
    #if(!$saleHistories.isEmpty())
158
    	<div class="row" id="sale-history-paginated">
159
    		<div class="col-lg-9">
160
    			<p>Showing <span class="start">$start</span> to <span class="end">$end</span> of <span class="size">$size</span> items</p>
161
    		</div>
162
    		<div class="col-lg-3" style="text-align:right;">
163
				<div class="btn-group" style="width:40%">
164
					<button class="btn btn-primary previous" disabled="disabled" style="width:100%">Previous</button>
165
				</div>
166
				<div class="btn-group" style="width:40%">
167
					#if($end >= $size)
168
						<button class="btn btn-primary next" style="width:100%" disabled="disabled">Next</button>
169
					#else
170
						<button class="btn btn-primary next" style="width:100%">Next</button>
171
					#end
172
				</div>
173
	    	</div>
174
	    </div>
175
    #end
176
</section>
177
<div id="sale-details-container" style="background:white;background-color:white;">
178
</div>