Subversion Repositories SmartDukaan

Rev

Rev 31320 | Rev 35539 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31320 Rev 35538
Line -... Line 1...
-
 
1
<div class="row warehouseMilestone" style="margin: 5px">
-
 
2
	<div class="col-lg-4 form-group">
-
 
3
		<span><b> Warehouse </b> </span>
-
 
4
		<select class="form-control input-sm" id="warehousepurchasemil" name="warehouseMap" placeholder="Warehouse" onchange="changeWarehousePurchaseMilestone()">
-
 
5
			<option value="" disabled selected>Warehouse</option>
-
 
6
			#if($warehouseId == 0)
-
 
7
				<option value="0" selected>All</option>
-
 
8
			#else
-
 
9
				<option value="0">All</option>
-
 
10
			#end
-
 
11
			#foreach($wm in $warehouseMap.entrySet()))
-
 
12
				#if($warehouseId == $wm.getKey())
-
 
13
					<option value="$wm.getKey()" selected>$wm.getValue()</option>
-
 
14
				#else
-
 
15
					<option value="$wm.getKey()">$wm.getValue()</option>
-
 
16
				#end
-
 
17
			#end
-
 
18
		</select>
-
 
19
	</div>
-
 
20
</div>
-
 
21
 
-
 
22
<table class="table table-striped table-advance table-hover">
-
 
23
	<tbody>
-
 
24
		<tr>
-
 
25
			<th>Partner Category</th>
-
 
26
			<th>MTD</th>
-
 
27
			<th>LMTD</th>
1
               
28
			<th>LMS</th>
-
 
29
			<th>Avg 3 Month</th>
-
 
30
		</tr>
-
 
31
		#foreach( $milestone in $milestones )
-
 
32
		<tr>
-
 
33
			<td>$milestone</td>
-
 
34
			#if($smtdMap.get($milestone))
-
 
35
				<td onclick="getPartnersPurchaseDetail($smtdMap.get($milestone))">$smtdMap.get($milestone).size()</td>
-
 
36
			#else
-
 
37
				<td>0</td>
-
 
38
			#end
-
 
39
			#if($slmtdMap.get($milestone))
-
 
40
				<td onclick="getPartnersPurchaseDetail($slmtdMap.get($milestone))">$slmtdMap.get($milestone).size()</td>
-
 
41
			#else
-
 
42
				<td>0</td>
-
 
43
			#end
-
 
44
			#if($lmsMap.get($milestone))
-
 
45
				<td onclick="getPartnersPurchaseDetail($lmsMap.get($milestone))">$lmsMap.get($milestone).size()</td>
-
 
46
			#else
-
 
47
				<td>0</td>
-
 
48
			#end
-
 
49
			#if($avg3MonthS.get($milestone))
-
 
50
				<td onclick="getPartnersPurchaseDetail($avg3MonthS.get($milestone))">$avg3MonthS.get($milestone).size()</td>
-
 
51
			#else
2
              
52
				<td>0</td>
-
 
53
			#end
-
 
54
		</tr>
-
 
55
		#end
-
 
56
		#set($mtdTotal = 0)
-
 
57
		#set($lmtdTotal = 0)
-
 
58
		#set($lmsTotal = 0)
-
 
59
		#set($avg3Total = 0)
3
	 <div class="row warehouseMilestone" style="margin: 5px">
60
		#foreach( $milestone in $milestones )
-
 
61
			#if($smtdMap.get($milestone))#set($mtdTotal = $mtdTotal + $smtdMap.get($milestone).size())#end
-
 
62
			#if($slmtdMap.get($milestone))#set($lmtdTotal = $lmtdTotal + $slmtdMap.get($milestone).size())#end
-
 
63
			#if($lmsMap.get($milestone))#set($lmsTotal = $lmsTotal + $lmsMap.get($milestone).size())#end
-
 
64
			#if($avg3MonthS.get($milestone))#set($avg3Total = $avg3Total + $avg3MonthS.get($milestone).size())#end
-
 
65
		#end
4
                        <div class="col-lg-4 form-group">
66
		<tr class="info" style="font-weight: bold;">
-
 
67
			<td><b>Total</b></td>
-
 
68
			<td><b>$mtdTotal</b></td>
-
 
69
			<td><b>$lmtdTotal</b></td>
-
 
70
			<td><b>$lmsTotal</b></td>
-
 
71
			<td><b>$avg3Total</b></td>
-
 
72
		</tr>
-
 
73
	</tbody>
-
 
74
</table>
5
 
75
 
6
							    <span><b> Warehouse </b> </span>
-
 
7
							    <select class="form-control input-sm" id="warehousepurchasemil" name="warehouseMap" placeholder="Warehouse"
-
 
8
							            onchange="changeWarehousePurchaseMilestone()">
-
 
9
							        <option value="" disabled selected>Warehouse</option>
-
 
10
							        #if($warehouseId == 0)
-
 
11
							            <option value="0" selected>All</option> #else
-
 
12
							            <option value="0">All</option>
-
 
13
							        #end
-
 
14
							        #foreach($wm in
-
 
15
							            $warehouseMap.entrySet())) #if($warehouseId ==$wm.getKey())
-
 
16
							            <option value="$wm.getKey()" selected>$wm.getValue()</option> #else
-
 
17
							            <option value="$wm.getKey()">$wm.getValue()</option> #end #end
-
 
18
							    </select>
-
 
19
							</div>
-
 
20
                        </div>
-
 
21
 
-
 
22
	
-
 
23
 
-
 
24
	    		<table class="table table-striped table-advance table-hover">
-
 
25
	    			<tbody>
-
 
26
	    				<tr>
-
 
27
	    					<th>Partner Category</th>
-
 
28
	    					<th>MTD</th>
-
 
29
	    					<th>LMTD</th>
-
 
30
	    					<th>LMS</th>
-
 
31
	    					<th>Avg 3 Month</th>
-
 
32
	    				
-
 
33
	    		     	</tr>
-
 
34
	    			
-
 
35
	    				#foreach( $milestone in $milestones )
-
 
36
			    		
-
 
37
			    			<tr>
-
 
38
			    			      	<td>$milestone</td>
-
 
39
			    			    	#if($smtdMap.get($milestone))
-
 
40
			    					<td onclick="getPartnersPurchaseDetail($smtdMap.get($milestone))">$smtdMap.get($milestone).size()</td>
-
 
41
			    					#else
-
 
42
			    					<td>0</td>
-
 
43
			    					
-
 
44
			    					#end
-
 
45
			    					
-
 
46
			    				    #if($slmtdMap.get($milestone))
-
 
47
			    					
-
 
48
			    					<td onclick="getPartnersPurchaseDetail($slmtdMap.get($milestone))">$slmtdMap.get($milestone).size()</td>
-
 
49
			    					#else
-
 
50
			    						<td>0</td>
-
 
51
			    				
-
 
52
			    					#end
-
 
53
			    					
-
 
54
			    							
-
 
55
			    				    #if($lmsMap.get($milestone))
-
 
56
			    					
-
 
57
			    					<td onclick="getPartnersPurchaseDetail($lmsMap.get($milestone))">$lmsMap.get($milestone).size()</td>
-
 
58
			    					#else
-
 
59
			    						<td>0</td>
-
 
60
			    				
-
 
61
			    					#end
-
 
62
			    					
-
 
63
			    					#if($avg3MonthS.get($milestone))
-
 
64
			    				
-
 
65
			    					<td onclick="getPartnersPurchaseDetail($avg3MonthS.get($milestone))">$avg3MonthS.get($milestone).size()</td>
-
 
66
			    					#else
-
 
67
			    					 <td>0</td>
-
 
68
			    					#end
-
 
69
			    			
-
 
70
			    				</tr>
-
 
71
			    			
-
 
72
			    	   #end
-
 
73
		    			
-
 
74
	    			</tbody>
-
 
75
	    		</table>
-
 
76
	
-
 
77
	
-
 
78
<script>
76
<script>
79
 
-
 
80
  function changeWarehousePurchaseMilestone() {
77
function changeWarehousePurchaseMilestone() {
81
        var warehouseId = $('#warehousepurchasemil').val();
78
	var warehouseId = $('#warehousepurchasemil').val();
82
 
-
 
83
 
-
 
84
        doGetAjaxRequestHandler(context + "/getPurchaseCountByMileStone?warehouseId="
79
	doGetAjaxRequestHandler(context + "/getPurchaseCountByMileStone?warehouseId=" + warehouseId, function (response) {
85
                + warehouseId, function (response) {
-
 
86
            $('.purchaseMilestoneContainer').html(response);
80
		$('.purchaseMilestoneContainer').html(response);
87
        });
81
	});
88
 
82
}
89
    }
-
 
90
    
83
 
91
   	function getPartnersPurchaseDetail(partnerIds){
84
function getPartnersPurchaseDetail(partnerIds) {
92
	
-
 
93
	      console.log(partnerIds)
85
	console.log(partnerIds)
94
		doGetAjaxRequestHandler(context + "/getMonthWisePurchase?fofoIds="+partnerIds,
86
	doGetAjaxRequestHandler(context + "/getMonthWisePurchase?fofoIds=" + partnerIds, function(response) {
95
			function(response) {
-
 
96
				$('#' + "main-content").html(response);
87
		$('#' + "main-content").html(response);
97
				console.log(response)
88
		console.log(response)
98
			});
89
	});
99
	}
90
}
100
 
-
 
101
 
-
 
102
</script> 
91
</script>
103
	
-
 
104
	
-