| 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>
|
|
|
13 |
#foreach($supplier in $action.getSuppliers())
|
|
|
14 |
<div id="supplier-$supplier.getId()">
|
|
|
15 |
<input supplierId="$supplier.getId()" type="button" value="Create PO with $supplier.getName()"/>
|
|
|
16 |
<input readonly value="0" type="text" name="total_amount"/>
|
|
|
17 |
<br />
|
|
|
18 |
<table>
|
|
|
19 |
<thead >
|
|
|
20 |
<tr >
|
|
|
21 |
<th >Item Id</th>
|
|
|
22 |
<th >Product Name</th>
|
|
|
23 |
<th >Quantity (COD/Prepaid)</th>
|
|
|
24 |
<th >Unit price</th>
|
|
|
25 |
<th >Total amount</th>
|
|
|
26 |
<th ></th>
|
|
|
27 |
</tr>
|
|
|
28 |
</thead>
|
|
|
29 |
<tbody >
|
|
|
30 |
<tr id="sample-lineitem">
|
|
|
31 |
<td><input type="text" class="required digits" name="item_id" disabled /></td>
|
|
|
32 |
<td><div id="model_name"></div></td>
|
|
|
33 |
<td ><input type="text" class="required digits" name="quantity" disabled /> </td>
|
|
|
34 |
<td ><input type="text" class="required number" name="unit_price" disabled /> </td>
|
|
|
35 |
<td ><div id="amount">0</div></td>
|
|
|
36 |
<td ><a id="remove-lineitem" href="#">remove</a></td>
|
|
|
37 |
</tr>
|
|
|
38 |
#foreach($lineitem in $action.getLineItemsBySupplier().get($supplier.getId()))
|
|
|
39 |
<tr >
|
|
|
40 |
<td><input type="text" class="required digits" name="item_id" value="$lineitem.getItemId()" /></td>
|
|
|
41 |
<td><div id="model_name">$action.getName($lineitem)</div></td>
|
|
|
42 |
#set($prepaidCount = $lineitem.getQuantity() - $lineitem.getCodCount())
|
|
|
43 |
<td ><input type="text" class="required digits" name="quantity" value="$lineitem.getQuantity() ($lienitem.getCodCount()/$prepaidCount)" /> </td>
|
|
|
44 |
<td ><input type="text" class="required number" name="unit_price" value="$lineitem.getUnitPrice()" /> </td>
|
|
|
45 |
#set($amount = $lineitem.getQuantity() * $lineitem.getUnitPrice())
|
|
|
46 |
<td ><div id="amount">$amount</div></td>
|
|
|
47 |
<td ><a id="remove-lineitem" href="#">remove</a></td>
|
|
|
48 |
</tr>
|
|
|
49 |
#end
|
|
|
50 |
</tbody>
|
|
|
51 |
</table>
|
|
|
52 |
<div >
|
|
|
53 |
<input id="add-lineitem" type="button" value="Add New Item"/> <br /> <br />
|
|
|
54 |
<input type="submit" value="Create Purchase Order"/>
|
|
|
55 |
<input id="cancel" type="button" value="Cancel"/>
|
|
|
56 |
</div>
|
|
|
57 |
</div>
|
|
|
58 |
#end
|
|
|
59 |
</body>
|
|
|
60 |
</html>
|