1 | |
---|
2 | |
---|
3 | <html> |
---|
4 | <head> |
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
---|
6 | <meta name="layout" content="main" /> |
---|
7 | <title>Show InventoryItem</title> |
---|
8 | <nav:resources override="true"/> |
---|
9 | <resource:tabView skin="tabviewCustom" /> |
---|
10 | <g:render template="/shared/pictureHead" /> |
---|
11 | </head> |
---|
12 | <body> |
---|
13 | <div class="nav"> |
---|
14 | <nav:renderSubItems group="nav"/> |
---|
15 | </div> |
---|
16 | <div class="body"> |
---|
17 | <g:render template="/shared/messages" /> |
---|
18 | <g:if test="${inventoryItemInstance.isObsolete || !inventoryItemInstance.isActive}" > |
---|
19 | <div class="errors"> |
---|
20 | <ul> |
---|
21 | <g:if test="${inventoryItemInstance.isObsolete}" > |
---|
22 | <li><g:message code="inventory.item.is.obsolete" /><li> |
---|
23 | </g:if> |
---|
24 | <g:if test="${!inventoryItemInstance.isActive}" > |
---|
25 | <li><g:message code="inventory.item.not.active" /><li> |
---|
26 | </g:if> |
---|
27 | <ul> |
---|
28 | </div> |
---|
29 | </g:if> |
---|
30 | <g:hasErrors bean="${inventoryMovementInstance}"> |
---|
31 | <div class="errors"> |
---|
32 | <g:renderErrors bean="${inventoryMovementInstance}" as="list" /> |
---|
33 | </div> |
---|
34 | </g:hasErrors> |
---|
35 | |
---|
36 | <g:hasErrors bean="${inventoryItemInstance}"> |
---|
37 | <div class="errors"> |
---|
38 | <g:renderErrors bean="${inventoryItemInstance}" as="list" /> |
---|
39 | </div> |
---|
40 | </g:hasErrors> |
---|
41 | |
---|
42 | <div class="tabHeader"> |
---|
43 | <h1> |
---|
44 | ${inventoryItemInstance.name} |
---|
45 | </h1> |
---|
46 | ${fieldValue(bean:inventoryItemInstance, field:'description')} |
---|
47 | </div> |
---|
48 | |
---|
49 | <br/> |
---|
50 | |
---|
51 | <richui:tabView id="tabView"> |
---|
52 | |
---|
53 | <richui:tabLabels> |
---|
54 | <richui:tabLabel selected="${showTab.inventory}" title="Inventory Item" /> |
---|
55 | <richui:tabLabel selected="${showTab.detail}" title="Detail" /> |
---|
56 | <g:if test="${!inventoryMovementList.isEmpty()}"> |
---|
57 | <richui:tabLabel selected="${showTab.movement}" title="Movement (${inventoryMovementList.size()})" /> |
---|
58 | </g:if> |
---|
59 | <g:else> |
---|
60 | <richui:tabLabel selected="${showTab.movement}" title="Movement" /> |
---|
61 | </g:else> |
---|
62 | <g:if test="${!inventoryItemPurchases.isEmpty()}"> |
---|
63 | <richui:tabLabel selected="${showTab.purchasing}" title="Purchasing (${inventoryItemPurchases.size()})" /> |
---|
64 | </g:if> |
---|
65 | <g:else> |
---|
66 | <richui:tabLabel selected="${showTab.purchasing}" title="Purchasing" /> |
---|
67 | </g:else> |
---|
68 | </richui:tabLabels> |
---|
69 | |
---|
70 | <richui:tabContents> |
---|
71 | |
---|
72 | <!-- Start Inventory tab --> |
---|
73 | <richui:tabContent> |
---|
74 | |
---|
75 | <g:if test="${inventoryMovementInstance}" > |
---|
76 | |
---|
77 | <div id="useInventoryItemDiv" style="display:inline"> <!-- inline required for IE --> |
---|
78 | <div class="pane_close" > |
---|
79 | <g:remoteLink action="clearUseInventoryItem" update="useInventoryItemDiv"> |
---|
80 | <img src="${resource(dir:'images/skin',file:'cross.png')}" alt="Clear" title="Clear"/> |
---|
81 | </g:remoteLink> |
---|
82 | </div> |
---|
83 | <g:form controller="inventoryItemDetailed" action="useInventoryItem" method="post" > |
---|
84 | <div class="dialog"> |
---|
85 | <table> |
---|
86 | <tbody> |
---|
87 | <g:hiddenField name="task.id" value="${inventoryMovementInstance.task.id}"/> |
---|
88 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}"/> |
---|
89 | <tr class="prop"> |
---|
90 | <td valign="top" class="name">Use on task:</td> |
---|
91 | <td valign="top" class="value"> |
---|
92 | <g:link controller="taskDetailed" action="show" id="${inventoryMovementInstance.task.id}" > |
---|
93 | ${Task.get(inventoryMovementInstance.task.id).encodeAsHTML()} |
---|
94 | </g:link> |
---|
95 | </td> |
---|
96 | </tr> |
---|
97 | |
---|
98 | <tr class="prop"> |
---|
99 | <td valign="top" class="name"> |
---|
100 | <label for="quantity">Quantity:</label> |
---|
101 | </td> |
---|
102 | <td valign="top"> |
---|
103 | <input class="medium ${hasErrors(bean:inventoryMovementInstance,field:'quantity','errors')}" |
---|
104 | type="text" id="quantity" name="quantity" |
---|
105 | value="${fieldValue(bean:inventoryMovementInstance,field:'quantity')}"/> |
---|
106 | ${inventoryItemInstance.unitOfMeasure?.encodeAsHTML()} |
---|
107 | |
---|
108 | <span class="buttons"> |
---|
109 | <g:actionSubmit action="useInventoryItem" class="save" value="${InventoryMovementType.read(1)}" /> |
---|
110 | </span> |
---|
111 | |
---|
112 | </td> |
---|
113 | </tr> |
---|
114 | |
---|
115 | </tbody> |
---|
116 | </table> |
---|
117 | </div> |
---|
118 | </g:form> |
---|
119 | |
---|
120 | <br /> |
---|
121 | </div> |
---|
122 | |
---|
123 | </g:if> |
---|
124 | |
---|
125 | <div class="dialog"> |
---|
126 | <table> |
---|
127 | <tbody> |
---|
128 | |
---|
129 | <tr class="prop"> |
---|
130 | <td valign="top" class="name">Picture:</td> |
---|
131 | <td valign="top" class="value"> |
---|
132 | <g:if test="${inventoryItemInstance.picture}" > |
---|
133 | <span class='gallery'><wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" size="${Image.Medium}" lightboxSize="${Image.Large}" target="_blank" title="Show Original" /></span> |
---|
134 | </g:if> |
---|
135 | <g:else> |
---|
136 | <g:link controller="pictureDetailed" |
---|
137 | params="['inventoryItem.id':inventoryItemInstance.id]" |
---|
138 | action="create"> |
---|
139 | Add Picture |
---|
140 | </g:link> |
---|
141 | </g:else> |
---|
142 | </td> |
---|
143 | </tr> |
---|
144 | |
---|
145 | <tr class="prop"> |
---|
146 | <td valign="top" class="name">Comment:</td> |
---|
147 | |
---|
148 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'comment')}</td> |
---|
149 | </tr> |
---|
150 | |
---|
151 | <tr class="prop"> |
---|
152 | <td valign="top" class="name">In Stock:</td> |
---|
153 | |
---|
154 | <td valign="top" class="value"> |
---|
155 | ${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')} ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
156 | </td> |
---|
157 | </tr> |
---|
158 | |
---|
159 | <tr class="prop"> |
---|
160 | <td valign="top" class="name">Location:</td> |
---|
161 | |
---|
162 | <td valign="top" class="value"> |
---|
163 | <g:link controller="inventoryLocationDetailed" action="show" id="${inventoryItemInstance.inventoryLocation?.id}"> |
---|
164 | ${inventoryItemInstance.inventoryLocation?.encodeAsHTML()} |
---|
165 | </g:link> |
---|
166 | in ${inventoryItemInstance.inventoryLocation?.inventoryStore.encodeAsHTML()} |
---|
167 | </td> |
---|
168 | </tr> |
---|
169 | |
---|
170 | <tr class="prop"> |
---|
171 | <td valign="top" class="name">Active:</td> |
---|
172 | |
---|
173 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isActive')}</td> |
---|
174 | </tr> |
---|
175 | |
---|
176 | <tr class="prop"> |
---|
177 | <td valign="top" class="name">Alternate Items:</td> |
---|
178 | |
---|
179 | <td valign="top" style="text-align:left;" class="value"> |
---|
180 | <ul> |
---|
181 | <g:each var="a" in="${ inventoryItemInstance.alternateItems.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
182 | <li><g:link controller="inventoryItemDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
183 | </g:each> |
---|
184 | </ul> |
---|
185 | </td> |
---|
186 | </tr> |
---|
187 | |
---|
188 | <tr class="prop"> |
---|
189 | <td valign="top" class="name">Spare For:</td> |
---|
190 | |
---|
191 | <td valign="top" style="text-align:left;" class="value"> |
---|
192 | <ul> |
---|
193 | <g:each var="s" in="${ inventoryItemInstance.spareFor.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
194 | <li><g:link controller="assetDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
195 | </g:each> |
---|
196 | </ul> |
---|
197 | </td> |
---|
198 | </tr> |
---|
199 | |
---|
200 | </tbody> |
---|
201 | </table> |
---|
202 | </div> |
---|
203 | <div class="buttons"> |
---|
204 | <g:form> |
---|
205 | <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> |
---|
206 | <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> |
---|
207 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
208 | </g:form> |
---|
209 | </div> |
---|
210 | |
---|
211 | <br /> |
---|
212 | |
---|
213 | </richui:tabContent> |
---|
214 | <!-- End Inventory tab --> |
---|
215 | |
---|
216 | <!-- Start Detail tab --> |
---|
217 | <richui:tabContent> |
---|
218 | |
---|
219 | <div class="dialog"> |
---|
220 | <table> |
---|
221 | <tbody> |
---|
222 | |
---|
223 | <tr class="prop"> |
---|
224 | <td valign="top" class="name">Id:</td> |
---|
225 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'id')}</td> |
---|
226 | </tr> |
---|
227 | |
---|
228 | <tr class="prop"> |
---|
229 | <td valign="top" class="name">Obsolete:</td> |
---|
230 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isObsolete')}</td> |
---|
231 | </tr> |
---|
232 | |
---|
233 | <tr class="prop"> |
---|
234 | <td valign="top" class="name">Inventory Group:</td> |
---|
235 | <td valign="top" class="value">${inventoryItemInstance.inventoryGroup?.encodeAsHTML()}</td> |
---|
236 | </tr> |
---|
237 | |
---|
238 | <tr class="prop"> |
---|
239 | <td valign="top" class="name">Inventory Type:</td> |
---|
240 | <td valign="top" class="value">${inventoryItemInstance.inventoryType?.encodeAsHTML()}</td> |
---|
241 | </tr> |
---|
242 | |
---|
243 | <tr class="prop"> |
---|
244 | <td valign="top" class="name">Reorder Point:</td> |
---|
245 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'reorderPoint')}</td> |
---|
246 | </tr> |
---|
247 | |
---|
248 | <tr class="prop"> |
---|
249 | <td valign="top" class="name">Enable Reorder:</td> |
---|
250 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'enableReorder')}</td> |
---|
251 | </tr> |
---|
252 | |
---|
253 | <tr class="prop"> |
---|
254 | <td valign="top" class="name">Recommended Reorder Point:</td> |
---|
255 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'recommendedReorderPoint')}</td> |
---|
256 | </tr> |
---|
257 | |
---|
258 | <tr class="prop"> |
---|
259 | <td valign="top" class="name">Estimated Unit Price:</td> |
---|
260 | |
---|
261 | <td valign="top" class="value"> |
---|
262 | <g:if test="${inventoryItemInstance.estimatedUnitPriceAmount}"> |
---|
263 | ${inventoryItemInstance.estimatedUnitPriceAmount.encodeAsHTML()} |
---|
264 | ${inventoryItemInstance.estimatedUnitPriceCurrency.encodeAsHTML()} |
---|
265 | </g:if> |
---|
266 | </td> |
---|
267 | </tr> |
---|
268 | |
---|
269 | <tr class="prop"> |
---|
270 | <td valign="top" class="name">Suppliers Part Number:</td> |
---|
271 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'suppliersPartNumber')}</td> |
---|
272 | </tr> |
---|
273 | |
---|
274 | <tr class="prop"> |
---|
275 | <td valign="top" class="name">Preferred Supplier:</td> |
---|
276 | |
---|
277 | <td valign="top" style="text-align:left;" class="value"> |
---|
278 | <g:link controller="supplierDetailed" action="show" id="${inventoryItemInstance.preferredSupplier?.id}"> |
---|
279 | ${inventoryItemInstance.preferredSupplier?.encodeAsHTML()} |
---|
280 | </g:link> |
---|
281 | </td> |
---|
282 | </tr> |
---|
283 | |
---|
284 | <tr class="prop"> |
---|
285 | <td valign="top" class="name">Alternate Suppliers:</td> |
---|
286 | |
---|
287 | <td valign="top" style="text-align:left;" class="value"> |
---|
288 | <ul> |
---|
289 | <g:each var="s" in="${ inventoryItemInstance.alternateSuppliers.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
290 | <li><g:link controller="supplierDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
291 | </g:each> |
---|
292 | </ul> |
---|
293 | </td> |
---|
294 | </tr> |
---|
295 | |
---|
296 | <tr class="prop"> |
---|
297 | <td valign="top" class="name">Average Delivery Time:</td> |
---|
298 | <td valign="top" class="value"> |
---|
299 | ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryTime')} |
---|
300 | ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryPeriod')} |
---|
301 | </td> |
---|
302 | </tr> |
---|
303 | |
---|
304 | <tr class="prop"> |
---|
305 | <td valign="top" class="name">Manufacturers Part Number:</td> |
---|
306 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'manufacturersPartNumber')}</td> |
---|
307 | </tr> |
---|
308 | |
---|
309 | <tr class="prop"> |
---|
310 | <td valign="top" class="name">Preferred Manufacturer:</td> |
---|
311 | |
---|
312 | <td valign="top" style="text-align:left;" class="value"> |
---|
313 | <g:link controller="manufacturerDetailed" action="show" id="${inventoryItemInstance.preferredManufacturer?.id}"> |
---|
314 | ${inventoryItemInstance.preferredManufacturer?.encodeAsHTML()} |
---|
315 | </g:link> |
---|
316 | </td> |
---|
317 | </tr> |
---|
318 | |
---|
319 | <tr class="prop"> |
---|
320 | <td valign="top" class="name">Alternate Manufacturers:</td> |
---|
321 | |
---|
322 | <td valign="top" style="text-align:left;" class="value"> |
---|
323 | <ul> |
---|
324 | <g:each var="m" in="${ inventoryItemInstance.alternateManufacturers.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
325 | <li><g:link controller="manufacturerDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
326 | </g:each> |
---|
327 | </ul> |
---|
328 | </td> |
---|
329 | </tr> |
---|
330 | |
---|
331 | |
---|
332 | </tbody> |
---|
333 | </table> |
---|
334 | </div> |
---|
335 | <div class="buttons"> |
---|
336 | <g:form> |
---|
337 | <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> |
---|
338 | <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> |
---|
339 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
340 | </g:form> |
---|
341 | </div> |
---|
342 | </richui:tabContent> |
---|
343 | <!-- End Detail tab --> |
---|
344 | |
---|
345 | <!-- Start Movement tab --> |
---|
346 | <richui:tabContent> |
---|
347 | |
---|
348 | <g:if test="${inventoryMovementList.isEmpty()}"> |
---|
349 | <br /> |
---|
350 | No Inventory Movements. |
---|
351 | <br /> |
---|
352 | <br /> |
---|
353 | |
---|
354 | <div class="buttons"> |
---|
355 | <g:form controller="inventoryMovementDetailed"> |
---|
356 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
357 | <span class="button"><g:actionSubmit action="create" class="add" value="Create" /></span> |
---|
358 | </g:form> |
---|
359 | </div> |
---|
360 | |
---|
361 | </g:if> |
---|
362 | <g:else> |
---|
363 | |
---|
364 | <div class="list"> |
---|
365 | <table> |
---|
366 | <thead> |
---|
367 | <tr> |
---|
368 | <th>Quantity</th> |
---|
369 | <th>Movement Type</th> |
---|
370 | <th>Date</th> |
---|
371 | <th>Person</th> |
---|
372 | <th></th> |
---|
373 | </tr> |
---|
374 | </thead> |
---|
375 | <tbody> |
---|
376 | <g:each in="${inventoryMovementList}" status="i" var="movements"> |
---|
377 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/> |
---|
378 | |
---|
379 | <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${movements.id}"'> |
---|
380 | ${fieldValue(bean:movements, field:'quantity')} |
---|
381 | </td> |
---|
382 | <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${movements.id}"'> |
---|
383 | ${fieldValue(bean:movements, field:'inventoryMovementType')} |
---|
384 | </td> |
---|
385 | <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${movements.id}"'> |
---|
386 | <g:formatDate date="${movements.date}" format="EEE, dd-MMM-yyyy"/> |
---|
387 | </td> |
---|
388 | <td onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${movements.id}"'> |
---|
389 | ${fieldValue(bean:movements, field:'person')} |
---|
390 | </td> |
---|
391 | |
---|
392 | <td class="notClickable"> |
---|
393 | <g:link controller="inventoryMovementDetailed" action="show" id="${movements.id}"> |
---|
394 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> |
---|
395 | </g:link> |
---|
396 | </td> |
---|
397 | |
---|
398 | </tr> |
---|
399 | </g:each> |
---|
400 | </tbody> |
---|
401 | </table> |
---|
402 | </div> |
---|
403 | |
---|
404 | <div class="buttons"> |
---|
405 | <g:form controller="inventoryMovementDetailed"> |
---|
406 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
407 | <g:if test="${inventoryMovementListTotal > inventoryMovementListMax}"> |
---|
408 | Showing ${inventoryMovementListMax} of ${inventoryMovementListTotal} |
---|
409 | <br /> |
---|
410 | </g:if> |
---|
411 | <g:else> |
---|
412 | Total ${inventoryMovementListTotal} |
---|
413 | <br /> |
---|
414 | </g:else> |
---|
415 | <span class="button"><g:actionSubmit action="listInventoryMovements" class="table" value="List" /></span> |
---|
416 | <span class="button"><g:actionSubmit action="create" class="add" value="Create" /></span> |
---|
417 | </g:form> |
---|
418 | </div> |
---|
419 | |
---|
420 | </g:else> |
---|
421 | |
---|
422 | </richui:tabContent> |
---|
423 | <!-- End Movement tab --> |
---|
424 | |
---|
425 | <!-- Start Purchases tab --> |
---|
426 | <richui:tabContent> |
---|
427 | |
---|
428 | <g:if test="${inventoryItemPurchases.isEmpty()}"> |
---|
429 | <br /> |
---|
430 | No Inventory Purchases. |
---|
431 | <br /> |
---|
432 | <br /> |
---|
433 | |
---|
434 | <div class="buttons"> |
---|
435 | <g:form controller="inventoryItemPurchaseDetailed"> |
---|
436 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
437 | <span class="button"><g:actionSubmit action="create" class="add" value="Order" /></span> |
---|
438 | </g:form> |
---|
439 | </div> |
---|
440 | |
---|
441 | </g:if> |
---|
442 | <g:else> |
---|
443 | |
---|
444 | <div class="list"> |
---|
445 | <table> |
---|
446 | <thead> |
---|
447 | <tr> |
---|
448 | <g:sortableColumn action="show" property="purchaseOrderNumber" |
---|
449 | title="Order #" params="[paginate: 'purchases']" /> |
---|
450 | <g:sortableColumn action="show" property="dateEntered" |
---|
451 | title="Date" params="[paginate: 'purchases']" /> |
---|
452 | <g:sortableColumn action="show" property="costCode" |
---|
453 | title="Cost Code" params="[paginate: 'purchases']" /> |
---|
454 | <g:sortableColumn action="show" property="quantity" |
---|
455 | title="Quantity" params="[paginate: 'purchases']" /> |
---|
456 | <g:sortableColumn action="show" property="orderValueAmount" |
---|
457 | title="Order \$" params="[paginate: 'purchases']" /> |
---|
458 | <g:sortableColumn action="show" property="invoiceNumber" |
---|
459 | title="Invoice Number" params="[paginate: 'purchases']" /> |
---|
460 | <g:sortableColumn action="show" property="inventoryItemPurchaseType" |
---|
461 | title="Type" params="[paginate: 'purchases']" /> |
---|
462 | <th> |
---|
463 | <img src="${resource(dir:'images/skin',file:'database_go_grey.png')}" alt="Show" title="Show" /> |
---|
464 | </th> |
---|
465 | <th> |
---|
466 | <img src="${resource(dir:'images/skin',file:'basket_put_grey.png')}" alt="Receive" title="Receive" /> |
---|
467 | </th> |
---|
468 | <th> |
---|
469 | <img src="${resource(dir:'images/skin',file:'tick_grey.png')}" alt="Approve" title="Approve Payment" /> |
---|
470 | </th> |
---|
471 | </tr> |
---|
472 | </thead> |
---|
473 | <tbody> |
---|
474 | <g:each in="${inventoryItemPurchases}" status="i" var="purchase"> |
---|
475 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}"/> |
---|
476 | |
---|
477 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
478 | ${fieldValue(bean:purchase, field:'purchaseOrderNumber')} |
---|
479 | </td> |
---|
480 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
481 | <g:formatDate date="${purchase.dateEntered}" format="EEE, dd-MMM-yyyy"/> |
---|
482 | </td> |
---|
483 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
484 | ${fieldValue(bean:purchase, field:'costCode')} |
---|
485 | </td> |
---|
486 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
487 | ${fieldValue(bean:purchase, field:'quantity')} |
---|
488 | </td> |
---|
489 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
490 | ${fieldValue(bean:purchase, field:'orderValueAmount')} |
---|
491 | ${fieldValue(bean:purchase, field:'orderValueCurrency')} |
---|
492 | </td> |
---|
493 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
494 | ${fieldValue(bean:purchase, field:'invoiceNumber')} |
---|
495 | </td> |
---|
496 | <td onclick='window.location = "${request.getContextPath()}/inventoryItemPurchaseDetailed/show/${purchase.id}"'> |
---|
497 | ${fieldValue(bean:purchase, field:'inventoryItemPurchaseType')} |
---|
498 | </td> |
---|
499 | <td class="notClickable"> |
---|
500 | <g:link controller="inventoryItemPurchaseDetailed" action="show" id="${purchase.id}"> |
---|
501 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" title="Show" /> |
---|
502 | </g:link> |
---|
503 | </td> |
---|
504 | |
---|
505 | <g:if test="${purchase.inventoryItemPurchaseType.id == 1}"> |
---|
506 | <g:if test="${!purchase.receivedComplete}"> |
---|
507 | <td class="notClickable"> |
---|
508 | <g:link controller="inventoryItemPurchaseDetailed" action="receive" params="[id: purchase.id, returnTo: 'inventoryItem']"> |
---|
509 | <img src="${resource(dir:'images/skin',file:'basket_put.png')}" alt="Receive" title="Receive" /> |
---|
510 | </g:link> |
---|
511 | </td> |
---|
512 | <td class="notClickable"> |
---|
513 | </td> |
---|
514 | </g:if> |
---|
515 | <g:else> |
---|
516 | <td class="notClickable"> |
---|
517 | </td> |
---|
518 | <td class="notClickable"> |
---|
519 | </td> |
---|
520 | </g:else> |
---|
521 | </g:if> |
---|
522 | <g:elseif test="${(purchase.inventoryItemPurchaseType.id == 2)||(purchase.inventoryItemPurchaseType.id == 3)}"> |
---|
523 | <g:if test="${!purchase.invoicePaymentApproved}"> |
---|
524 | <td class="notClickable"> |
---|
525 | </td> |
---|
526 | <td class="notClickable"> |
---|
527 | <g:link controller="inventoryItemPurchaseDetailed" action="approveInvoicePayment" params="[id: purchase.id, returnTo: 'inventoryItem']"> |
---|
528 | <img src="${resource(dir:'images/skin',file:'tick.png')}" alt="Approve" title="Approve Payment" /> |
---|
529 | </g:link> |
---|
530 | </td> |
---|
531 | </g:if> |
---|
532 | <g:else> |
---|
533 | <td class="notClickable"> |
---|
534 | </td> |
---|
535 | <td class="notClickable"> |
---|
536 | </td> |
---|
537 | </g:else> |
---|
538 | </g:elseif> |
---|
539 | <g:else> |
---|
540 | <td class="notClickable"> |
---|
541 | </td> |
---|
542 | <td class="notClickable"> |
---|
543 | </td> |
---|
544 | </g:else> |
---|
545 | |
---|
546 | </tr> |
---|
547 | </g:each> |
---|
548 | </tbody> |
---|
549 | </table> |
---|
550 | </div> |
---|
551 | |
---|
552 | <div class="buttons"> |
---|
553 | <g:form controller="inventoryItemPurchaseDetailed"> |
---|
554 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
555 | Results: ${inventoryItemPurchases.size()} / ${inventoryItemPurchasesTotal} |
---|
556 | <span class="button"><g:actionSubmit action="create" class="add" value="Order" /></span> |
---|
557 | </g:form> |
---|
558 | </div> |
---|
559 | |
---|
560 | <div class="paginateButtons"> |
---|
561 | <g:paginate action="show" |
---|
562 | id="${inventoryItemInstance?.id}" |
---|
563 | total="${inventoryItemPurchasesTotal}" |
---|
564 | params="[paginate: 'purchases']" /> |
---|
565 | </div> |
---|
566 | |
---|
567 | </g:else> |
---|
568 | |
---|
569 | </richui:tabContent> |
---|
570 | <!-- End Movement tab --> |
---|
571 | |
---|
572 | </richui:tabContents> |
---|
573 | </richui:tabView> |
---|
574 | |
---|
575 | </div> |
---|
576 | </body> |
---|
577 | </html> |
---|