[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" |
---|
| 84 | title="Order #" params="${filterParams}" /> |
---|
[605] | 85 | <g:sortableColumn property="date" |
---|
[468] | 86 | title="Date" params="${filterParams}" /> |
---|
| 87 | <g:sortableColumn property="costCode" |
---|
| 88 | title="Cost Code" params="${filterParams}" /> |
---|
| 89 | <g:sortableColumn property="quantity" |
---|
| 90 | title="Quantity" params="${filterParams}" /> |
---|
| 91 | <g:sortableColumn property="orderValueAmount" |
---|
| 92 | title="Order \$" params="${filterParams}" /> |
---|
| 93 | <g:sortableColumn property="invoiceNumber" |
---|
| 94 | title="Invoice Number" params="${filterParams}" /> |
---|
| 95 | <g:sortableColumn property="inventoryItemPurchaseType" |
---|
| 96 | title="Type" params="${filterParams}" /> |
---|
| 97 | <th> |
---|
| 98 | <img src="${resource(dir:'images/skin',file:'database_go_grey.png')}" alt="Show" title="Show" /> |
---|
| 99 | </th> |
---|
| 100 | <th> |
---|
| 101 | <img src="${resource(dir:'images/skin',file:'basket_put_grey.png')}" alt="Receive" title="Receive" /> |
---|
| 102 | </th> |
---|
| 103 | <th> |
---|
| 104 | <img src="${resource(dir:'images/skin',file:'tick_grey.png')}" alt="Approve" title="Approve Payment" /> |
---|
| 105 | </th> |
---|
| 106 | </tr> |
---|
| 107 | </thead> |
---|
| 108 | <tbody> |
---|
| 109 | <g:each in="${inventoryItemPurchaseList}" status="i" var="purchase"> |
---|
| 110 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/> |
---|
| 111 | |
---|
[595] | 112 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[468] | 113 | ${fieldValue(bean:purchase, field:'purchaseOrderNumber')} |
---|
| 114 | </td> |
---|
[595] | 115 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[605] | 116 | <g:formatDate date="${purchase.date}" format="EEE, dd-MMM-yyyy"/> |
---|
[468] | 117 | </td> |
---|
[595] | 118 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[468] | 119 | ${fieldValue(bean:purchase, field:'costCode')} |
---|
| 120 | </td> |
---|
[595] | 121 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[468] | 122 | ${fieldValue(bean:purchase, field:'quantity')} |
---|
| 123 | </td> |
---|
[595] | 124 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[468] | 125 | ${fieldValue(bean:purchase, field:'orderValueAmount')} |
---|
| 126 | ${fieldValue(bean:purchase, field:'orderValueCurrency')} |
---|
| 127 | </td> |
---|
[595] | 128 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[468] | 129 | ${fieldValue(bean:purchase, field:'invoiceNumber')} |
---|
| 130 | </td> |
---|
[595] | 131 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
[468] | 132 | ${fieldValue(bean:purchase, field:'inventoryItemPurchaseType')} |
---|
| 133 | </td> |
---|
[498] | 134 | <td class="notClickable"> |
---|
[595] | 135 | <g:link controller="inventoryItemPurchaseDetailed" action="show" params="[id: purchase.id, returnTo: 'search']"> |
---|
[468] | 136 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" title="Show" /> |
---|
| 137 | </g:link> |
---|
| 138 | </td> |
---|
[595] | 139 | |
---|
[468] | 140 | <g:if test="${purchase.inventoryItemPurchaseType.id == 1}"> |
---|
| 141 | <g:if test="${!purchase.receivedComplete}"> |
---|
[498] | 142 | <td class="notClickable"> |
---|
[595] | 143 | <g:link controller="inventoryItemPurchaseDetailed" action="receive" params="[id: purchase.id, returnTo: 'search']"> |
---|
[468] | 144 | <img src="${resource(dir:'images/skin',file:'basket_put.png')}" alt="Receive" title="Receive" /> |
---|
| 145 | </g:link> |
---|
| 146 | </td> |
---|
[595] | 147 | <td class="notClickable"> |
---|
| 148 | </td> |
---|
[468] | 149 | </g:if> |
---|
| 150 | <g:else> |
---|
[498] | 151 | <td class="notClickable"> |
---|
[468] | 152 | </td> |
---|
[595] | 153 | <td class="notClickable"> |
---|
| 154 | </td> |
---|
[468] | 155 | </g:else> |
---|
[595] | 156 | </g:if> |
---|
| 157 | <g:elseif test="${(purchase.inventoryItemPurchaseType.id == 2)||(purchase.inventoryItemPurchaseType.id == 3)}"> |
---|
[468] | 158 | <g:if test="${!purchase.invoicePaymentApproved}"> |
---|
[498] | 159 | <td class="notClickable"> |
---|
[595] | 160 | </td> |
---|
| 161 | <td class="notClickable"> |
---|
| 162 | <g:link controller="inventoryItemPurchaseDetailed" action="approveInvoicePayment" params="[id: purchase.id, returnTo: 'search']"> |
---|
[468] | 163 | <img src="${resource(dir:'images/skin',file:'tick.png')}" alt="Approve" title="Approve Payment" /> |
---|
| 164 | </g:link> |
---|
| 165 | </td> |
---|
| 166 | </g:if> |
---|
| 167 | <g:else> |
---|
[498] | 168 | <td class="notClickable"> |
---|
[468] | 169 | </td> |
---|
[595] | 170 | <td class="notClickable"> |
---|
| 171 | </td> |
---|
[468] | 172 | </g:else> |
---|
[595] | 173 | </g:elseif> |
---|
[468] | 174 | <g:else> |
---|
[498] | 175 | <td class="notClickable"> |
---|
[468] | 176 | </td> |
---|
[498] | 177 | <td class="notClickable"> |
---|
[468] | 178 | </td> |
---|
| 179 | </g:else> |
---|
| 180 | |
---|
| 181 | </tr> |
---|
| 182 | </g:each> |
---|
| 183 | </tbody> |
---|
| 184 | </table> |
---|
| 185 | </div> |
---|
| 186 | </g:if> |
---|
| 187 | <div class="paginateButtons"> |
---|
[615] | 188 | <g:paginate action="search" total="${inventoryItemPurchaseTotal}" params="${filterParams}" /> |
---|
[468] | 189 | </div> |
---|
| 190 | |
---|
| 191 | <filterpane:filterPane domainBean="InventoryItemPurchase" |
---|
| 192 | title="Advanced Search" |
---|
| 193 | action="search" |
---|
| 194 | class="overlayPane" |
---|
[605] | 195 | excludeProperties="orderValueCurrency, dateCreated" |
---|
[468] | 196 | associatedProperties="inventoryItemPurchaseType.name" |
---|
| 197 | filterPropertyValues="${['inventoryItemPurchaseType.name':[values:InventoryItemPurchaseType.findAllByIsActive(true)], |
---|
[605] | 198 | date:[years: associatedPropertyValues.yearRange,precision:'day'] |
---|
[468] | 199 | ]}"/> |
---|
| 200 | </div> <!-- end body --> |
---|
| 201 | |
---|
| 202 | <!-- Start Search Pane --> |
---|
| 203 | <div class="overlayPane" id="searchPane" style="display:none;"> |
---|
| 204 | <h2>Quick Search</h2> |
---|
| 205 | <g:form method="post" id="searchForm" name="searchForm" > |
---|
| 206 | <table> |
---|
| 207 | <tbody> |
---|
| 208 | |
---|
| 209 | <tr class="prop"> |
---|
| 210 | <td valign="top" class="name"> |
---|
| 211 | <label>Type:</label> |
---|
| 212 | </td> |
---|
| 213 | <td valign="top" class="value"> |
---|
| 214 | <g:link controller="inventoryItemPurchaseDetailed" |
---|
| 215 | action="search" |
---|
| 216 | params="[quickSearch: 'searchAllOrders']"> |
---|
| 217 | All Orders |
---|
| 218 | </g:link> |
---|
| 219 | <br /> |
---|
| 220 | <g:link controller="inventoryItemPurchaseDetailed" |
---|
| 221 | action="search" |
---|
| 222 | params="[quickSearch: 'searchAllReceived']"> |
---|
| 223 | All Received |
---|
| 224 | </g:link> |
---|
| 225 | </td> |
---|
| 226 | </tr> |
---|
| 227 | |
---|
| 228 | </tbody> |
---|
| 229 | </table> |
---|
| 230 | <div class="buttons"> |
---|
| 231 | <span class="button"> |
---|
| 232 | <input type="button" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" /> |
---|
| 233 | </span> |
---|
| 234 | </div> |
---|
| 235 | </g:form> |
---|
| 236 | </div> <!-- end search pane --> |
---|
| 237 | |
---|
| 238 | </body> |
---|
| 239 | </html> |
---|