Subversion Repositories SmartDukaan

Rev

Rev 25120 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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
			Warehouse Management::Purchase Order $action.getPurchaseOrder().getId()
6
		</title>
7
        <script type="text/javascript" src="/inventory/js/jquery-1.4.2.js"></script>
17406 manish.sha 8
		<link rel="stylesheet" href="/inventory/css/colorbox.css" type="text/css" />
9
		<script type="text/javascript" src="/inventory/js/jquery.colorbox-min.js"></script>
4687 mandeep.dh 10
        <script type="text/javascript" src="/inventory/js/purchase-order-common.js"></script>
11
        <script type="text/javascript" src="/inventory/js/purchase-order-events.js"></script>
12
        <link rel="stylesheet" href="/inventory/css/common.css" type="text/css" />
13
	</head>
14
	<body>
4754 mandeep.dh 15
        <a href="/inventory">Go to Home page</a>
16
        <br />        
6380 amar.kumar 17
		<h2>Start a Purchase</h2>
4687 mandeep.dh 18
		#set($purchases = $action.getPurchases())
19
		#if($purchases)
6380 amar.kumar 20
		<p>Previous Purchases for PO $action.getPurchaseOrder().getPoNumber()</p>
4687 mandeep.dh 21
			#foreach($purchase in $purchases)
22
        <ul>
11802 manish.sha 23
            <li><span>Purchase no. $purchase.getId()</span>&nbsp;&nbsp;&nbsp;<span>Purchase Comments: #if($purchase.getPurchaseComments()) $purchase.getPurchaseComments() #else NA #end</span></li>
4687 mandeep.dh 24
		</ul>
25
			#end
26
		#end
11801 manish.sha 27
 
10427 manish.sha 28
		#if($action.getPurchaseOrder().getStatus().getValue()==1 || $action.getPurchaseOrder().getStatus().getValue()==2)
25112 amit.gupta 29
    		  <a href="/inventory/purchase/new/?poId=$action.getPurchaseOrder().getId()">Start a new Purchase</a>
12531 manish.sha 30
		#end
31
		<br>
32
		<a href="/inventory/check-grn-imei">Check IMEI Status</a>
17408 manish.sha 33
		<br />
17423 manish.sha 34
		<a class = "link-requiring-itemid-for-productlabel" href="/inventory/purchase-order!generateProductLabel">Generate Product Label</a>
35
		 <br>
4687 mandeep.dh 36
        <div >
37
            <br />
38
            <div class="error">#set($messages = $action.getActionErrors())
39
                    #if($messages && $messages.size() != 0)
40
                        #foreach($message in $messages)
41
                            $message <br/>
42
                        #end
43
                    #end
44
            </div>
10427 manish.sha 45
			#if($action.isPermitted("po:closedAmend") && $action.canPurchaseOrderBeOpened($action.getPurchaseOrder().getId()))
9925 amar.kumar 46
				<input type = "button" id = "open-po-button" poId = "$action.getPurchaseOrder().getId()" value = "Open Purchase-Order"/>
47
			#end
48
			<br/>
49
 
4687 mandeep.dh 50
            <table class="bordered" border="1">
51
                <thead >
52
                    <tr class="bordered">
53
                        <th >Item Id</th>
54
                        <th >Product Name</th>
9416 amar.kumar 55
						<th >MRP</th>
25112 amit.gupta 56
						<th >Invoice Price</th>
4687 mandeep.dh 57
                        <th >Quantity ordered</th>
58
                        <th >Unfulfilled Quantity</th>
11801 manish.sha 59
						<!--
11802 manish.sha 60
						<th >Scanned Quantity</th> 
11801 manish.sha 61
						<th >Item Weight</th>
11802 manish.sha 62
						<th >Inventory Adjust</th> 
63
                        <th >Set Weight</th> -->
4687 mandeep.dh 64
                    </tr>
65
                </thead>
66
                <tbody >
67
                    #foreach($lineitem in $action.getPurchaseOrder().getLineitems())
68
                        <tr class="bordered">
69
                            <td id="itemId">$lineitem.getItemId()</td>
70
                            <td >$action.getName($lineitem)</td>
9416 amar.kumar 71
							<td >$lineitem.getMrp()</td>
25112 amit.gupta 72
							#if($lineitem.getQuantity() > $lineitem.getUnfulfilledQuantity() && $lineitem.getInvoicePrice() > 0 )
73
								<td><input data-id="$lineitem.getItemId()" type="number" value="$lineitem.getInvoicePrice()" readonly></td>
74
							#else
25120 amit.gupta 75
								<td><input data-id="$lineitem.getItemId()" type="number" value="$lineitem.getInvoicePrice()"></td>
25112 amit.gupta 76
							#end
4687 mandeep.dh 77
                            <td >$lineitem.getQuantity()</td>
78
                            <td >$lineitem.getUnfulfilledQuantity()</td>
79
                        </tr>
80
                    #end
81
                </tbody>
82
            </table>
83
            <input type="hidden" id="poId" value="$action.getPurchaseOrder().getId()"/>
84
        </div>
85
    </body>
25112 amit.gupta 86
    <script type="text/javascript">
87
    	$("td input:not([readonly])").change(function(){
25116 amit.gupta 88
    		if(!isNaN($(this).val()) && $(this).val() > 0){
25121 amit.gupta 89
    			updateModelNameInvoicePrice(this, $(this).attr('data-id'), $(this).val(), $action.getPurchaseOrder().getId());
25112 amit.gupta 90
    		} 
91
    	});
92
    </script>
4687 mandeep.dh 93
</html>