Subversion Repositories SmartDukaan

Rev

Rev 9416 | Blame | Compare with Previous | Last modification | View Log | RSS feed

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
        <head>
        <link rel="stylesheet" href="/inventory/css/common.css" type="text/css" />
        <script type="text/javascript" src="/inventory/js/jquery-1.4.2.js"></script>
                <script type = "text/javascript" src = "/inventory/js/purchase-order-common.js"></script>
                <script type = "text/javascript" src = "/inventory/js/purchase-order-events.js"></script>
                <title>
                        Warehouse Management::Purchase Orders
                </title>
        </head>
        <body>
        <a href="/inventory">Go to Home page</a>
        <br />
                <h2>Start or Continue a Purchase</h2>
                <p>Open Purchase Orders</p>
                #set($purchaseOrders = $action.getPurchaseOrders())
        <table class="bordered">
            <thead >
                <tr >
                    <th >PO Number</th>
                    <th >Warehouse</th>
                    <th >Creation Date</th>
                    #if($action.isPermitted("po:amend"))
                        <th ></th>
                                                <th ></th>
                                                ##if($action.isPermitted("po:changeWarehouse"))
                        <th></th>
                                                ##end
                    #end
                </tr>
            </thead>
            <tbody >
                #foreach($purchaseOrder in $purchaseOrders)
                    <tr >                       
                        <td >
                            #if($action.isPermitted("po:receive"))
                            <a href="/inventory/purchase-order/$purchaseOrder.getId()">$purchaseOrder.getPoNumber()</a>
                            #else
                                $purchaseOrder.getPoNumber()
                            #end
                        </td>
                        <td >$action.getOurGOODWarehouses().get($purchaseOrder.getSupplierId()).getDisplayName()</td>
                        <td >$action.convertDate($purchaseOrder.getCreatedAt())</td>
                        #if($action.isPermitted("po:amend"))
                            <td ><a href="/inventory/purchase-order/$purchaseOrder.getId()/edit">Edit</a></td>
                                                        <td ><input type = "button" id="close-po" poId = "$purchaseOrder.getId()" value = "Close PO"/></td>
                                                        ##if($action.isPermitted("po:changeWarehouse"))
                                                                <td >
                                                                        <input type = "button" class ="change-po-warehouse" poId = "$purchaseOrder.getId()" value = "Change Warehouse"/>
                                                                        <form class = "change-po-warehouse-form hidden" method="post" action="/inventory/purchase-order!changeWarehouseForPO"> 
                                                                        <span>WarehouseId : </span>
                                                                        <input type = "text" name = "warehouseId" pattern = "\d*" required /></br>
                                                                        <input type = "hidden" name = "id" value = "$purchaseOrder.getId()" /> 
                                                                        <input type = "submit" value = "Change Warehouse" /></br>
                                                                        <input type = "button" class = "cancel-change-po-warehouse" value = "Cancel"/>
                                        </form>
                                                                </td>
                                                        ##end
                                                #end
                    </tr>
                #end
            </tbody>
        </table>
    </body>
</html>