Subversion Repositories SmartDukaan

Rev

Rev 24939 | 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>
        <script type="text/javascript" src="/inventory/js/jquery-1.4.2.js"></script>
        <script type="text/javascript" src="/inventory/js/jquery.dataTables.min.js"></script>
                <title>
                        Suppliers
                </title>
                <style>
                        .wrap { 
                           word-wrap: break-word;
                           word-break: break-all;
                        }
                </style>
        </head>
        
        <body>
        <a href="/inventory">Go to Home page</a>
        <br />                
                <h2>Suppliers</h2>
        <span style="color:red">
            $action.getErrorMessage()
        </span>
        <div>
            #if($action.isPermitted("supplier:create"))
            <a href="/inventory/supplier/new">Add new Supplier</a>
            #end
        </div>
        <table border="1" cellspacing="0" cellpadding="0">
            <thead>
                <tr>
                    <th>Id</th>
                    <th>Name</th>
                    <th>Phone</th>
                    <th>Fax</th>
                    <th>GSTN</th>
                    <th>Pan</th>
                                        <th>State</th>
                                        <th>PO Validity Days Limit</th>
                    <th>Head</th>
                    <th>Head email</th>
                    <th>Contact Person</th>
                    <th class="wrap might-overflow">Contact email</th>
                    <th>Contact phone</th>
                    <th>Contact fax</th>
                    <th class="wrap">Registered address</th>
                    <th class="wrap">Communicaton address</th>
                </tr>
            </thead>
            <tbody>
                #foreach($supplier in $action.getSuppliers())
                    <tr>
                        <td>$supplier.getId()</td>
                        <td>
                            #if($action.isPermitted("supplier:edit"))
                                <a href="/inventory/supplier/$supplier.getId()/edit">$supplier.getName()</a>
                            #else
                                $supplier.getName()
                            #end
                        </td>
                        <td>$supplier.getPhone()</td>
                        <td>$supplier.getFax()</td>
                        <td>$supplier.getGstin()</td>
                        <td>$supplier.getPan()</td>
                        <td>$action.getStateName($supplier.getStateId())</td>
                        <td>$supplier.getPoValidityLimit()</td>
                        <td>$supplier.getHeadName()</td>
                        <td>$supplier.getHeadEmail()</td>
                        <td>$supplier.getContactName()</td>
                        <td class="wrap">$supplier.getContactEmail()</td>
                        <td>$supplier.getContactPhone()</td>
                        <td>$supplier.getContactFax()</td>
                        <td class="wrap">$supplier.getRegisteredAddress()</td>
                        <td class="wrap">$supplier.getCommunicationAddress()</td>
                    </tr>
                #end
            </tbody>
        </table>
    </body>
</html>
<script type="text/javascript">
$('table').dataTable({
                            "iDisplayLength" : 50,
                            "bAutoWidth": false,
                                "aoColumns" : [
                                    { sWidth: '30px' },
                                    { sWidth: '100px' },
                                    { sWidth: '60px' },
                                    { sWidth: '60px' },
                                    { sWidth: '80px' },
                                    { sWidth: '80px' },
                                    { sWidth: '100px' },
                                    { sWidth: '50px' },
                                    { sWidth: '100px' },
                                    { sWidth: '50px' },
                                    { sWidth: '100px' },
                                    { sWidth: '400px' },
                                    { sWidth: '50px' },
                                    { sWidth: '50px' },
                                    { sWidth: '175px' },
                                    { sWidth: '175px' }
                                 ]
                         
                        });
                        
</script>