| 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>
|
| 7410 |
amar.kumar |
29 |
<th >Total Quantity</th>
|
|
|
30 |
<th >Net Quantity</th>
|
| 4754 |
mandeep.dh |
31 |
<th >COD/Prepaid</th>
|
|
|
32 |
<th >Amount</th>
|
|
|
33 |
<th ></th>
|
|
|
34 |
</tr>
|
|
|
35 |
</thead>
|
|
|
36 |
<tbody >
|
|
|
37 |
#foreach($supplier in $action.getSuppliers().values())
|
|
|
38 |
<tr >
|
|
|
39 |
<td >$supplier.getName()</td>
|
| 7410 |
amar.kumar |
40 |
<td id="net-totals-quantity-$supplier.getId()">$action.getNetQuantityString($supplier.getId())</td>
|
| 4754 |
mandeep.dh |
41 |
<td id="total-quantity-$supplier.getId()">$action.getQuantityString($supplier.getId())</td>
|
|
|
42 |
<td >$action.getCODPrepaidString($supplier.getId())</td>
|
|
|
43 |
<td id="total-amount-$supplier.getId()" supplierId="$supplier.getId()">$action.getAmount($supplier.getId())</td>
|
| 20092 |
amit.gupta |
44 |
<td ><a class="show-details" supplierId="$supplier.getId()" href="javascript:void(0)">Show details</a></td>
|
| 4754 |
mandeep.dh |
45 |
</tr>
|
|
|
46 |
#end
|
|
|
47 |
</tbody>
|
|
|
48 |
</table>
|
|
|
49 |
#foreach($supplierId in $action.getSuppliers().keySet())
|
|
|
50 |
<div id="lineitems-$supplierId" class="lineitems hidden" supplierId="$supplierId">
|
| 4687 |
mandeep.dh |
51 |
<br />
|
| 4754 |
mandeep.dh |
52 |
<form class="create-purchase-order">
|
| 9416 |
amar.kumar |
53 |
<label>CForm Billing Required : </label>
|
| 10324 |
manish.sha |
54 |
<input type="checkbox" name="cForm" id="cForm" class="cForm-class">
|
| 9925 |
amar.kumar |
55 |
<label> Shipping Warehouse : </label>
|
|
|
56 |
<select name = "shippingWarehouseId" >
|
|
|
57 |
<option value = "0">Select</option>
|
| 20025 |
amit.gupta |
58 |
<!--<option value = "16">Amazon-Mumbai(Bhiwandi)</option>
|
| 11074 |
manish.sha |
59 |
<option value = "1771"> Amazon-Bangalore </option>
|
| 12543 |
manish.sha |
60 |
<option value = "2854"> HR-FK/Gurgaon </option>
|
| 12729 |
manish.sha |
61 |
<option value = "3295"> HR-AMZ/Mewat </option>
|
| 13354 |
manish.sha |
62 |
<option value = "4699"> DL-FK/Mahipalpur-Delhi </option>
|
| 15387 |
manish.sha |
63 |
<option value = "5314">DL-SD/Samalkha-Delhi</option>
|
| 20025 |
amit.gupta |
64 |
<option value = "5623">DL-AMZ/Amazon-Delhi</option>-->
|
| 9925 |
amar.kumar |
65 |
</select>
|
| 9416 |
amar.kumar |
66 |
<br/>
|
| 10324 |
manish.sha |
67 |
<div id="cstCostTypeDiv" class="cstCostTypeDiv-class" hidden>
|
|
|
68 |
<label> CST Cost Borne : </label>
|
|
|
69 |
<select id="cstCostType" name="cstCostType" class="cstCostType-class">
|
|
|
70 |
<option value="vendor">Vendor</option>
|
|
|
71 |
<option value="ours" selected="selected">Ours</option>
|
|
|
72 |
<option value="custom">Custom</option>
|
|
|
73 |
</select>
|
|
|
74 |
<br/>
|
|
|
75 |
<div id="extraCstInputs" class="extraCstInputs-class" hidden>
|
|
|
76 |
<label>CST Borne By Us: (Between 0.00 to 2.00) </label>
|
|
|
77 |
<input type="text" class="cstBorneByUs-class" name="cstBorneByUs" id="cstBorneByUs">
|
|
|
78 |
</div>
|
|
|
79 |
</div>
|
|
|
80 |
<br>
|
| 4754 |
mandeep.dh |
81 |
<table class="lineitems">
|
| 4687 |
mandeep.dh |
82 |
<thead >
|
|
|
83 |
<tr >
|
|
|
84 |
<th >Item Id</th>
|
|
|
85 |
<th >Product Name</th>
|
| 4754 |
mandeep.dh |
86 |
<th >Quantity</th>
|
|
|
87 |
<th >COD/Prepaid</th>
|
|
|
88 |
<th >Transfer price</th>
|
| 9416 |
amar.kumar |
89 |
<th style="display:none;">Mrp</th>
|
| 7672 |
rajveer |
90 |
<th style="display:none;">Nlc</th>
|
| 4687 |
mandeep.dh |
91 |
<th >Total amount</th>
|
| 6880 |
amar.kumar |
92 |
<th style="display:none;">Available</th>
|
|
|
93 |
<th style="display:none;">Reserved</th>
|
| 20092 |
amit.gupta |
94 |
<th >Net Pending Order Qty</th>
|
|
|
95 |
<th >previously Ordered Qty</th>
|
|
|
96 |
<th style="display:none;">Last XDays Sale</th>
|
| 6937 |
amar.kumar |
97 |
<th >AverageSale </th>
|
| 20092 |
amit.gupta |
98 |
<th style="display:none;">Average Sales </th>
|
|
|
99 |
<th style="display:none;">InStock Days</th>
|
| 8182 |
amar.kumar |
100 |
<th >Pending RTOs</th>
|
| 20092 |
amit.gupta |
101 |
<th >NumDays Stock</th>
|
|
|
102 |
<th >MinStock Req</th>
|
|
|
103 |
<th >Additional Qty</th>
|
|
|
104 |
<th style="display:none;">Suggested Qty</th>
|
| 4687 |
mandeep.dh |
105 |
<th ></th>
|
|
|
106 |
</tr>
|
|
|
107 |
</thead>
|
| 4754 |
mandeep.dh |
108 |
<tbody>
|
|
|
109 |
<tr id="sample-lineitem" class="hidden">
|
| 20093 |
amit.gupta |
110 |
<td><input type="text" class="required digits" name="itemId" supplierId="$supplierId" style="width:80px" disabled /></td>
|
| 4754 |
mandeep.dh |
111 |
<td><div id="modelName"></div></td>
|
| 20093 |
amit.gupta |
112 |
<td ><input type="text" class="required digits" name="quantity" style="width:80px" disabled /> </td>
|
| 4754 |
mandeep.dh |
113 |
<td >0/0</td>
|
| 20093 |
amit.gupta |
114 |
<td id="transferPrice"><input type="text" class="required number" name="unitPrice" style="width:80px" disabled readonly /> </td>
|
| 9416 |
amar.kumar |
115 |
<td id="mrp" style="display:none;"><input name="mrp" readonly/></td>
|
| 7672 |
rajveer |
116 |
<td id="nlc" style="display:none;"><input name="nlc" readonly /> </td>
|
| 4687 |
mandeep.dh |
117 |
<td ><div id="amount">0</div></td>
|
| 6880 |
amar.kumar |
118 |
<td id="availableQuantity" style="display:none;" ><div name="availableQuantity" readonly /> </td>
|
|
|
119 |
<td id="reservedQuantity" style="display:none;" ><div name="reservedQuantity" readonly /> </td>
|
|
|
120 |
<td id="netPendingOrderQty"><div name="netPendingOrderQty" readonly /> </td>
|
| 6890 |
amar.kumar |
121 |
<td id="previouslyOrderedQty"><div name="previouslyOrderedQty" readonly /> </td>
|
| 6880 |
amar.kumar |
122 |
<td id="lastXdaysSale" style="display:none;"><div name="lastXdaysSale" readonly /> </td>
|
| 6937 |
amar.kumar |
123 |
<td id="avgSale"><div name="avgSale" readonly /> </td>
|
|
|
124 |
<td id="avgSales" style="display:none;"><div name="avgSales" readonly /> </td>
|
|
|
125 |
<td id="numberOfDaysInStock" style="display:none;"><div name="numberOfDaysInStock" readonly /> </td>
|
| 8182 |
amar.kumar |
126 |
<td id="pendingRTOs"></td>
|
| 6880 |
amar.kumar |
127 |
<td id="numberOfDaysStock"><div name="numberOfDaysStock" readonly /> </td>
|
|
|
128 |
<td id="minStockLevel"><div name="minStockLevel" readonly /> </td>
|
|
|
129 |
<td id="additionalQuantity"><div name="additionalQuantity" readonly /> </td>
|
|
|
130 |
<td id="suggestedQuantity" style="display:none;"><div name="suggestedQuantity" readonly /> </td>
|
| 20092 |
amit.gupta |
131 |
<td ><a id="remove-lineitem" href="javascript:void(0)">remove</a></td>
|
| 4687 |
mandeep.dh |
132 |
</tr>
|
| 4754 |
mandeep.dh |
133 |
#foreach($lineItem in $action.getLineItemsBySupplier().get($supplierId))
|
| 4687 |
mandeep.dh |
134 |
<tr >
|
| 20093 |
amit.gupta |
135 |
<td><input type="text" class="required digits" name="itemId" value="$lineItem.getItemId()" style="width:80px" /></td>
|
| 4754 |
mandeep.dh |
136 |
<td><div id="modelName">$action.getName($lineItem)</div></td>
|
|
|
137 |
#set($prepaidCount = $lineItem.getQuantity() - $lineItem.getCodCount())
|
| 20093 |
amit.gupta |
138 |
<td ><input type="text" class="required digits" name="quantity" value="$lineItem.getSuggestedQuantity()" style="width:80px" /> </td>
|
| 4754 |
mandeep.dh |
139 |
<td >$lineItem.getCodCount()/$prepaidCount</td>
|
| 20093 |
amit.gupta |
140 |
<td id="transferPrice"><input type="text" class="required number" name="unitPrice" value="$lineItem.getUnitPrice()" style="width:80px" readonly /> </td>
|
| 9416 |
amar.kumar |
141 |
<td style="display:none;"><input type="hidden" name="mrp" value = "$lineItem.getMrp()" readonly /></td>
|
| 7672 |
rajveer |
142 |
<td style="display:none;"><input type="hidden" name="nlc" value = "$lineItem.getNlc()" readonly /></td>
|
|
|
143 |
#set($amount = $lineItem.getSuggestedQuantity() * $lineItem.getUnitPrice())
|
| 4687 |
mandeep.dh |
144 |
<td ><div id="amount">$amount</div></td>
|
| 6880 |
amar.kumar |
145 |
<td style="display:none;"><input type="hidden" name="availableQuantity" value = "$lineItem.getAvailableQuantity()" readonly /></td>
|
|
|
146 |
<td style="display:none;"><input type="hidden" name="reservedQuantity" value = "$lineItem.getReservedQuantity()" readonly /></td>
|
|
|
147 |
#set($netPendingReq = $lineItem.getReservedQuantity() - $lineItem.getAvailableQuantity())
|
| 20093 |
amit.gupta |
148 |
<td ><div id="netPendingOrderQty" style="width:80px" readonly />$lineItem.getReservedQuantity() - $lineItem.getAvailableQuantity() = $netPendingReq</td>
|
|
|
149 |
<td ><input type="text" name="previouslyOrderedQty" value = "$lineItem.getPreviouslyOrderedQty()" style="width:80px" readonly /></td>
|
| 6880 |
amar.kumar |
150 |
<td style="display:none;"><input type="hidden" name="lastXdaysSale" value = "$lineItem.getLastXdaysSale()" readonly /></td>
|
| 20093 |
amit.gupta |
151 |
<td ><div id="avgSale" style="width:80px" readonly />$lineItem.getLastXdaysSale() ($lineItem.getAvgSales())</td>
|
|
|
152 |
<td style="display:none;"><input type="text" name="avgSales" value = "$lineItem.getAvgSales()" style="width:80px" readonly /></td>
|
|
|
153 |
<td style="display:none;"><input type="text" name="numberOfDaysInStock" value = "$lineItem.getNumberOfDaysInStock()" style="width:80px" readonly /></td>
|
|
|
154 |
<td ><input type="text" name="rtoOrders" value = "$lineItem.getRtoOrders()" style="width:80px" readonly /></td>
|
|
|
155 |
<td ><input type="text" name="numberOfDaysStock" value = "$lineItem.getNumberOfDaysStock()" style="width:80px" readonly /></td>
|
|
|
156 |
<td ><input type="text" name="minStockLevel" value = "$lineItem.getMinStockLevel()" style="width:80px" readonly /></td>
|
| 6886 |
amar.kumar |
157 |
#set($stockThroughAvgSales = $lineItem.getAvgSales() * $lineItem.getNumberOfDaysStock())
|
|
|
158 |
#if($stockThroughAvgSales > $lineItem.getMinStockLevel())
|
|
|
159 |
#set($additionalQty = $stockThroughAvgSales)
|
|
|
160 |
#else
|
|
|
161 |
#set($additionalQty = $lineItem.getMinStockLevel())
|
|
|
162 |
#end
|
| 8182 |
amar.kumar |
163 |
#if($lineItem.getRtoOrders() >1)
|
|
|
164 |
#set($additionalQty =$additionalQty -($lineItem.getRtoOrders()/2))
|
|
|
165 |
#end
|
| 9416 |
amar.kumar |
166 |
#if($additionalQty<0)
|
|
|
167 |
#set($additionalQty = 0)
|
|
|
168 |
#end
|
| 20093 |
amit.gupta |
169 |
<td ><input type="text" name="additionalQuantity" value = "$additionalQty" style="width:80px" readonly /></td>
|
| 6880 |
amar.kumar |
170 |
<td style="display:none;"><input type="hidden" name="suggestedQuantity" value = "$lineItem.getSuggestedQuantity()" readonly /></td>
|
| 20092 |
amit.gupta |
171 |
<td ><a id="remove-lineitem" href="javascript:void(0)">remove</a></td>
|
| 4687 |
mandeep.dh |
172 |
</tr>
|
|
|
173 |
#end
|
|
|
174 |
</tbody>
|
|
|
175 |
</table>
|
|
|
176 |
<div >
|
|
|
177 |
<input id="add-lineitem" type="button" value="Add New Item"/> <br /> <br />
|
| 4754 |
mandeep.dh |
178 |
<input type="hidden" name="supplierId" value="$supplierId"/>
|
| 7410 |
amar.kumar |
179 |
<input type="hidden" name="warehouseId" value="$warehouseId"/>
|
| 4687 |
mandeep.dh |
180 |
<input type="submit" value="Create Purchase Order"/>
|
| 4754 |
mandeep.dh |
181 |
<input id="cancel" type="button" value="Cancel"/>
|
| 4687 |
mandeep.dh |
182 |
</div>
|
| 4754 |
mandeep.dh |
183 |
</form>
|
| 4687 |
mandeep.dh |
184 |
</div>
|
|
|
185 |
#end
|
|
|
186 |
</body>
|
|
|
187 |
</html>
|