Subversion Repositories SmartDukaan

Rev

Rev 10884 | 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" />
                <link rel="stylesheet" href="/inventory/css/TableTools.css" type="text/css" />
                <link rel="stylesheet" href="/inventory/css/demo_table.css" type="text/css" />
                <link rel="stylesheet" href="/inventory/css/colorbox.css" type="text/css" />
                
                <script type="text/javascript" src="/inventory/js/jquery-1.4.2.js"></script>
        <script type="text/javascript" src="/inventory/js/jquery.validate.js"></script>
                <script src="/inventory/js/jquery.dataTables.min.js" type="text/javascript"></script>
                <script type="text/javascript" src="/inventory/js/jquery.colorbox-min.js"></script>
                <script type="text/javascript" src="/inventory/js/TableTools.min.js"></script>
        <script type="text/javascript" src = "/inventory/js/purchase-return.js"></script>
        <title>
                Purchase Return
        </title>
    </head>
        
        <body>
                
        <a href="/inventory">Go to Home Page</a>
                <br/>
                <br/>
                
                #if($action.isPermitted("purchase-return:create"))
                        <div id = "create-purchasereturn-link" >
                                <a href = "/inventory/purchase-return/new">Create New Purchase Return</a>
                        </div>
                #end
                <br/>
                <br/>
                #set($purchaseReturns = $action.getPurchaseReturns())
                <table id = "purchase-return-table" width="100%">
                        <thead >
                                <tr >
                                        <th >PurchaseRet ID</th>
                                        <th >Vendor</th>
                                        <th >Amount</th>
                                        <th >Return Time</th>
                                        <th >Return Inventory Type</th>
                                        <th >Unsettled Amount</th>
                                        <th >Purchase Return Reason</th>
                    <th >Reason Text</th> 
                                        #if($action.isPermitted("purchase-return:settle"))
                                                <th >Mark Settled</th>
                                        #end
                    <th >Item Details</th>
                    <th >PR Settlement Info</th>
                </tr>
            </thead>
                        <tbody >
                                #foreach($purchaseReturn in $purchaseReturns)
                                <tr >
                    <td>$purchaseReturn.getId()</td>
                                        <td>$action.getVendorName($purchaseReturn.getVendorId())</td>
                                        <td>$purchaseReturn.getAmount()</td>
                                        <td>$action.getDateTime($purchaseReturn.getReturnTimestamp())</td>
                    <td>$purchaseReturn.getReturnInventoryType().toString()</td>
                                        <td>$purchaseReturn.getUnsettledAmount()</td>
                                        #if($purchaseReturn.getPurchaseReturnType())
                                                <td>$purchaseReturn.getPurchaseReturnType().toString()</td>
                                        #else
                                                <td>NOT_DEFINED</td>
                                        #end
                                        #if($purchaseReturn.getReasonText())
                                                <td>$purchaseReturn.getReasonText()</td>
                                        #else
                                                <td>NOT_MENTIONED</td>
                                        #end
                                                
                                        #if($action.isPermitted("purchase-return:settle"))
                        <td ><input type = "button" class = "settlePurchaseReturn" id = $purchaseReturn.getId() value="Mark as Settled"></input>
                                                <form class="settlePurchaseReturnForm" hidden>
                                                        <label >Settled Amount: </label>
                            <input type="text" name="settledAmount" class="settledAmount_$purchaseReturn.getId()"/> <br />
                            <label >Settlement Type: </label>
                                                        <select name="settlementType" class="settlementType_$purchaseReturn.getId()">
                                                                <option value="CREDIT_NOTE" selected="selected">CREDIT_NOTE</option>
                                                                <option value="REPLACEMENT">REPLACEMENT</option>
                                <option value="AGAINST_GRN">AGAINST_GRN</option>
                            </select><br />
                                                        <label >Document Number: </label>
                                                        <input type="text" name="documentNumber" class="documentNumber_$purchaseReturn.getId()"/> <br />
                                                        <input type="submit" class="settledPR" purchaseReturnId="$purchaseReturn.getId()" value="Settle-Purchase-Return"/>
                            <input type="button" value="Cancel" class="cancelSettlementButton"/>
                                                        <input type="hidden" name="purchaseReturnId" id="purchaseReturnId" value="$purchaseReturn.getId()"/>
                                                </form> 
                                                </td>
                                        #end
                                        <td ><input type = "button" class = "detailPurchaseReturn" id = $purchaseReturn.getId() value="View Items"></input></td>
                    <td ><input type = "button" class = "purchaseReturnSettlementDetails" id = $purchaseReturn.getId()  value="View Settlements"></input></td>
                </tr>
                                #end
            </tbody>
        </table>
                
    </body>
</html>