| 4687 |
mandeep.dh |
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
2 |
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
3 |
<head>
|
|
|
4 |
<title>
|
|
|
5 |
Inventory Management::Create Purchase Order
|
|
|
6 |
</title>
|
|
|
7 |
<script type="text/javascript" src="/inventory/js/jquery-1.4.2.js"></script>
|
|
|
8 |
<script type="text/javascript" src="/inventory/js/purchase-order-common.js"></script>
|
|
|
9 |
<script type="text/javascript" src="/inventory/js/purchase-order-events.js"></script>
|
|
|
10 |
<link rel="stylesheet" href="/inventory/css/common.css" type="text/css" />
|
|
|
11 |
</head>
|
|
|
12 |
<body>
|
| 4754 |
mandeep.dh |
13 |
<a href="/inventory">Go to Home page</a>
|
|
|
14 |
<br />
|
|
|
15 |
<div class="error">
|
|
|
16 |
#set($messages = $action.getActionErrors())
|
|
|
17 |
#if($messages && $messages.size() != 0)
|
|
|
18 |
<label >Please fix below errors first to see accurate requirements</label> <br/>
|
|
|
19 |
#foreach($message in $messages)
|
|
|
20 |
$message <br/>
|
|
|
21 |
#end
|
|
|
22 |
#end
|
|
|
23 |
<br />
|
|
|
24 |
</div>
|
|
|
25 |
<table id="suppliers">
|
|
|
26 |
<thead >
|
|
|
27 |
<tr >
|
|
|
28 |
<th >Supplier</th>
|
|
|
29 |
<th >Quantity</th>
|
|
|
30 |
<th >COD/Prepaid</th>
|
|
|
31 |
<th >Amount</th>
|
|
|
32 |
<th ></th>
|
|
|
33 |
</tr>
|
|
|
34 |
</thead>
|
|
|
35 |
<tbody >
|
|
|
36 |
#foreach($supplier in $action.getSuppliers().values())
|
|
|
37 |
<tr >
|
|
|
38 |
<td >$supplier.getName()</td>
|
|
|
39 |
<td id="total-quantity-$supplier.getId()">$action.getQuantityString($supplier.getId())</td>
|
|
|
40 |
<td >$action.getCODPrepaidString($supplier.getId())</td>
|
|
|
41 |
<td id="total-amount-$supplier.getId()" supplierId="$supplier.getId()">$action.getAmount($supplier.getId())</td>
|
|
|
42 |
<td ><a class="show-details" supplierId="$supplier.getId()" href="#">Show details</a></td>
|
|
|
43 |
</tr>
|
|
|
44 |
#end
|
|
|
45 |
</tbody>
|
|
|
46 |
</table>
|
|
|
47 |
#foreach($supplierId in $action.getSuppliers().keySet())
|
|
|
48 |
<div id="lineitems-$supplierId" class="lineitems hidden" supplierId="$supplierId">
|
| 4687 |
mandeep.dh |
49 |
<br />
|
| 4754 |
mandeep.dh |
50 |
<form class="create-purchase-order">
|
|
|
51 |
<table class="lineitems">
|
| 4687 |
mandeep.dh |
52 |
<thead >
|
|
|
53 |
<tr >
|
|
|
54 |
<th >Item Id</th>
|
|
|
55 |
<th >Product Name</th>
|
| 4754 |
mandeep.dh |
56 |
<th >Quantity</th>
|
|
|
57 |
<th >COD/Prepaid</th>
|
|
|
58 |
<th >Transfer price</th>
|
| 4687 |
mandeep.dh |
59 |
<th >Total amount</th>
|
| 6880 |
amar.kumar |
60 |
<th style="display:none;">Available</th>
|
|
|
61 |
<th style="display:none;">Reserved</th>
|
|
|
62 |
<th >NetPendingOrderQty</th>
|
| 6890 |
amar.kumar |
63 |
<th >previouslyOrderedQty</th>
|
| 6880 |
amar.kumar |
64 |
<th style="display:none;">LastXDaysSale</th>
|
| 6863 |
amar.kumar |
65 |
<th >AverageSales </th>
|
| 6827 |
amar.kumar |
66 |
<th >InStockDays</th>
|
| 6839 |
amar.kumar |
67 |
<th >NumDaysStock</th>
|
| 6827 |
amar.kumar |
68 |
<th >MinStockReq</th>
|
| 6831 |
amar.kumar |
69 |
<th >AdditionalQty</th>
|
| 6880 |
amar.kumar |
70 |
<th style="display:none;">SuggestedQty</th>
|
| 4687 |
mandeep.dh |
71 |
<th ></th>
|
|
|
72 |
</tr>
|
|
|
73 |
</thead>
|
| 4754 |
mandeep.dh |
74 |
<tbody>
|
|
|
75 |
<tr id="sample-lineitem" class="hidden">
|
| 6863 |
amar.kumar |
76 |
<td><input type="text" class="required digits" name="itemId" supplierId="$supplierId" style="width:100px" disabled /></td>
|
| 4754 |
mandeep.dh |
77 |
<td><div id="modelName"></div></td>
|
| 6863 |
amar.kumar |
78 |
<td ><input type="text" class="required digits" name="quantity" style="width:100px" disabled /> </td>
|
| 4754 |
mandeep.dh |
79 |
<td >0/0</td>
|
| 6863 |
amar.kumar |
80 |
<td id="transferPrice"><input type="text" class="required number" name="unitPrice" style="width:100px" disabled readonly /> </td>
|
| 4687 |
mandeep.dh |
81 |
<td ><div id="amount">0</div></td>
|
| 6880 |
amar.kumar |
82 |
<td id="availableQuantity" style="display:none;" ><div name="availableQuantity" readonly /> </td>
|
|
|
83 |
<td id="reservedQuantity" style="display:none;" ><div name="reservedQuantity" readonly /> </td>
|
|
|
84 |
<td id="netPendingOrderQty"><div name="netPendingOrderQty" readonly /> </td>
|
| 6890 |
amar.kumar |
85 |
<td id="previouslyOrderedQty"><div name="previouslyOrderedQty" readonly /> </td>
|
| 6880 |
amar.kumar |
86 |
<td id="lastXdaysSale" style="display:none;"><div name="lastXdaysSale" readonly /> </td>
|
|
|
87 |
<td id="avgSales"><div name="avgSales" readonly /> </td>
|
|
|
88 |
<td id="numberOfDaysInStock"><div name="numberOfDaysInStock" readonly /> </td>
|
|
|
89 |
<td id="numberOfDaysStock"><div name="numberOfDaysStock" readonly /> </td>
|
|
|
90 |
<td id="minStockLevel"><div name="minStockLevel" readonly /> </td>
|
|
|
91 |
<td id="additionalQuantity"><div name="additionalQuantity" readonly /> </td>
|
|
|
92 |
<td id="suggestedQuantity" style="display:none;"><div name="suggestedQuantity" readonly /> </td>
|
| 6821 |
amar.kumar |
93 |
<td ><a id="remove-lineitem" href="#">remove</a></td>
|
| 4687 |
mandeep.dh |
94 |
</tr>
|
| 4754 |
mandeep.dh |
95 |
#foreach($lineItem in $action.getLineItemsBySupplier().get($supplierId))
|
| 4687 |
mandeep.dh |
96 |
<tr >
|
| 6863 |
amar.kumar |
97 |
<td><input type="text" class="required digits" name="itemId" value="$lineItem.getItemId()" style="width:100px" /></td>
|
| 4754 |
mandeep.dh |
98 |
<td><div id="modelName">$action.getName($lineItem)</div></td>
|
|
|
99 |
#set($prepaidCount = $lineItem.getQuantity() - $lineItem.getCodCount())
|
| 6880 |
amar.kumar |
100 |
<td ><input type="text" class="required digits" name="quantity" value="$lineItem.getSuggestedQuantity()" style="width:100px" /> </td>
|
| 4754 |
mandeep.dh |
101 |
<td >$lineItem.getCodCount()/$prepaidCount</td>
|
| 6862 |
amar.kumar |
102 |
<td id="transferPrice"><input type="text" class="required number" name="unitPrice" value="$lineItem.getUnitPrice()" style="width:100px" readonly /> </td>
|
| 6886 |
amar.kumar |
103 |
#set($amount = $lineItem.getSuggestedQuantity() * $lineItem.getUnitPrice())
|
| 4687 |
mandeep.dh |
104 |
<td ><div id="amount">$amount</div></td>
|
| 6880 |
amar.kumar |
105 |
<td style="display:none;"><input type="hidden" name="availableQuantity" value = "$lineItem.getAvailableQuantity()" readonly /></td>
|
|
|
106 |
<td style="display:none;"><input type="hidden" name="reservedQuantity" value = "$lineItem.getReservedQuantity()" readonly /></td>
|
|
|
107 |
#set($netPendingReq = $lineItem.getReservedQuantity() - $lineItem.getAvailableQuantity())
|
|
|
108 |
<td ><div id="netPendingOrderQty" style="width:100px" readonly />$lineItem.getReservedQuantity() - $lineItem.getAvailableQuantity() = $netPendingReq</td>
|
| 6890 |
amar.kumar |
109 |
<td ><input type="text" name="previouslyOrderedQty" value = "$lineItem.getPreviouslyOrderedQty()" style="width:100px" readonly /></td>
|
| 6880 |
amar.kumar |
110 |
<td style="display:none;"><input type="hidden" name="lastXdaysSale" value = "$lineItem.getLastXdaysSale()" readonly /></td>
|
|
|
111 |
<td ><input type="text" name="avgSales" value = "$lineItem.getLastXdaysSale() ($lineItem.getAvgSales())" style="width:100px" readonly /></td>
|
|
|
112 |
<td ><input type="text" name="numberOfDaysInStock" value = "$lineItem.getNumberOfDaysInStock()" style="width:100px" readonly /></td>
|
|
|
113 |
<td ><input type="text" name="numberOfDaysStock" value = "$lineItem.getNumberOfDaysStock()" style="width:100px" readonly /></td>
|
|
|
114 |
<td ><input type="text" name="minStockLevel" value = "$lineItem.getMinStockLevel()" style="width:100px" readonly /></td>
|
| 6886 |
amar.kumar |
115 |
#set($stockThroughAvgSales = $lineItem.getAvgSales() * $lineItem.getNumberOfDaysStock())
|
|
|
116 |
#if($stockThroughAvgSales > $lineItem.getMinStockLevel())
|
|
|
117 |
#set($additionalQty = $stockThroughAvgSales)
|
|
|
118 |
#else
|
|
|
119 |
#set($additionalQty = $lineItem.getMinStockLevel())
|
|
|
120 |
#end
|
| 6880 |
amar.kumar |
121 |
<td ><input type="text" name="additionalQuantity" value = "$additionalQty" style="width:100px" readonly /></td>
|
|
|
122 |
<td style="display:none;"><input type="hidden" name="suggestedQuantity" value = "$lineItem.getSuggestedQuantity()" readonly /></td>
|
| 4754 |
mandeep.dh |
123 |
<td ><a id="remove-lineitem" href="#">remove</a></td>
|
| 4687 |
mandeep.dh |
124 |
</tr>
|
|
|
125 |
#end
|
|
|
126 |
</tbody>
|
|
|
127 |
</table>
|
|
|
128 |
<div >
|
|
|
129 |
<input id="add-lineitem" type="button" value="Add New Item"/> <br /> <br />
|
| 4754 |
mandeep.dh |
130 |
<input type="hidden" name="supplierId" value="$supplierId"/>
|
| 4687 |
mandeep.dh |
131 |
<input type="submit" value="Create Purchase Order"/>
|
| 4754 |
mandeep.dh |
132 |
<input id="cancel" type="button" value="Cancel"/>
|
| 4687 |
mandeep.dh |
133 |
</div>
|
| 4754 |
mandeep.dh |
134 |
</form>
|
| 4687 |
mandeep.dh |
135 |
</div>
|
|
|
136 |
#end
|
|
|
137 |
</body>
|
|
|
138 |
</html>
|