Subversion Repositories SmartDukaan

Rev

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

Rev 32745 Rev 32748
Line 1... Line 1...
1
			<div class="col-lg-12">
1
<div class="col-lg-12">
2
				 <table id="warehouseBrandItemStock" class="table table-striped table-advance table-hover">
2
    <table id="warehouseBrandItemStock" class="table table-striped table-advance table-hover">
3
				 <thead>
3
        <thead>
4
	    			<tr>
4
        <tr>
5
	    			    <th>W/H Name</th>
5
            <th>W/H Name</th>
6
	    				<th>Item</th>
6
            <th>Item</th>
7
	    				<th>Unit Price</th>
7
            <th>Unit Price</th>
8
	    				<th>Stock Qty</th>
8
            <th>Stock Qty</th>
9
	    				<th>Stock Value</th>
9
            <th>Stock Value</th>
10
	    				<th>Pending Indent</th>
10
            <th>Pending Indent</th>
11
	    				<th>Tertiary</th>
11
            <th>Tertiary</th>
12
	    				<th>&lt;10</th>
12
            <th>&lt;10</th>
13
	    				<th>&lt;20</th>
13
            <th>&lt;20</th>
14
	    				<th>&lt;30</th>
14
            <th>&lt;30</th>
15
	    				<th>&gt;30</th>
15
            <th>&gt;30</th>
16
	    				
16
 
17
	    			 </tr>
17
        </tr>
18
				 </thead>
18
        </thead>
19
	    			<tbody>
19
        <tbody>
20
	    			    #foreach($key in $warehouseWiseItemStock)
20
            #foreach($key in $warehouseWiseItemStock)
21
	    				<tr>
21
            <tr>
22
	    				<td>$key.getWarehouseName()</td>
22
                <td>$key.getWarehouseName()</td>
-
 
23
                <td
23
	    	 		     <td #if($key.getDgt30() > 0)
24
                    #if($key.getDgt30() > 0)
24
							 style="color:red"
25
                            style="color:red"
-
 
26
                    #elseif($key.getD20to30())
-
 
27
                            style="color:darkorange"
25
						 #end
28
                    #end
26
						 >$key.getBrand() $key.getModelName() $key.getModelNumber() $key.getColor()</td>
29
                >$key.getBrand() $key.getModelName() $key.getModelNumber() $key.getColor()</td>
27
	    	 		     <td>$key.getUnitPrice()</td>
30
                <td>$key.getUnitPrice()</td>
28
	    	 		     <td>$key.getStockQty()</td>
31
                <td>$key.getStockQty()</td>
29
	    	 		     <td class="currency">$key.getStockValue()</td> 
32
                <td class="currency">$key.getStockValue()</td>
30
	    	 		      <td class="pendingIndent"  data-itemid="$key.getItemId()"  data-warehouseid="$key.getWarehouseId()" data-toggle="modal" data-target="#pendingIndentItem">$key.getPendingIndent()</td>
33
                <td class="pendingIndent" data-itemid="$key.getItemId()" data-warehouseid="$key.getWarehouseId()"
-
 
34
                    data-toggle="modal" data-target="#pendingIndentItem">$key.getPendingIndent()</td>
31
	    	 		      <td>$key.getTertiary()</td>
35
                <td>$key.getTertiary()</td>
32
	    	 		       <td>$key.getDlt10()</td>
36
                <td>$key.getDlt10()</td>
33
	    	 		        <td>$key.getD10to20()</td>
37
                <td>$key.getD10to20()</td>
34
	    	 		         <td>$key.getD20to30()</td>
38
                <td>$key.getD20to30()</td>
35
	    	 		         <td>$key.getDgt30()</td>
39
                <td>$key.getDgt30()</td>
36
	    				</tr>
40
            </tr>
37
	    				 #end
41
            #end
38
	    				
42
 
39
	    		    </tbody>
43
        </tbody>
40
	    		</table>
44
    </table>
41
			</div>
45
</div>
42
		
46
 
43
 <div id="pendingIndentItem" class="modal" role="dialog">
47
<div id="pendingIndentItem" class="modal" role="dialog">
44
	  <div class="modal-dialog">
48
    <div class="modal-dialog">
45
	    <div class="modal-content">
49
        <div class="modal-content">
-
 
50
 
46
	     
51
        </div>
47
    </div>
52
    </div>
48
   </div>
-
 
49
 </div>
53
</div>
50
 
-
 
51
<script type="text/javascript">
-
 
52
$(document).ready(function() {
-
 
53
 
54
 
54
   $('#warehouseBrandItemStock thead tr').clone(true).appendTo( '#warehouseBrandItemStock thead' );
-
 
55
    $('#warehouseBrandItemStock thead tr:eq(1) th').each( function (i) {
-
 
56
        var title = $(this).text();
55
<script type="text/javascript">
57
        $(this).html( '<input type="text" style = "width:60%;" placeholder="Search '+title+'" />' );
-
 
58
 
-
 
59
        $( 'input', this ).on( 'keyup change', function () {
56
    $(document).ready(function () {
60
            if ( table.column(i).search() !== this.value ) {
-
 
61
                table
-
 
62
                    .column(i)
-
 
63
                    .search( this.value )
-
 
64
                    .draw();
-
 
65
            }
-
 
66
        } );
-
 
67
    } )
-
 
68
  var table = $('#warehouseBrandItemStock').DataTable( {
-
 
69
        orderCellsTop: true,
-
 
70
        fixedHeader: true
-
 
71
    } );
-
 
72
});
-
 
73
 
57
 
-
 
58
        $('#warehouseBrandItemStock thead tr').clone(true).appendTo('#warehouseBrandItemStock thead');
-
 
59
        $('#warehouseBrandItemStock thead tr:eq(1) th').each(function (i) {
-
 
60
            var title = $(this).text();
-
 
61
            $(this).html('<input type="text" style = "width:60%;" placeholder="Search ' + title + '" />');
-
 
62
 
-
 
63
            $('input', this).on('keyup change', function () {
-
 
64
                if (table.column(i).search() !== this.value) {
-
 
65
                    table
-
 
66
                            .column(i)
-
 
67
                            .search(this.value)
-
 
68
                            .draw();
-
 
69
                }
-
 
70
            });
-
 
71
        })
-
 
72
        var table = $('#warehouseBrandItemStock').DataTable({
-
 
73
            orderCellsTop: true,
-
 
74
            fixedHeader: true
-
 
75
        });
-
 
76
    });
74
 
77
 
75
 
78
 
76
</script>
79
</script>
77
 
80
 
78
<script type="text/javascript">
81
<script type="text/javascript">
79
 
82
 
80
$('#warehouseBrandItemStock').on('click', '.pendingIndent', function(){
83
    $('#warehouseBrandItemStock').on('click', '.pendingIndent', function () {
81
 		var itemId = $(this).data('itemid');
84
        var itemId = $(this).data('itemid');
82
		var warehouseId = $(this).data('warehouseid');
85
        var warehouseId = $(this).data('warehouseid');
83
		
86
 
84
				
87
 
85
				doGetAjaxRequestHandler(context + "/getPartnerPendingIndentItem?itemId="
88
        doGetAjaxRequestHandler(context + "/getPartnerPendingIndentItem?itemId="
86
						+ itemId +"&warehouseId="+ warehouseId, function(response) {
89
                + itemId + "&warehouseId=" + warehouseId, function (response) {
87
 
90
 
88
					$('#pendingIndentItem .modal-content').html(response);
91
            $('#pendingIndentItem .modal-content').html(response);
89
 
92
 
90
				});
93
        });
91
});
94
    });
92
</script>
95
</script>
93
96