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 | <nav:renderSubItems group="navAlt"/> |
---|
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" action="setSearchParamsMax" > |
---|
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 action="search" 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 #" |
---|
85 | params="${filterParams}" /> |
---|
86 | <g:sortableColumn property="date" |
---|
87 | title="Date" |
---|
88 | params="${filterParams}" /> |
---|
89 | <g:sortableColumn property="inventoryItem" |
---|
90 | title="Inventory Item" |
---|
91 | params="${filterParams}" /> |
---|
92 | <g:sortableColumn property="costCode" |
---|
93 | title="Cost Code" |
---|
94 | params="${filterParams}" /> |
---|
95 | <g:sortableColumn property="quantity" |
---|
96 | title="Quantity" |
---|
97 | params="${filterParams}" /> |
---|
98 | <g:sortableColumn property="orderValueAmount" |
---|
99 | title="Order \$" |
---|
100 | params="${filterParams}" /> |
---|
101 | <g:sortableColumn property="inventoryItemPurchaseType" |
---|
102 | title="Type" |
---|
103 | params="${filterParams}" /> |
---|
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 | |
---|
119 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
120 | ${fieldValue(bean:purchase, field:'purchaseOrderNumber')} |
---|
121 | </td> |
---|
122 | <td style="width:75px;" onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
123 | <g:formatDate date="${purchase.date}" format="EEE, dd-MMM-yyyy"/> |
---|
124 | </td> |
---|
125 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
126 | <b>${fieldValue(bean:purchase, field:'inventoryItem')}</b><br/> |
---|
127 | ${purchase.inventoryItem.description?.encodeAsHTML()} |
---|
128 | </td> |
---|
129 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
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"'> |
---|
137 | ${fieldValue(bean:purchase, field:'quantity')} |
---|
138 | </td> |
---|
139 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
140 | ${fieldValue(bean:purchase, field:'orderValueAmount')} |
---|
141 | ${fieldValue(bean:purchase, field:'orderValueCurrency')} |
---|
142 | </td> |
---|
143 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}?returnTo=search"'> |
---|
144 | ${fieldValue(bean:purchase, field:'inventoryItemPurchaseType')} |
---|
145 | </td> |
---|
146 | <td class="notClickable"> |
---|
147 | <g:link controller="inventoryItemPurchaseDetailed" action="show" params="[id: purchase.id, returnTo: 'search']"> |
---|
148 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" title="Show" /> |
---|
149 | </g:link> |
---|
150 | </td> |
---|
151 | |
---|
152 | <g:if test="${purchase.inventoryItemPurchaseType.id == 1}"> |
---|
153 | <g:if test="${!purchase.receivedComplete}"> |
---|
154 | <td class="notClickable"> |
---|
155 | <g:link controller="inventoryItemPurchaseDetailed" action="receive" params="[id: purchase.id, returnTo: 'search']"> |
---|
156 | <img src="${resource(dir:'images/skin',file:'basket_put.png')}" alt="Receive" title="Receive" /> |
---|
157 | </g:link> |
---|
158 | </td> |
---|
159 | <td class="notClickable"> |
---|
160 | </td> |
---|
161 | </g:if> |
---|
162 | <g:else> |
---|
163 | <td class="notClickable"> |
---|
164 | </td> |
---|
165 | <td class="notClickable"> |
---|
166 | </td> |
---|
167 | </g:else> |
---|
168 | </g:if> |
---|
169 | <g:elseif test="${(purchase.inventoryItemPurchaseType.id == 2)||(purchase.inventoryItemPurchaseType.id == 3)}"> |
---|
170 | <g:if test="${!purchase.invoicePaymentApproved}"> |
---|
171 | <td class="notClickable"> |
---|
172 | </td> |
---|
173 | <td class="notClickable"> |
---|
174 | <g:link controller="inventoryItemPurchaseDetailed" action="approveInvoicePayment" params="[id: purchase.id, returnTo: 'search']"> |
---|
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> |
---|
180 | <td class="notClickable"> |
---|
181 | </td> |
---|
182 | <td class="notClickable"> |
---|
183 | </td> |
---|
184 | </g:else> |
---|
185 | </g:elseif> |
---|
186 | <g:else> |
---|
187 | <td class="notClickable"> |
---|
188 | </td> |
---|
189 | <td class="notClickable"> |
---|
190 | </td> |
---|
191 | </g:else> |
---|
192 | |
---|
193 | </tr> |
---|
194 | </g:each> |
---|
195 | </tbody> |
---|
196 | </table> |
---|
197 | </div> |
---|
198 | </g:if> |
---|
199 | <div class="paginateButtons"> |
---|
200 | <g:paginate action="search" total="${inventoryItemPurchaseTotal}" params="${filterParams}" /> |
---|
201 | </div> |
---|
202 | |
---|
203 | <filterpane:filterPane domainBean="InventoryItemPurchase" |
---|
204 | title="Advanced Search" |
---|
205 | action="search" |
---|
206 | class="overlayPane" |
---|
207 | excludeProperties="orderValueCurrency, dateCreated" |
---|
208 | associatedProperties="inventoryItemPurchaseType.name" |
---|
209 | filterPropertyValues="${['inventoryItemPurchaseType.name':[values:InventoryItemPurchaseType.findAllByIsActive(true)], |
---|
210 | date:[years: associatedPropertyValues.yearRange,precision:'day'] |
---|
211 | ]}"/> |
---|
212 | </div> <!-- end body --> |
---|
213 | |
---|
214 | <!-- Start Search Pane --> |
---|
215 | <div class="overlayPane" id="searchPane" style="display:none;"> |
---|
216 | <h2>Quick Search</h2> |
---|
217 | <g:form method="post" id="searchForm" name="searchForm" > |
---|
218 | <table> |
---|
219 | <tbody> |
---|
220 | |
---|
221 | <tr class="prop"> |
---|
222 | <td valign="top" class="name"> |
---|
223 | <label>Type:</label> |
---|
224 | </td> |
---|
225 | <td valign="top" class="value"> |
---|
226 | <g:link controller="inventoryItemPurchaseDetailed" |
---|
227 | action="search" |
---|
228 | params="[quickSearch: 'searchAllOrders']"> |
---|
229 | All Orders |
---|
230 | </g:link> |
---|
231 | <br /> |
---|
232 | <g:link controller="inventoryItemPurchaseDetailed" |
---|
233 | action="search" |
---|
234 | params="[quickSearch: 'searchAllReceived']"> |
---|
235 | All Received |
---|
236 | </g:link> |
---|
237 | </td> |
---|
238 | </tr> |
---|
239 | |
---|
240 | </tbody> |
---|
241 | </table> |
---|
242 | <div class="buttons"> |
---|
243 | <span class="button"> |
---|
244 | <input type="button" value="${g.message(code:'fp.tag.filterPane.button.cancel.text', default:'Cancel')}" onclick="return hideElement('searchPane');" /> |
---|
245 | </span> |
---|
246 | </div> |
---|
247 | </g:form> |
---|
248 | </div> <!-- end search pane --> |
---|
249 | |
---|
250 | </body> |
---|
251 | </html> |
---|