Subversion Repositories SmartDukaan

Rev

Rev 22245 | Rev 23167 | 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 {
23164 amit.gupta 12
		background-color: #FCB322;
22245 ashik.ali 13
	  	color:white;
14
	  	font-weight:600;
15
	}
16
	.btn:hover{
17
  		color: grey;
18
  		text-decoration: none;
19
	}
20
	.btn-primary:hover{
21
  		color: grey;
22
  		text-decoration: none;
23
	}
24
	.sale-details{
25
		cursor:pointer;
26
	}
27
</style>
28
<script>
29
	$(function() {
30
 
31
    	var start = moment().subtract(29, 'days');
32
    	var end = moment();
33
    	console.log(start);
34
    	console.log(end);
35
 
36
    	function cb(start, end) {
37
        	$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
38
   	 	}
39
 
40
    	$('#reportrange').daterangepicker({
41
        	startDate: start,
42
        	endDate: end,
43
        	alwaysShowCalendars: true,
44
        	ranges: {
45
	           'Today': [moment(), moment()],
46
	           'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
47
	           'Last 7 Days': [moment().subtract(6, 'days'), moment()],
48
	           'Last 30 Days': [moment().subtract(29, 'days'), moment()],
49
	           'This Month': [moment().startOf('month'), moment().endOf('month')],
50
	           'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
51
        	}
52
    	}, cb);
53
 
54
    	cb(start, end);
55
 
56
	});
57
</script>
58
 
59
<section class="wrapper">            
60
	<div class="row">
61
		<div class="col-lg-12">
62
			<h3 class="page-header"><i class="icon_document_alt"></i>SALE HISTORY</h3>
63
			<ol class="breadcrumb">
64
				<li><i class="fa fa-home"></i><a href="${rc.contextPath}/dashboard">Home</a></li>
65
				<li><i class="icon_document_alt"></i>SALE HISTORY</li>						  	
66
			</ol>
67
		</div>
68
	</div>
69
 
70
	 <div id="sale-history-search">
71
    	<div class="row">
72
    		<div class="col-lg-12">
73
    			<div class="col-lg-9 form-group pull-right">
74
    				<div class="col-md-6 col-sm-6 col-xs-6 form-group pull-right top_search">
75
    					<div class="input-group">
76
                			<div id="reportrange" class="pull-right" style="width:80%;margin:auto;background: #fff; cursor: pointer; padding: 8px; border: 1px solid #ccc">
77
                        		<i class="glyphicon glyphicon-calendar fa fa-calendar"></i>
78
                        		<span></span>
79
                			</div>
80
                			<span class="input-group-btn">
81
                      			<button class="btn btn-primary submit" id="sale-history-date-button" type="button">Go!</button>
82
                    		</span>
83
                    	</div>
84
                	</div>
85
                	<div class="col-md-5 col-sm-5 col-xs-5 form-group pull-right top_search">
86
                  		<div class="input-group">
87
                    		<input type="text" class="form-control" id="sale-history-search-text"" placeholder="Search by invoice number..." value="" />
88
                    		<span class="input-group-btn">
89
                      			<button class="btn btn-primary submit" id="sale-history-search-button" type="button">Go!</button>
90
                    		</span>
91
                  		</div>
92
                	</div>
93
              	</div>
94
         	</div>
95
       	</div>
96
   	</div>
97
  	<div id="sale-history-table">
98
		<div class="row">
99
	    	<div class="col-lg-12">
100
	    		<table class="table table-striped table-advance table-hover">
101
	    			<tbody>
102
	    				<tr>
103
	    					<th>Order Id</th>
104
	    					<th>Invoice Number</th>
105
	    					<th>Total Amount</th>
106
	    					<th>Created On</th>
107
	    				</tr>
108
	    				#if(!$saleHistories.isEmpty())
109
			    			#foreach( $saleHistory in $saleHistories )
110
			    				<tr class="sale-details" data="$saleHistory.getId()">
111
			    					<td>$saleHistory.getId()</td>
112
			    					<td>$saleHistory.getInvoiceNumber()</td>
113
			    					<td>$saleHistory.getTotalAmount()</td>
114
			    					<td>$saleHistory.getFormattedDate()</td>
115
			    				</tr>
116
			    			#end
117
		    			#else
118
		    				<tr>
119
		    					<td colspan="6" style="text-align:center;">NO MATCHING DATA FOUND FOR CRITERIA</td>
120
		    				</tr>
121
		    			#end
122
	    			</tbody>
123
	    		</table>
124
	    	</div>
125
	    </div>
126
    </div>
127
    #if(!$saleHistories.isEmpty())
128
    	<div class="row" id="sale-history-paginated">
129
    		<div class="col-lg-9">
130
    			<p>Showing <span class="start">$start</span> to <span class="end">$end</span> of <span class="size">$size</span> items</p>
131
    		</div>
132
    		<div class="col-lg-3" style="text-align:right;">
133
				<div class="btn-group" style="width:40%">
134
					<button class="btn btn-primary previous" disabled="disabled" style="width:100%">Previous</button>
135
				</div>
136
				<div class="btn-group" style="width:40%">
137
					#if($end >= $size)
138
						<button class="btn btn-primary next" style="width:100%" disabled="disabled">Next</button>
139
					#else
140
						<button class="btn btn-primary next" style="width:100%">Next</button>
141
					#end
142
				</div>
143
	    	</div>
144
	    </div>
145
    #end
146
</section>
147
<div id="sale-details-container" style="background:white;background-color:white;">
148
</div>