Subversion Repositories SmartDukaan

Rev

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


          
  <script>
   $(document).ready(function () {
        
      var dtable = $('#warehouse-purchase-order').DataTable({
           
            
       });
    
    }); 
 
 </script>

 
 <div class="col-lg-12">
            <table id="warehouse-purchase-order" class="table table-striped table-advance table-hover" >
              <thead>
                <tr>
                 <th> Id</th>
                 <th> Po Number </th>
                 <th> Supplier</th>
                 <th> Warehouse</th>
                 <th> Buyer</th>
                 <th> Total Cost </th>
                 <th> Created On</th>
                             <th> Status </th>
                             <th> Transaction </th>
                             <th> View</th>
                             <th> Reopen</th>
                            
                </tr>
              </thead> 
                
              <tbody> 
              
              
                #foreach($purchaseOrder in $purchaseOrders)
                <tr>
                <td>$purchaseOrder.getId()</td>
                <td>$purchaseOrder.getPoNumber()</td>
                <td>$supplierMap.get($purchaseOrder.getSupplierId()).getName()</td>
               
                <td>#if($warehouseMap.get($purchaseOrder.getWarehouseId()))$warehouseMap.get($purchaseOrder.getWarehouseId())#{else}$purchaseOrder.getWarehouseId()#end</td>
                <td>$sellerMap.get($purchaseOrder.getBuyerId()).getLabel()</td>
                <td>$purchaseOrder.getTotalCost()</td>
                <td>$purchaseOrder.getCreatedAt().format($dateFormatter)</td>
                <td>$purchaseOrder.getStatus() </td> 
                ## An internal movement is raised as a transaction, so the invoice being GRN'd leads straight back
                ## to its PO through this id - search the table by it rather than hunting through dates.
                <td>#if($purchaseOrder.getTransactionId())$purchaseOrder.getTransactionId()#end</td>
                <td> <input class="form-control btn btn-primary viewPurchaseOrderlineItem" type="button" value="View"  data-poid="$purchaseOrder.getId()"
                                data-toggle="modal"
                                data-target="#warehouseLineItem"> </td> 
                ## Only a movement between our own warehouses, and only once it has closed: an outside vendor's PO
                ## that has closed is settled with that vendor, not reopened here.
                <td>#if(!$purchaseOrder.isOpen() && $supplierMap.get($purchaseOrder.getSupplierId()) && $supplierMap.get($purchaseOrder.getSupplierId()).isInternal())<input class="form-control btn btn-warning reopenPurchaseOrder" type="button" value="Reopen" data-poid="$purchaseOrder.getId()">#end</td>
              
               </tr>
                 #end
                 
             </tbody>
             </table>
  </div>
  
  
      <div id="warehouseLineItem" class="modal" role="dialog">
        <div class="modal-dialog">
            <div class="modal-content">

            </div>
        </div>
    </div>
         
</section>