Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
32145 tejbeer 1
 
2
 
3
  <script>
4
   $(document).ready(function () {
5
 
6
      var dtable = $('#warehouse-purchase-order').DataTable({
7
 
8
 
9
       });
10
 
11
    }); 
12
 
13
 </script>
14
 
15
 
16
 <div class="col-lg-12">
17
            <table id="warehouse-purchase-order" class="table table-striped table-advance table-hover" >
18
              <thead>
19
                <tr>
20
                 <th> Id</th>
21
                 <th> Po Number </th>
37088 amit 22
                 <th> Supplier</th>
23
                 <th> Warehouse</th>
24
                 <th> Buyer</th>
25
                 <th> Total Cost </th>
32145 tejbeer 26
                 <th> Created On</th>
27
			     <th> Status </th>
37705 amit 28
			     <th> Transaction </th>
32145 tejbeer 29
			     <th> View</th>
37704 amit 30
			     <th> Reopen</th>
32145 tejbeer 31
 
32
                </tr>
33
              </thead> 
34
 
35
              <tbody> 
36
 
37
 
38
                #foreach($purchaseOrder in $purchaseOrders)
39
                <tr>
40
                <td>$purchaseOrder.getId()</td>
41
                <td>$purchaseOrder.getPoNumber()</td>
42
                <td>$supplierMap.get($purchaseOrder.getSupplierId()).getName()</td>
43
 
37088 amit 44
                <td>#if($warehouseMap.get($purchaseOrder.getWarehouseId()))$warehouseMap.get($purchaseOrder.getWarehouseId())#{else}$purchaseOrder.getWarehouseId()#end</td>
32145 tejbeer 45
                <td>$sellerMap.get($purchaseOrder.getBuyerId()).getLabel()</td>
46
                <td>$purchaseOrder.getTotalCost()</td>
47
                <td>$purchaseOrder.getCreatedAt().format($dateFormatter)</td>
48
                <td>$purchaseOrder.getStatus() </td> 
37705 amit 49
                ## An internal movement is raised as a transaction, so the invoice being GRN'd leads straight back
50
                ## to its PO through this id - search the table by it rather than hunting through dates.
51
                <td>#if($purchaseOrder.getTransactionId())$purchaseOrder.getTransactionId()#end</td>
32145 tejbeer 52
                <td> <input class="form-control btn btn-primary viewPurchaseOrderlineItem" type="button" value="View"  data-poid="$purchaseOrder.getId()"
53
                                data-toggle="modal"
54
                                data-target="#warehouseLineItem"> </td> 
37704 amit 55
                ## Only a movement between our own warehouses, and only once it has closed: an outside vendor's PO
56
                ## that has closed is settled with that vendor, not reopened here.
57
                <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>
32145 tejbeer 58
 
59
               </tr>
60
                 #end
61
 
62
             </tbody>
63
             </table>
64
  </div>
65
 
66
 
67
      <div id="warehouseLineItem" class="modal" role="dialog">
68
        <div class="modal-dialog">
69
            <div class="modal-content">
70
 
71
            </div>
72
        </div>
73
    </div>
74
 
75
</section>