Subversion Repositories SmartDukaan

Rev

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

Rev 30205 Rev 30973
Line 1... Line 1...
1
         <div class="col-lg-12">
1
<div class="col-lg-12">
2
        <table class="table table-border table-condensed table-bordered" id="commitment-table" style="width:100%">
2
    <table class="table table-border table-condensed table-bordered" id="commitment-table" style="width:100%">
3
 
3
 
4
            <thead class="row htable" style="background:#F5F5F5;">
4
        <thead class="row htable" style="background:#F5F5F5;">
-
 
5
 
-
 
6
        <tr style="color:black;">
-
 
7
            <th rowspan="2">Committed By</th>
-
 
8
            <th rowspan="2">Partner Name</th>
-
 
9
            <th colspan="2">Collection</th>
-
 
10
            <th colspan="2">Total</th>
-
 
11
            <th colspan="2">Samsung</th>
-
 
12
            <th colspan="2">Oppo</th>
-
 
13
            <th colspan="2">Vivo</th>
-
 
14
            <th colspan="2">Itel</th>
-
 
15
            <th colspan="2">Almost New</th>
-
 
16
            <th colspan="2">Others</th>
-
 
17
        </tr>
-
 
18
        <tr>
-
 
19
            <th>Target(<span id="coltgt"> </span>)</th>
-
 
20
            <th>Ach (<span id="colach"> </span>)</th>
-
 
21
            <th>Tgt</th>
-
 
22
            <th>Ach</th>
-
 
23
            <th>Tgt</th>
-
 
24
            <th>Ach</th>
-
 
25
            <th>Tgt</th>
-
 
26
            <th>Ach</th>
-
 
27
            <th>Tgt</th>
-
 
28
            <th>Ach</th>
-
 
29
            <th>Tgt</th>
-
 
30
            <th>Ach</th>
-
 
31
            <th>Tgt</th>
-
 
32
            <th>Ach</th>
-
 
33
            <th>Tgt</th>
-
 
34
            <th>Ach</th>
-
 
35
        </tr>
-
 
36
        </thead>
-
 
37
        <tbody>
-
 
38
            #foreach($commitment in $commitments )
-
 
39
 
-
 
40
            <tr>
-
 
41
                #parse("team-commitment-index.vm")
5
 
42
 
6
            <tr style="color:black;">
-
 
7
                <th>Committed By</th>
-
 
8
                <th>Partner Name</th>
-
 
9
                <th>Col_Tgt (<span id = "coltgt"> </span>)</th>
-
 
10
                <th>Col_Ach  (<span id = "colach"> </span>)</th>
-
 
11
                <th>Samsung_Tgt</th>
-
 
12
                <th>Samsung_Ach</th>
-
 
13
                <th>Oppo_Tgt</th>     
-
 
14
                <th>Oppo_Ach</th>
-
 
15
                <th>Vivo_Tgt</th>
-
 
16
                <th>Vivo_Ach</th>
-
 
17
                <th>Itel_Tgt</th>
-
 
18
                <th>Itel_Ach</th>
-
 
19
                <th>Almost_New_Tgt</th>
-
 
20
                <th>Almost_New_Ach</th>
-
 
21
                <th>Others_Tgt</th>
-
 
22
                <th>Others_Ach</th>
-
 
23
  
-
 
24
            </tr>
43
            </tr>
25
            </thead>
-
 
26
            <tbody>
-
 
27
                #foreach($commitment in $commitments )
-
 
28
           
-
 
29
                <tr>
-
 
30
                   #parse("team-commitment-index.vm")
-
 
31
 
44
 
32
                </tr>
-
 
33
            
-
 
34
                #end
45
            #end
35
 
46
 
36
            </tbody>
47
        </tbody>
37
 
48
 
38
        </table>
49
    </table>
39
    </div>
50
</div>
40
    
51
 
41
 <script type="text/javascript">
52
<script type="text/javascript">
42
	$(document).ready(function() {
53
    $(document).ready(function () {
43
		var table = $('#commitment-table').DataTable({
54
        var table = $('#commitment-table').DataTable({
44
			"scrollX": true,
55
            "scrollX": true,
45
			"bPaginate" : true,
56
            "bPaginate": true,
46
			"bLengthChange" : true,
57
            "bLengthChange": true,
47
			"bFilter" : true,
58
            "bFilter": true,
48
			"bInfo" : false,
59
            "bInfo": false,
49
			"bAutoWidth" : false,
60
            "bAutoWidth": false,
50
			"pageLength": 100,
61
            "pageLength": 100,
51
			
62
 
52
 
63
 
53
		});
64
        });
54
		
65
 
55
		    datatableSum();
66
        datatableSum();
56
		  table.on('search.dt', function () {
67
        table.on('search.dt', function () {
57
            console.log('Currently applied global search: ' + table.search());
68
            console.log('Currently applied global search: ' + table.search());
58
            datatableSum();
69
            datatableSum();
59
           
70
 
60
 
71
 
61
        });
72
        });
62
	});
73
    });
63
	
74
 
64
	
75
 
65
	 function datatableSum() {
76
    function datatableSum() {
66
	 
77
 
67
	   var col_tgt_sum = $('#commitment-table').DataTable().column(2,{page:'current'}).data().sum();
78
        var col_tgt_sum = $('#commitment-table').DataTable().column(2, {page: 'current'}).data().sum();
68
	   $('#coltgt').html(col_tgt_sum);
79
        $('#coltgt').html(col_tgt_sum);
69
	 
80
 
70
	 
81
 
71
	  var col_acv_sum = $('#commitment-table').DataTable().column(3,{page:'current'}).data().sum();
82
        var col_acv_sum = $('#commitment-table').DataTable().column(3, {page: 'current'}).data().sum();
72
	       console.log(col_acv_sum)
83
        console.log(col_acv_sum)
73
	   $('#colach').html(col_acv_sum);
84
        $('#colach').html(col_acv_sum);
74
		    
85
 
75
	 }
86
    }
76
	
87
 
77
 
88
 
78
</script>
89
</script>
79
90