Subversion Repositories SmartDukaan

Rev

Rev 27599 | Rev 32748 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

                        <div class="col-lg-12">
                                 <table id="warehouseBrandItemStock" class="table table-striped table-advance table-hover">
                                 <thead>
                                <tr>
                                    <th>W/H Name</th>
                                        <th>Item</th>
                                        <th>Unit Price</th>
                                        <th>Stock Qty</th>
                                        <th>Stock Value</th>
                                        <th>Pending Indent</th>
                                        <th>Tertiary</th>
                                        <th>&lt;10</th>
                                        <th>&lt;20</th>
                                        <th>&lt;30</th>
                                        <th>&gt;30</th>
                                        
                                 </tr>
                                 </thead>
                                <tbody>
                                    #foreach($key in $warehouseWiseItemStock)
                                        <tr>
                                        <td>$key.getWarehouseName()</td>
                                     <td #if($key.getDgt30() > 0)
                                                         style="color:red"
                                                 #end
                                                 >$key.getBrand() $key.getModelName() $key.getModelNumber() $key.getColor()</td>
                                     <td>$key.getUnitPrice()</td>
                                     <td>$key.getStockQty()</td>
                                     <td class="currency">$key.getStockValue()</td> 
                                      <td class="pendingIndent"  data-itemid="$key.getItemId()"  data-warehouseid="$key.getWarehouseId()" data-toggle="modal" data-target="#pendingIndentItem">$key.getPendingIndent()</td>
                                      <td>$key.getTertiary()</td>
                                       <td>$key.getDlt10()</td>
                                        <td>$key.getD10to20()</td>
                                         <td>$key.getD20to30()</td>
                                         <td>$key.getDgt30()</td>
                                        </tr>
                                         #end
                                        
                            </tbody>
                        </table>
                        </div>
                
 <div id="pendingIndentItem" class="modal" role="dialog">
          <div class="modal-dialog">
            <div class="modal-content">
             
    </div>
   </div>
 </div>
 
<script type="text/javascript">
$(document).ready(function() {

   $('#warehouseBrandItemStock thead tr').clone(true).appendTo( '#warehouseBrandItemStock thead' );
    $('#warehouseBrandItemStock thead tr:eq(1) th').each( function (i) {
        var title = $(this).text();
        $(this).html( '<input type="text" style = "width:60%;" placeholder="Search '+title+'" />' );
 
        $( 'input', this ).on( 'keyup change', function () {
            if ( table.column(i).search() !== this.value ) {
                table
                    .column(i)
                    .search( this.value )
                    .draw();
            }
        } );
    } )
  var table = $('#warehouseBrandItemStock').DataTable( {
        orderCellsTop: true,
        fixedHeader: true
    } );
});



</script>

<script type="text/javascript">

$('#warehouseBrandItemStock').on('click', '.pendingIndent', function(){
                var itemId = $(this).data('itemid');
                var warehouseId = $(this).data('warehouseid');
                
                                
                                doGetAjaxRequestHandler(context + "/getPartnerPendingIndentItem?itemId="
                                                + itemId +"&warehouseId="+ warehouseId, function(response) {

                                        $('#pendingIndentItem .modal-content').html(response);

                                });
});
</script>