Subversion Repositories SmartDukaan

Rev

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

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