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:hasErrors bean="${inventoryMovementInstance}"> |
---|
19 | <div class="errors"> |
---|
20 | <g:renderErrors bean="${inventoryMovementInstance}" as="list" /> |
---|
21 | </div> |
---|
22 | </g:hasErrors> |
---|
23 | |
---|
24 | <g:hasErrors bean="${inventoryItemInstance}"> |
---|
25 | <div class="errors"> |
---|
26 | <g:renderErrors bean="${inventoryItemInstance}" as="list" /> |
---|
27 | </div> |
---|
28 | </g:hasErrors> |
---|
29 | |
---|
30 | <richui:tabView id="tabView"> |
---|
31 | |
---|
32 | <richui:tabLabels> |
---|
33 | <richui:tabLabel selected="${showTab.inventory}" title="Inventory Item" /> |
---|
34 | <richui:tabLabel selected="${showTab.detail}" title="Detail" /> |
---|
35 | <richui:tabLabel selected="${showTab.movement}" title="Movement" /> |
---|
36 | </richui:tabLabels> |
---|
37 | |
---|
38 | <richui:tabContents> |
---|
39 | |
---|
40 | <!-- Start Inventory tab --> |
---|
41 | <richui:tabContent> |
---|
42 | |
---|
43 | <g:if test="${inventoryMovementInstance}" > |
---|
44 | |
---|
45 | <g:form controller="inventoryItemDetailed" method="post" > |
---|
46 | <div class="dialog"> |
---|
47 | <table> |
---|
48 | <tbody> |
---|
49 | <g:hiddenField name="task.id" value="${inventoryMovementInstance.task.id}"/> |
---|
50 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}"/> |
---|
51 | <tr class="prop"> |
---|
52 | <td valign="top" class="name">Use on task:</td> |
---|
53 | <td valign="top" class="value"> |
---|
54 | <g:link controller="taskDetailed" action="show" id="${inventoryMovementInstance.task.id}" > |
---|
55 | ${Task.get(inventoryMovementInstance.task.id).encodeAsHTML()} |
---|
56 | </g:link> |
---|
57 | </td> |
---|
58 | </tr> |
---|
59 | |
---|
60 | <tr class="prop"> |
---|
61 | <td valign="top" class="name"> |
---|
62 | <label for="quantity">Quantity:</label> |
---|
63 | </td> |
---|
64 | <td valign="top"> |
---|
65 | <input class="medium ${hasErrors(bean:inventoryMovementInstance,field:'quantity','errors')}" |
---|
66 | type="text" id="quantity" name="quantity" |
---|
67 | value="${fieldValue(bean:inventoryMovementInstance,field:'quantity')}"/> |
---|
68 | ${inventoryItemInstance.unitOfMeasure?.encodeAsHTML()} |
---|
69 | |
---|
70 | <span class="buttons"> |
---|
71 | <g:actionSubmit action="useInventoryItem" class="save" value="${InventoryMovementType.get(1)}" /> |
---|
72 | </span> |
---|
73 | |
---|
74 | </td> |
---|
75 | </tr> |
---|
76 | |
---|
77 | </tbody> |
---|
78 | </table> |
---|
79 | </div> |
---|
80 | </g:form> |
---|
81 | |
---|
82 | <br /> |
---|
83 | |
---|
84 | </g:if> |
---|
85 | |
---|
86 | <div class="dialog"> |
---|
87 | <table> |
---|
88 | <tbody> |
---|
89 | |
---|
90 | <tr class="prop"> |
---|
91 | <td valign="top" class="name">Picture:</td> |
---|
92 | <td valign="top" class="value"> |
---|
93 | <g:if test="${inventoryItemInstance.picture}" > |
---|
94 | <span class='gallery'><wa:pictureLightboxAnchor picture="${inventoryItemInstance.picture}" size="${Image.Medium}" lightboxSize="${Image.Large}" target="_blank" title="Show Original" /></span> |
---|
95 | </g:if> |
---|
96 | <g:else> |
---|
97 | <g:link controller="pictureDetailed" |
---|
98 | params="['inventoryItem.id':inventoryItemInstance.id]" |
---|
99 | action="create"> |
---|
100 | Add Picture |
---|
101 | </g:link> |
---|
102 | </g:else> |
---|
103 | </td> |
---|
104 | </tr> |
---|
105 | |
---|
106 | <tr class="prop"> |
---|
107 | <td valign="top" class="name">Name:</td> |
---|
108 | |
---|
109 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'name')}</td> |
---|
110 | </tr> |
---|
111 | |
---|
112 | <tr class="prop"> |
---|
113 | <td valign="top" class="name">Description:</td> |
---|
114 | |
---|
115 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'description')}</td> |
---|
116 | </tr> |
---|
117 | |
---|
118 | <tr class="prop"> |
---|
119 | <td valign="top" class="name">In Stock:</td> |
---|
120 | |
---|
121 | <td valign="top" class="value"> |
---|
122 | ${fieldValue(bean:inventoryItemInstance, field:'unitsInStock')} ${inventoryItemInstance.unitOfMeasure.encodeAsHTML()} |
---|
123 | </td> |
---|
124 | </tr> |
---|
125 | |
---|
126 | <tr class="prop"> |
---|
127 | <td valign="top" class="name">Location:</td> |
---|
128 | |
---|
129 | <td valign="top" class="value"> |
---|
130 | <g:link controller="inventoryLocationDetailed" action="show" id="${inventoryItemInstance.inventoryLocation?.id}"> |
---|
131 | ${inventoryItemInstance.inventoryLocation?.encodeAsHTML()} |
---|
132 | </g:link> |
---|
133 | in ${inventoryItemInstance.inventoryLocation?.inventoryStore.encodeAsHTML()} |
---|
134 | </td> |
---|
135 | </tr> |
---|
136 | |
---|
137 | <tr class="prop"> |
---|
138 | <td valign="top" class="name">Active:</td> |
---|
139 | |
---|
140 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isActive')}</td> |
---|
141 | </tr> |
---|
142 | |
---|
143 | <tr class="prop"> |
---|
144 | <td valign="top" class="name">Alternate Items:</td> |
---|
145 | |
---|
146 | <td valign="top" style="text-align:left;" class="value"> |
---|
147 | <ul> |
---|
148 | <g:each var="a" in="${inventoryItemInstance.alternateItems}"> |
---|
149 | <li><g:link controller="inventoryItemDetailed" action="show" id="${a.id}">${a?.encodeAsHTML()}</g:link></li> |
---|
150 | </g:each> |
---|
151 | </ul> |
---|
152 | </td> |
---|
153 | </tr> |
---|
154 | |
---|
155 | <tr class="prop"> |
---|
156 | <td valign="top" class="name">Spare For:</td> |
---|
157 | |
---|
158 | <td valign="top" style="text-align:left;" class="value"> |
---|
159 | <ul> |
---|
160 | <g:each var="s" in="${ inventoryItemInstance.spareFor.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
161 | <li><g:link controller="assetDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
162 | </g:each> |
---|
163 | </ul> |
---|
164 | </td> |
---|
165 | </tr> |
---|
166 | |
---|
167 | </tbody> |
---|
168 | </table> |
---|
169 | </div> |
---|
170 | <div class="buttons"> |
---|
171 | <g:form> |
---|
172 | <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> |
---|
173 | <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> |
---|
174 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
175 | </g:form> |
---|
176 | </div> |
---|
177 | |
---|
178 | <br /> |
---|
179 | |
---|
180 | </richui:tabContent> |
---|
181 | <!-- End Inventory tab --> |
---|
182 | |
---|
183 | <!-- Start Detail tab --> |
---|
184 | <richui:tabContent> |
---|
185 | |
---|
186 | <div class="dialog"> |
---|
187 | <table> |
---|
188 | <tbody> |
---|
189 | |
---|
190 | <tr class="prop"> |
---|
191 | <td valign="top" class="name">Id:</td> |
---|
192 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'id')}</td> |
---|
193 | </tr> |
---|
194 | |
---|
195 | <tr class="prop"> |
---|
196 | <td valign="top" class="name">Obsolete:</td> |
---|
197 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'isObsolete')}</td> |
---|
198 | </tr> |
---|
199 | |
---|
200 | <tr class="prop"> |
---|
201 | <td valign="top" class="name">Inventory Group:</td> |
---|
202 | <td valign="top" class="value">${inventoryItemInstance.inventoryGroup?.encodeAsHTML()}</td> |
---|
203 | </tr> |
---|
204 | |
---|
205 | <tr class="prop"> |
---|
206 | <td valign="top" class="name">Inventory Type:</td> |
---|
207 | <td valign="top" class="value">${inventoryItemInstance.inventoryType?.encodeAsHTML()}</td> |
---|
208 | </tr> |
---|
209 | |
---|
210 | <tr class="prop"> |
---|
211 | <td valign="top" class="name">Reorder Point:</td> |
---|
212 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'reorderPoint')}</td> |
---|
213 | </tr> |
---|
214 | |
---|
215 | <tr class="prop"> |
---|
216 | <td valign="top" class="name">Enable Reorder:</td> |
---|
217 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'enableReorder')}</td> |
---|
218 | </tr> |
---|
219 | |
---|
220 | <tr class="prop"> |
---|
221 | <td valign="top" class="name">Recommended Reorder Point:</td> |
---|
222 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'recommendedReorderPoint')}</td> |
---|
223 | </tr> |
---|
224 | |
---|
225 | <tr class="prop"> |
---|
226 | <td valign="top" class="name">Estimated Unit Price:</td> |
---|
227 | |
---|
228 | <td valign="top" class="value"> |
---|
229 | <g:if test="${inventoryItemInstance.estimatedUnitPriceAmount}"> |
---|
230 | ${inventoryItemInstance.estimatedUnitPriceAmount.encodeAsHTML()} |
---|
231 | ${inventoryItemInstance.estimatedUnitPriceCurrency.encodeAsHTML()} |
---|
232 | </g:if> |
---|
233 | </td> |
---|
234 | </tr> |
---|
235 | |
---|
236 | <tr class="prop"> |
---|
237 | <td valign="top" class="name">Suppliers Part Number:</td> |
---|
238 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'suppliersPartNumber')}</td> |
---|
239 | </tr> |
---|
240 | |
---|
241 | <tr class="prop"> |
---|
242 | <td valign="top" class="name">Suppliers:</td> |
---|
243 | |
---|
244 | <td valign="top" style="text-align:left;" class="value"> |
---|
245 | <ul> |
---|
246 | <g:each var="s" in="${ inventoryItemInstance.suppliers.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
247 | <li><g:link controller="supplierDetailed" action="show" id="${s.id}">${s?.encodeAsHTML()}</g:link></li> |
---|
248 | </g:each> |
---|
249 | </ul> |
---|
250 | </td> |
---|
251 | </tr> |
---|
252 | |
---|
253 | <tr class="prop"> |
---|
254 | <td valign="top" class="name">Average Delivery Time:</td> |
---|
255 | <td valign="top" class="value"> |
---|
256 | ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryTime')} |
---|
257 | ${fieldValue(bean:inventoryItemInstance, field:'averageDeliveryPeriod')} |
---|
258 | </td> |
---|
259 | </tr> |
---|
260 | |
---|
261 | <tr class="prop"> |
---|
262 | <td valign="top" class="name">Manufacturers Part Number:</td> |
---|
263 | <td valign="top" class="value">${fieldValue(bean:inventoryItemInstance, field:'manufacturersPartNumber')}</td> |
---|
264 | </tr> |
---|
265 | |
---|
266 | <tr class="prop"> |
---|
267 | <td valign="top" class="name">Manufacturers:</td> |
---|
268 | |
---|
269 | <td valign="top" style="text-align:left;" class="value"> |
---|
270 | <ul> |
---|
271 | <g:each var="m" in="${ inventoryItemInstance.manufacturers.sort { p1, p2 -> p1.name.compareToIgnoreCase(p2.name) } }"> |
---|
272 | <li><g:link controller="manufacturerDetailed" action="show" id="${m.id}">${m?.encodeAsHTML()}</g:link></li> |
---|
273 | </g:each> |
---|
274 | </ul> |
---|
275 | </td> |
---|
276 | </tr> |
---|
277 | |
---|
278 | |
---|
279 | </tbody> |
---|
280 | </table> |
---|
281 | </div> |
---|
282 | <div class="buttons"> |
---|
283 | <g:form> |
---|
284 | <g:hiddenField name="id" value="${inventoryItemInstance.id}" /> |
---|
285 | <span class="button"><g:actionSubmit class="edit" value="Edit" /></span> |
---|
286 | <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span> |
---|
287 | </g:form> |
---|
288 | </div> |
---|
289 | </richui:tabContent> |
---|
290 | <!-- End Detail tab --> |
---|
291 | |
---|
292 | <!-- Start Movement tab --> |
---|
293 | <richui:tabContent> |
---|
294 | |
---|
295 | <g:if test="${inventoryMovementList.isEmpty()}"> |
---|
296 | <br /> |
---|
297 | No Inventory Movements. |
---|
298 | <br /> |
---|
299 | <br /> |
---|
300 | |
---|
301 | <div class="buttons"> |
---|
302 | <g:form controller="inventoryMovementDetailed"> |
---|
303 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
304 | <span class="button"><g:actionSubmit action="create" class="add" value="Create" /></span> |
---|
305 | </g:form> |
---|
306 | </div> |
---|
307 | |
---|
308 | </g:if> |
---|
309 | <g:else> |
---|
310 | |
---|
311 | <div class="list"> |
---|
312 | <table> |
---|
313 | <thead> |
---|
314 | <tr> |
---|
315 | <th>Quantity</th> |
---|
316 | <th>Movement Type</th> |
---|
317 | <th>Date</th> |
---|
318 | <th>Person</th> |
---|
319 | <th></th> |
---|
320 | </tr> |
---|
321 | </thead> |
---|
322 | <tbody> |
---|
323 | <g:each in="${inventoryMovementList}" status="i" var="movements"> |
---|
324 | <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/inventoryMovementDetailed/show/${movements.id}"'/> |
---|
325 | |
---|
326 | <td>${fieldValue(bean:movements, field:'quantity')}</td> |
---|
327 | <td>${fieldValue(bean:movements, field:'inventoryMovementType')}</td> |
---|
328 | <td><g:formatDate date="${movements.date}" format="EEE, dd-MMM-yyyy"/></td> |
---|
329 | <td>${fieldValue(bean:movements, field:'person')}</td> |
---|
330 | <td> |
---|
331 | <g:link controller="inventoryMovementDetailed" action="show" id="${movements.id}"> |
---|
332 | <img src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" /> |
---|
333 | </g:link> |
---|
334 | </td> |
---|
335 | |
---|
336 | </tr> |
---|
337 | </g:each> |
---|
338 | </tbody> |
---|
339 | </table> |
---|
340 | </div> |
---|
341 | |
---|
342 | <div class="buttons"> |
---|
343 | <g:form controller="inventoryMovementDetailed"> |
---|
344 | <g:hiddenField name="inventoryItem.id" value="${inventoryItemInstance.id}" /> |
---|
345 | <g:if test="${inventoryMovementListTotal > inventoryMovementListMax}"> |
---|
346 | Showing ${inventoryMovementListMax} of ${inventoryMovementListTotal} |
---|
347 | <br /> |
---|
348 | </g:if> |
---|
349 | <g:else> |
---|
350 | Total ${inventoryMovementListTotal} |
---|
351 | <br /> |
---|
352 | </g:else> |
---|
353 | <span class="button"><g:actionSubmit action="listInventoryMovements" class="table" value="List" /></span> |
---|
354 | <span class="button"><g:actionSubmit action="create" class="add" value="Create" /></span> |
---|
355 | </g:form> |
---|
356 | </div> |
---|
357 | |
---|
358 | </g:else> |
---|
359 | |
---|
360 | </richui:tabContent> |
---|
361 | <!-- End Movement tab --> |
---|
362 | |
---|
363 | </richui:tabContents> |
---|
364 | </richui:tabView> |
---|
365 | |
---|
366 | |
---|
367 | </div> |
---|
368 | </body> |
---|
369 | </html> |
---|