[468] | 1 | <html> |
---|
| 2 | <head> |
---|
| 3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
| 4 | <meta name="layout" content="main" /> |
---|
| 5 | <title>Inventory Item Purchase Search</title> |
---|
| 6 | <filterpane:includes /> |
---|
| 7 | <nav:resources override="true"/> |
---|
| 8 | <export:resource /> |
---|
| 9 | </head> |
---|
| 10 | <body> |
---|
| 11 | <div class="nav"> |
---|
[595] | 12 | <nav:renderSubItems group="navAlt"/> |
---|
[468] | 13 | </div> |
---|
| 14 | |
---|
| 15 | <div class="body"> |
---|
| 16 | <g:render template="/shared/messages" /> |
---|
| 17 | <filterpane:currentCriteria domainBean="InventoryItemPurchase" |
---|
| 18 | action="search" |
---|
| 19 | dateFormat="EEE, dd-MMM-yyyy" |
---|
| 20 | removeImgDir="images" |
---|
| 21 | removeImgFile="bullet_delete.png" |
---|
| 22 | title="Advanced Search"/> |
---|
| 23 | |
---|
| 24 | <div class="paginateButtons"> |
---|
| 25 | <span class="searchButtons"> |
---|
| 26 | <a href='' onclick="showElement('searchPane'); return false;">Quick</a> |
---|
| 27 | </span> |
---|
| 28 | Results: ${inventoryItemPurchaseList.size()} / ${inventoryItemPurchaseTotal} |
---|
| 29 | <span class="searchButtons"> |
---|
| 30 | <filterpane:filterButton text="Advanced" appliedText="Advanced" /> |
---|
| 31 | </span> |
---|
| 32 | </div> |
---|
| 33 | |
---|
| 34 | <jsUtil:toggleControl toggleId="options" |
---|
| 35 | imageId="optionsImg" |
---|
| 36 | closedImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_right.png')}" |
---|
| 37 | openImgUrl="${resource(dir:'images/skin',file:'bullet_arrow_down.png')}" |
---|
| 38 | text="${g.message(code: 'default.options.text')}" |
---|
| 39 | /> |
---|
| 40 | |
---|
| 41 | <div id="options" style="display:none;"> |
---|
[570] | 42 | <g:form method="post" action="setSearchParamsMax" > |
---|
[468] | 43 | <g:hiddenField name="params" value="${filterParams}" /> |
---|
| 44 | <div class="dialog"> |
---|
| 45 | <table> |
---|
| 46 | <tbody> |
---|
| 47 | |
---|
| 48 | <tr class="prop"> |
---|
| 49 | <td valign="top" class="name"> |
---|
| 50 | <label for="max">Results per page:</label> |
---|
| 51 | </td> |
---|
| 52 | <td valign="top" class="value"> |
---|
| 53 | <input type="text" maxlength="4" id="description" name="newMax" value="${params.max}"/> |
---|
| 54 | |
---|
| 55 | <span class="buttons"> |
---|
| 56 | <g:actionSubmit action="setSearchParamsMax" class="go" value="Update" /> |
---|
| 57 | </span> |
---|
| 58 | </td> |
---|
| 59 | </tr> |
---|
| 60 | |
---|
| 61 | </tbody> |
---|
| 62 | </table> |
---|
| 63 | </div> |
---|
| 64 | <export:formats params="${filterParams}" formats="['csv', 'excel', 'pdf', 'rtf']"/> |
---|
| 65 | </g:form> |
---|
| 66 | </div> |
---|
| 67 | |
---|
| 68 | <br /> |
---|
| 69 | |
---|
| 70 | <g:if test="${inventoryItemPurchaseList.size() > 10}"> |
---|
| 71 | <g:if test="${inventoryItemPurchaseTotal > inventoryItemPurchaseList.size()}"> |
---|
| 72 | <div class="paginateButtons"> |
---|
[615] | 73 | <g:paginate action="search" total="${inventoryItemPurchaseTotal}" params="${filterParams}" /> |
---|
[468] | 74 | </div> |
---|
| 75 | </g:if> |
---|
| 76 | </g:if> |
---|
| 77 | |
---|
| 78 | <g:if test="${inventoryItemPurchaseList.size() > 0}"> |
---|
| 79 | <div class="list"> |
---|
| 80 | <table> |
---|
| 81 | <thead> |
---|
| 82 | <tr> |
---|
| 83 | <g:sortableColumn property="purchaseOrderNumber" |
---|
[618] | 84 | title="Order #" |
---|
| 85 | params="${filterParams}" /> |
---|
[605] | 86 | <g:sortableColumn property="date" |
---|
[618] | 87 | title="Date" |
---|
| 88 | params="${filterParams}" /> |
---|
| 89 | <g:sortableColumn property="inventoryItem" |
---|
| 90 | title="Inventory Item" |
---|
| 91 | params="${filterParams}" /> |
---|
[468] | 92 | <g:sortableColumn property="costCode" |
---|
[618] | 93 | title="Cost Code" |
---|
| 94 | params="${filterParams}" /> |
---|
[468] | 95 | <g:sortableColumn property="quantity" |
---|
[618] | 96 | title="Quantity" |
---|
| 97 | params="${filterParams}" /> |
---|
[468] | 98 | <g:sortableColumn property="orderValueAmount" |
---|
[618] | 99 | title="Order \$" |
---|
| 100 | params="${filterParams}" /> |
---|
[468] | 101 | <g:sortableColumn property="inventoryItemPurchaseType" |
---|
[618] | 102 | title="Type" |
---|
| 103 | params="${filterParams}" /> |
---|
[468] | 104 | <th> |
---|
| 105 | <img src="${resource(dir:'images/skin',file:'database_go_grey.png')}" alt="Show" title="Show" /> |
---|
| 106 | </th> |
---|
| 107 | <th> |
---|
| 108 | <img src="${resource(dir:'images/skin',file:'basket_put_grey.png')}" alt="Receive" title="Receive" /> |
---|
| 109 | </th> |
---|
| 110 | <th> |
---|
| 111 | <img src="${resource(dir:'images/skin',file:'tick_grey.png')}" alt="Approve" title="Approve Payment" /> |
---|
| 112 | </th> |
---|
| 113 | </tr> |
---|
| 114 | </thead> |
---|
| 115 | <tbody> |
---|
| 116 | <g:each in="${inventoryItemPurchaseList}" status="i" var="purchase"> |
---|
| 117 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/> |
---|
| 118 | |
---|
[595] | 119 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[468] | 120 | ${fieldValue(bean:purchase, field:'purchaseOrderNumber')} |
---|
| 121 | </td> |
---|
[620] | 122 | <td style="width:75px;" onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[605] | 123 | <g:formatDate date="${purchase.date}" format="EEE, dd-MMM-yyyy"/> |
---|
[468] | 124 | </td> |
---|
[595] | 125 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[618] | 126 | <b>${fieldValue(bean:purchase, field:'inventoryItem')}</b><br/> |
---|
| 127 | ${purchase.inventoryItem.description?.encodeAsHTML()} |
---|
[468] | 128 | </td> |
---|
[595] | 129 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[618] | 130 | <b>${fieldValue(bean:purchase, field:'costCode')}</b><br/> |
---|
| 131 | <g:if test="${purchase.invoiceNumber}"> |
---|
| 132 | Invoice # ${fieldValue(bean:purchase, field:'invoiceNumber')}<br/> |
---|
| 133 | </g:if> |
---|
| 134 | ${fieldValue(bean:purchase, field:'comment')} |
---|
| 135 | </td> |
---|
| 136 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[468] | 137 | ${fieldValue(bean:purchase, field:'quantity')} |
---|
| 138 | </td> |
---|
[595] | 139 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[468] | 140 | ${fieldValue(bean:purchase, field:'orderValueAmount')} |
---|
| 141 | ${fieldValue(bean:purchase, field:'orderValueCurrency')} |
---|
| 142 | </td> |
---|
[595] | 143 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[468] | 144 | ${fieldValue(bean:purchase, field:'inventoryItemPurchaseType')} |
---|
| 145 | </td> |
---|
[498] | 146 | <td class="notClickable"> |
---|
[595] | 147 | <g:link controller="inventoryItemPurchaseDetailed" action="show" params="[id: purchase.id, returnTo: 'search']"> |
---|
[468] | 148 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" title="Show" /> |
---|
| 149 | </g:link> |
---|
| 150 | </td> |
---|
[595] | 151 | |
---|
[468] | 152 | <g:if test="${purchase.inventoryItemPurchaseType.id == 1}"> |
---|
| 153 | <g:if test="${!purchase.receivedComplete}"> |
---|
[498] | 154 | <td class="notClickable"> |
---|
[595] | 155 | <g:link controller="inventoryItemPurchaseDetailed" action="receive" params="[id: purchase.id, returnTo: 'search']"> |
---|
[468] | 156 | <img src="${resource(dir:'images/skin',file:'basket_put.png')}" alt="Receive" title="Receive" /> |
---|
| 157 | </g:link> |
---|
| 158 | </td> |
---|
[595] | 159 | <td class="notClickable"> |
---|
| 160 | </td> |
---|
[468] | 161 | </g:if> |
---|
| 162 | <g:else> |
---|
[498] | 163 | <td class="notClickable"> |
---|
[468] | 164 | </td> |
---|
[595] | 165 | <td class="notClickable"> |
---|
| 166 | </td> |
---|
[468] | 167 | </g:else> |
---|
[595] | 168 | </g:if> |
---|
| 169 | <g:elseif test="${(purchase.inventoryItemPurchaseType.id == 2)||(purchase.inventoryItemPurchaseType.id == 3)}"> |
---|
[468] | 170 | <g:if test="${!purchase.invoicePaymentApproved}"> |
---|
[498] | 171 | <td class="notClickable"> |
---|
[595] | 172 | </td> |
---|
| 173 | <td class="notClickable"> |
---|
| 174 | <g:link controller="inventoryItemPurchaseDetailed" action="approveInvoicePayment" params="[id: purchase.id, returnTo: 'search']"> |
---|
[468] | 175 | <img src="${resource(dir:'images/skin',file:'tick.png')}" alt="Approve" title="Approve Payment" /> |
---|
| 176 | </g:link> |
---|
| 177 | </td> |
---|
| 178 | </g:if> |
---|
| 179 | <g:else> |
---|
[498] | 180 | <td class="notClickable"> |
---|
[468] | 181 | </td> |
---|
[595] | 182 | <td class="notClickable"> |
---|
| 183 | </td> |
---|
[468] | 184 | </g:else> |
---|
[595] | 185 | </g:elseif> |
---|
[468] | 186 | <g:else> |
---|
[498] | 187 | <td class="notClickable"> |
---|
[468] | 188 | </td> |
---|
[498] | 189 | <td class="notClickable"> |
---|
[468] | 190 | </td> |
---|
| 191 | </g:else> |
---|
| 192 | |
---|
| 193 | </tr> |
---|
| 194 | </g:each> |
---|
| 195 | </tbody> |
---|
| 196 | </table> |
---|
| 197 | </div> |
---|
| 198 | </g:if> |
---|
| 199 | <div class="paginateButtons"> |
---|
[615] | 200 | <g:paginate action="search" total="${inventoryItemPurchaseTotal}" params="${filterParams}" /> |
---|
[468] | 201 | </div> |
---|
| 202 | |
---|
| 203 | <filterpane:filterPane domainBean="InventoryItemPurchase" |
---|
| 204 | title="Advanced Search" |
---|
| 205 | action="search" |
---|
| 206 | class="overlayPane" |
---|
[605] | 207 | excludeProperties="orderValueCurrency, dateCreated" |
---|
[734] | 208 | associatedProperties="inventoryItemPurchaseType.name, supplier.name" |
---|
[468] | 209 | filterPropertyValues="${['inventoryItemPurchaseType.name':[values:InventoryItemPurchaseType.findAllByIsActive(true)], |
---|
[734] | 210 | 'supplier.name':[values:Supplier.findAllByIsActive(true).sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) }], |
---|
[605] | 211 | date:[years: associatedPropertyValues.yearRange,precision:'day'] |
---|
[468] | 212 | ]}"/> |
---|
| 213 | </div> <!-- end body --> |
---|
| 214 | |
---|
| 215 | <!-- Start Search Pane --> |
---|
| 216 | <div class="overlayPane" id="searchPane" style="display:none;"> |
---|
| 217 | <h2>Quick Search</h2> |
---|
| 218 | <g:form method="post" id="searchForm" name="searchForm" > |
---|
| 219 | <table> |
---|
| 220 | <tbody> |
---|
| 221 | |
---|
| 222 | <tr class="prop"> |
---|
| 223 | <td valign="top" class="name"> |
---|
| 224 | <label>Type:</label> |
---|
| 225 | </td> |
---|
| 226 | <td valign="top" class="value"> |
---|
| 227 | <g:link controller="inventoryItemPurchaseDetailed" |
---|
| 228 | action="search" |
---|
| 229 | params="[quickSearch: 'searchAllOrders']"> |
---|
| 230 | All Orders |
---|
| 231 | </g:link> |
---|
| 232 | <br /> |
---|
| 233 | <g:link controller="inventoryItemPurchaseDetailed" |
---|
| 234 | action="search" |
---|
| 235 | params="[quickSearch: 'searchAllReceived']"> |
---|
| 236 | All Received |
---|
| 237 | </g:link> |
---|
| 238 | </td> |
---|
| 239 | </tr> |
---|
| 240 | |
---|
| 241 | </tbody> |
---|
| 242 | </table> |
---|
| 243 | <div class="buttons"> |
---|
| 244 | <span class="button"> |
---|
| 245 | <input type="button" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" /> |
---|
| 246 | </span> |
---|
| 247 | </div> |
---|
| 248 | </g:form> |
---|
| 249 | </div> <!-- end search pane --> |
---|
| 250 | |
---|
| 251 | </body> |
---|
| 252 | </html> |
---|