[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"> |
---|
| 12 | <h1>Inventory Purchases</h1> |
---|
| 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;"> |
---|
| 42 | <g:form method="post" > |
---|
| 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"> |
---|
| 73 | <g:paginate total="${inventoryItemPurchaseTotal}" params="${filterParams}" /> |
---|
| 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}" /> |
---|
| 85 | <g:sortableColumn property="dateEntered" |
---|
| 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 | |
---|
| 112 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
| 113 | ${fieldValue(bean:purchase, field:'purchaseOrderNumber')} |
---|
| 114 | </td> |
---|
| 115 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
| 116 | <g:formatDate date="${purchase.dateEntered}" format="EEE, dd-MMM-yyyy"/> |
---|
| 117 | </td> |
---|
| 118 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
| 119 | ${fieldValue(bean:purchase, field:'costCode')} |
---|
| 120 | </td> |
---|
| 121 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
| 122 | ${fieldValue(bean:purchase, field:'quantity')} |
---|
| 123 | </td> |
---|
| 124 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
| 125 | ${fieldValue(bean:purchase, field:'orderValueAmount')} |
---|
| 126 | ${fieldValue(bean:purchase, field:'orderValueCurrency')} |
---|
| 127 | </td> |
---|
| 128 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
| 129 | ${fieldValue(bean:purchase, field:'invoiceNumber')} |
---|
| 130 | </td> |
---|
| 131 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
| 132 | ${fieldValue(bean:purchase, field:'inventoryItemPurchaseType')} |
---|
| 133 | </td> |
---|
[498] | 134 | <td class="notClickable"> |
---|
[468] | 135 | <g:link controller="inventoryItemPurchaseDetailed" action="show" id="${purchase.id}"> |
---|
| 136 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" title="Show" /> |
---|
| 137 | </g:link> |
---|
| 138 | </td> |
---|
| 139 | <g:if test="${purchase.inventoryItemPurchaseType.id == 1}"> |
---|
| 140 | <g:if test="${!purchase.receivedComplete}"> |
---|
[498] | 141 | <td class="notClickable"> |
---|
[468] | 142 | <g:link controller="inventoryItemPurchaseDetailed" action="receive" id="${purchase.id}"> |
---|
| 143 | <img src="${resource(dir:'images/skin',file:'basket_put.png')}" alt="Receive" title="Receive" /> |
---|
| 144 | </g:link> |
---|
| 145 | </td> |
---|
| 146 | </g:if> |
---|
| 147 | <g:else> |
---|
[498] | 148 | <td class="notClickable"> |
---|
[468] | 149 | </td> |
---|
| 150 | </g:else> |
---|
| 151 | <g:if test="${!purchase.invoicePaymentApproved}"> |
---|
[498] | 152 | <td class="notClickable"> |
---|
[468] | 153 | <g:link controller="inventoryItemPurchaseDetailed" action="approveInvoicePayment" id="${purchase.id}"> |
---|
| 154 | <img src="${resource(dir:'images/skin',file:'tick.png')}" alt="Approve" title="Approve Payment" /> |
---|
| 155 | </g:link> |
---|
| 156 | </td> |
---|
| 157 | </g:if> |
---|
| 158 | <g:else> |
---|
[498] | 159 | <td class="notClickable"> |
---|
[468] | 160 | </td> |
---|
| 161 | </g:else> |
---|
| 162 | </g:if> |
---|
| 163 | <g:else> |
---|
[498] | 164 | <td class="notClickable"> |
---|
[468] | 165 | </td> |
---|
[498] | 166 | <td class="notClickable"> |
---|
[468] | 167 | </td> |
---|
| 168 | </g:else> |
---|
| 169 | |
---|
| 170 | </tr> |
---|
| 171 | </g:each> |
---|
| 172 | </tbody> |
---|
| 173 | </table> |
---|
| 174 | </div> |
---|
| 175 | </g:if> |
---|
| 176 | <div class="paginateButtons"> |
---|
| 177 | <g:paginate total="${inventoryItemPurchaseTotal}" params="${filterParams}" /> |
---|
| 178 | </div> |
---|
| 179 | |
---|
| 180 | <filterpane:filterPane domainBean="InventoryItemPurchase" |
---|
| 181 | title="Advanced Search" |
---|
| 182 | action="search" |
---|
| 183 | class="overlayPane" |
---|
| 184 | excludeProperties="orderValueCurrency" |
---|
| 185 | associatedProperties="inventoryItemPurchaseType.name" |
---|
| 186 | filterPropertyValues="${['inventoryItemPurchaseType.name':[values:InventoryItemPurchaseType.findAllByIsActive(true)], |
---|
| 187 | dateEntered:[years:2020..2000,precision:'day'] |
---|
| 188 | ]}"/> |
---|
| 189 | </div> <!-- end body --> |
---|
| 190 | |
---|
| 191 | <!-- Start Search Pane --> |
---|
| 192 | <div class="overlayPane" id="searchPane" style="display:none;"> |
---|
| 193 | <h2>Quick Search</h2> |
---|
| 194 | <g:form method="post" id="searchForm" name="searchForm" > |
---|
| 195 | <table> |
---|
| 196 | <tbody> |
---|
| 197 | |
---|
| 198 | <tr class="prop"> |
---|
| 199 | <td valign="top" class="name"> |
---|
| 200 | <label>Type:</label> |
---|
| 201 | </td> |
---|
| 202 | <td valign="top" class="value"> |
---|
| 203 | <g:link controller="inventoryItemPurchaseDetailed" |
---|
| 204 | action="search" |
---|
| 205 | params="[quickSearch: 'searchAllOrders']"> |
---|
| 206 | All Orders |
---|
| 207 | </g:link> |
---|
| 208 | <br /> |
---|
| 209 | <g:link controller="inventoryItemPurchaseDetailed" |
---|
| 210 | action="search" |
---|
| 211 | params="[quickSearch: 'searchAllReceived']"> |
---|
| 212 | All Received |
---|
| 213 | </g:link> |
---|
| 214 | </td> |
---|
| 215 | </tr> |
---|
| 216 | |
---|
| 217 | </tbody> |
---|
| 218 | </table> |
---|
| 219 | <div class="buttons"> |
---|
| 220 | <span class="button"> |
---|
| 221 | <input type="button" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" /> |
---|
| 222 | </span> |
---|
| 223 | </div> |
---|
| 224 | </g:form> |
---|
| 225 | </div> <!-- end search pane --> |
---|
| 226 | |
---|
| 227 | </body> |
---|
| 228 | </html> |
---|