Subversion Repositories SmartDukaan

Rev

Rev 34180 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<div class="col-lg-12">
    <table id="brandwise-stock" class="table table-condensed table-bordered">
        <thead>
        <tr>
            <th rowspan="2">Brand</th>
            <th rowspan="2">Name</th>
            <th rowspan="2">Color</th>
            <th rowspan="2">Focused</th>
            <th rowspan="2">Item Id</th>
            <th rowspan="2">Category</th>
            <th rowspan="2">Status</th>
            #foreach($entry in $warehouseMap.entrySet())
                <th style="text-align: center" colspan="6">$entry.getValue()</th>
            #end
        </tr>
        <tr>
            #foreach($entry in $warehouseMap.entrySet())
                <th>Avlbl</th>
                <th>Indent</th>
                <th>Intran</th>
                <th>Net</th>
                <th>LAST 7 DAYS SEC</th>
                <th>Order qty</th>
            #end
        </tr>
        </thead>
        <tbody>
            #foreach($itemWarehouseEntry in $warehouseStockMap.entrySet())
            <tr>
                <td>$itemWarehouseEntry.getKey().getBrand()</td>
                <td>$itemWarehouseEntry.getKey().getModelName() $itemWarehouseEntry.getKey().getModelNumber()</td>
                <td>$itemWarehouseEntry.getKey().getColor()</td>
                <td>#if($itemWarehouseEntry.getKey().isFocused()) True
                #else False
                #end
                </td>
                <td>$itemWarehouseEntry.getKey().getItemId()</td>
                <td>$itemWarehouseEntry.getKey().getItemType()</td>
                <td>
                    #if($itemWarehouseEntry.getKey().getStatus())
                        $itemWarehouseEntry.getKey().getStatus()
                    #else
                        -
                    #end
                </td>
                #foreach($entry in $warehouseMap.entrySet())
                    #if($itemWarehouseEntry.getValue().get($entry.getKey()))
                        <td>$itemWarehouseEntry.getValue().get($entry.getKey()).getAvailability()</td>
                        <td>$itemWarehouseEntry.getValue().get($entry.getKey()).getReserved()</td>
                        <td>$itemWarehouseEntry.getValue().get($entry.getKey()).getInTransit()</td>
                        <td>$itemWarehouseEntry.getValue().get($entry.getKey()).getNetAvailability()</td>
                        <td>$itemWarehouseEntry.getValue().get($entry.getKey()).getBilledQty()</td>
                        <td>$itemWarehouseEntry.getValue().get($entry.getKey()).getAvailabilityGap()</td>
                    #else
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                        <td>0</td>
                    #end
                #end
            </tr>
            #end
        </tbody>
    </table>
</div>

<script type="text/javascript">
    var table = $('#brandwise-stock').DataTable({
        "scrollX": true,
        "scrollY": "600px",
        "fixedHeader": true,
        "bPaginate": false,
        "bLengthChange": true,
        "bFilter": true
    });
</script>